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.186.132
<?php
include("sys_connect.php");
include("sys_mainphp.php");
include("sys_session.php");
if($type_id=='ADMIN')
{
$mysql="select * from masdept where ifnull(fsalrcomp,'F')<>'F' and ifnull(fdeptstat,'')<>'F'order by fdeptname";
}
elseif($type_id=='CHIEF')
{
$mysql="select * from masdept where fdeptcode='$dept_id' and ifnull(fsalrcomp,'F')<>'F' and ifnull(fdeptstat,'')<>'F' order by fdeptname";
}
else
{
$mysql="select * from masdept where fdeptcode='' and ifnull(fsalrcomp,'F')<>'F' and ifnull(fdeptstat,'')<>'F' order by fdeptname";
}
$myres = mysqli_query($mycon,$mysql) or die(mysqli_error($mycon));
$mycnt = mysqli_num_rows($myres);
$mysalr=0;
while($row = mysqli_fetch_assoc($myres))
{
$dept_code= $row['fdeptcode'];
$salr_mnth = date('Y-m',strtotime("first day of last month"));
$mysql1="select fdeptcode,count(*) as salcount from salary where fsalrmnth='$salr_mnth' and fdeptcode='$dept_code' order by fdeptcode";
$myres1 = mysqli_query($mycon,$mysql1);
while($row1 = mysqli_fetch_assoc($myres1))
{
if($row1['salcount']==0)
{
$dept_name=substr($row['fdeptname'],0,60);
$salr_date=date('t-M-Y',strtotime($salr_mnth));
$salr_mnth=date('M-Y',strtotime($salr_mnth));
echo "<a onClick=window.location='salary.php'><span class='glyphicon glyphicon-list-alt'></span> ";
echo "$salr_date : $salr_mnth salary not updated - $dept_name";
echo "</a>";
$mysalr++;
}
}
}
if($mysalr==0)
{
echo "<p class='bg-info'>No pending salary!</p>";
}
?>
|