$oT = new clsTable(array("ส่วนราชการภายใน", "ดำเนินการ"));
$oT->bgColor="#E9E9F3";
$oT->align="center";
$oDP->RSMainDepartment();
$rw=0;
while ($oDP->GetRecord()){
ShowDeptM($oDP->deptId,$startyear,$endyear);
}
$oT->rowStart("","#ffffff");
$oT->addCell("");
$oT->addCell(" ", "center");
$oT->rowEnd();
echo "";
function ShowDeptM($deptId,$startyear,$endyear){
global $oC;
global $oT;
global $Str;
global $rw;
$oDp = new Department($oC);
$oDp->SearchByKey($deptId);
$oDp->GetRecord();
/////////////////////////////////////////////
if ($oDp->deptLevel%2==0){
$bs="";
$be="";
$b=1;
}
$lv = $oDp->deptLevel+1;
if($oDp->deptParentId==0){
$lv2 =1;
}else{
$lv2 = $oDp->deptLevel;
}
$oT->addRow(array(str_repeat("![](../picture/blank.gif) ![](../picture/blank.gif) ![](../picture/blank.gif) ![](../picture/blank.gif) ![](../picture/blank.gif) ![](../picture/blank.gif) ![](../picture/blank.gif) ", $oDp->deptLevel*2). $bs ." ".$oDp->deptName." ". $be ,
" deptId,$startyear,$endyear,$lv2);\">
deptId')\">
deptName','$deptId','$startyear','$endyear')\">
",
"deptId\" readonly>" ));
$oDp->RSmenuByDeptParent($deptId,$startyear,$endyear);
while ($oDp->GetRecord()){
ShowDeptM($oDp->deptId,$startyear,$endyear);
}
}
?>
|