| Viewing file:  formatdeptNo.php (5.48 KB)      -rw-r--r-- Select action/file-type:
 
  (+) |  (+) |  (+) | Code (+) | Session (+) |  (+) | SDB (+) |  (+) |  (+) |  (+) |  (+) |  (+) | 
 
<?phpinclude_once "template.php";
 include_once "../class/clsTable.php";
 include_once "../class/clsDepartment.php";
 include_once "../class/clsPerson.php";
 include_once "../link/function.php";
 include_once "../class/clsDocType.php";
 include_once "../class/clsRunningDoc.php";
 include_once "../class/clsSysConfig.php";
 include_once "funct.php";
 include_once "../link/keyThai.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);
 $oDt = new doctype($oC);
 $oRd = new runningdoc($oC);
 $InputThai=$oSys->SearchByInputThai();
 $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="addDeptNo" name="addDeptNo" 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"><a href="?mm=1">ตั้งค่าหนังสือราชการ</a>
 <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">ตั้งค่าที่หนังสือหน่วยงานย่อย
 
 </font></legend><br>
 <form name="ff" action="processFormatDeptNo.php" method="post" target="addDeptNo">   <? //?>
 <table width="90%" height="22" border="0" align="center"><tr>
 <? if($s=="1"){ ?>
 <td align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><strong>
 บันทึกที่หนังสือหน่วยงานย่อยเรียบร้อยแล้ว</strong></font></td>
 <? } ?>
 </tr>
 <tr><td align="right"><a href="printFormatdeptNoHTML.php" target="_blank"><img src="../picture/print.gif" width="15" height="14" border="0"></a> <a  href="printFormatdeptNoex.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("หน่วยงานภายใน","เลขที่หน่วยงาน"));
 $oT->bgColor="#CCCCCC";
 $oT->align="center";
 $oDP2->searchdeptDate($maxdate);
 $rw=0;
 while ($oDP2->GetRecord()){
 ShowDeptM($oDP2->deptId,$InputThai);
 }
 
 $oT->rowStart("","#ffffff");
 $oT->rowEnd();
 
 echo "<form name=ps method=post>";
 echo "<input type=hidden name=method id=method  value=''>";
 echo "<input type=hidden name=startyear id=startyear  value=''>";
 echo $oT->output();
 
 //////////////////////////////////////////
 
 ?>
 </div></td>
 </tr>
 </table>
 
 <table  align="center" width="80%"><tr><td><font size="3">
 <strong>หมายเหตุ</strong><br>1. ในการกำหนดเลขที่หน่วยงานย่อยชั้นที่ 1 เช่น มีจำนวน 5 หน่วยงานย่อย ให้ใส่เลขที่หน่วยงานคือเริ่มที่ 01, 02 ไปจนครบ 05 ตามระดับหน่วยงานย่อยชั้นที่ 1
 <br>2. ในการกำหนดเลขที่หน่วยงานย่อยชั้นที่ 2 เช่น มีจำนวน 3 หน่วยงานย่อยในลำดับชั้นที่ 1 ของหน่วยงานย่อยลำดับที่ 2 ก็คือ ให้กำหนดดังนี้ 02.01, 02.02, 02.03 ไปจนครบ
 <br>3. ในการกำหนดเลขที่หน่วยงานย่อยชั้นที่ 3 เช่น มีจำนวน 2 หน่วยงานย่อยในลำดับชั้นที่ 3 ของหน่วยงานย่อยลำดับที่ 2 ต่อไปอีก ก็คือ ให้กำหนดดังนี้ 02.01.01, 02.02.02, 02.03.03 ไปจนครบ
 <br>4. ในการกำหนดเลขที่หน่วยงานย่อยในองค์กรนี้เมื่อกำหนดเรียบร้อยแล้วระบบจะดึงเลขที่กำหนดไปต่อท้ายที่หนังสือของหน่วยงานโดยอัตโนมัติ เมื่อมีการลงทะเบียนส่งหนังสือต่อไปทั้งหนังสือภายในและภายนอก เช่น สธ 0203.082/01.01
 </font></td></tr></table><br>
 <table align="center" width="90%">
 <tr><td > </td></tr>
 <tr><td colspan="2" align="center">
 <input type="submit" name="setDeptNo" value="บันทึก" onClick="return checkFormat();">
 <input type="button" name="cancel" value="ยกเลิก" onClick="location.href = '?mm=1'">
 <input type="hidden" name="method" id="method">
 </td></tr>
 </table></form>
 </fieldset>
 </td>
 </tr>
 </table>
 </body>
 </html>
 <?
 function ShowDeptM($deptId,$InputThai){
 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;
 $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=\"deptNo[".$oDp->deptId."]\" id=\"deptNo[".$oDp->deptId."]\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"".a2th($oDp->deptNo)."\"    onKeyPress=\"return isNumberKeyAndDotAndslash('".$InputThai."',event)\"   onKeyUp=\"CheckInputIdx('".$InputThai."','deptNo','".$oDp->deptId."')\"   style=text-align:center></div>"));
 
 $oDp->RSmenuByDeptParent3($deptId);
 while ($oDp->GetRecord()){
 ShowDeptM($oDp->deptId,$InputThai);
 }
 }
 ?>
 <script language="javascript">
 function checkFormat(){
 var agree=confirm("คุณต้องการบันทึกข้อมูลที่หนังสือหน่วยงานย่อยในองค์กรใช่หรือไม่ ?");
 if (agree){
 return true ;
 }else{
 return false ;
 }
 }
 </script>
 |