Viewing file: ShowResearch.php (12.96 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( "../includes/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
$sql3 = "Select Teacher_code,First_name,Teacher_name,Teacher_lastname,Faculty_code From personal_tb ";
$result2= mysql_query($sql3);
$rss = mysql_fetch_array($result2);
/** Config Table for This Page */
$myTable = "research_tb";
$myTable2PK = "Research_code";
$myOrderBy = "Year_finish";
$myTableField1 = "Research_name";
$myTableField2 = "Branch";
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
$id = $_REQUEST['Research_code'];
$num = count($id);
for( $i=0; $i<$num; $i++ ) {
$Mint = '22' ;
$Research_code =$_REQUEST['Research_code'];
$outreacId =$_REQUEST['outreacId'];
$Budget_Year =$_REQUEST['Budget_Year'];
InsertIntegration ($Mint ,$courseId, $Research_code, $proId, $outreacId ,$Flag ,$Budget_Year) ;
echo "";
}
//** Parameter */
$params = "outreacId=$outreacId&Mint=$Mint&keyword=$keyword&selectTypeBook=$selectTypeBook";
} # 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 ReTyId='1' and ($myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' ) ORDER BY $OrderBy $ASCDESC ";
} else {
$query = " SELECT * FROM $myTable Where ReTyId='1' ORDER BY $OrderBy $ASCDESC ";
}
}
elseif( !isset($_GET['OrderBy']) ) {
if( $keyword != "" ) { // ใส่ Keyword
$query = " SELECT * FROM $myTable
WHERE ReTyId='1' and ($myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' ) ORDER BY $myOrderBy ASC ";
} else {
$query = " SELECT * FROM $myTable Where ReTyId='1' ORDER BY $myOrderBy DESC";
}
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
| |