Viewing file: DevList.php (11.28 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" );
require_once( "../include/Function.php" );
/** Chart */
include ("../includes/charts.php");
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "dev_cdev ";
$myTableFK = "cdevcode ";
$myOrderBy = "cdevcode,cdevname ";
//$params = "PrefixId=$Year_com";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
$params = "codeDv=$codeDv";
} # 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 codeDv='$codeDv' and ( cdevname '%$keyword%' ) ORDER BY $OrderBy $ASCDESC ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable WHERE codeDv='$codeDv' and ( cdevname LIKE '%$keyword%' ) ORDER BY $myTableFK ASC ";
}
}
else {
if( isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable Where codeDv='$codeDv' ORDER BY $OrderBy $ASCDESC ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable Where codeDv='$codeDv' ORDER BY $myTableFK ASC ";
}
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
|
freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> |