Viewing file: showdeptsend.php (3.85 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once("../../class/clsConnection.php");
include_once("../../class/clsDB.php");
include_once "../global.php";
include_once "../class/clsDepartment.php";
include_once "../class/clsPerson.php";
include_once "../link/function.php";
include_once "../link/functionshow.php";
include_once "../class/clsDocLinePosition.php";
include_once "../class/clsDocLineConfig.php";
include_once "../class/clsReceiveSendType.php";
include_once "../class/clsDocType.php";
include_once "../class/clsDocSpeedLevel.php";
include_once "../class/clsDocSecreLevel.php";
include_once "../class/clsDocattatchesTmp.php";
include_once "../class/clsDocuments.php";
include_once "../class/clsDocattatches.php";
include_once "../class/clsDocReceiveSend.php";
include_once "../class/clsRunningDoc.php";
include_once "funct.php";
include_once "../class/clsDocSendtoPsTmp.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);
$oDP4 = new Department($oC);
$oDP5 = new Department($oC);
$oDPt = new Department($oC);
$oDPt2 = new Department($oC);
$oDPt3 = new Department($oC);
$oDPt4 = new Department($oC);
$oPS = new person($oC);
$oPS2 = new person($oC);
$oPS3 = new person($oC);
$oPS4 = new person($oC);
$oDlc = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlc3 = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp1 = new docLinePosition($oC);
$oRSt = new receiveSendType($oC);
$oDt = new doctype($oC);
$oDsl = new DocSpeedLevel($oC);
$oDcl = new DocSecretLevel($oC);
$oDtmp = new DocattatchesTmp($oC);
$oDoc = new Documents($oC);
$oDoc2 = new Documents($oC);
$oDoc3 = new Documents($oC);
$oDatt = new Docattatches($oC);
$oRs = new DocReceiveSend($oC);
$oRs1 = new DocReceiveSend($oC);
$oRs2 = new DocReceiveSend($oC);
$oRs3 = new DocReceiveSend($oC);
$oRs4 = new DocReceiveSend($oC);
$oRs5 = new DocReceiveSend($oC);
$oRd = new runningdoc($oC);
$oStmp=new DocSendToPsTmp($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
?>
<form name="ff" METHOD="POST">
<table width="87%" height="21" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr><td width="13%" align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>หน่วยงาน :: </strong>
</font></td>
<td width="87%" align="left">
<select name="deptId" onChange='return showdept();' >
<option value="0">- เลือกหน่วยงาน -</option>
<? $oDP->RSDeptByMaxdeptDate2();
while($oDP->GetRecord()){?>
<option value="<? echo $oDP->deptId;?>" <? if($oDP->deptId==$deptId){ echo "selected"; }?>><? echo $oDP->deptName; ?></option>
<? } ?>
</select>
</td>
</tr>
</table>
</form>
<?
echo $deptId;
$oDP->SearchByKey($deptId);
$oDP->GetRecord();
if($oDP->deptParentId==0){
echo "wต้นเรื่องที่จะส่งหนังสือ :: ".$oDP->deptName."<br>";
$oDP2->RSmenuByDeptParent2($oDP->deptParentId);
while($oDP2->GetRecord()){
if($oDP2->deptId!=$oDP->deptId){
echo " --".$oDP2->deptName."<br>";
}
}
}else{
echo "2ต้นเรื่องที่จะส่งหนังสือ :: ".$oDP->deptName."<br>";
$oDP2->SearchByKey($oDP->deptParentId);
$oDP2->GetRecord();
echo " --".$oDP2->deptName."<br>";
$oDP3->RSmenuByDeptParent2($oDP2->deptId);
while($oDP3->GetRecord()){
if($oDP3->deptId!=$deptId){
echo " --".$oDP3->deptName."<br>";
}
}
$oDP4->RSmenuByDeptParent2($deptId);
while($oDP4->GetRecord()){
echo " --".$oDP4->deptName."<br>";
}
}
?>
<script language="javascript">
function showdept(){
document.ff.submit();
}
</script>
|