Viewing file: RoomTypeList.php (11.9 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 = "room_tb";
$myTableFK = "BuildD_No , Room_code";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
/** 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 url LIKE '%$keyword%' OR description LIKE '%$keyword%' ORDER BY $OrderBy $ASCDESC ";
$query = " SELECT * FROM $myTable ORDER By $myTableFK ";
}
elseif( !isset($_GET['OrderBy']) ) {
//$query = " SELECT * FROM $myTable WHERE StatusId='1' AND url LIKE '%$keyword%' OR description LIKE '%$keyword%' ORDER BY $myTableFK ASC ";
$query = " SELECT * FROM $myTable ORDER By $myTableFK ";
}
}
else {
if( isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable ORDER By $myTableFK";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable ORDER By $myTableFK ";
}
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
| |