Viewing file: ExcelreDev_10.php (17.63 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
";
echo " กรุณาทำการ Login ก่อน ";
echo "";
exit();
}
else {
/** Configuration */
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="Report.xls"');
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../includes/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2PK = "tt.Training_code ";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 1000; }
$param = "Year_std=$Year_std&Training_std=$Training_std";
} # else
?>
งานพัฒนาบุคลากร
execQuery($query);
$numrows = $dbObj->_numrows;
/** Paging */
$display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page'];
$start = ( ($display * $limit) - $limit );
/** Paging */
if( isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM personal_tb pt, training_tb tt Where pt.StatusId='1' and pt.Teacher_code = tt.Teacher_code and tt.Year_std='$Year_std' and tt.Training_std='Y' Group By pt.Teacher_code ORDER BY $OrderBy $ASCDESC ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM personal_tb pt, training_tb tt Where pt.StatusId='1' and pt.Teacher_code = tt.Teacher_code and tt.Year_std='$Year_std' and tt.Training_std='Y' Group By pt.Teacher_code ORDER BY $myTable2PK DESC ";
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
| |