Viewing file: deptstructureedit.php (3.81 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include_once "template.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsdepttype.php"; include_once "../link/function.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EPERSON'], $GLOBALS['DBUSER_EPERSON'], $GLOBALS['DBPASS_EPERSON']);
$oDpT = new Department($oC); $oDp = new Department($oC); $oDP3 = new Department($oC);
list($yy, $mm, $dd) = preg_split("[-]", $deptDate); $yy=($yy-543); $maxdate2="$yy$mm$dd";
?> <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> <script language="javascript" src="../source/calendarDateInput.js"></script> <table width="740" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><br> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="showdept.php">จัดการโครงสร้างหน่วยงานสารบรรณ</a> <img src="../picture/ico3.gif" align="absmiddle" border="0">แก้ไขข้อมูลโครงสร้างหน่วยงานสารบรรณที่ใช้ปัจจุบัน</font></legend> <label><div align="center"><br> <form name=ff method=post action="processdept.php"> <table width="70%" border="0" cellspacing="0" cellpadding="1" align="center" > <tr> <td align="right"><font size="2" face="Microsoft Sans Serif">วันที่ยืนยันการใช้งาน :: <? echo abbreDate(splitDateDb2($deptDate ,'/')); ?></font></td> </tr> <tr> <td colspan="3"><hr></td> </tr> </table> <input name="method" type="hidden" value="confirmdeptdate"> </form> <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>แก้ไขข้อมูลโครงสร้างหน่วยงานสารบรรณที่ใช้ปัจจุบัน</b></font><br><br> <? include_once "../class/clsTable.php"; $oT = new clsTable(array("ส่วนราชการภายใน","ประเภทของ<br>ส่วนราชการภายใน","รายละเอียด", "ดำเนินการ")); $oT->bgColor="#CCCCCC"; $oT->align="center"; $oDpT->RSMainDepartmentdeptDate($deptDate); $rw=0; while ($oDpT->GetRecord()){ ShowDeptM($oDpT->deptId,$deptDate); } $oT->rowStart("","#ffffff"); echo "<form name=ps method=post>"; echo "<input type=hidden name=method value=''>"; echo "<input type=hidden name=startyear value=''>"; echo $oT->output(); echo "</form>"; 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="<b>"; $be="</b>"; } $oDpt->SearchByKey($oDp->depttypeId); $oDpt->GetRecord(); $dt = $oDpt->depttypeName; if($oDp->deptDesc){ $det = $oDp->deptDesc; }else{ $det =" "; } $lv = $oDp->deptLevel+1; $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 ,$dt,$det, "<align=center><a href=\"javascript:doEditMenu('$oDp->deptId')\"><img src=\"../picture/edit.gif\" title=\"แก้ไข\" border=\"0\" ></a></align> <input type=hidden name='deptId[]' value=\"$oDp->deptId\" readonly>")); $oDp->RSmenuByDeptParent2deptdate0deptDate($deptId,$deptDate); while ($oDp->GetRecord()){ ShowDeptM($oDp->deptId,$deptDate); } } ?> <input type="button" name="back" value="กลับหน้าหลัก" onClick="location.href='showdept.php' "> <br> </div></label> </fieldset><br></td> </tr> </table> </body> </html> <script> function doEditMenu(deptId){ window.open("deptpop3.php?deptId=" + deptId,"loaddorder",'toolbar=0, scrollbars=1, location=0, status=1, menubar=1, resizable=1, width=600, height=400, left = 500, top = 30'); } </script>
|