Viewing file: BuildingList.php (12.94 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
";
echo " กรุณาทำการ Login ก่อน ";
echo "";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
include("../include/Function.php");
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "building_tb";
$myTableFK = "BuildD_No";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
/** Searching */
$keyword = $_REQUEST['keyword'];
$param = "Build_type=$Build_type";
} # 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 Build_type ='$Build_type' order by Year_budget desc ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable Where Build_type ='$Build_type' ";
}
}
else {
if( isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable Where Build_type ='$Build_type' ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable Where Build_type ='$Build_type' ";
}
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
| |