Viewing file: submenu.php (1.97 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
//echo "$oU->MnID, $oU->userID, $oU->GpID<br>";
$oMmn->RSmenuByParentMn($oU->MmnID);
if ($oMmn->GetRowSelected()==0){
$oMmn->SearchByKey($oU->MmnID);
$oMmn->GetRecord();
header("Location: $oMmn->MnURL");
exit();
}else{
$oMmn->SearchByKey($oU->MmnID);
$oMmn->GetRecord();
}
?>
<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->MmnID, $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;
global $oU;
include_once("../../class/clsDB.php");
$oUp = new umpermission($oC);
$oGp = new umgpermission($oC);
$oMn = new ummenu($oC);
$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\">";
if (trim($oMn->MnURL)<>"") $Stm .= "<a href=\"$oMn->MnURL?MmnID=$oU->MmnID&MnID=$oMn->MnID\">";
$Stm .= $oMn->MnNameT;
if (trim($oMn->MnURL)<>"") $Stm .= "</a>";
$Stm .= "<br>\n";
}
//---------------
$oMn->RSmenuByParentMn($MnID);
}
while ($oMn->GetRecord()){
ShowMenu($oMn->MnID, $UsID, $GpID, $flg, $Stm);
}
}
?>
|