Viewing file: configDept.php (4.73 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../class/clsWorkGroup.php"; include_once "../link/function.php"; include_once "funct.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC); $oDP2 = new Department($oC); $oDP3 = new Department($oC); $oPS = new person($oC); $oWG = new workGroup($oC); $oWG2 = new workGroup($oC); $maxdate = $oDP3->MaxDate(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body> <iframe id="configDept" name="configDept" src="" style="width:$0px;height:0px;border:0"></iframe> <br> <table width=703 align="center"> <tr><td height="150"> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">จัดการข้อมูลพื้นฐานในงานสารบรรณ</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">กำหนดสิทธิ์ในการรับ-ส่งหนังสือภายนอก-ภายใน</font></legend> <form name="ff" action="processConfigDept.php" method="post" target="configDept"> <table border="0" width="100%"><tr><td align="right"><a href="printConfigDeptHTML.php" target="_blank"><img src="../picture/print.gif" width="15" height="14" border="0"></a> <a href="printConfigDeptex.php" target="_blank"><img src="../picture/ico_excel.gif" title="พิมพ์ excel" border="0" style="cursor:pointer;"></a> </td></tr></table> <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" > <tr> <td valign="top"><br> <label><div align="center"> <? $oT = new clsTable(array(" หน่วยงานภายใน ","รับ-ภายนอก<br>(ส่วนราชการ)","ส่ง-ภายนอก<br>(ส่วนราชการ)","รับ-ภายใน","ส่ง-ภายใน")); $oT->bgColor="#CCCCCC"; $oT->align="center"; $oDP2->searchdeptDate($maxdate); $rw=0; while ($oDP2->GetRecord()){ ShowDeptM($oDP2->deptId); } $oT->rowStart("","#ffffff"); $oT->rowEnd();
echo $oT->output(); ?> </div></td> </tr> </table> <table border="0" align="center" width="100%"><tr><td align="center"> <br> <input type="hidden" name="method" id="method" value="add"> <input type="button" name="cancel" value="กลับสู่เมนูหลัก" onClick="location.href = '?mm=1'"> </td> </tr></table></form> </fieldset> <table width="704" border="0" align="center"> <tr> <td width="85" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>หมายเหตุ : </strong> </font></td> <td width="609" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">การเลือกคือการบันทึกข้อมูลอัตโนมัติ</font></td> </tr> </table> <br><br>
</td> </tr> </table> </body> </html> <? function ShowDeptM($deptId){ global $oC; global $oT; global $Str; global $rw;
$oPS = new person($oC); $oDp = new Department($oC); $oDp->SearchByKey($deptId); $oDp->GetRecord();
if ($oDp->deptLevel%2==0){ $bs="<b>"; $be="</b>"; } $lv = $oDp->deptLevel+1; if($oDp->deptParentId!='0'){ $showdisabled='disabled'; } if($oDp->receiveOut=="Y"){ $showreceiveOut="checked";} if($oDp->sendOut=="Y"){ $showsendOut="checked";} if($oDp->receiveIn=="Y"){ $showreceiveIn="checked";} if($oDp->sendIn=="Y"){ $showsendIn="checked";} $oT->addRow(array(str_repeat("<img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif>", $oDp->deptLevel*2). $bs ." ".$oDp->deptName. $be ,"<div align=center><input name=receiveOut[".$oDp->deptId."] type=checkbox value=Y ".$showreceiveOut." ".$showdisabled." onClick='return checkFormat();' ></div>" ,"<div align=center><input name=sendOut[".$oDp->deptId."] type=checkbox value=Y ".$showsendOut." onClick='return checkFormat();' ></div>" ,"<div align=center><input name=receiveIn[".$oDp->deptId."] type=checkbox value=Y ".$showreceiveIn." onClick='return checkFormat();' ></div>" ,"<div align=center><input name=sendIn[".$oDp->deptId."] type=checkbox value=Y ".$showsendIn." onClick='return checkFormat();' ></div>")); $oDp->RSmenuByDeptParent3($deptId); while ($oDp->GetRecord()){ ShowDeptM($oDp->deptId); } }
?> <script language="javascript"> function checkFormat(){ document.ff.submit(); } </script>
|