โครงสร้างเพื่อการส่งหนังสือในระบบสารบรรณ if($deptDate==$maxdate && $maxdate !='0000-00-00'){ echo "
วันที่ยืนยันการใช้งาน ".abbreDate(splitDateDb2($deptDate ,'/'))." (โครงสร้างปัจจุบัน)"; }else if($deptDate=='0000-00-00'){ echo "
(ยังไม่ยืนยันการใช้งานโครงสร้างนี้)"; }else{ echo "
วันที่ยืนยันการใช้งาน ".abbreDate(splitDateDb2($deptDate ,'/')); } ?>
$oT = new clsTable(array("ส่วนราชการภายใน","ประเภทของ
ส่วนราชการภายใน","รายละเอียด"));
$oT->bgColor="#CCCCCC";
$oT->align="center";
$oDpT->searchdeptDate2($deptDate);
$rw=0;
while ($oDpT->GetRecord()){
ShowDeptM($oDpT->deptId,$deptDate);
}
$oT->rowStart("","#ffffff");
$oT->addCell("");
$oT->rowEnd();
echo "
";
//////////////////////////////////////////
function ShowDeptM($deptId,$deptDate){
global $oC;
global $oT;
global $Str;
global $rw;
$oDp = new Department($oC);
$oDpt= new Departmenttype($oC);
$oDp->SearchByKey($deptId);
$oDp->GetRecord();
/////////////////////////////////////////////
if ($oDp->deptLevel%2==0){
$bs="
";
$be="";
}
$lv = $oDp->deptLevel+1;
$oDpt->SearchByKey($oDp->depttypeId);
$oDpt->GetRecord();
$dt = $oDpt->depttypeName;
$det = $oDp->deptDesc;
$oT->addRow(array(str_repeat("
![](../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,$dt,$det));
$oDp->RSmenuByDeptParentdeptDate($deptId,$deptDate);
while ($oDp->GetRecord()){
ShowDeptM($oDp->deptId,$deptDate);
}
}
?>