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.227.134.95
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/header_menu.php |
<link href="assets/spryassets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="assets/spryassets/SpryMenuBar.js" type="text/javascript"></script>
<?php
include("sys_connect.php");
if (strtoupper($type_id) == 'ADMIN' || strtoupper($type_id) == 'CHIEF') {
$mode_code = "10";
} else {
$mode_code = "10";
}
if (isset($_COOKIE["modeid"])) {
$mode_code = $_COOKIE["modeid"];
}
if ($mode_code == 10) {
$menu_mode = "m.fmodecode in (select fmodecode from sys_module where fdeleted<>'T')";
} else {
$menu_mode = "m.fmodecode in (11,98,99,$mode_code)";
}
// Menu listing starts
if (strtoupper($type_id) == 'ADMIN') {
$myqry = "";
// $query1 = "select * from sys_menu m where fmenuline='0' and fmenustat='T' and " . $menu_mode . " order by fmodecode,fmainmenu,fmenucode";
} elseif (strtoupper($type_id) == 'CHIEF') {
$myqry = "";
} else {
$myqry = " and m.fmenuadmn<>'T' ";
}
$query1 = "select distinct m.fmodecode,m.fmainmenu,m.fmenucode,fmenuname,fmenulink,fmenustat,fmenuline
from sys_menu m
left join sys_user_menu u on m.fmodecode=u.fmodecode and m.fmainmenu=u.fmainmenu and u.flinkstat=1 and u.fusercode='$user_id'
where m.fmenustat='T' and " . $menu_mode . " and m.fmenuline=0 " . $myqry . "
order by m.fmodecode,m.fmainmenu,m.fmenucode";
$myres1 = mysqli_query($mycon, $query1);
echo "<ul id=MenuBar1 class=MenuBarHorizontal>";
while ($myrow1 = mysqli_fetch_array($myres1)) {
echo "<li><a style=text-align:center;>$myrow1[fmenuname]</a>";
echo "<ul>";
if (strtoupper($type_id) == 'ADMIN') {
$query2 = "select * from sys_menu m where fmenuline='1' and fmainmenu=" . $myrow1['fmainmenu'] . " and fmenustat='T'
and " . $mode_code . " order by fmodecode,fmainmenu,fmenucode";
} else {
$query2 = "select m.fmodecode,m.fmainmenu,m.fmenucode,fmenuname,fmenulink,fmenustat,fmenuline from sys_menu m
left join sys_user_menu u on m.fmodecode=u.fmodecode and m.fmainmenu=u.fmainmenu and m.fmenucode=u.fmenucode
where m.fmenuadmn<>'T' and m.fmenustat='T' and " . $mode_code . " and m.fmainmenu = '$myrow1[fmainmenu]' and m.fmenuline=1
and u.flinkstat=1 and u.fusercode='$user_id' order by m.fmodecode,m.fmainmenu,m.fmenucode";
// $query2 ="select sys_menu.fmainmenu,sys_menu.fmenucode,fmenuname,fmenulink,fmenuline from sys_menu,sys_user_menu ";
// $query2.="where sys_menu.fmenuline=1 and fmenuadmn<>'T' and fusercode='$user_id' and fmenustat='T' ";
// $query2.="and sys_menu.fmodecode in (11,$mode_code,99) ";
// $query2.="and sys_menu.fmodecode=sys_user_menu.fmodecode ";
// $query2.="and sys_menu.fmainmenu=sys_user_menu.fmainmenu ";
// $query2.="and sys_menu.fmenucode=sys_user_menu.fmenucode ";
// $query2.="and sys_user_menu.flinkstat=1 and sys_menu.fmainmenu=".$myrow1['fmainmenu']." ";
// $query2.="group by sys_menu.fmenucode,sys_menu.fmenucode,fmenuname,fmenulink,fmenuline";
}
$myres2 = mysqli_query($mycon, $query2);
while ($myrow2 = mysqli_fetch_array($myres2)) {
echo "<li><a onClick=window.location='$myrow2[fmenulink]'>$myrow2[fmenuname]</a></li>";
}
echo "</ul>";
echo "</li>";
}
echo "</ul>";
?>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {
imgDown: "assets/spryassets/SpryMenuBarDownHover.gif",
imgRight: "assets/spryassets/SpryMenuBarRightHover.gif"
});
</script>
|