Viewing file: printRepSumDocSendBackforDeptex.php (5.58 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? set_time_limit(0); header('Content-type: application/xls'); header('Content-Disposition: attachment; filename="printRepSumRegisDocforDeptex.xls"'); include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "functforRptEx.php"; include_once "../link/functionshow.php"; include_once "../class/clsDocType.php"; include_once "../class/clsDocuments.php"; include_once "funct.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsDocLineConfig.php"; include_once "../class/clsDocLinePosition.php"; include_once "../class/clsDocReceiveSend.php"; include_once "../class/clsPerson.php"; include_once "../link/keyThai.php"; include_once "getPrefix.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDt = new doctype($oC); $oDoc = new Documents($oC); $oDoc2 = new Documents($oC); $oDP = new Department($oC); $oDP1 = new Department($oC); $oDlc = new DocLineConfig($oC); $oDlc1 = new DocLineConfig($oC); $oDlc2 = new DocLineConfig($oC); $oDlc3 = new DocLineConfig($oC); $oDlc4 = new DocLineConfig($oC); $oDlp = new docLinePosition($oC); $oDlp1 = new docLinePosition($oC); $oRs = new DocReceiveSend($oC); $oRs1 = new DocReceiveSend($oC); $oPS = new person($oC); $MaxDocGroup=$oDP->SearchMaxDocGroup(); ?> <title>รายงานหนังสือที่แจ้งส่งผิด แยกตามหน่วยงานย่อย</title> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <body> <div id="tabmargin"> <table width="99%" align="center"> <tr> <td height="22"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>รายงานหนังสือที่แจ้งส่งผิด แยกตามหน่วยงานย่อย :: <? $oDP->SearchByKey($deptId); $oDP->GetRecord(); echo $oDP->deptName;?> </strong></font></td> <td height="22" align="right"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>OIS...</strong></font></td> </tr> <tr> <td width="92%" height="22" colspan="2"><font face="MS Sans Serif, Tahoma, sans-serif"><strong><? echo $GLOBALS["COLLEGENAME"]; ?> <? if(th2a($yearDoc) == 0){ echo "ตั้งแต่วันที่ "; list($day1,$month1,$year1) = preg_split('[/]',$start); $s=($year1+543)."-".$month1."-".$day1; echo abbreDate2($s,'/'); echo " ถึง "; list($day2,$month2,$year2) = preg_split('[/]',$end); $e=($year2+543)."-".$month2."-".$day2; echo abbreDate2($e,'/'); }else{ echo "ประจำปี ".a2th($yearDoc); } ?> </strong></font></td> </tr> <tr> <td height="24" colspan="2"><hr></td> </tr> <tr align="center"> <td align="center" colspan="2"> <table width="99%" border="1" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse" bordercolor="#000000"> <tr align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>"> <td width="5%"><font face="MS Sans Serif, Tahoma, sans-serif"><strong> </strong></font></td> <td width="20%"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>ที่</strong></font></td> <td width="40%"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>เรื่อง/ว่าด้วย (ชนิดหนังสือ)</strong></font></td> <td width="24%"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>แจ้งการส่งผิดจาก</strong></font></td> <td width="10%" ><font face="MS Sans Serif, Tahoma, sans-serif"><strong>หมายเหตุ</strong></font></td> </tr> <? if(th2a($yearDoc) == 0){ list($dd, $mm, $yy) = preg_split('[/]',$start); $startT=($yy+543)."-".$mm."-".$dd; list($dd, $mm, $yy) = preg_split('[/]',$end); $endT=($yy+543)."-".$mm."-".$dd; }else{ $yy = th2a($yearDoc); $startT = $yy."-01-01"; $endT = $yy."-12-31"; } $oRs->SearchprintRepDrsSendBack($MaxDocGroup,$deptId,$startT,$endT); $i=0; while($oRs->GetRecord()){ ?> <tr><td align="center"><? echo a2th(($i+1));?></td><td> <? echo a2th($oRs->DocNo); ?></td><td> <? echo a2th($oRs->DocSubject);?> <? $oDt->SearchByKey($oRs->DtID); $oDt->GetRecord(); echo "(".$oDt->DtName.")";?></td> <td> <? if($oRs->DlcID==0){ $oPS->SearchByKey($oRs->personId); $oPS->GetRecord(); echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName."<br>"; echo " <strong>คำชี้แจง :: </strong>".$oRs->DrsSendBack."<br>"; list($DocD,$DocT) = preg_split('[ ]',$oRs->DrsReceiveDate); echo " ".abbreDate2($DocD,'/')." ".a2th($DocT)." "; }else{ $oDlc2->SearchByKey($oRs->DlcID); $oDlc2->GetRecord(); $oDlp->SearchByKey($oDlc2->DlpID); $oDlp->GetRecord(); $oPS->SearchByKey($oRs->DrsPsIDCreate); $oPS->GetRecord(); echo " ".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName." (".$oDlp->DlpName.")<br>"; echo " <strong>คำชี้แจง :: </strong>".$oRs->DrsSendBack."<br>"; list($DocD,$DocT) = preg_split('[ ]',$oRs->DrsReceiveDate); echo " ".abbreDate2($DocD,'/')." ".a2th($DocT)." "; } ?> </td><td> </td> </tr> <? $i++; } if($i == 0){ ?> <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_5"];?>"> <td colspan="10" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" >** ไม่พบรายการ **</font></td> </tr> <? } ?> </table> </table> </td> </tr> </table> </div> </body>
|