"; echo "


กรุณาทำการ Login ก่อน

"; echo ""; exit(); } else { /** Configuration */ header('Content-type: application/xls'); header('Content-Disposition: attachment; filename="testing.xls"'); require_once( "../configuration.php" ); require_once( $_Config_absolute_path . "/includes/framework.php" ); require_once( "../include/Function.php" ); /** Chart */ include ("../includes/charts.php"); /** Create Database Object */ $dbObj = new DBConn; /** Config Table for This Page */ $myTable = "personal_tb"; $myTable2 = "history_position_tb"; $myTableFK = "Teacher_id"; $myOrderBy = "Teacher_id,Teacher_name"; $params = "StatusId=1"; /** Paging */ $page = $_GET['page']; if( $page == "" ) { $page = 1; } /** จำนวนข้อมูล ต่อ 1 หน้า */ $perpage = $_REQUEST['perpage']; if( $perpage == "" ) { $perpage = 1000; } } # else ?> ข้อมูลการพัฒนาบุคลากร - ข้อมูลงานประวัติการดำรงตำแหน่ง
execQuery($query); $numrows = $dbObj->_numrows; /** Paging */ $display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page']; $start = ( ($display * $limit) - $limit ); /** Paging */ //### Search if( $keyword != "" ) { if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE StatusId='1' and ( First_name LIKE '%$keyword%' OR Teacher_name LIKE '%$keyword%' OR Teacher_lastname LIKE '%$keyword%' ) ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE StatusId='1' and ( First_name LIKE '%$keyword%' OR Teacher_name LIKE '%$keyword%' OR Teacher_lastname LIKE '%$keyword%' ) ORDER BY $myTableFK ASC "; } } else { if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable where StatusId='1' ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable Where StatusId='1' ORDER BY $myTableFK ASC "; } } $query .= " LIMIT $start, $limit "; $result = $dbObj->execQuery($query); ?>
0 ) { ?> fetchArray($result) ) { $bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF"; $Teacher_code = $rs['Teacher_code']; /** จำนวนระเบียน */ $sql = " SELECT * FROM history_position_tb WHERE Teacher_code='$Teacher_code' " ; $result3 = $dbObj->execQuery($sql); $countnum = $dbObj->_numrows; $dbObj->freeresult($result3); $sum += $countnum; ?>
No รหัส ชื่อ-นามสกุล ตำแหน่งราชการ เงินเดือนปัจจุบัน ประวัติเงินเดือน
ตาม กพ 7
 
freeresult($result); /** Close the Database */ $dbObj->disconn(); /** Unset Class */ unset($dbObj); ?>