Viewing file: addRegisDoc.php (27.29 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 "funct.php";
include_once "../link/keyThai.php";
include_once "../class/clsSysConfig.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);
$oPS = new person($oC);
$oDlc = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp2 = new docLinePosition($oC);
$oRSt = new receiveSendType($oC);
$oDt = new doctype($oC);
$oDt2 = new doctype($oC);
$oDsl = new DocSpeedLevel($oC);
$oDcl = new DocSecretLevel($oC);
$oDtmp = new DocattatchesTmp($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
$InputThai=$oSys->SearchByInputThai();
$oSys->SearchByKey();
$oSys->GetRecord();
if($DLCID && $one_position!="1"){ include_once "selectposition.php";
?>
<?
$oDlc->SearchByKey($DLCID); $oDlc->GetRecord();
$oDP->SearchByKey($oDlc->deptId);
$oDP->GetRecord();
if($RsID=="" && $oDP->deptIsCenter=="Y" && $oDP->receiveOut=="Y"){
$RsID=1;
if($DtID==""){ $DtID=1; }
}else if($RsID=="" && $oDP->deptIsCenter=="Y" && $oDP->sendOut=="Y"){
$RsID=2;
if($DtID==""){ $DtID=1; }
}else if($RsID=="" && $oDP->deptIsCenter=="N" && $oDP->sendIn=="Y" ){
$RsID=4;
if($DtID==""){ $DtID=3; }
}
?>
<html>
<head>
<script language="javascript" src="../source/calendarDateInput.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="../source/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" align="center">
<tr><td >
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="regisDoc.php">ลงทะเบียน</a>
<img src="../picture/ico3.gif" width="10" border="0" align="absmiddle">ลงทะเบียนหนังสือ</font>
</font></legend><br>
<form name="ff" METHOD="POST" action="processRegisterDoc.php">
<table align="center" width="95%" >
<tr>
<td align="right"><a href="addRegisDoc.php?RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>"><img src="../picture/regist_tc.jpg" alt="ลงทะเบียนหนังสือ" style="cursor:pointer;" border="0"></a></td>
</tr>
<tr>
<td width="68%" height="25" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_19"]; ?>">
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="3"><strong>
ลงทะเบียนหนังสือ: </strong></font>
<select name="RsID" onChange='return showDoc();' >
<?
if($oDP->receiveOut=="Y"){ ?>
<option value="1" <? if($RsID==1){ echo "selected"; } ?>><? echo $oRSt->SearchShowRsName(1); ?></option>
<? }if($oDP->sendOut=="Y"){ ?>
<option value="2" <? if($RsID==2){ echo "selected"; } ?>><? echo $oRSt->SearchShowRsName(2); ?></option>
<? }if($oDP->sendIn=="Y"){
if($oDlp->DlpID!="1" && $oDlp->DlpID!="2"){ //ไม่ใ่ช่สารบรรณกลาง ?>
<option value="4" <? if($RsID==4){ echo "selected"; } ?>><? echo $oRSt->SearchShowRsName(4); ?></option>
<? }
}?>
<option value="5" <? if($RsID==5){ echo "selected"; } ?>><? echo $oRSt->SearchShowRsName(5); ?></option>
</select>
<font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="3"><strong>
ชนิดหนังสือ: </strong></font> <select name="DtID" onChange='return showDoc();' >
<? $oDt->RSdoctype();
while($oDt->GetRecord()){
if($oDt->DtP!="1"){
if($RsID=="1" || $RsID=="2"){
if($DtID=="3" || $DtID=="5" || $DtID=="6" || $DtID=="7" || $DtID=="9" || $DtID=="10" || $DtID=="11" || $DtID=="13"){ $DtID="1"; }
if($RsID=="1"){ $DocfCir=""; };
if($oDlp->DlpID=="1" || $oDlp->DlpID=="2"){ //สารบรรณกลาง
if($oDt->DtID=="1" || $oDt->DtID=="2" || $oDt->DtID=="14"){?>
<option value="<? echo $oDt->DtID;?>" <? if($DtID==$oDt->DtID){ echo "selected"; } ?>><? echo $oDt->DtName; ?></option>
<? }
}else{ //สารบรรณย่อย
if($oDt->DtID=="1" || $oDt->DtID=="2"){?>
<option value="<? echo $oDt->DtID;?>" <? if($DtID==$oDt->DtID){ echo "selected"; } ?>><? echo $oDt->DtName; ?></option>
<? }
}
}else if($RsID=="3" || $RsID=="4"){
if($oDlp->DlpID!="1" && $oDlp->DlpID!="2"){ //ไม่ใ่ช่สารบรรณกลาง
$DtID="3";
if($oDt->DtID==3){?>
<option value="<? echo $oDt->DtID;?>" <? if($DtID==$oDt->DtID){ echo "selected"; } ?>><? echo $oDt->DtName; ?></option>
<? }
}
}else if($RsID=="5"){
if($DtID=="1" || $DtID=="2" || $DtID=="3" || $DtID=="14"){ $DtID="5"; }
if($oDt->DtID=="5" || $oDt->DtID=="6" || $oDt->DtID=="7" || $oDt->DtID=="9" || $oDt->DtID=="10" || $oDt->DtID=="11" || $oDt->DtID=="13") {?>
<option value="<? echo $oDt->DtID;?>" <? if($DtID==$oDt->DtID){ echo "selected"; } ?>><? echo $oDt->DtName; ?></option>
<? }
} ?>
<? } //show doc
} //while doctype
?>
</select></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" style="border-collapse:collapse">
<tr><td> </td><td> </td><td align="right"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong><? if($DtID==13){?><a href="addRegisDocAll.php?RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>" style="cursor:pointer;">[ <img src="../picture/icoa15.jpg" border="0" alt="ลงทะเบียนหนังสือรับรองแบบกลุ่ม"> ลงทะเบียนหนังสือรับรองแบบกลุ่ม]</a><? }?></strong></font> </td></tr>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>เลขทะเบียน<? echo ShowNameRSDoc2($RsID);?></strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<? $rd=ShowRunningDoc($RsID,$DtID,$oDlc->deptId); ?>
<td>
<?
if($rd=="NoConfirm"){
echo "<font color=\"#8C0000\"><strong><div align=\"center\">** ไม่สามารถลงทะเบียนได้ เนื่องจากยังไม่มีการยืนยันการใช้งานเลขทะเบียนหนังสือชนิดนี้ **<br>กรุณาติดต่อผู้รับผิดชอบระบบ</div></strong></font>";
}else if($rd=="N"){
echo "<font color=\"#8C0000\"><strong><div align=\"center\">** ไม่สามารถลงทะเบียนได้ เนื่องจากยังไม่มีการตั้งค่าเลขเริ่มต้นของทะเบียนหนังสือชนิดนี้ **<br>กรุณาติดต่อผู้รับผิดชอบระบบ</div></strong></font>";
}else{
?>
<input name="DocTypeNo" type="text" style="" size="25" disabled value="<?php echo a2th($rd);?>">
<input name="DocTypeNo" type="hidden" value="<?php echo $rd;?>">
<?
} //can regisDoc
?>
</td>
</tr>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? echo ShowNameDocNo($DtID); ?></strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td><input name="DocNo" type="text" maxlength="50" size="25" <? if($RsID=="2" || $RsID=="3" || $RsID=="4" || $RsID=="5"){ echo "disabled"; ?> value="<? echo a2th(ShowDocNo($RsID,$DtID,$oDlc->deptId,$DocfCir,$useMainDocNo)); ?>" <? }else{ $insertDocNo=1; if($DocNo!=""){ echo "value=".a2th($DocNo); }else{ echo "value=\"\""; } } ?> onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }">
<? if($RsID=="2" || $RsID=="3" || $RsID=="4" || $RsID=="5"){ ?><input name="DocNo" type="hidden" value="<? echo ShowDocNo($RsID,$DtID,$oDlc->deptId,$DocfCir,$useMainDocNo); ?>"><? } ?><? if($checkDocNoex==1){ ?><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><strong><? echo "***ที่หนังสือนี้เคยถูกลงทะเบียนแล้ว"; ?></strong></font><input name="checkDocNoex" type="hidden" value="<?php echo $checkDocNoex;?>"><? } ?>
<? if($RsID=="2"){ ?> <input name="useMainDocNo" type="checkbox" value="Y" onClick='return showDocNomain();' <? if($useMainDocNo=="Y"){ echo "checked"; }?>> ใช้ที่หนังสือ <? echo a2th($oSys->sysDocNo); ?><? } ?>
</td>
</tr>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? echo ShowNameDate2($DtID); ?></strong></td>
<td width="0%" align="center"><strong>:</strong></td><td><? if($DocDate!="" && $DocDate!="0000-00-00"){ ?> <script>DateInput('DocDate', true, 'DD/MM/YYYY','<?php echo $DocDate;?>');</script><? }else{ ?><script>DateInput('DocDate', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script><? } ?></td>
</tr>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>" > <strong><? echo ShowNameSubject($DtID); ?></strong></td>
<td width="0%" align="center"><strong>:</strong></td><td ><input name="DocSubject" type="text" style="" size="70" maxlength="255" onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }" value="<? if($DocSubject!=""){ echo a2th($DocSubject); }?>" ></td>
</tr>
<? if($DtID==1 || $DtID==2 || $DtID==14 || $DtID==13){?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? echo ShowNameFrom($DtID); ?></strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td ><input name="DocFrom" type="text" style="" size="70" maxlength="255" <? if($RsID=="2" || $DtID=="13"){ $checkNameFrom=1; ?>value="<? echo a2th($GLOBALS["COLLEGENAME2"]); ?>" disabled<? }else{ if($DocFrom!=""){ ?> value="<? echo a2th($DocFrom); ?>" <? } } ?> onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }">
<? if($RsID=="2" || $DtID=="13"){ ?> <input name="DocFrom" type="hidden" value="<? echo a2th($GLOBALS["COLLEGENAME2"]); ?>"><? } ?></td>
</tr>
<? } ?>
<? if($DtID=="3" && $RsID=="4"){?>
<tr ><td width="22%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>จาก</strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td > <? echo searchDeptDlcID($DLCID); ?><input name="DocFrom" type="hidden" value="<? echo searchDeptDlcID($DLCID); ?>"></td>
</tr>
<? } ?>
<? if($DtID==13){?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ชื่อผู้ได้รับการรับรอง</strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td ><input name="CertificatePs" type="text" style="" size="70" maxlength="255" value="<? if($CertificatePs!=""){ echo a2th($CertificatePs); } ?>" onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }"></td>
</tr>
<? } ?>
<? if($DtID==1 || $DtID==2 || $DtID==14 || $DtID==3){?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong><? if($DtID==3){ echo "เรียน"; }else{ echo "ถึง"; } ?></strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td ><? if($DocfCir=="Y"){ ?>
<textarea name="DocTo" cols="70" rows="2" onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }"><? if($DocTo!=""){ echo a2th($DocTo); }?></textarea>
<? }else{ ?>
<input name="DocTo" type="text" style="" size="70" maxlength="255" <? if($RsID=="1"){ $checkDocTo=1; ?>value="<? echo a2th($GLOBALS["COLLEGENAME2"]); ?>" disabled<? }else{ if($DocTo!=""){ ?> value="<? echo a2th($DocTo); ?>" <? } } ?> onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }">
<? } ?><? if(($DtID==1 || $DtID==2) && $RsID=="2"){?> <input name="DocfCir" type="checkbox" value="Y" onClick='return showDoc1();' <? if($DocfCir=="Y"){ echo "checked"; }?>> <strong>ส่งเวียน</strong><? } ?>
<? if($RsID=="1"){ $checkDocTo=1; ?> <input name="DocTo" type="hidden" value="<?php echo a2th($GLOBALS["COLLEGENAME2"]); ?>"><? } ?></td>
</tr>
<? }?>
<? if(($DtID==1 || $DtID==2 ) && ($RsID=="2" || $RsID=="1")){?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>อ้างถึง</strong></td>
<td width="0%" align="center"><strong>:</strong></td><td>
<input name="DocRef" type="text" style="" size="70" maxlength="255" onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }" value="<? if($DocNoShow!=""){
echo a2th($DocNoShow);
echo " ".a2th($DocSubjectShow);
if($DocDateShow ==""){
echo "";
}else{
echo " ".abbreDate(splitDateDb2($DocDateShow ,'/'));
}
}else{
echo a2th($DocRef);
} ?>">
<? if($RsID=="2"){
$d=ShowDocNo($RsID,$DtID,$oDlc->deptId,$DocfCir,$useMainDocNo);
if($checkNameFrom==1){ $fname=$GLOBALS["COLLEGENAME2"]; }
?>
<a style="cursor:pointer;" onClick="addDocRef1('<? echo $d; ?>','<? echo $fname;?>','<? echo $useMainDocNo; ?>')"><img src="../picture/search.gif" alt="ค้นหา" style="cursor:pointer;" border="0" ></a>
<? }else if($RsID=="1"){
if($checkDocTo==1){ $d=$GLOBALS["COLLEGENAME2"]; }
?>
<a style="cursor:pointer;" onClick="addDocRef2('<? echo $d; ?>','<? echo $useMainDocNo; ?>')"><img src="../picture/search.gif" alt="ค้นหา" style="cursor:pointer;" border="0" ></a>
<? } ?>
</td>
</tr>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>สิ่งที่ส่งมาด้วย</strong></td>
<td width="0%" align="center"><strong>:</strong></td><td><input name="DocOther" type="text" style="" size="70" maxlength="255" value="<? if($DocOther!=""){ echo a2th($DocOther); } ?>" onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }"></td>
</tr>
<? } ?>
<? if($DtID==3 && $RsID=="4"){
$oDlc2->SearchByKey($DLCID); $oDlc2->GetRecord();
$oDlp2->SearchByKey($oDlc2->DlpID); $oDlp2->GetRecord();
if($oDlp2->DlpPID!="0"){
$DlcPS2=$DLCID;
}else{
$DlcPS2=$oDlc2->SearchDlc2($oDlc2->DlcSeq,$oDlp2->DlpPID,$oDlc2->deptId);
}
?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>อ้างถึงหนังสือเพื่อตอบกลับ</strong></td>
<td width="0%" align="center"><strong>:</strong></td><td><input name="DocRefAns" type="text" style="" size="70" maxlength="255" value="<? if($DocNoShow!=""){ echo a2th($DocNoShow); echo " ".a2th($DocSubjectShow); if($DocDateShow ==""){ echo ""; }else{ echo " ".abbreDate(splitDateDb2($DocDateShow ,'/')); } }else{ echo a2th($DocRefAns); } ?>" <? if($DocNoShow!=""){ echo "disabled"; }else if($DocRefAns!=""){ echo "disabled"; } ?> onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }">
<? if($DocNoShow!=""){ ?><input name="DocRefAns" type="hidden" value="<? if($DocNoShow!=""){ echo a2th($DocNoShow); echo " ".a2th($DocSubjectShow); if($DocDateShow ==""){ echo ""; }else{ echo " ".abbreDate(splitDateDb2($DocDateShow ,'/')); }}else{ echo a2th($DocRefAns); } ?>"><? }?>
<? if($DocNoShow!=""){ ?> <input name="DocRefAns" type="hidden" value="<? if($DocNoShow!=""){ echo a2th($DocNoShow); echo " ".a2th($DocSubjectShow); if($DocDateShow ==""){ echo ""; }else{ echo " ".abbreDate(splitDateDb2($DocDateShow ,'/')); }}else{ echo a2th($DocRefAns); } ?>"><? }else if($DocRefAns!=""){ ?><input name="DocRefAns" type="hidden" value="<? echo $DocRefAns; ?>"><? } ?>
<a style="cursor:pointer;" onClick="addDocRefAns('<? echo $DLCID; ?>','<? echo $DlcPS2; ?>','<? echo $useMainDocNo; ?>')"><img src="../picture/search.gif" alt="ค้นหา" style="cursor:pointer;" border="0" ></a>
</td>
</tr>
<? } ?>
<? if($DtID==1 || $DtID==2 || $DtID==3 || $DtID==14){?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ชั้นความเร็ว</strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td>
<select name="DslID">
<? $oDsl->RSDocSpeedLevel();
while($oDsl->GetRecord()){?>
<option value="<? echo $oDsl->DslID;?>" <? if($DslID!="" && $DslID==$oDsl->DslID){ echo "selected"; }?>><? echo $oDsl->DslName; ?></option>
<? } ?></select></td>
</tr>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>ชั้นความลับ</strong></td>
<td width="0%" align="center"><strong>:</strong></td><td>
<select name="DclID" >
<? $oDcl->RSDocSecretLevel();
while($oDcl->GetRecord()){?>
<option value="<? echo $oDcl->DclID;?>" <? if($DclID!="" && $DclID==$oDcl->DclID){ echo "selected"; }?>><? echo $oDcl->DclName; ?></option>
<? } ?></select></td>
</tr>
<? } ?>
<tr ><td width="21%" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <strong>หมายเหตุ</strong></td>
<td width="0%" align="center"><strong>:</strong></td>
<td><textarea name="DocShortDesc" cols="70" rows="4" onKeyPress="if(event.keyCode==39){ alert('ระบบไม่สามารถบันทึกตัวอักษรนี้ได้!!'); return false;}else{ event.keyCode=KeyfontThai(event.keyCode,'<? echo $InputThai; ?>'); return event.keyCode; }" ><? if($DocShortDesc!=""){ echo a2th($DocShortDesc); } ?></textarea></td>
</tr>
<? if(($RsID=="1" || $RsID=="4") && ($DtID=="1" || $DtID=="2" || $DtID=="3")){ ?>
<tr >
<td width="21%" height="24"> </td>
<td width="0%" align="center"> </td>
<td ><input name="DrsSendToPs" type="checkbox" value="Y" <? if($DrsSendToPs=="Y"){ echo "checked"; }?>>
<strong>ส่งด่วน (ส่งถึงบุคคลทันที)</strong></td>
</tr>
<? } ?>
<tr >
<tr >
<td width="21%" height="24"> </td>
<td width="0%" align="center"> </td>
<? $oDt2->SearchByKey($DtID); $oDt2->GetRecord(); ?>
<td ><input name="endDoc" type="checkbox" value="Y" <? if($oDt2->forRegis=="Y" || ($RsID=="2" && ($DtID=="1" || $DtID=="2"))){ echo "checked disabled"; }else{ if($endDoc=="Y"){ echo "checked"; } }?>>
<strong>ยุติหนังสือ</strong></td><? if($oDt2->forRegis=="Y" || ($RsID=="2" && ($DtID=="1" || $DtID=="2"))){ ?><input name="endDoc" type="hidden" value="Y"> <? } ?>
</tr>
<tr >
<td height="24" colspan="3" align="center">
<input type="submit" name="jj" value="ลงทะเบียน" onClick="return checkFormat('<? echo $insertDocNo; ?>');" <? if($rd=="N" || $rd=="NoConfirm"){ echo "disabled";}?> <? if($oDlc->DlcActive!='Y'){ echo "disabled"; } ?>>
<? if($checkDocNoex==1){ ?>
<input name="cregis" type="button" value="ยกเลิกการลงทะเบียน" onClick="location.href='addRegisDoc.php?RsID=<? echo $RsID; ?>&DtID=<? echo $DtID; ?>'">
<? } ?>
<input type="button" name="cancel" value="กลับหน้าหลัก" onClick="location.href = 'regisDoc.php'">
<input name="DlcID" type="hidden" value="<?php echo $DLCID; ?>">
<input name="DtmpID" type="hidden" value="<?php echo $DtmpID; ?>">
<input name="personId" type="hidden" value="<?php echo $oDlc->personId; ?>">
<input name="deptId" type="hidden" value="<?php echo $oDlc->deptId; ?>">
<input name="DocGroup" type="hidden" value="<?php echo $MaxDocGroup; ?>">
<input name="DocRefAnsID" type="hidden" value="<?php echo $DocRefAnsID; ?>">
<input type="hidden" name="method">
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr><td colspan="3" align="center">
<table width="98%" >
<tr><td><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong><img src="../picture/official_letter.gif" alt="" border="0" > แฟ้มหนังสือ</strong></font><br><hr color="#000099"></td></tr>
<tr>
<td width="79%"><table width="602" align="left"><tr><td width="260">
<? //------------table upload file------------------------- ?>
<table width="250" border=1 cellpadding="0" cellspacing="0" bordercolor="#6CABF9" style="border-collapse:collapse">
<tr>
<td width="246" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_20"]; ?>">
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">
<img src="../picture/attach_ico.gif" alt="" border="0" > แฟ้มที่เกี่ยวข้อง <? echo a2th(0); ?> รายการ</font></td>
</tr>
<tr>
<td height="68">
<br></td>
</tr>
</table>
</td><td width="319"><table width="227" height="77" border=1 cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#6CABF9">
<tr>
<td width="234" height="75" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_20"]; ?>">
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">
คลิ๊กที่ปุ่ม
"Browse.." เพื่อเลือกแฟ้ม จากนั้น<br> คลิ๊กที่ปุ่ม "เพิ่มแฟ้ม"
เพื่อเพิ่มแฟ้มเข้าในรายการ
<input name="fileupload" type="file" disabled>
<input type="submit" value="เพิ่มแฟ้ม" disabled>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr><td> </td><td><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">หมายเหตุ ชื่อแฟ้มไม่ควรจะประกอบด้วย จุด(.)</font></td></tr>
</table>
</td></tr>
</table>
<? //------------table upload file------------------------- ?>
</td>
</tr>
</table></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" alt="" 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"><img src="../picture/delete1.gif" alt="" border="0" >
<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 showDoc(){
document.ff.method.value="showDoc";
document.ff.submit();
}
function showDoc1(){
document.ff.method.value="selectCir";
document.ff.submit();
}
function showDocNomain(){
document.ff.method.value="showDocNomain";
document.ff.submit();
}
function checkFormat(q){
if(q==1){
if(document.ff.DocNo.value == ""){
alert("กรุณากรอกที่หนังสือ");
document.ff.DocNo.focus();
return false;
}
}
var agree=confirm("คุณต้องการลงทะเบียนหนังสือแน่นอนใช่หรือไม่ ?");
if (agree){
document.ff.method.value="registerDoc";
return true;
}else{
return false ;
}
}
function addDocRef1(d,fname,s){
docDate=document.ff.DocDate.value;
DocSubject=document.ff.DocSubject.value;
DocTo=document.ff.DocTo.value;
DocOther=document.ff.DocOther.value;
DslID=document.ff.DslID.value;
DclID=document.ff.DclID.value;
DocShortDesc=document.ff.DocShortDesc.value;
DocRef=document.ff.DocRef.value;
if(document.ff.endDoc.checked==true){ endDoc="Y"; }else{ endDoc=""; }
FileName = "addDocRefTable.php?RsID=<? echo $RsID;?>&DtID=<? echo $DtID; ?>&DocfCir=<? echo $DocfCir; ?>&DocNo="+d+"&DocDate="+docDate+"&DocSubject="+DocSubject+"&DocFrom="+fname+"&DocTo="+DocTo+"&DocOther="+DocOther+"&DslID="+DslID+"&DclID="+DclID+"&DocShortDesc="+DocShortDesc+"&endDoc="+endDoc+"&DocRef="+DocRef+"&useMainDocNo="+s;
var w=350;
var h=300;
strOption = "scrollbars=yes,left=400,top=100,width=" + w + ",height=" + h;
window.open(FileName,"",strOption);
}
function addDocRef2(d,s){
docDate=document.ff.DocDate.value;
DocSubject=document.ff.DocSubject.value;
DocFrom=document.ff.DocFrom.value;
DocOther=document.ff.DocOther.value;
DocNo=document.ff.DocNo.value;
DslID=document.ff.DslID.value;
DclID=document.ff.DclID.value;
DocShortDesc=document.ff.DocShortDesc.value;
DocRef=document.ff.DocRef.value;
if(document.ff.endDoc.checked==true){ endDoc="Y"; }else{ endDoc=""; }
if(document.ff.DrsSendToPs.checked==true){ DrsSendToPs="Y"; }else{ DrsSendToPs=""; }
FileName = "addDocRefTable.php?RsID=<? echo $RsID;?>&DtID=<? echo $DtID; ?>&DocfCir=<? echo $DocfCir; ?>&DocNo="+DocNo+"&DocDate="+docDate+"&DocSubject="+DocSubject+"&DocFrom="+DocFrom+"&DocTo="+d+"&DocOther="+DocOther+"&DslID="+DslID+"&DclID="+DclID+"&DocShortDesc="+DocShortDesc+"&endDoc="+endDoc+"&DocRef="+DocRef+"&DrsSendToPs="+DrsSendToPs+"&useMainDocNo="+s;
var w=350;
var h=300;
strOption = "scrollbars=yes,left=400,top=100,width=" + w + ",height=" + h;
window.open(FileName,"",strOption);
}
function addDocRefAns(p,q,s){
docDate=document.ff.DocDate.value;
DocSubject=document.ff.DocSubject.value;
DocTo=document.ff.DocTo.value;
DocNo=document.ff.DocNo.value;
DslID=document.ff.DslID.value;
DclID=document.ff.DclID.value;
DocShortDesc=document.ff.DocShortDesc.value;
DocRefAns=document.ff.DocRefAns.value;
if(document.ff.endDoc.checked==true){ endDoc="Y"; }else{ endDoc=""; }
FileName = "addDocRefAnsTable.php?DLCID="+p+"&DlcPS2="+q+"&RsID=<? echo $RsID;?>&DtID=<? echo $DtID; ?>&DocNo="+DocNo+"&DocDate="+docDate+"&DocSubject="+DocSubject+"&DocTo="+DocTo+"&DslID="+DslID+"&DclID="+DclID+"&DocShortDesc="+DocShortDesc+"&endDoc="+endDoc+"&DocRefAns="+DocRefAns+"&useMainDocNo="+s;
var w=390;
var h=300;
strOption = "scrollbars=yes,left=400,top=100,width=" + w + ",height=" + h;
window.open(FileName,"",strOption);
}
</script>
|