Viewing file: ExcelPtyeMoney.php (43.92 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("../include/Function.php");
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "salary_repot_tb";
$myTableFK = "Start_year , Start_mont";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 500; }
/** Searching */
$keyword = $_REQUEST['keyword'];
} # else
?>
MIS -- Administrator
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 Start_year='$Start_year' and Start_mont='$Start_mont' and Person_type='$Ptype_code' ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = "SELECT * FROM $myTable WHERE StatusId='1' and Start_year='$Start_year' and Start_mont='$Start_mont' and Person_type='$Ptype_code' ";
}
}
else {
if( isset($_GET['OrderBy']) ) {
$query = "SELECT * FROM $myTable WHERE StatusId='1' and Start_year='$Start_year' and Start_mont='$Start_mont' and Person_type='$Ptype_code' ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = "SELECT * FROM $myTable WHERE StatusId='1' and Start_year='$Start_year' and Start_mont='$Start_mont' and Person_type='$Ptype_code' ";
}
}
$query .= " LIMIT $start, $limit ";
//echo $query;
$result = $dbObj->execQuery($query);
?>
|
disconn();
/** Unset Class */
unset($dbObj);
?> |