Viewing file: printRepFollowDocDeptDetail.php (34.04 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once("../../class/clsConnection.php");
include_once("../../class/clsDB.php");
include_once "../global.php";
include_once "../class/clsTable.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/clsProposeType.php";
include_once "funct.php";
include_once "../class/clsDocSendtoPsTmp.php";
include_once "../class/clsannounceDocType.php";
include_once "../link/keyThai.php";
include_once "../class/clsDocWSign.php";
include_once "../class/clsSendReceive.php";
include_once "../class/clsCollegeDetail.php";
include_once "getPrefix.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);
$oPS = new person($oC);
$oPS2 = new person($oC);
$oPS3 = new person($oC);
$oPS4 = new person($oC);
$oPS5 = new person($oC);
$oPS6 = new person($oC);
$oPS7 = new person($oC);
$oDlc = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlc3 = new DocLineConfig($oC);
$oDlc4 = new DocLineConfig($oC);
$oDlc5 = new DocLineConfig($oC);
$oDlc6 = new DocLineConfig($oC);
$oDlc7 = new DocLineConfig($oC);
$oDlc8 = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp1 = new docLinePosition($oC);
$oDlp2= 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);
$oDoc4 = 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);
$oRs6 = new DocReceiveSend($oC);
$oRs7 = new DocReceiveSend($oC);
$oRs8 = new DocReceiveSend($oC);
$oRs9 = new DocReceiveSend($oC);
$oRs10 = new DocReceiveSend($oC);
$oPt = new ProposeType($oC);
$oStmp=new DocSendToPsTmp($oC);
$oAn=new announceDocType($oC);
$oDws = new docwsign($oC);
$oTsr = new sendreceive($oC);
$oCd = new collegedetail($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
$oDoc->SearchByKey($DocID); $oDoc->GetRecord();
$oDlc->SearchByKey($DLCID); $oDlc->GetRecord();
$oRs->SearchByKey($DrsID); $oRs->GetRecord();
?>
<title>รายละเอียดหนังสือราชการ</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<body>
<div id="tabmargin">
<form name="ps" method="post" target="_self">
<table width="98%" align="center">
<tr bgcolor="#FFFFFF">
<td width="99%">
<br>
<table width="100%" cellpadding="1" cellspacing="1">
<tr>
<td height="22"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>ข้อมูลทั่วไปของหนังสือราชการ</strong></font></td>
<td height="22" align="right"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>OIS...</strong></font></td>
</tr>
<tr><td colspan="2">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" style="border-collapse:collapse">
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? echo ShowNameDocNo($oDoc->DtID); ?></strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DtID!="15"){ if($oDoc->DocNo!=""){ echo $oDoc->DocNo; } }else{ echo '-';} ?></td></tr>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? echo ShowNameDate2($oDoc->DtID); ?></strong></td>
<td width="2%" align="center" ><strong>:</strong></td><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? if($oDoc->DocDate!="" && $oDoc->DocDate!="0000-00-00"){
echo " ".abbreDate2($oDoc->DocDate,'/');
} ?>
</td></tr>
<? //if($oDoc->DtID!=13){ ?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>" > <strong><? echo ShowNameSubject($oDoc->DtID); ?></strong></td>
<td width="2%" align="center"><strong>:</strong></td><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DocSubject!=""){ echo $oDoc->DocSubject; } ?></td>
</tr>
<? //} ?>
<? if($oDoc->DtID==1 || $oDoc->DtID==2 || $oDoc->DtID==3 || $oDoc->DtID==14 || $oDoc->DtID==13 || $oDoc->DtID==15){?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? echo ShowNameFrom($oDoc->DtID); ?></strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DocFrom!=""){ echo $oDoc->DocFrom; } ?></td>
</tr>
<? } ?>
<? if($oDoc->DtID==13){?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ชื่อผู้ได้รับการรับรอง</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->CertificatePs!=""){ echo $oDoc->CertificatePs; } ?></td>
</tr>
<? } ?>
<? if($oDoc->DtID==1 || $oDoc->DtID==2 || $oDoc->DtID==14 || $oDoc->DtID==3 || $oDoc->DtID==15){?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? if($oDoc->DtID==3 || $oDoc->DtID==15){ echo "เรียน"; }else{ echo "ถึง"; } ?></strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DocTo!=""){ echo $oDoc->DocTo; }?></td>
</tr>
<? }?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>แฟ้มหนังสือ</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td width="73%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? if($oDoc->DocPID=="0" || $oDoc->DocPID==""){ $searchDoc=$oDoc->DocID; }else{ $searchDoc=$oDoc->DocPID; } ?>
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">
<img src="../picture/attach_ico.gif" alt="" border="0" > แฟ้มที่เกี่ยวข้อง <? echo a2th($oDatt->CountDocByDocID($searchDoc)); ?> รายการ<br></font>
<?
$oDatt->SearchByDocID($searchDoc);
while($oDatt->GetRecord()){
$c++;
$pathfile="../documents/".$oDatt->DaUpFileName;
?>
<a href="<? echo $pathfile ; ?>" target="_blank"><img src="../picture/allregistered_ico.gif" alt="เปิดดูแฟ้มหนังสือ" border="0" style="cursor:pointer;" ></a>
<? echo " ".$c.". ".$oDatt->DaFileName."<br>";
} ?>
</td>
</tr>
<? if(($oDoc->DtID==1 || $oDoc->DtID==2) && ($oDoc->RsID=="2" || $oDoc->RsID=="1")){?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>อ้างถึง</strong></td>
<td width="2%" align="center"><strong>:</strong></td><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DocRef!=""){ echo $oDoc->DocRef; } ?></td>
</tr>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>สิ่งที่ส่งมาด้วย</strong></td>
<td width="2%" align="center"><strong>:</strong></td><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DocOther!=""){ echo $oDoc->DocOther; }?></td>
</tr>
<? } ?>
<? if($oDoc->DtID==3 && ($oDoc->RsID=="4" || $oDoc->RsID=="3")){?>
<tr height=22><td width="31%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>อ้างถึงหนังสือเพื่อตอบกลับ</strong></td>
<td width="2%" align="center"><strong>:</strong></td><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? if($oDoc->DocRefAns!=""){ echo $oDoc->DocRefAns; } ?></td>
</tr>
<? } ?>
<? if($oDoc->DtID==1 || $oDoc->DtID==2 || $oDoc->DtID==3 || $oDoc->DtID==14 || $oDoc->DtID==15){?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ชั้นความเร็ว</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? $oDsl->SearchByKey($oDoc->DslID); $oDsl->GetRecord(); echo " ".$oDsl->DslName;?>
</td></tr>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ชั้นความลับ</strong></td>
<td width="2%" align="center" ><strong>:</strong></td><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? $oDcl->SearchByKey($oDoc->DclID); $oDcl->GetRecord(); echo " ".$oDcl->DclName;?></td>
</tr>
<? } ?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>หมายเหตุ</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? if($oDoc->DocShortDesc!=""){ echo " ".$oDoc->DocShortDesc; } ?>
</td>
</tr>
<? if($oDoc->DocforSign=="Y"){ ?>
<tr height=22>
<td width="25%"> </td>
<td width="2%" align="center"> </td>
<td > <input name="" type="checkbox" value="" checked disabled>
ลงทะเบียนหนังสือลงนาม </td>
</tr>
<? } ?>
<? if($oDoc->sendToPs=="Y"){ ?>
<tr height=22><td width="25%"> </td>
<td width="2%" align="center"> </td>
<td >
<input name="" type="checkbox" value="" checked disabled> ส่งด่วน
</td>
</tr>
<? } ?>
<tr>
<td height="24" colspan="3"><hr color="#000099"></td>
</tr>
<tr>
<td colspan="3" height="25"> <font color="#0066CC"><strong>รายละเอียดการส่ง รับทราบ การดำเนินงาน</strong></font></td>
</tr>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ผู้ส่ง</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<?
$oDlc8->SearchByKey($oRs->DlcID); $oDlc8->GetRecord();
$oPS7->SearchByKey($oDlc8->personId); $oPS7->GetRecord();
echo GetPrefix($oPS7->prefixId).$oPS7->fName." ".$oPS7->lName;
?>
</td>
</tr>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ลักษณะหนังสือ</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? $oPt->SearchByKey($oRs->PtID);
$oPt->GetRecord();
echo $oPt->PtName;
?>
</td>
</tr>
<? if($oRs->AnID!="0"){ ?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ข้อมูลขึ้นเว็บ</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? $oAn->SearchByKey($oRs->AnID);
$oAn->GetRecord();
echo $oAn->AnName;
?>
<br> แจ้งขึ้นเว็บ <? echo ShowNameonweb($oDoc->DocShowInOut); ?>
<br> วันที่ประกาศขึ้นเว็บ
<? if($oRs->DrsstartDatePost!="0000-00-00"){
if($oRs->DrsstartDatePost==$oRs->DrsendDatePost){
echo abbreDate2($oRs->DrsstartDatePost,'/');
}else{
echo abbreDate2($oRs->DrsstartDatePost,'/')." ถึง ".abbreDate2($oRs->DrsendDatePost,'/');
}
}
?>
</td>
</tr>
<? } ?>
<? if($oRs->DrsSendDate!="0000-00-00"){ ?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ว/ด/ป ที่สั่งการ</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? if($oRs->DrsSendDate!="0000-00-00 00:00:00"){ list($DocD,$DocT) = split(' ',$oRs->DrsSendDate); echo " ".abbreDate2($DocD,'/')." ".a2th($DocT);}?>
</td>
</tr>
<? } ?>
<? if($oRs->DrsDocDueDate!="0000-00-00"){ ?>
<tr height=22><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ว/ด/ป ที่กำหนดเสร็จ</strong></td>
<td width="2%" align="center"><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<? if($oRs->DrsDocDueDate!="0000-00-00"){ echo " ".abbreDate2($oRs->DrsDocDueDate,'/'); }else{ echo "-"; } ?>
</td>
</tr>
<? } ?>
</table>
</td></tr>
<tr>
<td colspan="2">
<table border="0" width="95%" align="center">
<tr><td colspan="2">
<? if($oDoc->RsID!='2'){ //send out ?>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"><td width="40%" align="center"><strong>ผู้รับหนังสือ</strong></td><td width="15%" align="center"><strong>สถานะ<br>การรับทราบ</strong></td><td width="15%" align="center"><strong>สถานะ<br>เวลา</strong></td><td width="15%" align="center"><strong>หมายเหตุ</strong></td></tr>
<? $nomainps=0;
$oRs8->SearchByDrsFromDrsID($DrsID);
while($oRs8->GetRecord()){
?>
<td width="17%" height="22"><?
if($oRs8->personId==0){
$oDlc->SearchByKey($oRs8->DlcID); $oDlc->GetRecord();
$oDP->SearchByKey($oDlc->deptId); $oDP->GetRecord();
$oPS->SearchByKey($oRs8->DrsReceivePersonId); $oPS->GetRecord();
if($oRs8->DrsReceivePersonId!='0'){
echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName.'<br>';
}
echo " สารบรรณย่อย";
echo " (".$oDP->deptName.")";
$nomainps=1;
$sendtodept=1;
}else{
$sendtodept='';
$oPS->SearchByKey($oRs8->personId); $oPS->GetRecord();
echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName;
if($oRs8->DrsMainPs=="Y"){ echo " <font color=\"#029b0a\">[ผู้รับผิดชอบหลัก]</font>"; $nomainps=0; }else{ $nomainps=1; }
if($oRs8->DrsSendToPs=="Y"){
echo " <font color=\"#FF0000\">[ส่งด่วน]</font>";
}
}
if($oRs8->DrsSendDocNew !="0000-00-00 00:00:00"){
echo "<br> <font color=\"#FF0000\">[ส่งเพิ่มเติม] ";
list($DocD,$DocT) = split(' ',$oRs8->DrsSendDocNew);
echo abbreDate2($DocD,'/')." ".a2th($DocT);
echo "</font>";
}
?></td>
<td width="10%" align="center"><? if($sendtodept==1){
$oRs9->SearchByDrsFromDrsID($oRs8->DrsID); $oRs9->GetRecord();
if($oRs8->DrsSendDate!="0000-00-00 00:00:00" && $oRs9->DsID!='6' && $oRs9->DsID!='7' ){ list($DocD3,$DocT3) = split(' ',$oRs8->DrsSendDate); echo "รับทราบ::<br>".abbreDate2($DocD3,'/')."<br>".a2th($DocT3);}
if($oRs9->DsID=='6'){ echo "ไม่รับทราบ"; }
if($oRs9->DsID=='7'){ echo "แจ้งการส่งผิด"; }
}else{
if($oRs8->DsID=="4" && $oRs8->DrsDocReceiveDate=="0000-00-00 00:00:00"){
echo "เปิดหนังสือ";
}else if($oRs8->DsID=="5" && $oRs8->DrsDocReceiveDate=="0000-00-00 00:00:00"){
echo "เปิดแฟ้มหนังสือ";
}else if($oRs8->DsID=="5" && $oRs8->DrsDocReceiveDate!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = split(' ',$oRs8->DrsDocReceiveDate);
echo "รับทราบ::<br>".abbreDate2($DocD2,'/')."<br>".a2th($DocT2)."";
}
if($oRs8->DrsDelete=='Y'){ echo 'ลบหนังสือ'; }
if($oRs8->DsID=="7" && $oRs8->DrsDocReceiveDate!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = split(' ',$oRs8->DrsDocReceiveDate);
echo "แจ้งการส่งผิด::<br>".abbreDate2($DocD2,'/')."<br>".a2th($DocT2)."";
}
}
?></td>
<td width="10%" align="center">
<?
if($nomainps==1){
echo "-";
}else{
if($oRs8->DocRefAnsDate!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = split(' ',$oRs8->DocRefAnsDate);
if($DocD2>$oRs->DrsDocDueDate){
echo '<br>หลังเวลากำหนด<br>';
}else if($DocD2==$oRs->DrsDocDueDate){
echo '<br>ตามเวลากำหนด<br>';
}else{
echo '<br>ก่อนเวลากำหนด<br>';
}
echo abbreDate2($DocD2,'/')."<br>".a2th($DocT2);
}else{
echo '<br>ยังไม่ปฏิบัติ<br>';
}
}
?>
</td>
<td width="10%"> </td></tr>
<? $i++; }?>
</table>
<? }else{ //case send out ?>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"><td width="40%" align="center"><strong>ผู้รับหนังสือ</strong></td>
<td width="30%" align="center"><strong>สถานะ</strong></td><td width="15%" align="center"><strong>หมายเหตุ</strong></td></tr>
<?
$x=0;
$oTsr->SearchDocSend($GLOBALS["COLLEGEID"],$DocID);
while($oTsr->GetRecord()){
$oCd->SearchByKey($oTsr->tsr_to_node);
$oCd->GetRecord();
?>
<tr>
<td width="17%" height="22"><? echo " ".$oCd->collegeAbbr;
if($oTsr->tsr_SendNew!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = split(' ',$oTsr->tsr_SendNew);
echo "<br>[ส่งเพิ่มเติม ".abbreDate2($DocD2,'/')." ".a2th($DocT2)."]";
}
?></td>
<td width="30%" align="left">
<? echo Showtsr_status($oTsr->tsr_status); ?>
</td>
<td width="10%"> </td></tr>
<? $x++; }if($x==0){ ?>
<tr><td colspan="3" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีรายการหนังสือที่ส่งถึงผู้รับผิดชอบแล้ว **</font></td></tr>
<? } ?>
</table>
<? } //case send out?>
</td></tr>
</table>
</td>
</tr>
<tr><td align="center" colspan="2"><br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr><td align="right"><a onClick = "showline('<? echo $searchDoc;?>')" style="cursor:pointer;"><img src="../picture/button_showline.jpg" alt="" border="0" style="cursor:pointer;"></a>
<a onClick = "showline2('<? echo $searchDoc;?>')" style="cursor:pointer;"><img src="../picture/sign_tc.jpg" alt="" border="0" style="cursor:pointer;"></a>
</td></tr>
</table>
<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFCC99" >
<tr><td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" background="../picture/table_header_bg4.gif">
<tr>
<td width="68%" height="25">
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong> เส้นทางเดินของหนังสือ</strong></font>
</td>
</tr>
</table><br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr>
<td align="center">
<div style="overflow: auto; height: 300px; width: 100%;">
<? $lineDoc=GetLineDoc($DocID,$oDoc->DocGroup,$oDoc->DsID,$DrsID).$oRs->DrsID;
/*
$lineDoc=GetLineDoc($DocID,$oDoc->DocGroup,$oDoc->DsID,$DrsID);
$checkshow=0;
if($lineDoc!=$DrsID){ $lineDoc=$lineDoc.$oRs->DrsID; $checkshow=1;}
*/
//echo "=".$lineDoc."<br>";
// echo "-)=".$DocID."-".$oDoc->DocGroup."-".$oRs->DrsID."<br>";
// $lineDoc=GetLineDoc2($oDoc->DocGroup,$oRs->DrsID);
//echo "lineDoc=".$lineDoc."<br>";
while($lineDoc!=""){
list($line,$lineDoc)=split(',',$lineDoc,2);
//echo "=".$line."<br>";
$oRs2->SearchByKey($line);
$oRs2->GetRecord();
$oDoc2->SearchByKey($oRs2->DocID);
$oDoc2->GetRecord();
$oDlc3->SearchByKey($oDoc2->DlcID);
$oDlc3->GetRecord();
if($oRs2->DsID=="1"){
?>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr height=22>
<td colspan="3"> <strong>ข้อมูลการลงรับของหน่วยงาน <? $oDP->SearchByKey($oDlc3->deptId); $oDP->GetRecord(); echo $oDP->deptName;?></strong><br>
</td>
</tr>
<tr height=22>
<td width="33%"> ชนิดหนังสือ : <? $oDt->SearchByKey($oDoc2->DtID); $oDt->GetRecord(); echo $oDt->DtName; ?></td>
<td width="23%">เลขทะเบียน<? echo ShowNameRSDoc2($oDoc2->RsID);?> : <?php echo a2th($oDoc2->DocTypeNo);?></td>
<td width="44%">วันที่ลงทะเบียน : <?php
list($DocD,$DocT) = split(' ',$oDoc2->DocDateCreate);
echo abbreDate2($DocD,'/')." ".a2th($DocT); ?></td>
</tr>
<tr height=22>
<td colspan="3"> ลงรับโดย : <? $oPS->SearchByKey($oRs2->DrsReceivePersonId); $oPS->GetRecord(); ?>
<? echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName; ?>
<? $oDlp->SearchByKey($oDlc3->DlpID); $oDlp->GetRecord();
echo " (".ShowNamePosition($oDlp->DlpID,$oDlp->DlpName,$oDP->deptName).")"; ?></td>
</tr>
<tr>
<td colspan=3></hr></td>
</tr>
</table>
<hr color="#C87904">
<? }else if($oRs2->DsID=="2"){ ?>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" style="border-collapse:collapse">
<tr><td colspan="3"> <strong>ข้อมูลการเสนอลงนาม</strong></td></tr>
<tr><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> การบันทึกต่อเนื่อง</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo nl2br($oRs2->DrsPropose); ?></td>
</tr>
<tr height=22>
<td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ผู้เสนอลงนาม</td>
<td width="0%" align="center" ><strong>:</strong></td>
<? $oRs3->SearchByKey($oRs2->DrsFromDrsID);
$oRs3->GetRecord();
?>
<td width="75%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>" align="center">
<? $oPS->SearchByKey($oRs2->DrsPsIDCreate); $oPS->GetRecord(); ?>
<? echo GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName." "; ?>
<?
$oDlc5->SearchByKey($oRs2->DrsDlcIDCreate); $oDlc5->GetRecord();
$oDlp->SearchByKey($oDlc5->DlpID); $oDlp->GetRecord();
echo "(".ShowNamePosition($oDlp->DlpID,$oDlp->DlpName,$oDP->SearchDeptName($oDlc5->deptId)).") ";
list($DocD,$DocT) = split(' ',$oRs2->DrsReceiveDate );
echo "<br>".abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<td colspan=3><hr color="#C87904"></hr></td>
</tr>
</table>
<? if($oRs2->DrsWSign=='Y'){ //case DrsWSign
$oDws->SearchByDrsIDDocID($oRs2->DrsID,$oRs2->DocID);
$oDws->GetRecord();
?>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" style="border-collapse:collapse">
<tr><td colspan="3"> <strong>ข้อมูลการรอเสนอผอก./หน.</strong></td></tr>
<tr><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> การบันทึกต่อเนื่อง</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo nl2br($oDws->DocSign); ?></td>
</tr>
<tr height=22>
<td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ผู้ลงนาม</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td width="75%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>" align="center">
<? $oPS->SearchByKey($oDws->personId); $oPS->GetRecord(); ?>
<? echo GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName." "; ?>
<? $oDlc5->SearchByKey($oDws->DlcID); $oDlc5->GetRecord();
$oDlp->SearchByKey($oDlc5->DlpID); $oDlp->GetRecord();
echo "(".ShowNamePosition($oDlp->DlpID,$oDlp->DlpName,$oDP->SearchDeptName($oDlc5->deptId)).") ";
list($DocD,$DocT) = split(' ',$oDws->signDateTime);
echo abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<tr>
<td colspan=3><hr color="#C87904"></hr></td>
</tr>
</table>
<? } //case DrsWSign?>
<? }else if($oRs2->DsID=="3"){
$oRs4->SearchByKey($oRs2->DrsFromDrsID);
$oRs4->GetRecord();
if($oRs4->DrsByPass!="Y"){
?>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" style="border-collapse:collapse">
<tr><td colspan="3"> <strong>ข้อมูลการลงนาม</strong></td></tr>
<tr><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> การบันทึกต่อเนื่อง</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo nl2br($oRs2->DrsSign); ?></td>
</tr>
<tr height=22>
<td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ผู้ลงนาม</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td width="75%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>" align="center">
<? $oPS->SearchByKey($oRs2->DrsPsIDCreate); $oPS->GetRecord(); ?>
<? echo GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName." "; ?>
<? $oDlc5->SearchByKey($oRs2->DrsDlcIDCreate); $oDlc5->GetRecord();
$oDlp->SearchByKey($oDlc5->DlpID); $oDlp->GetRecord();
echo "(".ShowNamePosition($oDlp->DlpID,$oDlp->DlpName,$oDP->SearchDeptName($oDlc5->deptId)).") ";
list($DocD,$DocT) = split(' ',$oRs2->DrsReceiveDate );
echo "<br>".abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<tr>
<td colspan=3><hr color="#C87904"></hr></td>
</tr>
</table>
<? }
}else if($oRs2->DsID=="0" || $oRs2->DsID=="4" || $oRs2->DsID=="5"){
//$oRs6->SearchByDocGroupDrsFromDrsID($oRs2->DocGroup,$oRs2->DrsID);
$oRs6->SearchByKey($oRs2->DrsID);
$oRs6->GetRecord();
//if($oRs2->DrsSendDate!="0000-00-00 00-00-00"){ //show status=3 send to person
?>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" style="border-collapse:collapse">
<tr><td colspan="3"> <strong>ข้อมูลการส่งถึงผู้รับผิดชอบ</strong></td></tr>
<?
if($oRs6->PtID!=0 && $oRs6->PtID!=""){
$oPt->SearchByKey($oRs6->PtID);
$oPt->GetRecord();
?>
<? if($oRs6->DrsSendDocNew!="0000-00-00 00:00:00"){ ?>
<tr><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ส่งเพิ่มเติม</td>
<td><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>">
<? list($DocD2,$DocT2) = split(' ',$oRs6->DrsSendDocNew);
echo abbreDate2($DocD2,'/')." ".a2th($DocT2);
?></td>
</tr>
<? } ?>
<tr><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ลักษณะหนังสือ</td>
<td><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo $oPt->PtName; ?></td>
</tr>
<? } ?>
<? if($oRs6->AnID!=0 && $oRs6->AnID!=""){
$oAn->SearchByKey($oRs6->AnID);
$oAn->GetRecord();
?>
<tr><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ข้อมูลขึ้นเว็บ</td>
<td><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo $oAn->AnName; ?>
<br> แจ้งขึ้นเว็บ <? echo ShowNameonweb($oDoc2->DocShowInOut); ?>
<br> วันที่ประกาศขึ้นเว็บ
<? if($oRs6->DrsstartDatePost!="0000-00-00"){
if($oRs6->DrsstartDatePost==$oRs6->DrsendDatePost){
echo abbreDate2($oRs6->DrsstartDatePost,'/');
}else{
echo abbreDate2($oRs6->DrsstartDatePost,'/')." ถึง ".abbreDate2($oRs6->DrsendDatePost,'/');
}
}
?>
</td>
</tr>
<? } ?>
<tr><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> การบันทึกต่อเนื่อง</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo nl2br($oRs6->DrsPropose); ?></td>
</tr>
<tr height=22>
<td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ผู้ส่งหนังสือ</td>
<td width="0%" align="center" ><strong>:</strong></td>
<td width="75%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>" align="center">
<? $oPS->SearchByKey($oRs6->DrsPsIDCreate); $oPS->GetRecord(); ?>
<? echo GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName." "; ?>
<?
$oDlc5->SearchByKey($oRs6->DrsDlcIDCreate); $oDlc5->GetRecord();
$oDlp->SearchByKey($oDlc5->DlpID); $oDlp->GetRecord();
echo "(".ShowNamePosition($oDlp->DlpID,$oDlp->DlpName,$oDP->SearchDeptName($oDlc5->deptId)).") ";
$oRs10->SearchByKey($oRs6->DrsFromDrsID);
$oRs10->GetRecord();
list($DocD,$DocT) = split(' ',$oRs10->DrsSendDate);
echo "<br>".abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<?
// $oDoc3->SearchByKey($oRs6->DocID); $oDoc3->GetRecord(); //echo "----".$oDoc3->DocID;
if($oRs6->DrsDocDueDate!="0000-00-00"){ ?>
<tr><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> กำหนดระยะเวลาดำเนินการ</td>
<td><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> ภายในวันที่ <? echo abbreDate2($oRs6->DrsDocDueDate,'/');?></td></tr>
<? } ?>
<? $MainPs=$oRs7->SearchByDrsFromDrsIDDrsMainPsY($oRs6->DrsFromDrsID);
if($MainPs!="" && $MainPs!="0"){
$oPS2->SearchByKey($MainPs); $oPS2->GetRecord();
?>
<tr>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_21"]; ?>"> ผู้รับผิดชอบหลัก</td><td><strong>:</strong></td>
<td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_22"]; ?>"> <? echo GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName." "; ?></td>
</tr>
<? } ?>
<tr>
<td colspan=3><hr color="#C87904"></hr></td>
</tr>
</table>
<? } //show status=3 send to person?>
<? // }
} //each lineDoc ?>
</div> </td>
</tr>
<tr><td> </td></tr>
</table>
</td></tr>
</table>
</td></tr>
<tr><td colspan="2" align="center"><input type="button" name="cancel" value="ปิดหน้าต่าง" onClick="window.close();"></td></tr>
</table>
</form>
</div>
</body>
<script>
function showline(p){
FileName = "showlinedocTable.php?searchDoc="+p;
var w=900;
var h=500;
strOption = "scrollbars=yes,left=370,top=100,menubar=1,width=" + w + ",height=" + h;
window.open(FileName,"",strOption);
}
function showline2(p){
FileName = "showlinedocTable2.php?searchDoc="+p;
var w=900;
var h=500;
strOption = "scrollbars=yes,left=370,top=100,menubar=1,width=" + w + ",height=" + h;
window.open(FileName,"",strOption);
}
</script>
|