Viewing file: printRepDocNoSumRegisDoc.php (6.09 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? set_time_limit(0); include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../link/keyThai.php"; include_once "../class/clsDocuments.php"; include_once "../link/function.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDoc = new Documents($oC); $oDoc2 = new Documents($oC); ?> <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="ff" method="post" action="printRepDocNoSumRegisDocex.php" ><br> <table width="99%" align="center"> <tr><td> </td></tr> <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 width="92%" height="22"><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> <td width="8%" align="right"> <a href='#' onClick='return showDocex2()'><img src="../picture/print.gif" title="พิมพ์หน้านี้" border="0" style="cursor:pointer;"></a> <a href='#' onClick='return showDocex()'><img src="../picture/ico_excel.gif" title="พิมพ์ excel" border="0" style="cursor:pointer;"></a></td> </tr> <tr> <td height="24" colspan="2"><hr></td> </tr> <tr align="center"> <td align="center" colspan="2"> <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="18%" rowspan="2" align="center"><strong>ที่หนังสือ</strong></td> <td width="12%" align="center" colspan="3"><strong>หนังสือภายนอก</strong></td> <td width="10%" align="center" colspan="3"><strong>หนังสือประทับตรา</strong></td> <td width="12%" align="center" colspan="3"><strong>บันทึกข้อความส่งภายนอก</strong></td> </tr> <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>"> <td width="3%" align="center"><strong>รับ</strong></td> <td width="3%" align="center"><strong>ส่ง</strong></td> <td width="4%" align="center"><strong>รวม</strong></td> <td width="3%" align="center"><strong>รับ</strong></td> <td width="3%" align="center"><strong>ส่ง</strong></td> <td width="4%" align="center"><strong>รวม</strong></td> <td width="3%" align="center"><strong>รับ</strong></td> <td width="3%" align="center"><strong>ส่ง</strong></td> <td width="4%" align="center"><strong>รวม</strong></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"; } $i=0;
$sumreceive1=0; $sumsend1=0; $sum1=0;
$sumreceive2=0; $sumsend2=0; $sum2=0;
$sumreceive3=0; $sumsend3=0; $sum3=0;
if(($i%2) == 0) echo "<tr bgcolor=\"#FFFFFF\" height=22 >"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_17"]."\">"; ?> <td align="left" height="22"><b> <? echo $searchDocNo; ?></b></td> <td align="center"> <? $sumreceive1=$oDoc->SearchRepDocNoSumReceiveDoc('1','1',$startT,$endT,$searchDocNo); echo a2th($sumreceive1); ?></td> <td align="center"> <? $sumsend1=$oDoc->SearchRepDocNoSumReceiveDoc('2','1',$startT,$endT,$searchDocNo); echo a2th($sumsend1); ?></td> <td align="center"> <? $sum1=$sumreceive1+$sumsend1; echo a2th($sum1);?></td> <td align="center"> <? $sumreceive2=$oDoc->SearchRepDocNoSumReceiveDoc('1','2',$startT,$endT,$searchDocNo); echo a2th($sumreceive2);?></td> <td align="center"> <? $sumsend2=$oDoc->SearchRepDocNoSumReceiveDoc('2','2',$startT,$endT,$searchDocNo); echo a2th($sumsend2);?></td> <td align="center"> <? $sum2=$sumreceive2+$sumsend2; echo a2th($sum2);?></td> <td align="center"> <? $sumreceive3=$oDoc->SearchRepDocNoSumReceiveDoc('1','3',$startT,$endT,$searchDocNo); echo a2th($sumreceive3);?></td> <td align="center"> <? $sumsend3=$oDoc->SearchRepDocNoSumReceiveDoc('2','14',$startT,$endT,$searchDocNo); echo a2th($sumsend3);?></td> <td align="center"> <? $sum3=$sumreceive3+$sumsend3; echo a2th($sum3);?></td> </tr> </table> </table> </td> </tr> </table> <input type="hidden" name="start" id="start" value="<? echo $start;?>"> <input type="hidden" name="end" id="end" value="<? echo $end;?>"> <input type="hidden" name="yearDoc" id="yearDoc" value="<? echo $yearDoc;?>"> <input type="hidden" name="searchDocNo" id="searchDocNo" value="<? echo $searchDocNo;?>"> <input type="hidden" name="print" id="print" value="พิมพ์" > </form> </div> </body> <script> function showDocex(){ document.ff.submit(); } function showDocex2(){ window.print(); } </script>
|