Viewing file: showSendDoc.php (51.66 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 "../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 "../class/clsannounceDocType.php";
include_once "../class/clspsdept.php";
include_once "../class/clsDocWSign.php";
include_once "getPrefix.php";
include_once "../class/clsSysConfig.php";
include_once "../class/clsDocInboxStaff.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);
$oPS5 = new person($oC);
$oPS6 = new person($oC);
$oPS7 = new person($oC);
$oUG = new umgroup($oCu);
$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);
$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);
$oDoc5 = 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);
$oRstt = new DocReceiveSend($oC);
$oPt = new ProposeType($oC);
$oStmp=new DocSendToPsTmp($oC);
$oStmp2=new DocSendToPsTmp($oC);
$oAn=new announceDocType($oC);
$oAn=new announceDocType($oC);
$oPSd = new psdept($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
$oDws = new docwsign($oC);
$oSys = new sysConfig($oC);
$InputThai=$oSys->SearchByInputThai();
$oDws = new docwsign($oC);
$oDbxS = new DocInboxStaff($oC);
$oDbxS1 = new DocInboxStaff($oC);
$oDbxS3 = new DocInboxStaff($oC);
$oDbxS2 = new DocInboxStaff($oC);
doCheckAll();
if($_SESSION['DLCID'] && $_SESSION['one_position']!="1"){ include_once "selectposition.php";
?>
<?
$oDoc->SearchByKey($DocID); $oDoc->GetRecord();
$oDlc->SearchByKey($_SESSION['DLCID']); $oDlc->GetRecord();
if($_SESSION['DLCIDSECOND']=="Y"){
$oDlc7->SearchByKey($_SESSION['DLCIDSECONDID']); $oDlc7->GetRecord();
$mypersonId=$oDlc7->personId;
}else{
$mypersonId=$oDlc->personId;
}
$oDlp1->SearchByKey($oDlc->DlpID); $oDlp1->GetRecord();
$oRs->SearchByKey($DrsID); $oRs->GetRecord();
$DlcdeptId=$oDlc->deptId;
$DrsIDshow=$DrsID;
$getDlpIDCenter=searchGetDlpIDCenter($oDlc->DlpID);
$oSys->RSsysConfig(); $oSys->GetRecord();
?>
<html>
<head>
<script language="javascript" src="../source/calendarDateInput.js"></script>
<script>window.onload=
function defaultDivDisplay(){
selectPtID=document.getElementById("PtID").value;
if(selectPtID==0 || selectPtID==1 || selectPtID==2 || selectPtID==3){
for (var i=0; i<document.ff.length; i++)
{
if(document.ff.elements[i].type == 'radio')
{
document.ff.elements[i].style.display = "none";
}
}
}
if(document.getElementById("name").value==""){
document.getElementById("div2").style.display = "none";
}
document.getElementById("show_info").style.display = "";
}
</script>
<script language="javascript">
var XMLHttpRequestObject=false;
if(window.XMLHttpRequest){
XMLHttpRequestObject=new XMLHttpRequest();
}else if(window.ActiveXObject){
XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
}
function getData(data,divID){
document.getElementById("div2").style.display = "";
if(XMLHttpRequestObject){
var searchName = document.getElementById("name").value;
var obj = document.getElementById(divID);
data=data+"?name="+searchName;
XMLHttpRequestObject.open("GET",data);
XMLHttpRequestObject.onreadystatechange=function(){
if(XMLHttpRequestObject.readyState==4 &&
XMLHttpRequestObject.status==200){
obj.innerHTML=XMLHttpRequestObject.responseText;
}
}
XMLHttpRequestObject.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
XMLHttpRequestObject.send(null);
}
}
</script>
<script src="getinfo.js"></script>
<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="updoc" name="updoc" src="" style="width:0px;height:0px;border:0"></iframe>
<table width="100%" align="center">
<tr><td >
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="sendDoc.php">ส่งหนังสือถึงผู้รับผิดชอบ</a>
<img src="../picture/ico3.gif" width="10" border="0" align="absmiddle">รายละเอียดข้อมูลการส่งหนังสือถึงผู้รับผิดชอบ</font>
</font></legend>
<table align="center" width="93%" >
<tr>
<td width="68%" height="25"><img src="../picture/official_letter.gif" border="0" >
<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong>การส่งหนังสือถึงผู้รับผิดชอบ</strong></font>
</td>
</tr>
<tr>
<td colspan="3"><hr color="#000099"></hr>
</td>
</tr>
</table>
<table width="93%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>" style="border-collapse:collapse"><tr><td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" background="../picture/table_header_bg2.gif">
<tr>
<td width="68%" height="25">
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>
รายละเอียดของหนังสือ: </strong></font>
<font color="<?php echo $GLOBALS["COLOR_FONT_8"]; ?>" size="2"><strong>
<? if($oDoc->RsID==1){
echo $oRSt->SearchShowRsName(1);
}else if($oDoc->RsID==2){
echo $oRSt->SearchShowRsName(2);
}else if($oDoc->RsID==3){
echo $oRSt->SearchShowRsName(3);
}else if($oDoc->RsID==4){
echo $oRSt->SearchShowRsName(4);
}
?>
</strong></font>
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>
ชนิดหนังสือ: </strong></font>
<font color="<?php echo $GLOBALS["COLOR_FONT_8"]; ?>" size="2"><strong>
<? $oDt->SearchByKey($oDoc->DtID);
$oDt->GetRecord();
echo $oDt->DtName;
?>
</strong></font>
</td>
</tr>
</table>
<form name="gg" METHOD="POST" action="processAddDocAtt.php" enctype="multipart/form-data" target="updoc"><? // ?>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" >
<tr><td> </td></tr>
<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" border="0" > แฟ้มที่เกี่ยวข้อง <? echo a2th($oDatt->CountDocByDocID($searchDoc)); ?> รายการ
<? echo downloadProgramRead($oSys->downloadPpdf); ?></font><br>
<?
$oDatt->SearchByDocID($searchDoc);
while($oDatt->GetRecord()){
$c++;
$pathfile="../documents/".$oDatt->DaUpFileName;
?>
<a href="<? echo $pathfile ; ?>" target="_blank"><img src="../picture/allregistered_ico.gif" title="เปิดดูแฟ้มหนังสือ" border="0" style="cursor:pointer;" ></a><? if($oDatt->DaAddNew=='Y' && ($oDoc->DocPID==0 || $oDlp1->GSeeRepHign=='Y')){ ?> <img src="../picture/delete1.gif" title="ลบแฟ้มหนังสือ" border="0" style="cursor:pointer;" onClick='return checkDelete(<? echo $oDatt->DaID; ?>)'><? } ?>
<? echo " ".$c.". ".$oDatt->DaFileName."<br>";
} ?>
<? include("uploadDocSended.php"); echo manageDocAtt2($searchDoc);?>
</td>
</tr>
<?
$oSys->RSsysConfig();
$oSys->GetRecord();
$sizefileM=($oSys->filesizebyte/1024/1024);
if($oDoc->DocPID==0){ ?>
<tr><td width="25%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>แฟ้มหนังสือเพิ่มเติม</strong></td><td width="2%" align="center"><b>:</b></td><td><br>
<table width="100%" border=1 cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#6CABF9">
<tr><td height="22"> <b>เพิ่มแฟ้มหนังสือเพิ่มเติม (ก่อนส่งถึงผู้รับผิดชอบ)</b> </td></tr>
<tr>
<td height="75" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_20"]; ?>">
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">
คลิ๊กที่ปุ่ม
"Browse.." เพื่อเลือกแฟ้ม จากนั้น<br> คลิ๊กที่ปุ่ม "เพิ่มแฟ้ม"
เพื่อเพิ่มแฟ้มเข้าในรายการ
<input id="fileupload" name="fileupload" type="file" size="30"><input id="btnUpload" type="submit" value="เพิ่มแฟ้ม" onClick='return getDataDoc(<? echo $searchDoc; ?>);'>
<input type="hidden" name="searchDoc" id="searchDoc" value="<? echo $searchDoc; ?>">
<input type="hidden" name="DrsID" id="DrsID" value="<? echo $DrsID; ?>">
<input type="hidden" name="DocID" id="DocID" value="<? echo $DocID; ?>">
<input name="DlcID" id="DlcID" type="hidden" value="<?php echo $DLCID; ?>">
<input name="DtmpID" id="DtmpID" type="hidden">
<input name="page_id2" id="page_id2" type="hidden" value="<?php echo $page_id2; ?>">
<input type="hidden" name="method" id="method" >
<input type="hidden" name="folderstaff2" id="folderstaff2" value="<? echo $folderstaff2; ?>">
<input type="hidden" name="forfolderstaff2" id="forfolderstaff2" value="<? echo $forfolderstaff2; ?>">
</font>
</td>
</tr>
</table>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">หมายเหตุ*** ขนาดแฟ้มไม่เกิน
<? echo $sizefileM; ?> MB ,ชื่อแฟ้มไม่ควรจะประกอบด้วย
จุด(.) และ ,</font> <br><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="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->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>
<? } ?>
<? if($oDoc->DtID==1 || $oDoc->DtID==2 || $oDoc->DtID==14){?>
<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->DocDeptOwner!=""){ echo " ".$oDoc->DocDeptOwner; } ?></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->DocTelOwner!=""){ echo " ".$oDoc->DocTelOwner; } ?></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->DocFaxOwner!=""){ echo " ".$oDoc->DocFaxOwner; } ?></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->DocCopySend!=""){ echo " ".$oDoc->DocCopySend; } ?></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->DocContactE!=""){ echo " ".$oDoc->DocContactE; } ?></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>
<? } ?>
<? if(($oDoc->DtID==1 || $oDoc->DtID==2 || $oDoc->DtID==14) && $oDoc->DocSendReal=="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> </td></tr>
</table> </form>
</td></tr></table>
<form name="ff" METHOD="POST" action="processSendDoc.php">
<?
//------------------Sign------------------------------------------------------------------?>
<br>
<table width="93%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"><tr><td >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" background="../picture/table_header_bg2.gif">
<tr>
<td width="68%" height="25">
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>
รายละเอียดสำหรับส่งหนังสือถึงผู้รับผิดชอบ (กรณีต้องการส่งหนังสือถึงผู้รับผิดชอบ)</strong></font>
</td>
</tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" >
<tr><td> </td><td> </td></tr>
<tr align="center" valign="top">
<td width="45%" align="center" valign="top"><? include("showSendDocSign.php");?></td><td width="45%" align="center" valign="top"><? include("showSendDocToPs.php");?>
<div align="left"><br>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <strong>คำชี้แจง
</strong></font></legend>
<img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว<br> <img src="../picture/radio_seleted2.gif"> หมายถึงเลือกหน่วยงานหลัก/ผู้รับผิดชอบหลัก<br>
<input name="" type="checkbox" value="" checked disabled>หมายถึงเลือกผู้รับหนังสือ </fieldset></div></td>
</tr>
<?
$checkcountps=0;
$oStmp2->SearchByDrsID($oRs->DrsID);
$checkcountps=$oStmp2->NumRow();
if($oDoc->sendToPs=="Y" || $checkcountps!="0"){ ?><input type="hidden" name="showsendtops" id="showsendtops" value="Y"> <? }
?>
<tr><td colspan="3" > </td></tr>
<tr>
<td colspan="3" height="30" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_2"]; ?>"><input name="showsendtops" id="showsendtops" type="checkbox" value="Y" <? if($oDoc->sendToPs=="Y" || $checkcountps!="0"){ echo 'disabled checked'; }else if($checksearchPs==1){ echo "checked"; } ?> onClick="up_downList('<? echo $checksearchPs; ?>')">
<strong>เพิ่มการส่งด่วน (ส่งถึงบุคคลทันที)</strong></td>
</tr>
<tr height=22 <? if($oDoc->sendToPs!="Y" && $checkcountps=="0" && $checksearchPs!=1){ ?> id="openshow" style="display:none" <? } ?> ><td colspan="3">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_2"]; ?>" height=22>
<td width="50%" align="left" colspan="2"> ส่งด่วน [เพิ่มผู้รับหนังสือ]</td>
</tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>"><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>">
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> ชื่อ - นามสกุล ::</font><input name="name" id="name" type="text" value="<? echo $name; ?>" size="15"> <input type="button" value="ค้นหา" onclick="getData('showSelectName.php','div2')">
<input type=button value="เลือก" onclick="ShowInfo(<? echo $DrsID;?>)">
<div style="overflow: auto; height: 100px; width: 100%;" align="left"><span id="div2">
<table width="94%" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>"><input name="check_sendToPs" type="hidden" value="0">
<? if($name!=''){
$oPS4->SearchByName($name);
while($oPS4->GetRecord()){
if(($i%2) == 0)
echo "<tr>";
else
echo "<tr bgcolor=\"".$GLOBALS['COLOR_BG_TABLE_8']."\">";
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>"><td> <input name="check_sendToPs" type="checkbox" value="<? echo $oPS4->personId; ?>" onclick='test()'>
<? echo " ".GetPrefix($oPS4->prefixId).$oPS4->fName." ".$oPS4->lName; ?></td></tr>
<? } } ?>
</table><input type="hidden" id="st_val" name="store_DrsID" style="border:#000000 1px solid" > </span>
</div>
</td>
<td width="50%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>">
<tr>
<td height=22 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" colspan="3"> <strong>รายชื่อบุคลากรที่ต้องการส่งด่วน</strong></td>
</tr>
<tr><td bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"><div id=show_info>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>">
<? $i=0; $checkcountps=0;
$oStmp->SearchByDrsID($oRs->DrsID);
while($oStmp->GetRecord()){
$i++;
$oPS5->SearchByKey($oStmp->PsID); $oPS5->GetRecord();
?>
<tr ><td width="83%" height=22 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>"> <? echo " ".GetPrefix($oPS5->prefixId).$oPS5->fName." ".$oPS5->lName; ?></td>
<td width="17%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" align="center"><img src="../picture/cancel.gif" title="ลบ" border="0" style="cursor:pointer;" onclick="ShowInfo2('<? echo $oStmp->DtPsID; ?>','<? echo $DrsID; ?>');"></td>
</tr>
<? } ?>
<? if($i==0){ ?>
<tr ><td height=22 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" > <strong>-</strong></td>
<td height=22 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" > </td>
</tr>
<? } $checkcountps=$i; ?>
</table>
</div>
</td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<? //} ?>
<tr><td colspan="3"> </td></tr>
<? if($oSys->acceptDoc==Y){ ?>
<tr><td colspan="2">*** กรณีการส่งหนังสือถึงผู้ใช้ทั่วไป หากผู้รับหนังสือเป็นคนเดียวกับผู้ส่ง หรือเป็นผู้ลงนามหนังสือนี้ หนังสือที่ถูกส่งจะมีสถานะเป็นรับทราบแล้ว </td></tr>
<tr><td> </td></tr>
<? } ?>
<tr><td colspan="2" align="center">
<input type="submit" name="addsend" value="ส่งหนังสือ" onClick="return checkFormat('<? echo $mainPsselect; ?>','<? echo $firstpost; ?>','<? echo $getDlpIDCenter;?>');" <? if($oDlc->DlcActive!='Y'){ echo "disabled"; } ?>>
<input name="mainPsselect" id="mainPsselect" type="hidden">
<input type="button" name="cancel" value="กลับหน้าหลัก" onClick="location.href = 'sendDoc.php?page_id2=<? echo $page_id2;?>&searchpredocdate=<? echo $searchpredocdate;?>&selectpredocdatevalue=<? echo $selectpredocdatevalue;?>&searchNamePre=<? echo $searchNamePre;?>&searchNoPre=<? echo $searchNoPre;?>&selectpreDtID=<? echo $selectpreDtID;?>&folderstaff2=<? echo $folderstaff2; ?>&forfolderstaff2=<? echo $forfolderstaff2;?>&searchDeptPre=<? echo $searchDeptPre;?>'">
<input type="hidden" name="method" id="method" >
<input type="hidden" name="checkcountps" id="checkcountps" value="<? echo $checkcountps; ?>">
<input type="hidden" name="cansend" id="cansend" value="<? echo $cansend; ?>">
<input type="hidden" name="DlcdeptId" id="DlcdeptId" value="<? echo $DlcdeptId; ?>">
<input type="hidden" name="DrsID" id="DrsID" value="<? echo $DrsID; ?>">
<input type="hidden" name="DocID" id="DocID" value="<? echo $DocID; ?>">
<input type="hidden" name="DocGroup" id="DocGroup" value="<? echo $MaxDocGroup; //echo $oDoc->DocGroup; ?>">
<input type="hidden" name="DlcIDlogin" id="DlcIDlogin" value="<? echo $DLCID; ?>">
<input type="hidden" name="personId" id="personId" value="<? echo $mypersonId; ?>">
<input type="hidden" name="firstpost" id="firstpost" value="<? echo $firstpost; ?>">
<input type="hidden" name="deletePstmp" id="deletePstmp" >
<input type="hidden" name="checksearchPs" id="checksearchPs" >
<input type="hidden" name="searchpredocdate" id="searchpredocdate" value="<? echo $searchpredocdate; ?>">
<input type="hidden" name="selectpredocdatevalue" id="selectpredocdatevalue" value="<? echo $selectpredocdatevalue; ?>">
<input type="hidden" name="searchNamePre" id="searchNamePre" value="<? echo $searchNamePre; ?>">
<input type="hidden" name="searchNoPre" id="searchNoPre" value="<? echo $searchNoPre; ?>">
<input type="hidden" name="selectpreDtID" id="selectpreDtID" value="<? echo $selectpreDtID; ?>">
<input type="hidden" name="page_id2" id="page_id2" value="<? echo $page_id2; ?>">
<input type="hidden" name="folderstaff2" id="folderstaff2" value="<? echo $folderstaff2; ?>">
<input type="hidden" name="forfolderstaff2" id="forfolderstaff2" value="<? echo $forfolderstaff2; ?>">
<input type="hidden" name="searchPreTypeNoF" id="searchPreTypeNoF" value="<? echo $searchPreTypeNoF; ?>">
<input type="hidden" name="searchPreTypeNoT" id="searchPreTypeNoT" value="<? echo $searchPreTypeNoT; ?>">
</td></tr>
</table>
</td></tr>
</table><br>
<table width="93%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"><tr><td >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" background="../picture/table_header_bg2.gif">
<tr>
<td width="68%" height="25">
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>
รายละเอียดสำหรับการยุติหนังสือ (กรณีไม่ต้องการส่งหนังสือถึงผู้รับผิดชอบ)</strong></font>
</td>
</tr>
<tr><td bgcolor="#FFFFFF"><br> ** กรณีต้องการยุติหนังสือ ไม่ต้องการส่งหนังสือถึงผู้รับผิดชอบ <input type="submit" name="addsend" value="ยุติหนังสือ" onClick="return checkFormatEndDoc();"></td></tr>
<tr><td align=center bgcolor="#FFFFFF"></td></tr>
</table>
</td></tr>
</table>
<?
//-----------------Line Doc--------------------------------------------------------------?>
<br>
<? if($oDlc->DlcView=="Y"){ ?>
<table width="93%" 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" border="0" style="cursor:pointer;"></a>
<a onClick = "showline2('<? echo $searchDoc;?>')" style="cursor:pointer;"><img src="../picture/sign_tc.jpg" border="0" style="cursor:pointer;"></a>
</td></tr>
</table>
<table width="93%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFCC99" style="border-collapse:collapse">
<tr><td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" 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;
//echo "lineDoc=".$lineDoc."<br>";
while($lineDoc!=""){
list($line,$lineDoc)=preg_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="90%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA">
<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="37%"> ชนิดหนังสือ : <? $oDt->SearchByKey($oDoc2->DtID); $oDt->GetRecord(); echo $oDt->DtName; ?></td>
<td width="19%">เลขทะเบียน<? echo ShowNameRSDoc2($oDoc2->RsID);?> : <?php echo a2th($oDoc2->DocTypeNo);?></td>
<td width="44%">วันที่ลงทะเบียน : <?php
list($DocD,$DocT) = preg_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 color="#C87904"></hr></td>
</tr>
</table>
<? if($oRs2->DrsByPass=="Y"){
$oRs3->SearchByDrsFromDrsID($oRs2->DrsID);
$oRs3->GetRecord();
?>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" >
<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->DrsByPassPropose); ?></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($oRs3->DrsPsIDCreate); $oPS->GetRecord(); ?>
<? echo GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName." "; ?>
<? $oDlc5->SearchByKey($oRs2->DlcID); $oDlc5->GetRecord();
$oDlp->SearchByKey($oDlc5->DlpID); $oDlp->GetRecord();
echo "(".ShowNamePosition($oDlp->DlpID,$oDlp->DlpName,$oDP->SearchDeptName($oDlc5->deptId)).")";
list($DocD,$DocT) = preg_split('[ ]',$oRs2->DrsSendDate );
echo '<br>'.abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<tr>
<td colspan=3><hr color="#C87904"></hr></td>
</tr>
</table>
<? } //DrsByPass?>
<? }else if($oRs2->DsID=="2"){ ?>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" >
<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) = preg_split('[ ]',$oRs2->DrsReceiveDate );
echo abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<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="90%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" >
<tr><td colspan="3"> <strong>ข้อมูลการ<? echo $GLOBALS['DOCFORSIGNNAME'];?></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) = preg_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="90%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA">
<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) = preg_split('[ ]',$oRs2->DrsReceiveDate );
echo abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<tr>
<td colspan=3><hr color="#C87904"></hr></td>
</tr>
</table>
<? } //not DrsByPass
}else if($oRs2->DsID=="0" || $oRs2->DsID=="4" || $oRs2->DsID=="5"){ ?>
<?
// if($oRs2->DrsSendDate!="0000-00-00 00:00:00"){ //show status=3 send to person ?>
<? $oRs6->SearchByKey($oRs2->DrsID);
$oRs6->GetRecord();
//echo "DrsID=".$oRs6->DrsID."<br>";
?>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#DADADA" >
<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) = preg_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)).") ";
$oRs8->SearchByKey($oRs6->DrsFromDrsID);
$oRs8->GetRecord();
list($DocD,$DocT) = preg_split('[ ]',$oRs8->DrsSendDate);
echo abbreDate2($DocD,'/')." ".a2th($DocT);
?>
</td>
</tr>
<? //$oDoc3->SearchByKey($oRs6->DocID); $oDoc3->GetRecord();
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>
<? } ?>
<?
$MainPsDept=$oRs9->SearchByDrsFromDrsIDDrsMainPsDept($oRs2->DrsFromDrsID);
if($MainPsDept!="" && $MainPsDept!="0"){
$oDlc6->SearchByKey($MainPsDept);
$oDlc6->GetRecord();
$oDP3->SearchByKey($oDlc6->deptId); $oDP3->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 $oDP3->deptName; ?></td>
</tr>
<? } ?>
<?
$MainPs=$oRs7->SearchByDrsFromDrsIDDrsMainPsY($oRs2->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>
<? } //DrsView?><br>
<? if($oDlp1->DlpPID==0){
//==================================================================================
//========= จัดเก็บหนังสือในโฟลเดอร์ =========================================================
//==================================================================================
?>
<div id="showDIb" ><? //include("showSelectDIb_preSendDoc.php");?></div>
<? } ?>
<br>
</form>
</fieldset> <table width="95%" border="0" align="center">
<tr>
<td width="76" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>หมายเหตุ
: </strong> </font></td>
<td width="618" align="left"><img src="../picture/allregistered_ico.gif" border="0" >
<font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">คลิกเพื่อเปิดดูแฟ้มหนังสือ </font></td>
</tr>
<tr>
<td width="76"> </td>
<td width="618" align="left">
<font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> </font></td>
</tr></table>
</td>
</tr>
</table>
</body>
</html>
<? }else{ include_once "unselectposition.php"; } ?>
<script language="javascript">
function checkFormat(p,r,checkdlpid){
//alert(document.ff.mainPs.value);
//mainPsselect=document.getElementById('mainPs').value;
//alert(mainPsselect);
if(document.getElementById('AnID').value!=0 && document.getElementById('AnIDselected').value!='1' && document.getElementById('DocShowIn').checked==false && document.getElementById('DocShowOut').checked==false){
if(!document.getElementById('DocShowIn').checked && !document.getElementById('DocShowOut').checked){
alert("กรุณาเลือกประเภทการแจ้งข่าวบน\nInternet (ภายนอก) และ/หรือ Intranet (ภายใน)");
return false;
}
}
if(document.getElementById('AnID').value!=0 && r=="1"){
f = document.ff;
var date1 = f.DrsstartDatePost.value.split("/");
var date2 = f.DrsendDatePost.value.split("/");
//Set the two dates
date1 = new Date(eval(date1[2]), eval(date1[1]-1), eval(date1[0]));
date2 = new Date(eval(date2[2]), eval(date2[1]-1), eval(date2[0])); //Month is 0-11 in JavaScript
//Set 1 day in milliseconds
var one_day = 1000*60*60*24;
//Calculate difference btw the two dates, and convert to days
var diff = Math.ceil((date2.getTime()-date1.getTime())/(one_day));
if(diff < 0){
alert("กรุณาตรวจสอบช่วง 'วันที่เริ่มต้น' ควรน้อยกว่า 'วันที่สิ้นสุด' !");
return false;
}
}
if(checkdlpid!='Y'){
if(document.getElementById('PtID').value==0){
alert("กรุณาเลือกลักษณะหนังสือ");
document.getElementById('PtID').focus();
return false ;
}
}
if(document.getElementById('PtID').value==3){
if(!document.getElementById('checkDocSpeedDate').checked){
alert('กรุณากำหนดระยะเวลาดำเนินการ');
return false;
}
}
var agree=confirm("คุณต้องการส่งหนังสือแน่นอนใช่หรือไม่ ?");
if (agree){
/*
if(mainPsselect=="" || mainPsselect=="0"){
document.ff.mainPsselect.value=p;
}else{
document.ff.mainPsselect.value=mainPsselect;
}
*/
document.ff.method.value="addsend";
return true;
}else{
return false ;
}
}
function checkFormatEndDoc(){
var agree=confirm("คุณต้องการยุติหนังสือแน่นอนใช่หรือไม่ ?");
if (agree){
document.ff.method.value="addenddoc";
return true;
}else{
return false ;
}
}
function changePtID(){
document.ff.method.value="addsend2";
document.ff.submit();
return true;
}
function radioSelectType(val){
document.ff.mainPs.value=val;
}
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);
}
function up_downList(checksearchPs){
var mybrowser=navigator.userAgent;
if(checksearchPs!=1){
if(mybrowser.indexOf('MSIE')>0){
if(openshow.style.display=='none'){
openshow.style.display='';
}else if(openshow.style.display==''){
openshow.style.display='none';
}
}else{
if(document.getElementById( 'openshow' ).style.display=='none'){
document.getElementById( 'openshow' ).setAttribute( 'style', 'display:' );
}else if(document.getElementById( 'openshow' ).style.display==''){
document.getElementById( 'openshow' ).setAttribute( 'style', 'display:none' );
}
}
}
}
function changeDivDisplay(id)
{
for (var i=0; i<document.ff.length; i++)
{
if(document.ff.elements[i].type == 'radio')
{
if(id==0 || id==1 || id==2 || id==6){
document.ff.elements[i].style.display = "none";
}else{
document.ff.elements[i].style.display = "";
}
}
}
}
function getDataDoc(searchDoc){
if(document.gg.fileupload.value==""){
alert("กรุณา Browse เลือกเแฟ้ม");
return false ;
}
document.gg.method.value="uploadfile";
document.gg.submit();
}
function checkDelete(DtmpID){
var agree=confirm("คุณต้องการลบแฟ้มหนังสือนี้แน่นอนใช่หรือไม่ ?");
if (agree){
document.gg.DtmpID.value = DtmpID;
document.gg.method.value="delfile";
document.gg.submit();
}else{
return false ;
}
}
function test()
{
var check_sendToPs_len = document.ff.check_sendToPs.length;
if(check_sendToPs_len==0)
{
document.getElementById('st_val').value ='';
}
document.getElementById('st_val').value ='';
for ( i = 0; i<check_sendToPs_len ; i++)
{
if(document.ff.check_sendToPs[i].checked)
{
document.getElementById('st_val').value+=document.ff.check_sendToPs[i].value+',';
}
}
fin_str = document.getElementById('st_val').value;
document.getElementById('st_val').value = fin_str.replace(',on,','');
}
</script>
|