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 : 18.191.103.29
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/work_entry_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 fdeptstat='T' and fattnenbl='T' order by fdeptname";
} else {
$mysql = "select * from masdept d
inner join masdept_user u on d.fdeptcode = u.fdeptcode and fusercode='$user_id'
where d.fdeptstat='T' and d.fattnenbl='T' order by fdeptname";
}
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 1) {
echo "<option value='%'>ALL [CLIENTS]</option>";
}
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<option value='$myrow[fdeptcode]'>$myrow[fdeptname] [$myrow[fdeptcode]]</option>";
}
}
if ($_POST['load_data'] == 'empl_data') {
if ($type_id == 'ADMIN') {
$myqry = "";
} elseif ($type_id == 'CHIEF') {
$myqry = " inner join masdept_user du on em.fdeptcode = du.fdeptcode and du.fusercode='$user_id'
inner join workentry wk on em.femplcode = wk.femplcode and em.fdeptcode = wk.fdeptcode ";
} else {
$myqry = " inner join masdept_user du on em.fdeptcode = du.fdeptcode and em.fusercode='$user_id'
inner join workentry wk on em.femplcode = wk.femplcode and em.fdeptcode = wk.fdeptcode ";
}
$mysql = "select distinct em.fdeptcode,em.femplcode,femplname
from masempl em
" . $myqry . "
where em.fdeptcode like '$_POST[dept_code]' order by femplname";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 1) {
echo "<option value='%'>ALL [EMPLOYEES]</option>";
}
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<option value='$myrow[femplcode]'>$myrow[femplname] [$myrow[femplcode]] [$myrow[fdeptcode]]</option>";
}
}
if ($_POST['load_data'] == 'work_type') {
$mysql = "select * from maswork_type order by ftypeordr,ftypedesc";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) != 0) {
echo "<option value=%>ALL [TYPES]</option>";
while ($row = mysqli_fetch_assoc($myres)) {
echo "<option value='$row[fworktype]'>$row[ftypedesc]</option>";
}
}
}
if ($_POST['load_data'] == 'clnt_data') {
$mysql = "select * from masclient order by fclntname";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) != 0) {
echo "<option value=%>ALL [CLIENTS]</option>";
while ($row = mysqli_fetch_assoc($myres)) {
echo "<option value='$row[fclntcode]'>$row[fclntname]</option>";
}
}
}
|