Viewing file: submenu(2).php (2.66 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
//include_once("../../ums/clsConnection.php");
//include_once("../../ums/clsUmMenu.php");
//include_once("../../ums/clsUmPermission.php");
//include_once("../../ums/clsUmGPermission.php");
//include_once("../../ums/clsUmUserGroup.php");
//include_once("../../ums/clsUmGroup.php");
//$oC = new clsConnection();
//$oGrp = new umgroup($oC->c);
//$oUg = new umusergroup($oC->c);
//$oMmn = new ummenu($oC->c);
//$oUp = new umpermission($oC->c);
//$oGp = new umgpermission($oC->c);
//include_once("../../ums/clsConnection.php");
//include_once("../../ums/clsUmMenu.php");
//include_once("../../ums/clsUmPermission.php");
//include_once("../../ums/clsUmGPermission.php");
//$oC = new clsConnection();
//$oUp = new umpermission($oC->c);
//$oGp = new umgpermission($oC->c);
//echo "$oU->MnID, $oU->userID, $oU->GpID<br>";
$oMmn->RSmenuByParentMn($oU->MnID);
if ($oMmn->GetRowSelected()==0){
$oMmn->SearchByKey($oU->MnID);
$oMmn->GetRecord();
header("Location: $oMmn->MnURL");
exit();
}else{
$oMmn->SearchByKey($oU->MnID);
$oMmn->GetRecord();
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><br><fieldset>
<legend align="center"><font size="3" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><b><?=$oMmn->MnNameT;?></b></font></legend>
<label><div align="center"><br>
<table width="740" align="center" cellpadding="0" cellspacing="1" boder="1">
<tr align="left">
<td><font face="Ms Sans Serif" size="2">
<?
$StrMenu = "";
ShowMenu($oU->MnID, $oU->userID, $oU->GpID, 1, $StrMenu);
echo $StrMenu;
?>
</font></td>
</tr>
</table>
</div><br></label>
</fieldset><br></td>
</tr>
</table>
<?
/////////////////////////////////////////////////////////////
function ShowMenu($MnID, $UsID, $GpID, $x, &$Stm){
global $oC;
$oUp = new umpermission($oC->c);
$oGp = new umgpermission($oC->c);
$oMn = new ummenu($oC->c);
$oMn->SearchByKey($MnID);
$oMn->GetRecord();
$flg=1;
$oUp->SearchByKey($UsID, $MnID);
if ($oUp->GetRecord()){
$flg = $oUp->pmX;
}else{
$oGp->SearchByKey($GpID, $MnID);
if ($oGp->GetRecord()){
$flg = $oGp->gpX;
}
}
if ($flg==$x){
if ($oMn->MnLevel>0){
$Stm .= str_pad("",10*6*$oMn->MnLevel, " ", STR_PAD_RIGHT)."<img src=\"../picture/ico1.gif\" align=\"absmiddle\" border=\"0\">";
$Stm .= "<a href=\"$oMn->MnURL\">";
$Stm .= $oMn->MnNameT."</a><br>\n";
}
//---------------
$oMn->RSmenuByParentMn($MnID);
}
while ($oMn->GetRecord()){
ShowMenu($oMn->MnID, $UsID, $GpID, $flg, $Stm);
}
}
?>
|