<?php   session_start();



if ( $_SESSION[ invcox ] == "" ) { header( "location:login.php?action=need" );} else { include( "config.php" );

   	?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

   <head>

      <meta http-equiv="Content-Type" content="text/html;

 charset=iso-8859-1"/>

      <title>hr_employee Entry</title>

      <link href="style.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="stylew.css">
      <?php include("calendar.php");

?>   

   </head>

   <body>

      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="box-wrap">

         <tr>

            <td>   <?php include("top.php");

?></td>

         </tr>

         <tr>

            <td>

               <table width="100%" border="0" cellspacing="1" cellpadding="0">

                  <tr>

                     <td align="left" class="link2">&nbsp;

</td>

                  </tr>

                  

                  <tr>

                     <td align="center">&nbsp;

</td>

                  </tr>

                  <tr>

                     <td>

                        <form action="insert_emp.php" method="post" enctype="multipart/form-data" name="form1" class="round_box" id="form1" onsubmit="return validate()">

                           <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">

                              <tr>

                                 <td height="40" colspan="2" align="center" bgcolor="#466c74">Employee Entry</td>
                              </tr>

                              <?php if($_GET[info]!=""){?>

                              <tr>

                                 <td height="40" colspan="2" align="center" bgcolor="#80E8F4"><?php echo $_GET[info];

 ?>   </td>
                              </tr>

                              <?php }?>

                              <tr bordercolor="#999999">
                                <td >Joining Date</td>
                                <td ><table width="180" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="70%"><input name="date1" type="text" id="date1" size="15"  value="<?php echo date("d-m-Y");?>" required="required"/></td>
                                      <td width="30%" align="center"><a title="Calendar" onclick="displayDatePicker('date1', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
                                    </tr>
                                </table></td>
                              </tr>
                              <tr>

                                 <td width="14%" height="30"> Employee Name: *</td>

                                 <td width="86%" class="input200"><input name="customer_name" type="text" required="required" id="customer_name" />   </td>
                              </tr>

                              <tr>

                                 <td bordercolor="#CCCCCC">Salary</td>

                                 <td bordercolor="#CCCCCC" class="input200"><label><input name="contact_person" type="text" id="contact_person"  value="" /></label>   </td>
                              </tr>

                              <tr>

                                 <td>Mobile:<span class="red"></span>*</td>

                                 <td class="input200"><input name="personal_phn" type="text" required="required" id="personal_phn" />   </td>
                              </tr>

                              <tr>

                                 <td>Nid :<span class="red">*</span>   </td>

                                 <td class="input200"><input name="nid" type="text" required="required" id="nid" />   </td>
                              </tr>

                              <tr>

                                 <td>Email :</td>

                                 <td class="input200"><input name="personal_email" type="text" id="personal_email" />   </td>
                              </tr>

                              <tr>

                                 <td>Address :</td>

                                 <td class="input200"> <input name="url" type="hidden" id="url" value="add_client.php"/><textarea name="address" rows="5" required="required" id="address"></textarea>   </td>
                              </tr>

                              <tr>

                                <td height="50" align="left">Nid / Passport :</td>

                                <td height="50" align="left">

        <input type="file" name="file1">                                </td>
                             </tr>

                              <tr>

                                <td height="50" align="left">Pic / Other :</td>

                                <td height="50" align="left"><input type="file" name="file2"></td>
                              </tr>

                              <tr bordercolor="#999999">
                                <td >Resign / Suspend / Terminate Date</td>
                                <td ><table width="180" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="70%"><input name="date2" type="text" id="date2" size="15"  value="" required="required"/></td>
                                      <td width="30%" align="center"><a title="Calendar" onclick="displayDatePicker('date2', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
                                    </tr>
                                </table></td>
                              </tr>
                              <tr>

                                 <td height="50" align="center">&nbsp;</td>

                                 <td height="50" align="left"><input type="submit" name="Submit23" value="Submit"/>   </td>
                              </tr>
                           </table>

                        </form>

                     </td>

                  </tr>

                  <tr>

                     <td>&nbsp;

</td>

                  </tr>

                  <tr>

                     <td align="center" class="round_box">

                        <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="list_table">

                           <tr>

                              <th height="30">SL</th>
                              <th>ID</th>

							   <th height="30">Employee  Name </th>

                              <th height="30" align="center">Salary</th>

                              <th height="30" align="left">Mobile</th>

                              <th height="30" align="left">Nid</th>

                              <th height="30" align="left">Email  </th>

                              <th height="30" align="center">Address</th>

                              <th align="center">Joining Date</th>
                              <th align="center">Resign Date</th>
                              <th height="30" align="center">Nid / Pic</th>

                              <th width="109" height="30" align="center"><span class="style23">Edit</th>
                           </tr>

                           <?php $page_name="hr_employee.php?id=$_GET[id]";

 	$limit=$_GET['limit'];

	$start=$_GET['start'];

if(!($start > 0)) {	$start = 0;

	}	$eu = ($start - 0);

 	$limit = '50';

   	$this1 = $eu + $limit;

 	$back = $eu - $limit;

 	$next = $eu + $limit;

$ant=mysql_query("select * from hr_employee order by id desc ");

$nume=mysql_num_rows($ant);

$result=mysql_query("select * from hr_employee order by id desc limit $eu, $limit");

$row=mysql_fetch_array($result);

$sr=0;

do{

							

							$sr++;?>   

                           <tr>

							   <td width="21" align="center" valign="top" class="link"><?php echo $sr;?></td>
						     <td width="21" align="center" valign="top" class="link"><a href="hr_employee_profile.php?refr_id=<?php    echo $row[id];?>">
                             <?php    echo $row[id];?>
						     </a></td>

                              <td width="282" align="center" valign="top" class="link"><?php    echo $row[customer_name];

            ?>   </td>

                              <td width="219" align="center" valign="top" class="link "><?php echo $row[contact_person];

   ?></td>

                              <td width="184" align="left" valign="top" class="link "><?php echo $row[personal_phn];

?></td>

                              <td width="174" align="left" valign="top" class="link "><?php echo $row[nid];

 ?></td>

                              <td width="212" align="left" valign="top" class="link "><?php echo $row[personal_email];

?></td>

                              <td width="72" align="center" valign="top" class="link "><?php echo $row[address];

 ?></td>

                              <td width="71" align="center" valign="top" class="link "><?php echo dtformat($row[date1]);

 ?></td>
                              <td width="142" align="center" valign="top" class="link "><?php echo dtformat($row[date2]);

 ?></td>
                              <td width="85" align="center" valign="top" class="link ">
							  
							  <?php if($row[file1]!=""){ ?> <img src="uploads_hr/<?php echo $row[file1];?>" id="myImg<?php echo $row[id];?>" class="thumb"><?php }?>
							 <?php if($row[file2]!=""){ ?><img src="uploads_hr/<?php echo $row[file2];?>" id="myImg<?php echo $row[id];?>2" class="thumb"><?php }?> </td>

                              <td width="109" align="center" class="link"><?php    if($bill_verify == '1'){      ?><a href="edit_emp.php?id=<?php echo $row[id];

 ?>" class=" ">Edit</a><?php } ?></td>
                           </tr>

                           <?php }while($row=mysql_fetch_array($result));

?>
                        </table>
<div id="imgModal" class="modal">
  <span class="close">&times;</span>
  <img class="modal-img" id="modalImg">
</div><script src="script.js"></script>
                    <td width="25" align="center" class="paiging">&nbsp;

</td>

                  </tr>

               </table>

            </td>

         </tr>

         <tr>

            <td height="28" align="center">

               <table border="0" align = "center" cellpadding="0" cellspacing="2">

                  <tr>

                     <?php if($back >=0) { echo  "<td  align='left' class='paiging' width='60px'><a href='$page_name&start=$back&limit=$limit'><< PREV</a></td>";

 } //// Let us display the page links at  center. We will not display the current page as a link //?>   <?php $i=0;

$l=1;

for($i=0;

$i < $nume;

$i=$i+$limit){if($i <> $eu){if($srx == "50"){$srx=0;

 echo '</tr><tr>';

}?>   

                     <td width="25px" align="center" class="paiging"><?php echo " <a href='$page_name&start=$i&limit=$limit'>$l</a>";

?></td>

                     <?php }else{echo "<td align='center' width='25px'><span class='paiging_red'>$l</td>";

}/// Current page is not displayed as link and given font color red$l=$l+1;

$srx=$srx+1;

}?>   <?php 

 ///////////// If we are not in the last page then Next link will be displayed. Here we check that 

																					  

/////if($this1 < $nume) { echo "<td  align='right' class='paiging' width='60px'><a href='$page_name&start=$next&limit=$limit'>NEXT >></a></td>";} 

					  

					  ?>

                  </tr>

               </table>

            </td>

         </tr>

         <tr>

            <td height="28"><?php include("bot.php");

?></td>

         </tr>

      </table>

   </body>

</html>

<?php }?>