Viewing file: showPsInDept.php (5.22 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/function.php"; include_once "../link/keyThai.php"; include_once "getPrefix.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"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body> <iframe id="addConfig" name="addConfig" src="" style="width:0px;height:0px;border:0"></iframe> <br> <table width=730 align="center"> <tr><td height="150"> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">จัดการข้อมูลบุคลากรและโครงสร้าง</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">รายงานข้อมูลบุคลากรในระบบสารบรรณจำแนกตามหน่วยงาน
</font></legend> <form name="ff" METHOD="POST" action="showPsInDept.php"> <table border="0" align="center" width="100%"><tr><td align="center"> <table width="87%" height="21" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <tr><td width="13%" align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>หน่วยงาน :: </strong> </font></td> <td width="87%" align="left"> <select name="deptId" id="deptId" onChange='return showdept2();' > <option value="0">- เลือกหน่วยงาน -</option> <? $oDP->RSDeptByMaxdeptDate(); while($oDP->GetRecord()){?> <option value="<? echo $oDP->deptId;?>" <? if($oDP->deptId==$deptId){ echo "selected"; $deptName=$oDP->deptName; }?>><? echo $oDP->deptName; ?></option> <? } ?> <option value="nodept" <? if($deptId=="nodept"){ echo "selected"; $deptName=" ไม่มีหน่วยงานที่สังกัด"; }?>>ไม่มีหน่วยงานที่สังกัด</option> </select> <input type="hidden" name="method" id="method" value="pp"> <input type="hidden" name="showdeptId" id="showdeptId"> </td> </tr> </table><br>
<? if($deptId!="" && $deptId!="0"){ ?> <table border="0" width="75%"><tr><td align="right"><a href="printPsInDeptHTML.php?deptId=<? echo $deptId;?>&deptName=<? echo $deptName; ?>" target="_blank"><img src="../picture/print.gif" width="15" height="14" border="0"></a> <a href="printPsInDeptex.php?deptId=<? echo $deptId;?>&deptName=<? echo $deptName; ?>" target="_blank"><img src="../picture/ico_excel.gif" title="พิมพ์ excel" border="0" style="cursor:pointer;"></a> </td></tr></table> <table width="75%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="silver"> <tr><td colspan="8" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_9"];?>" height="24"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>ข้อมูลบุคลากรในหน่วยงาน<? echo $deptName;?></b></font></td></tr> <tr align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_9"];?>"> <td width="5%" height="35" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>#</b></font></td> <td width="15%" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b> คำนำหน้าชื่อ</b></font></td> <td width="25%" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>ชื่อ</b></font></td> <td width="30%" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><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="8" align="center" bgcolor="#FFFFFF"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">** ไม่มีข้อมูลบุคลากรของหน่วยงานนี้ **</font></td></tr> <? } ?> </table> <? } //if $deptId!="" && $deptId!="0" ?> </td></tr> <tr><td> </td></tr> <tr><td align="center"><input type="button" name="cancel" value="กลับสู่เมนูหลัก" onClick="location.href = '?mm=1'"></td></tr> </table> </form><br> </fieldset> <br> <br> <br><br> <br><br> </td> </tr> </table> </body> </html> <script language="javascript"> function showdept2(){ document.ff.showdeptId.value="1"; document.ff.submit(); } </script>
|