 
<center> 
 
  <!--NEW USER REGISTRATION FORM, DISPLAYED BY DEFAULTS IN PAGE LOAD-->
<table>
  <tr>
    
  <td valign="top" width="85%">
      <?php
    
 $MS=$myAgrocon->getThisMyShop($ownID,$shopid);
 if ($MS->rowCount()>0) {
  

 $shop=$MS->fetch();

  $shopid=$shop['shopid'];
                     }
     require_once('shopNavLink.php');

 /*
 <ul >
      <li>
                 <form action="myShopIemListView.php" method="post">

                     <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">


                     <input class="hi" type="hidden" name="shopid"  value="<?php echo $shopid;?>">

                    <input  class="spos" type="submit" value="My stock" name="post">

                 </form>

                </li>
       <li>
        
                <form action="newshopitempost.php" method="post">

                      <input class="hi" type="text" name="owniD"  value="<?php echo $ownID;?>">


                      <input class="hi" type="text" name="shopid"  value="<?php echo $shopid;?>">

 

                      <input  class="spos" type="submit" value="New item" name="post"  >

                 </form>

       </li>

       <li >
        
                <form action="OrderToMyShop.php" method="post">

                      <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">


                      <input class="hi" type="hidden" name="shopid"  value="<?php echo $shopid;?>">

 

                      <input  class="spos" type="submit" value="New order" name="post"  >

                 </form>

       </li>
        <li >
        
                <form action="shopWorkersProfile.php" method="post">

                      <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">


                      <input class="hi" type="hidden" name="shopid"  value="<?php echo $shopid;?>">

 

                      <input  class="spos" type="submit" value="Workers" name="post"  >

                 </form>

       </li>
  </ul>
  */
?>
  </td>

</tr>
</table>

<fieldset id="alt_new_user_reg_form">
<label id="reg_form_tile_label">Comfoirm the detail of employee </label></p/>
<i>Please comfoirm the detail of employee to register   -</i>
<form name="new_user_registration" id="new_user_registration" action="addComfirmedShopWorkersPro.php"  method="post">

<table border="0" id="reg_form_table">

<tr>                      <!--CARRY HOTEL ID AND ROOM ID-->

        <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">

        <input class="hi" type="hidden" name="shopid"  value="<?php echo $shopid;?>">

        <input class="hi" type="hidden" name="accountId"  value="<?php echo $accountId;?>">

        

                                                      <!--USERS NAME-->





<td  id="reg_form_table_cell" valign="bottom"><label id="main_label">Name:</label></td></tr>

 
<tr><td height="40px" valign="top">    <label id="mini_label">First Name<sup>*</sup></label> <br/> <sup id="nf"></sup>   </td>  

<td height="40px" valign="top"> <label id="mini_label">Middle Name </label>   <br><sup id="mn"></sup>   </td>


<td height="40px" valign="top"><label id="mini_label">Last Name<sup>*</sup></label><br><sup id="ln"></sup>

        </td></tr>


    <tr ><td id="reg_form_table_cell">
    
        <input type="text" name="fname" id="fname" class="prof_info" value="<?php echo $info['fname'];?>"  /> 
       
        </td>
        <td id="reg_form_table_cell">
        

         <input type="text" name="mname" id="mname" class="prof_info" value="<?php echo $info['mname'];?>" /><br/>
     
         
         </td>
     

    <td id="reg_form_table_cell">

    
        <input type="text" name="lname" id="lname" class="prof_info" value="<?php echo $info['lname'];?>" /><br/>
        
    </td></tr>
<tr>





                                                                             
                                                                             <!----CONTACT ADDRESS-->




<tr> <td colspan="3" id="reg_form_table_cell" valign="bottom">

<label id="main_label"  >Contact Address:</label>
 
</td>
</tr>


<tr><td height="40px" valign="top"> <label>E-mail<sup>*</sup></label><br><sup id="em"></sup></td>


<td height="40px" valign="top"><label id="mini_label">Phone Number1<sup>*</sup></label>
<br><sup id="p"></sup></td>


<td height="40px" valign="top"> <label id="mini_label">Phone Number2<sup>optional</sup></label></td></tr>
 

<tr><td id="reg_form_table_cell">
    
    
     <input type="email" name="email" id="email" class="prof_info" value="<?php echo $info['email'];?>" /><br/>
    
    
    </td>
     <td id="reg_form_table_cell">
     
     <input type="text" name="phoneno" id="phoneno" class="prof_info" value="<?php echo $info['phoneno'];?>" /><br/>
     
     </td>

      <td>
     
     <input type="text" name="phoneno2" id="phoneno2" class="prof_info" /><br/>
    

     </td>
</tr>






                               <!---USERS PLACE OF BIRTH-->


<tr>
<td colspan="3" id="reg_form_table_cell" valign="bottom">

<label id="main_label">Place of resident:</label> 
  
  </td>

</tr>
<tr>
   <td height="40px" valign="top"> <label id="mini_label">P.o.box<sup>optional</sup></label><br/></td>

   <td height="40px" valign="top">  <label id="mini_label">Street/Village<sup>*</sup></label><br><sup id="vs"></sup></td>

   <td height="40px" valign="top">   <label id="mini_label">Ward<sup>*</sup></label><br><sup id="w"></sup> </td>

</tr>




<tr><td id="reg_form_table_cell">

        <input type="text" name="pobox" id="pobox" class="prof_info" value="<?php echo $info['postAddress'];?>"/><br/>
       
    </td>
    <td id="reg_form_table_cell">

    
        <input type="text" name="street" id="street" class="prof_info" value="<?php echo $info['street'];?>" /><br/>
        
    </td>

    <td id="reg_form_table_cell">

    
        <input type="text" name="ward" id="ward" class="prof_info" value="<?php echo $info['ward'];?>" /><br/>
      
    </td>

    

<tr>
   <td height="40px" valign="top"> <label id="mini_label">Town/District<sup>*</sup></label> <br><sup id="ds"></sup></td>


   <td height="40px" valign="top">    <label id="mini_label">City/Region<sup>*</sup></label> <br><sup id="r"></sup></td>


   <td height="40px" valign="top"> <label id="mini_label">Country<sup>*</sup></label><br><sup id="c"></sup> </td>

</tr>



    <tr>


    <td id="reg_form_table_cell">
       
        <input type="text" name="district" id="district" class="prof_info" value="<?php echo $info['district'];?>" /><br/>
         
    </td>
    <td id="reg_form_table_cell">

   
        <input type="text" name="region" id="region" class="prof_info" value="<?php echo $info['city'];?>" /><br/>
      
    </td>

    <td id="reg_form_table_cell">

    
        <input type="text" name="country" id="country" class="prof_info" value="<?php echo $info['country'];?>" /><br/>
        
    </td>
</tr>








<!----PLACE OF BIRTH, AND PROFILE GENDER-->




<tr><td height="40px" valign="top">   <label id="main_label" >Gender<sup>*</sup></label>     <br><sup id="g"></sup></td>


<td   height="40px" valign="top"> <label id="main_label" >Date of birth<sup>*</sup>:</label> <br><sup id="ob"></sup> </td> 
 
 <td valign="bottom" id="reg_form_table_cell"> <label id="main_label">Occupation<sup>*</sup>:</label> <br><sup id="o"></sup> 
 </td>

 </tr>

 <tr>

      <td id="reg_form_table_cell">  <input name="gender" type="text" id="gender"  class="prof_info" value="<?php echo $info['gender'];?>"/>  
  
      <td   id="reg_form_table_cell"> 
      
      <input type="text" name="dob" id="dob" class="prof_info" value="<?php echo $info['dob'];?>"/> </td>
     
      <td id="reg_form_table_cell">

     <input type="text" name="occupation" id="occupation" class="prof_info" value="<?php echo $info['occupation'];?>" /><br/>
         
    </td>
</tr>




                                                                <!---USERS PASSWORD-->




<tr><td colspan="3" id="reg_form_table_cell" valign="bottom"><label id="main_label">Add employee's detail here:</label></td></tr> 

<tr><td colspan="2" height="40px" valign="top"><label id="mini_label">Employee job's title:<sup>*</sup></label><br><sup id="pwd"></sup></td>

<td  height="40px" valign="top">
         <label id="mini_label">Salary amount:<sup>*</sup></label>  <br><sup id="ss"></sup>  </td>

</tr>    


    <tr ><td colspan="2" id="reg_form_table_cell">

  
        <input type="text" name="jobtitle" id="jobtitle" class="prof_info"  /><br/>
        
        </td>
        <td id="reg_form_table_cell" >
       
         <input type="text" name="salary" id="salary" class="prof_info"/> 
     
         </td>

     
  </tr>



<tr id="">
  <td id="" align="right" id="reg_form_table_cell">
        <input type="submit"  name="submit" value="Submit" id="subownreg"/>
  </td>
  <td id="" colspan="2" align="left" id="reg_form_table_cell">
        <input type="reset" name="reset" value="Reset" id="btn"/>

   </td></tr>

 </table>
 
</form>
</fieldset>

 


<script>
$(document).ready(function(){

  document.getElementById('phoneno2').disabled=true;
  document.getElementById('dob').disabled=true;
  document.getElementById('fname').disabled=true;
 
 document.getElementById('mname').disabled=true;
 
 document.getElementById('lname').disabled=true;
 
 document.getElementById('street').disabled=true;
 
 document.getElementById('email').disabled=true;
 
 document.getElementById('ward').disabled=true;
 
 document.getElementById('district').disabled=true;
 
 document.getElementById('region').disabled=true;
 

 document.getElementById('country').disabled=true;
 
 document.getElementById('phoneno').disabled=true;
 document.getElementById('pobox').disabled=true;
 
 document.getElementById('occupation').disabled=true;
 

 document.getElementById('gender').disabled=true;
  
  
$("#new_user_registration").on('submit',function(e){
 
 
jobtitle=document.getElementById('jobtitle').value;

salary=document.getElementById('salary').value;
 

var vN =/[\(A-Za-z)]/g; 
var nV =/[a-z\s]/i;
var j=0,k=0, g=0,i=0;


 if(jobtitle==""){
  e.preventDefault();

document.getElementById('pwd').innerHTML="Job title is required!..";

 }
 else{

      for(i=0;i<jobtitle.length;i++)
       {
         if(!jobtitle[i].match(nV))
          {
             j++;

           }
        }
      
       if(j>0){
       e.preventDefault();
   
        document.getElementById('pwd').innerHTML="Job title typed with error!.."; 
              }
         else{
 
        document.getElementById('pwd').innerHTML="";

              }
   }
 
    j=0, i=0;


     var phn =/[0-9]/g;
//oooooooooo

if(salary==""){
 e.preventDefault();
document.getElementById('ss').innerHTML="Salary is required valid one!..";
 

              }
 else{

      for(i=0;i<salary.length;i++)
       {
         if(!salary[i].match(phn))
          {
             j++;

           }
        }
      
       if(j>0){
       e.preventDefault();
   
        document.getElementById('ss').innerHTML="Salary is typed with error!..";  
              }
         else if(salary.indexOf(0)==0)
         {
        e.preventDefault();
        document.getElementById('ss').innerHTML="Valid salary number must start with greater than 0 digits.."; 
              

         }

          else
         {

        document.getElementById('ss').innerHTML="";

        }
   }
 
    j=0, i=0;


     ////////////mmm
   

  


    
  
}
);
}
);  
    
</script>

 