0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.145.76.12


Current Path : /var/www/misc/public_html/oums_old/phpscript/
Upload File :
Current File : /var/www/misc/public_html/oums_old/phpscript/attendance_report.php

<?php
	include("sys_session.php");
	include("sys_connect.php");	
	include("sys_mainphp.php");															

	$resp_mesg="";
	$resp_stat="";
	$resp_file="";

	if($_POST["load_data"]=='dept_data')
	{
		if($type_id=='ADMIN')
		{
			$mysql="select * from masdept where fdeptcode<>'ADMN' order by fdeptname";
		}
		elseif($type_id=='CHIEF')
		{
			$mysql="select * from masdept where fdepthead='$empl_id' order by fdeptname";
		}		
		else
		{
			$mysql="select * from masdept where fdeptcode='$dept_id' order by fdeptname";
		}
		$myres=mysqli_query($mycon,$mysql);
		if(mysqli_num_rows($myres)>1)
		{
			echo "<option value=0>--Select--</option>";
		}		
		while($row = mysqli_fetch_assoc($myres))
		{
			echo "<option value='$row[fdeptcode]'>$row[fdeptname]</option>";
		}
	}
	
	if($_POST["load_data"]=='attn_mnth')
	{
		$dept_code=$_POST["dept_code"];		
		$mysql = "select left(fattndate,7) as lattnmnth from attendance where fdeptcode like '$dept_code' ";
		$mysql.= "group by left(fattndate,7) order by left(fattndate,7) desc";
		$myres=mysqli_query($mycon,$mysql);
		if(mysqli_num_rows($myres)!=0)
		{
			while($row = mysqli_fetch_assoc($myres))
			{
			echo "<option value=$row[lattnmnth]>$row[lattnmnth]</option>";
			}
		}
	}
?>