เพิ่มโครงสร้างเพื่อการส่งหนังสือในระบบสารบรรณ
include_once "../class/clsTable.php";
$oT = new clsTable(array("ส่วนราชการภายใน","ประเภทของ
ส่วนราชการภายใน","รายละเอียด", "ดำเนินการ"));
$oT->bgColor="#CCCCCC";
$oT->align="center";
$oDpT->RSMainDepartment2($free,$free);
$rw=0;
while ($oDpT->GetRecord()){
ShowDeptM($oDpT->deptId);
}
$oT->rowStart("","#ffffff");
$oT->addCell("");
$oT->addCell("");
$oT->addCell("");
$oT->addCell("
![\"เพิ่มส่วนราชการภายใน\"](\"../picture/new.gif\")
(เพิ่มระดับที่ 1)", "center");
$oT->rowEnd();
echo "
";
function ShowDeptM($deptId){
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="";
}
$oDpt->SearchByKey($oDp->depttypeId);
$oDpt->GetRecord();
$dt = $oDpt->depttypeName;
$det = $oDp->deptDesc;
$lv = $oDp->deptLevel+1;
$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,
"
![\"เพิ่มส่วนราชการย่อย\"](\"../picture/new.gif\")
deptId);\">
deptId')\">
deptName','$deptId')\">
![\"ลบ\"](\"../picture/del.gif\")
deptId\" readonly>"));
$oDp->RSmenuByDeptParent2deptdate0($deptId);
while ($oDp->GetRecord()){
ShowDeptM($oDp->deptId);
}
}
?>