";
if ($type_id == 'ADMIN') {
$mysql = "select * from masdept where fdeptstat='T' and fholienbl='T' and fdeleted<>'T' order by fdeptname";
} elseif ($type_id == 'CHIEF') {
$mysql = "select * from masdept dp
inner join masdept_user du on dp.fdeptcode = du.fdeptcode and du.fusercode='$user_id'
where fdeptstat='T' and fholienbl='T' and fdeleted<>'T' order by fdeptname";
} else {
$mysql = "select * from masdept dp
inner join masdept_user du on dp.fdeptcode = du.fdeptcode and du.fusercode='$user_id'
where fdeptstat='T' and fholienbl='T' and fdeleted<>'T' order by fdeptname";
}
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 1) {
echo "";
}
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "";
}
echo "";
?>