Viewing file: printPsInDeptex.php (2.78 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? header('Content-type: application/xls'); header('Content-Disposition: attachment; filename="printPsInDeptex.xls"'); include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/keyThai.php"; include_once "getPrefix.php"; include_once "functforRptEx.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); $maxdate = $oDP3->MaxDate();
?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> </head> <body> <table border="0" align="center" width="75%"><tr> <td align="center"> <br> <table width="100%" border="1" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse" bordercolor="#000000" > <tr><td colspan="4" align="center" height="24"><font size="2" ><b>ข้อมูลบุคลากรในหน่วยงาน<? echo $deptName;?></b></font></td></tr> <tr align="center" > <td width="5%" height="35" align="center"><font size="2" ><b>#</b></font></td> <td width="15%" align="center"><font size="2" ><b> คำนำหน้าชื่อ</b></font></td> <td width="25%" align="center"><font size="2" ><b>ชื่อ</b></font></td> <td width="30%" align="center"><font size="2" ><b>นามสกุล</b></font></td> </tr> <? $j=0; if($deptId=="nodept"){ $oPS->SearchByNodeptNamedocGroup($oDP->MaxDate()); }else{ $oPS->RSPersonf1dept2($deptId); } while($oPS->GetRecord()){ if(($j%2) == 0) echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_5"]."\">"; else echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_11"]."\">"; ?> <td align="center"><? echo a2th($j+1); ?></td> <td align="left"> <? echo GetPrefix($oPS->prefixId); ?></td> <td align="left"> <? echo $oPS->fName; ?></td> <td align="left"> <? echo $oPS->lName; ?></td> </tr> <? $j++; } if($j==0){ ?> <tr><td colspan="4" align="center" bgcolor="#FFFFFF"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีข้อมูลบุคลากรของหน่วยงานนี้ **</font></td></tr> <? } ?> </table> </td></tr> <tr><td> </td></tr> <tr> <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">วันที่พิมพ์ : <?php echo abbreDate2((date('Y')+543).'-'.date('m').'-'.date('d')).' '.a2th(date('H:i:s'));?></font></td> </tr> </table>
|