Viewing file: showSelectsendReceiveDoc_c.php (12.26 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../link/function.php"; include_once "funct.php"; include_once "../link/keyThai.php"; include_once "../class/clsSendReceive.php"; include_once "../link/functionshow.php"; include_once "../class/clsDocLinePosition.php"; include_once "../class/clsDocLineConfig.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsDocSpeedLevel.php"; include_once "../class/clsDocSecreLevel.php"; include_once "../class/clsCollegeDetail.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']); $time_startpage = microtime_float(); $InputThai=$oSys->SearchByInputThai(); $oDP = new Department($oC); $oTsr = new sendreceive($oC); $oTsr2 = new sendreceive($oC); $oTsr3 = new sendreceive($oC); $oDlc = new DocLineConfig($oC); $oDlc2 = new DocLineConfig($oC); $oDlc3 = new DocLineConfig($oC); $oDlc4 = new DocLineConfig($oC); $oDlc9 = new DocLineConfig($oC); $oDlp = new docLinePosition($oC); $oDlp1 = new docLinePosition($oC); $oDlp2 = new docLinePosition($oC); $oDsl = new DocSpeedLevel($oC); $oDcl = new DocSecretLevel($oC); $oDsl2 = new DocSpeedLevel($oC); $oDcl2 = new DocSecretLevel($oC); $oCd = new collegedetail($oC); $oCd2 = new collegedetail($oC); $oCd3 = new collegedetail($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup(); if($_SESSION['DLCID'] && $_SESSION['one_position']!="1"){ include_once "selectposition.php";
$oDlc->SearchByKey($_SESSION['DLCID']); $oDlc->GetRecord(); if($_SESSION['DLCIDSECOND']=="Y"){ $oDlc9->SearchByKey($_SESSION['DLCIDSECONDID']); $oDlc9->GetRecord(); $mypersonId=$oDlc9->personId; }else{ $mypersonId=$oDlc->personId; } $checkcan=SearchSendAll_receive($oDlc->DlpID); $useReceiveAll=$oSys->SearchuseReceiveAll(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" align="center"> <tr><td > <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="sendReceiveDoc_c.php">การติดตามหนังสือรับอิเล็กทรอนิกส์</a><img src="../picture/ico3.gif" width="10" border="0" align="absmiddle">เลือกดาวน์โหลดเอกสารเฉพาะเรื่อง </font></legend> <form name="gg" METHOD="POST" action="processReSendDocSR.php"> <table align="center" width="98%" > <tr> <td width="53%" height="25"><img src="../picture/search_ico.gif" border="0" > <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="3"><strong> หนังสือรับอิเล็กทรอนิกส์จากหน่วยงานภายนอก</strong></font> </td> <td width="7%" align="right"> </td> <td width="40%" align="right" ><? if($checkcan=='All' && $oSys->sendAllNode=='Y'){ ?><a onClick = "showprogramX()" style="cursor:pointer;"><font color="#000066">[<img src="../picture/download.gif"> เริ่มดาวน์โหลดเอกสาร]</font><? }?></a></td> </tr> <tr> <td colspan="3"><hr color="#000099"></hr> </td> </tr> <tr><td colspan="3" align="right">แสดงข้อมูลหนังสือรับจาก <select name="selectcID" id="selectcID" onChange="On_selectCoID()"> <option value="All">ทุกหน่วยงาน</option> <? $oCd3->RScollegedetailnotMe($GLOBALS["COLLEGEID"]); while($oCd3->GetRecord()){ ?> <option value="<? echo $oCd3->collegeID; ?>" <? if($selectcID==$oCd3->collegeID){ echo "selected"; }?>><? echo $oCd3->collegeAbbr;?></option> <? } ?> </select></td></tr> </table> <table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" > <tr height=22> <td width="15%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ที่</strong></font></td> <td width="15%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>ลงวันที่</strong></font></td> <td width="29%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>เรื่อง (จาก)</strong></font></td> <td width="15%" align="center" background="../picture/table_header_bg.gif"><font color="<?php echo $GLOBALS["COLOR_FONT_1"]; ?>" size="2"><strong>วันที่รับหนังสือ</strong></font></td> <td width="3%" align="center" background="../picture/table_header_bg.gif"><img src="../picture/rapid0.jpg" border="0" ></td> <td width="3%" align="center" background="../picture/table_header_bg.gif"><img src="../picture/secret0.jpg" border="0" ></td> </tr> <? $oTsr->SearchBytsr_status(r1); $i=0; while($oTsr->GetRecord() && $checkcan=='All'){ if(($i%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\" height=22 align=\"left\">"; ?> <td align="left"><? echo a2th($oTsr->tsr_DocNo); ?></td> <td align="center"><?php if($oTsr->tsr_DocDate =="0000-00-00"){ echo ""; }else{ echo abbreDate(splitDateDb2($oTsr->tsr_DocDate ,'/')); }?></td> <td align="left"> <a href="showDetailReceiveDocSRshow.php?tsr_id=<?php echo $oTsr->tsr_id;?>"><? echo a2th($oTsr->tsr_DocSubject); ?></a> <? $oCd->SearchByKey($oTsr->tsr_fr_node); $oCd->GetRecord(); echo " (จาก".$oCd->collegeAbbr.')'; ?> </td> <td align="center"> <? if($oTsr->tsr_to_node_date !="0000-00-00 00:00:00"){ list($DocD,$DocT) = preg_split('[ ]',$oTsr->tsr_to_node_date ); echo abbreDate2($DocD,'/')."<br>".a2th($DocT); } ?></td> <? if($oTsr->tsr_DslID=="0"){ $rapid="../picture/rapid0.jpg"; $rapidname=$oDsl2->SearchName(0); }else if($oTsr->tsr_DslID=="1"){ $rapid="../picture/rapid1.jpg"; $rapidname=$oDsl2->SearchName(1); }else if($oTsr->tsr_DslID=="2"){ $rapid="../picture/rapid2.jpg"; $rapidname=$oDsl2->SearchName(2); }else if($oTsr->tsr_DslID=="3"){ $rapid="../picture/rapid3.jpg"; $rapidname=$oDsl2->SearchName(3); }else{ $rapid="../picture/blank.gif"; $rapidname=""; }?> <td align="center"><img src="<? echo $rapid; ?>" border="0" ></td> <? if($oTsr->tsr_DclID=="0"){ $secret="../picture/secret0.jpg"; $secretname=$oDcl2->SearchName(0); }else if($oTsr->tsr_DclID=="1"){ $secret="../picture/secret1.jpg"; $secretname=$oDcl2->SearchName(1); }else if($oTsr->tsr_DclID=="2"){ $secret="../picture/secret2.jpg"; $secretname=$oDcl2->SearchName(2); }else if($oTsr->tsr_DclID=="3"){ $secret="../picture/secret3.jpg"; $secretname=$oDcl2->SearchName(3); }else if($oTsr->tsr_DclID=="4"){ $secret="../picture/secret4.jpg"; $secretname=$oDcl2->SearchName(4); }else{ $secret="../picture/blank.gif"; $secretname=""; }?> <td align="center"><img src="<? echo $secret; ?>" border="0" ></td> </tr> <? $i++; } ?> </table> <table width="99%" align="center" border=0 cellpadding="0" cellspacing="0" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_13'];?>" height="22"> <? if($i=="0"){?> <tr height=22><td align="center" bgcolor="#FFFFFF"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีรายการหนังสือรับภายนอก **</font></td></tr> <? } ?> <tr height=22><td align="right"> </td></tr> </table> </form> <br> </fieldset> <table width="99%" border="0" align="center"> <tr> <td width="134" align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>หมายเหตุ : </strong> </font></td> <td width="1070" 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"; } ?> <? $time_endpage = microtime_float(); echo '<div align=right><font color=#AAAAAA>'.$time = $time_endpage - $time_startpage; echo ' s</font></div>'; ?> <script language="javascript"> function showDoc(){ document.ff.submit(); } function up_downList(status){ var mybrowser=navigator.userAgent; if(status=='up'){ if(mybrowser.indexOf('MSIE')>0){ closeshow.style.display=''; openshow.style.display='none'; showtable.style.display=''; }else{ document.getElementById( 'closeshow' ).setAttribute( 'style', 'display:' ); document.getElementById( 'openshow' ).setAttribute( 'style', 'display:none' ); document.getElementById( 'showtable' ).setAttribute( 'style', 'display:' ); } }else{ if(mybrowser.indexOf('MSIE')>0){ openshow.style.display=''; closeshow.style.display='none'; showtable.style.display='none'; }else{ document.getElementById( 'openshow' ).setAttribute( 'style', 'display:' ); document.getElementById( 'closeshow' ).setAttribute( 'style', 'display:none' ); document.getElementById( 'showtable' ).setAttribute( 'style', 'display:none' ); } } } function On_Month(){ searchYear=document.ff.searchYear.value; if (searchYear=="") { alert('กรุณากรอกปี'); document.ff.searchYear.focus(); return false ; } document.ff.flagshow.value=1; document.ff.submit(); } function On_selectCoID(){ document.gg.action="sendReceiveDoc_c.php"; document.gg.submit(); } function On_selectCoID2(){ searchYear=document.ff.searchYear.value; if (searchYear=="") { alert('กรุณากรอกปี'); document.ff.searchYear.focus(); return false ; } document.ff.flagshow.value=1; document.ff.submit(); } function On_Year(DLCID,MaxDocGroup,DlcPS2,InputThai){ searchYear=document.ff.searchYear.value; if (searchYear.length == 4) { document.ff.flagshow.value=1; document.ff.submit(); } } function changeS2(){ if(document.ff.searchName.value==""){ document.ff.searchName.value=""; } if(document.ff.searchNo.value==""){ document.ff.searchNo.value=""; } document.ff.submit(); } function goAccept(a,type,dlcid){ if(type=='yes'){ var agree=confirm("คุณต้องการลงทะเบียนหนังสือฉบับนี้แน่นอนใช่หรือไม่ ?"); }else if(type=='no'){ var agree=confirm("คุณต้องการไม่ลงทะเบียนหนังสือฉบับนี้แน่นอนใช่หรือไม่ ?"); } if (agree){ if(type=='yes'){ window.location.href="processReceiveDocSR.php?tsr_id="+a+"&p=1&DlcID="+dlcid; }else if(type=='no'){ window.location.href="processReceiveDocSR.php?tsr_id="+a+"&p=0&DlcID="+dlcid; } return true; }else{ return false ; } } function showprogramX(){ FileName = "programX.php"; var w=500; var h=200; strOption = "scrollbars=yes,left=370,top=100,menubar=1,status=1, width=" + w + ",height=" + h; window.open(FileName,"",strOption); } </script> <script type="text/javascript"> function checkAll() { var check_DrsID_len = document.ff.check_DrsID.length; document.getElementById('st_val').value=''; for ( i = 0; i<check_DrsID_len ; i++) { document.ff.check_DrsID[i].checked=true; document.getElementById('st_val').value+=document.ff.check_DrsID[i].value+','; } fin_str = document.getElementById('st_val').value; document.getElementById('st_val').value = fin_str.replace(',on,',''); }
function clearAll() { var check_DrsID_len = document.ff.check_DrsID.length; for ( i = 0; i<check_DrsID_len ; i++) { document.ff.check_DrsID[i].checked=false; document.getElementById('st_val').value=''; } }
function validate() { if(document.getElementById('st_val').value=='') { alert('กรุณาเลือกหนังสือที่ต้องการลงทะเบียนรับ'); return false; } else { var agree=confirm("คุณต้องการลงทะเบียนรับหนังสือที่้เลือกนี้แน่นอนใช่หรือไม่ ?"); if (agree){ document.ff.action="processReceiveDocSRAll.php"; return true; }else{ return false ; } } } function test() { var check_DrsID_len = document.ff.check_DrsID.length; if(check_DrsID_len==0) { document.getElementById('st_val').value ='';
} document.getElementById('ch_all').checked =false; document.getElementById('st_val').value ='';
for ( i = 0; i<check_DrsID_len ; i++) { if(document.ff.check_DrsID[i].checked) { document.getElementById('st_val').value+=document.ff.check_DrsID[i].value+','; } } fin_str = document.getElementById('st_val').value; document.getElementById('st_val').value = fin_str.replace(',on,',''); } </script>
|