Viewing file: PersonalResearch_old.php (16.48 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;
$sql3 = "Select Teacher_code,First_name,Teacher_name,Teacher_lastname,Faculty_code From personal_tb Where Teacher_code='$Teacher_code'";
$result2= mysql_query($sql3);
$rss = mysql_fetch_array($result2);
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "personal_tb";
$myOrderBy = "Teacher_id";
$myTableField1 = "Teacher_id";
$myTableField2 = "Teacher_name";
$myTableField3 = "Teacher_lastname";
/** Parameters */
$params = "";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
} # else
?>
ข้อมูลงานวิจัยแยกตามรายบุคคล
|
execQuery($query);
$numrows = $dbObj->_numrows;
/** Paging */
$display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page'];
$start = ( ($display * $limit) - $limit );
/** Paging */
if( isset($_GET['OrderBy']) ) {
if( $keyword != "" ) { // ใส่ Keyword
$query = " SELECT * FROM $myTable
WHERE ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' )
ORDER BY $OrderBy $ASCDESC ";
} else {
$query = " SELECT * FROM $myTable ORDER BY $OrderBy $ASCDESC ";
}
}
elseif( !isset($_GET['OrderBy']) ) {
if( $keyword != "" ) { // ใส่ Keyword
$query = " SELECT * FROM $myTable
WHERE ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' )
ORDER BY $myOrderBy ASC ";
} else {
$query = " SELECT * FROM $myTable ORDER BY $myOrderBy ASC ";
}
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
| |