<? 
session_start(0);
$loginusername=$_SESSION['login_username'];
if($loginusername==NULL)
{
	?><script>window.location="op_log.php?ses=out";</script>
	<?
}

        $seleect_employee=mysql_query("select * from `employee_mng`");
		while($fetch_employee=mysql_fetch_array($seleect_employee))
		{ 
	    $emid=$fetch_employee['emp_id']; 
		$emname=$fetch_employee['name'];
		 date_default_timezone_set("Asia/Kolkata");
		 $mntth=date('F');
		 $yrar=date("Y");

      $ckkqu=mysql_query("select * from emp_attendance where empid='$emid' and  month='$mntth' and year='$yrar'  ");
	  $chknum=mysql_num_rows($ckkqu);
	  
	  if($chknum==0)
	  {
	   $insf=mysql_query("insert into emp_attendance(`empid`,`emp_name`,`year`,`month`) values('$emid','$emname','$yrar','$mntth')");
	  }
}



?>

<link rel="stylesheet" href="menu_cs/styles.css">
   <script src="menu_cs/jquery-latest.min1234.js" type="text/javascript"></script>
   <script src="menu_cs/script.js"></script>
   
<div id='cssmenu'>
<ul>
   <li><a href='ad_site.php'>Home</a></li>
   <li class='active'><a href='#'>Employee</a>
      <ul>
         <li><a href='ad_depart.php'>Add Department </a></li>
         <li><a href='viwe_department.php'>View Department</a></li>
         <li><a href='ad_empploe.php'>Add Employee Details</a></li>
         <li><a href='viwe_empploe.php'>View Employee Details</a></li>
      </ul>
   </li>
   
   
   <li class='active'><a href='#'>Work Allocation</a>
      <ul>
         <li><a href='ad_work.php'>Add Work</a></li>
         <li><a href='viwe_work.php'>View Work</a></li>
      </ul>
   </li>
   
   <li class='active'><a href='#'>Certificate</a>
      <ul>
         <li><a href='ad_certfi.php'>Add Certificate</a></li>
         <li><a href='viw_certfi.php'>View Certificate</a></li>
      </ul>
   </li>
   
   <li><a href='neweven.php'>News/Events/Circulars</a></li>
         <li class='active'><a href='#'>Attendance</a>
         <ul>
         <li><a href='ad_leave.php'>Add Leave</a></li>
         <li><a href='leave_req.php'>Request Leave</a></li>
         <li><a href='leave_work.php'>Leave Details</a></li>
         <li><a href='attendance.php'>Attendance Details</a></li>
         </ul>
   </li>

         <li class='active'>
         <a href='#'>Salary</a>
         <ul>
         <li><a href='ad_salary.php'>Add Salary</a></li>
         <li><a href='viwe_salary.php'>View Salary</a></li>
         <li><a href='ad_advance.php'>Add Advance</a></li>
         <li><a href='viwe_advance2.php'>Request Advance</a></li>
         <li><a href='viwe_advance.php'>View Advance</a></li>
         <li><a href='ad_monthlysalary.php'>Add Monthly Salary</a></li>
         <li><a href='viwe_salarydetails.php'>Salary Details</a></li>
         </ul>
         </li>
   <li class='active'><a href='#'>settings</a>
      <ul>
         <li><a href='ch_to_pass.php'>Change password</a></li>
         <li><a href='out_si_session.php' onclick="return confirm('Please make a confirm...');">Logout</a></li>
      </ul>
   </li>
</ul>
</div>