<script language="javascript" type="text/javascript">
    function validateEdit()
    {
        if(document.editNum.number.value == 0 )
        {
            alert("<?php echo sprintf($insert,$numberLBL["mobile"]);?>");
            document.editNum.number.focus();
            return false;
        }
		
    }
    </script>
  <form method="POST" action="numberModalEdit2.php" target="_parent" name="editNum" onsubmit="return validateEdit();">
   <div class="modal fade modal-fullscreen " style="z-index:10000;padding-<?php echo $align;?>:0px" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalTitle" aria-hidden="true">
      <div class="modal-dialog modal-dialog-centered" role="document">
         <div class="modal-content text-right">
            <div class="modal-header modal-header-primary">
               <h5 class="modal-title" id="editModalTitle"><?php echo $numberLBL["editNumber"];?></h5>
               <button type="button" class="close slidedown" data-dismiss="modal" aria-label="Close">
               <span aria-hidden="true">&times;</span>
               </button>
            </div>
            <div class="modal-body" style="text-align: <?php echo $align;?>;">
               <div class="form-group" style="margin-bottom: 0px">
              	<label for="categoryId" class="col-form-label myModalLabel"> <?php echo $numberLBL["category"];?>:</label>
             	 <select name="categoryId" id="categoryId" class="form-control" style="padding: 0px">
                   <?php
						$queryCategory  = "select id,name from ".$userCategory." where userId='".$_SESSION["userId"]."' ";
						$resultCategory = mysqli_query($conn, $queryCategory);
						$numCategory = mysqli_num_rows($resultCategory);
						for($c=0;$c<$numCategory;$c++) {
							$rowCategory= mysqli_fetch_row($resultCategory);?>
							<option value='<?php echo $rowCategory[0];?>' <?php if(@$_POST["categoryId"]==$rowCategory[0]) echo "selected";?> ><?php echo $rowCategory[1]?></option>
							<?php
						}
                        ?>
                </select>
           		</div>
                <div class="form-group" style="margin-bottom: 0px">
              		<label for="name" class="col-form-label myModalLabel"> <?php echo $numberLBL["name"];?>:</label>
             	 	<input type="text" class="form-control" name="name" id="name">
           		</div>
                <div class="form-group" style="margin-bottom: 0px">
              		<label for="number" class="col-form-label myModalLabel"> <?php echo $numberLBL["mobile"];?>:</label>
             	 	<input type="text" class="form-control" name="number" id="number">
           		</div>
                <div class="form-group" style="margin-bottom: 0px">
              		<label for="city" class="col-form-label myModalLabel"> <?php echo $numberLBL["city"];?>:</label>
             	 	<input type="text" class="form-control" name="city" id="city">
           		</div>
                
            </div>
            
            <div class="modal-footer">
               <button type="button" class="btn bg-danger btn-flat text-white m-1" data-dismiss="modal"><?php echo $button["close"];?></button>
               <input type="submit" value='<?php echo $button["edit"];?>' id="submit2" class="btn bg-primary btn-flat text-white m-1">
            </div>
         </div>
      </div>
   </div>
   <input type="hidden" name="numberId" id="numberId22" />
    <input type="hidden" name="CatId" id="CatId" />
    <input type="hidden" name="pageStart" id="pageStart" value="<?php echo $_POST["start"]?>" />
</form>
