 
 <?php 
   require_once("../head2Alts.php");
   if(isset($_POST['post']))

  {

     if( isset($_POST['shopid']) && isset($_POST['owniD']) && isset($_POST['emID']))
     {

        $shopid=$_POST['shopid'];
        $ownID=$_POST['owniD'];
        $accountId= $_POST['emID'];
          //HOTEL NAVIGATION LINKS-->
  // require_once("my_hotel_main_nav_link.php");
   //-MAIN NAVIGATION LINK END-->
      
         $ro=$mcon->getShopName($shopid)->fetch();
         $wE=$mcon->getShopWorkersForEdit($accountId,$shopid);

        
      
    }


}

if($wE->rowCount()>0)
  {
    $nn=$wE->fetch();

?> 


<center> 
 <table width="60%" border="0">
  <tr>
    
  <td valign="top" width="85%" colspan="12">
    <label id="main_lab"><?php echo $ro["shopname"];?> </label><br/>
  
 <center> <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="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 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>
</center>
  </td>
  </tr>
</table>
  <!--NEW USER REGISTRATION FORM, DISPLAYED BY DEFAULTS IN PAGE LOAD-->


<fieldset id="emp_edit_user_reg_form">
<label id="reg_form_tile_label">Edit employee detail below:- </label></p/>
<i>Please edit employee's jobtile and salary below:-</i>
<form name="new_user_registration" id="new_user_registration" action="editShopEmployeeProfilePro.php"  method="post">

<table border="0" id="reg_form_table">
<!--<tr>                      <!--CARRY HOTEL ID AND ROOM ID--

       
     
     



                                                                <!---USERS PASSWORD-->
<!--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-->

 
<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" value="<?php echo $nn["jobtitle"];?>" /><br/>
        
        </td>
        <td id="reg_form_table_cell" >
       
         <input type="text" name="salary" id="salary" class="prof_info" value="<?php echo $nn["salary"];?>"/> 
     
         </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>
<?php
 }
 else
 {
  ?>
  <table id="alt_new_user_reg_form"><tr><td>No employee selected!..</td></tr></table>

<?php
 }
?>
</center>

 


<script>
$(document).ready(function(){ 
  
  
$("#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;
 
}
);
}
);  
    
</script>

 <?php
 require_once('../footerIns.php');
?>