Viewing file: printFormatdeptNoex.php (3.45 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php header('Content-type: application/xls'); header('Content-Disposition: attachment; filename="printFormatdeptNoex.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 "functforRptEx.php"; include_once "../class/clsDocType.php"; include_once "../class/clsRunningDoc.php"; include_once "../class/clsSysConfig.php"; include_once "funct.php"; include_once "../link/keyThai.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); $oDt = new doctype($oC); $oRd = new runningdoc($oC); $InputThai=$oSys->SearchByInputThai(); $maxdate = $oDP3->MaxDate(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> </head> <title>รายงานที่หนังสือหน่วยงานย่อย</title> <body> <iframe id="addDeptNo" name="addDeptNo" src="" style="width:$0px;height:0px;border:0"></iframe> <br><br> <table width="60%" align="center"> <tr> <td align="center"><b>รายงานที่หนังสือหน่วยงานย่อย</b></td> </tr> <tr> <td > <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" > <tr> <td valign="top"><br> <label><div align="center"> <? $oT = new clsTable(array("หน่วยงานภายใน","เลขที่หน่วยงาน","ตัวอย่างที่หนังสือ")); $oT->borderColor="#000000"; $oT->border="1"; $oT->cellSpacing="0"; $oT->cellPadding="0"; $oT->align="center"; $oT->width="100%"; $oT->height="22"; $oT->headerBgColor="#ffffff"; $oDP2->searchdeptDate($maxdate); $rw=0; while ($oDP2->GetRecord()){ ShowDeptM($oDP2->deptId,$InputThai); } $oT->rowStart("","#ffffff","#ffffff"); $oT->rowEnd(); echo "<form name=ps method=post>"; echo "<input type=hidden name=method id=method value=''>"; echo "<input type=hidden name=startyear id=startyear value=''>"; echo $oT->output(); ////////////////////////////////////////// ?> </div></td> </tr> </table> </td> </tr> </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> <? function ShowDeptM($deptId,$InputThai){ global $oC; global $oT; global $Str; global $rw;
$oPS = new person($oC); $oDp = new Department($oC); $oDp->SearchByKey($deptId); $oDp->GetRecord();
if ($oDp->deptLevel%2==0){ $bs="<b>"; $be="</b>"; } if($oDp->deptNo!=""){ $deptNo=a2th($oDp->deptNo); }else{ $deptNo=" "; } $ShowDocNo=ShowDocNo('3','3',$oDp->deptId,'',''); $lv = $oDp->deptLevel+1; $oT->addRow(array(str_repeat(" ", $oDp->deptLevel*2). $bs ." ".$oDp->deptName. $be ,"<div align=center>".a2th($deptNo)."</div>","<div align=left> ".a2th($ShowDocNo)."</div>")); $oDp->RSmenuByDeptParent3($deptId); while ($oDp->GetRecord()){ ShowDeptM($oDp->deptId,$InputThai); } } ?>
|