<script language="javascript" type="text/javascript">
    function validateAdd()
    {
        if(document.addNum.catName.value == 0 )
        {
            alert('<?php echo $numberLBL["selectCategory"];?>');
            document.addNum.catName.focus();
            return false;
        }
        
        if(document.addNum.number.value == "")
        {
            alert('<?php echo $numberLBL["enterMobileNumber"];?>');
            document.addNum.number.focus();
            return false;
        }	
    }
    </script>
    <form name="addNum" method="POST" action="numberModalAdd2.php" onsubmit="return validateAdd();" style="margin:0px">
   <div class="modal fade modal-fullscreen " style="z-index:10000;padding-<?php echo $align;?>:0px" id="addDirectNumbers" tabindex="-1" role="dialog" aria-labelledby="addDirectNumbersTitle" 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="addDirectNumbersTitle"><?php echo $button["add"];?></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="catNameId" class="col-form-label myModalLabel"> <?php echo $numberLBL["category"];?>:</label>
             	 <select name="catName" id="catNameId" class="form-control" style="padding: 0px">
                   <option value="0"><?php echo $numberLBL["selectCat"];?></option>
					<?php
                    $query  = "SELECT id, name FROM $userCategory WHERE userId='".$_SESSION["userId"]."'";
                    $result = mysqli_query($conn, $query);
                    $num = mysqli_num_rows($result);
                    while($row= mysqli_fetch_array($result))
                    {
                        ?>
                        <option value="<?php echo $row['id'];?>"><?php echo $row['name'];?></option>
                       <?php
                    }
                    ?>
                </select>
           		</div>
                
                <div class="form-group" style="margin-bottom: 0px">
              		<label class="col-form-label myModalLabel"> <?php echo $numberLBL["name"];?>:</label>
             	 	<input type="text" class="form-control" name="name">
           		</div>
                
                <div class="form-group" style="margin-bottom: 0px">
              		<label class="col-form-label myModalLabel"> <?php echo $numberLBL["number"];?>:</label>
             	 	<input type="text" class="form-control" name="number">
           		</div>
                
                <div class="form-group" style="margin-bottom: 0px">
              		<label class="col-form-label myModalLabel"> <?php echo $numberLBL["city"];?>:</label>
             	 	<input type="text" class="form-control" name="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["add"];?>' name="addFileBTN" class="btn bg-primary btn-flat text-white m-1">
            </div>
         </div>
      </div>
   </div>
        <input type="hidden" value="1" name="addDirect" />
</form>