\n"; echo "$pageTitle\n"; echo ""; ?>

เลือกระบบงาน \n "; $s.="
เลือกกลุ่มงาน selectHTMLByStID($ID, "GpID", $GpID); if ($ID<>""){ } ?>

GpID=$GpID"; if ($pg<>"" or $submit=="Search"){ include_once("functions.php"); include_once("clsUmGroup.php"); include_once("clsUmSystem.php"); include_once("clsUmMenu.php"); include_once("clsUmGPermission.php"); $oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB'], $GLOBALS['USER'], $GLOBALS['PASSWORD']); $oGp = new umgroup($oC); $oSt = new umSystem($oC); $oMnT = new umMenu($oC); $oMn = new umMenu($oC); $oGPm = new umgpermission($oC); $rw=0; //get App group info $oGp->SearchByKey($GpID); $oGp->GetRecord(); //get App info $oSt->SearchByKey($oGp->GpStID); $oSt->GetRecord(); $StName = $oSt->StNameT; $oT = new clsTable(); $oT->bgColor="#eeeeee"; $oT->headerBgColor="#dddddd"; $oT->align="center"; // $oT->rowStart(); // $oT->addCell("ระบบ ".$oSt->StNameT."","","",2); // $oT->rowEnd(); // $oT->rowStart(); // $oT->addCell("       กลุ่มงาน ".$oGp->GpNameT."","","",2); // $oT->rowEnd(); $oT->rowStart("",$oT->headerBgColor); $oT->addCell("เมนูหลัก-เมนูย่อยู","center"); $oT->addCell("หมายเหตุ","center"); $oT->rowEnd(); $oMnT->RSMainMenuBySt($oGp->GpStID); while ($oMnT->GetRecord()){ ShowmenuGP($oGp->GpID, $oMnT->MnID); } echo $oT->output(); } ////////////////////////////////////////// function ShowMenuGP($GpID, $MnID){ global $oC; global $oT; global $Str; global $oGPm; global $rw; global $flgStrike; include_once("../class/clsDB.php"); $oMn = new ummenu($oC); $oMn->SearchByKey($MnID); $oMn->GetRecord(); if ($oMn->MnLevel==0){ $bs=""; $be=""; } $lv = $oMn->MnLevel+1; $checkX= "checked"; $checkC= "checked"; $checkR= "checked"; $checkU= "checked"; $checkD= "checked"; $oGPm->SearchByKey($GpID,$oMn->MnID); if ($oGPm->GetRowSelected()>0){ //found in group permission $oGPm->GetRecord(); if ($oGPm->gpX==0) $checkX=""; if ($oGPm->gpC==0) $checkC=""; if ($oGPm->gpR==0) $checkR=""; if ($oGPm->gpU==0) $checkU=""; if ($oGPm->gpD==0) $checkD=""; } if ($checkX=="checked"){ $flgStrike=false; $oT->rowStart(); $oT->addCell("MnID>" . str_pad("",10*6*$oMn->MnLevel, " ", STR_PAD_RIGHT).$bs.$oMn->MnNameT.$be); $oT->addCell(""); $oT->rowEnd(); }else{ $flgStrike=True; } if ($flgStrike==false){ $oMn->RSmenuByParentMn($MnID); } while ($oMn->GetRecord()){ ShowMenuGP($GpID, $oMn->MnID); } } ?>