Viewing file: printRepRegisDocreg.php (7.62 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/function.php";
include_once "../link/functionshow.php";
include_once "../class/clsDocType.php";
include_once "../class/clsDocuments.php";
include_once "../class/clsDepartment.php";
include_once "funct.php";
include_once "../link/keyThai.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDt = new doctype($oC);
$oDoc = new Documents($oC);
$oDP = new Department($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
?>
<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="printRepRegisDocregex.php">
<div align="center">
</div><br>
<table width="100%" align="center">
<tr bgcolor="#FFFFFF">
<td width="99%" align="center"><table width="99%" cellpadding="1" cellspacing="1">
<tr>
<td height="22"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>
<?
echo "รายงานทะเบียนหนังสือรับรองเกี่ยวกับนักศึกษาแบบกลุ่ม"; $DtID="13"; $RsID=5;
?>
</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="73%" height="22"><font face="MS Sans Serif, Tahoma, sans-serif"><strong><? echo $GLOBALS["COLLEGENAME"]; ?>
<? if(th2a($yearDoc) == 0){
echo "ตั้งแต่วันที่ "; list($day1,$month1,$year1) = split('/',$start); $s=($year1+543)."-".$month1."-".$day1; echo th2a(abbreDate2($s,'/'));
echo " ถึง "; list($day2,$month2,$year2) = split('/',$end); $e=($year2+543)."-".$month2."-".$day2; echo th2a(abbreDate2($e,'/'));
}else{
echo "ประจำปี ".th2a($yearDoc);
}
?>
</strong></font></td>
<td width="27%" align="right">
<a href='#' onClick='return showDocex2()'><img src="../picture/print.gif" alt="พิมพ์หน้านี้" border="0" style="cursor:pointer;"></a>
<a href='#' onClick='return showDocex()'><img src="../picture/ico_excel.gif" alt="พิมพ์ excel" border="0" style="cursor:pointer;"></a></td>
</tr>
<tr>
<td height="24" colspan="2"><hr></td>
</tr>
</table>
<?
$flag = 0;
if(th2a($yearDoc) == 0){
list($dd, $mm, $yy) = split('[/]',$start);
$startT=($yy+543)."-".$mm."-".$dd;
list($dd, $mm, $yy) = split('[/]',$end);
$endT=($yy+543)."-".$mm."-".$dd;
$oDoc->SearchRsIDDtIDfDeleteDocNoSubjectreg($RsID,$DtID,$startT,$endT,th2a($DocTypeNoStart),th2a($DocTypeNoEnd),th2a($DocSubject),$MaxDocGroup,$printorder);
}else{
$yy = th2a($yearDoc);
$startT = $yy."-01-01";
$endT = $yy."-12-31";
$oDoc->SearchRsIDDtIDfDeleteDocNoSubjectreg($RsID,$DtID,$startT,$endT,th2a($DocTypeNoStart),th2a($DocTypeNoEnd),th2a($DocSubject),$MaxDocGroup,$printorder);
}
while($oDoc->GetRecord()){
list($DocD,$DocT) = split(' ',$oDoc->DocDateCreate);
$a=$DocD;
if($d!=$DocD){ $d=$a;
?>
<table width="99%" border="0" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse">
<tr><td> </td></tr>
<tr><td align="right" colspan="8">
<font size="2" face="MS Sans Serif, Tahoma, sans-serif"><strong>
วันที่ลงทะเบียน<? echo ShowNameRSDoc2($RsID); ?>หนังสือ <? echo th2a(abbreDate2($DocD,'/'));?></strong></font>
</td></tr></table>
<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="8%"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>ที่</strong></font></td>
<td width="11%"><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>
<td width="15%"><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>
<td width="7%"><font face="MS Sans Serif, Tahoma, sans-serif"><strong>การปฏิบัติ</strong></font></td>
<td width="9%" ><font face="MS Sans Serif, Tahoma, sans-serif"><strong>หมายเหตุ</strong></font></td>
</tr>
<? }?>
<? //------------------data
if($oDoc->DocPID=="0" || $oDoc->DocPID==""){ $searchDoc=$oDoc->DocID; }else{ $searchDoc=$oDoc->DocPID; }
?>
<tr valign="top">
<td align="center"><font face="MS Sans Serif, Tahoma, sans-serif"><? echo th2a($oDoc->DocNo); ?></font></td>
<td align="center"><font face="MS Sans Serif, Tahoma, sans-serif"><? echo th2a(abbreDate2($oDoc->DocDate,'/'));?></font></td>
<td align="center"><font face="MS Sans Serif, Tahoma, sans-serif"><? echo th2a($oDoc->stdCode); ?></font></td>
<td><font face="MS Sans Serif, Tahoma, sans-serif"><? echo " ".$oDoc->CertificatePs; ?> </font></td>
<td><font face="MS Sans Serif, Tahoma, sans-serif">
<? echo " ".th2a($oDoc->DocSubject); ?></font></td>
<td><font face="MS Sans Serif, Tahoma, sans-serif"> </font> </td>
<td><font face="MS Sans Serif, Tahoma, sans-serif"><? if($oDoc->PtID!=="1"){ searchDocSendToPs($oDoc->DocID); }?></font> </td>
<td><font face="MS Sans Serif, Tahoma, sans-serif"><? echo " ".th2a($oDoc->DocShortDesc); ?> </font></td>
</tr>
<? $flag = 1;
} // end while oDoc
if($flag == 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>
</td>
</tr>
</table></td>
</tr>
</table>
<input type="hidden" name="typeshow" value="<? echo $typeshow; ?>" >
<input type="hidden" name="dlcid" value="<? echo $dlcid; ?>" >
<input type="hidden" name="DocSubject" value="<? echo $DocSubject; ?>" >
<input type="hidden" name="start" value="<? echo $start; ?>" >
<input type="hidden" name="end" value="<? echo $end; ?>" >
<input type="hidden" name="yearDoc" value="<? echo $yearDoc; ?>" >
<input type="hidden" name="DocTypeNoStart" value="<? echo $DocTypeNoStart; ?>" >
<input type="hidden" name="DocTypeNoEnd" value="<? echo $DocTypeNoEnd; ?>" >
<input type="hidden" name="printorder" value="<? echo $printorder; ?>" >
<input type="hidden" name="print" value="พิมพ์" >
</form><br>
</div>
</body>
<script>
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 showDocex(){
document.ff.submit();
}
function showDocex2(){
window.print();
}
</script>
|