Viewing file: printSetPsDeptex.php (2.99 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? header('Content-type: application/xls'); header('Content-Disposition: attachment; filename="printSetPsDeptex.xls"'); include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/keyThai.php"; include_once "../class/clspsdept.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); $oPSd = new psdept($oC); $oPSd2 = new psdept($oC); $maxdocgroup=$oDP->SearchMaxDocGroup(); ?> <html> <head> <script language="javascript" src="../source/calendarDateInput.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> </head> <title>รายงานข้อมูลบุคลากรในหน่วยงานรองทั้งหมด</title> <body><br> <table width="95%" align="center"> <tr align="center"> <td align="center" colspan="2"> <table width="100%" border="1" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse" bordercolor="#000000" > <tr><td colspan="5" align="center" height="24"><font size="2" ><b>ข้อมูลบุคลากรในหน่วยงานรองทั้งหมด</b></font></td></tr> <tr align="center" > <td width="5%" height="35" align="center"><font size="2" ><b>#</b></font></td> <td width="9%" align="center"><font size="2" ><b> คำนำหน้า<br>ชื่อ</b></font></td> <td width="21%" align="center"><font size="2" ><b>ชื่อ</b></font></td> <td width="23%" align="center"><font size="2" ><b>นามสกุล</b></font></td> <td width="21%" align="center"><font size="2" ><b>หน่วยงานรอง</b></font></td> </tr> <? $oDP->SearchBydeptDateDocGroup($maxdocgroup); while($oDP->GetRecord()){ $i=0; $oPS->SearchByDeptId2($oDP->deptId); while($oPS->GetRecord()){ if($oPSd->SearchCountBypersonId($oPS->personId,$maxdocgroup)!=0){ if($i==0){ ?> <tr> <td colspan="5" height="22" bgcolor="#FFFFFF"> <strong>หน่วยงานหลัก :: <? echo $oDP->deptName; ?></strong></td></tr> <? }?> <tr> <td align="center" ><? echo a2th($i+1);?></td> <td> <? echo GetPrefix($oPS->prefixId); ?></td> <td height="22" > <? echo $oPS->fName; ?></td> <td> <? echo $oPS->lName;?></td> <td><? $oPSd2->SearchBypersonIddeptIddocGroup($oPS->personId,$maxdocgroup); while($oPSd2->GetRecord()){ echo ' - '.a2th($oPSd2->deptName).'<br>'; } ?></td> </tr> <? $i++;} } }?> </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> </body> </html>
|