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.92.96
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/popup_work_entry.php |
<div class="list-group" style="text-align:left; cursor:pointer;">
<?php
include("sys_connect.php");
include("sys_session.php");
$mysql = "select
concat('[',em.fdeptcode,'] ',dp.fdeptshrt) as fdeptname,
concat('[',em.femplcode,'] ',em.femplname) as femplname,
date_format(fattndate,'%Y %M') as fattnmnth,count(*) as fworkpend
from masempl em
inner join attendance ad on ad.femplcode = em.femplcode
inner join masdept dp on em.fdeptcode = dp.fdeptcode
left join workentry wk on ad.femplcode = wk.femplcode and ad.fattndate = wk.fworkdate and ifnull(wk.fdelestat,'F')='F'
where em.femplstat='T' and em.fworkentr='T' and fattnstat in ('PR','PH','HW')
and ad.fattndate > '2021-12-31' and em.femplcode='$empl_id' and wk.femplcode is null
group by left(fattndate,7) desc;";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 0) {
echo "<table class='table table-default'>";
echo "<tr>";
echo "<th class='text-right'>#</th>";
echo "<th class='text-left col-sm-5'>Empl Name</th>";
echo "<th class='text-left col-sm-4'>Month</th>";
echo "<th class='text-center col-sm-3'>Pending</th>";
echo "</tr>";
$i = 1;
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<tr>";
echo "<td class='text-right'> $i.</td>";
echo "<td class='text-left'> $myrow[femplname]</td>";
echo "<td class='text-left'> $myrow[fattnmnth]</td>";
echo "<td class='text-center'> $myrow[fworkpend]</td>";
echo "</tr>";
$i++;
}
echo "</table>";
} else {
echo "<div class='alert alert-info'>No work entry pending!</div>";
}
$mysql = "select fworkcode,date_format(fworkdate,'%d/%m/%Y') as fworkdate,fworkname,fworkdetl,fviewdetl
from workentry
where femplcode='$empl_id' and ifnull(fviewdetl,'')<>'' and facknnote='F' and ifnull(fdelestat,'F')='F'
order by fworkcode desc limit 15";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 0) {
echo "<table class='table table-default'>";
echo "<tr>";
echo "<th class='text-right'>#</th>";
echo "<th class='text-left col-sm-4'>Date</th>";
echo "<th class='text-left col-sm-4'>Empl Name</th>";
echo "<th class='text-left col-sm-4'>Action</th>";
echo "</tr>";
$i = 1;
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<tr>";
echo "<td class='text-right'> $i.</td>";
echo "<td width='10%' class='text-left'> $myrow[fworkdate]</td>";
echo "<td width='80%' class='text-left'> Work Name: $myrow[fworkname]</br>Work Details: $myrow[fworkdetl]</br>Review Remarks: $myrow[fviewdetl]</td>";
echo "<td class='text-left'> <a class='btn btn-primary btn-sm' href=# onClick=ackn_note('$myrow[fworkcode]')>Acknowledge</a></td>";
echo "</tr>";
$i++;
}
echo "</table>";
} else {
echo "<div class='alert alert-info'>No review notices!</div>";
}
?>
</div>
|