Viewing file: Qaindicator.php (10.61 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/Function.php" );
require_once( "../includes/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "qa_elements_tb";
$myTable3 = "qa_indicator ";
$myTable4 = "qa_indicator_tb ";
$myTablePK = "elemCode";
/** Table --> projectstdplan_tb */
$query = " SELECT * FROM qa_indicator WHERE indId='$indId' ";
$result11 = $dbObj->execQuery($query);
$rs1 = $dbObj->fetchArray($result11);
//$query = " SELECT * FROM qa_indicator_tb WHERE indica_code='$id[$i]' ";
//$result2 = $dbObj->execQuery($query);
//$rs2 = $dbObj->fetchArray($result2);
$query = " SELECT * FROM $myTable2 WHERE indId='$indId' ORDER BY indId ASC ";
$result3 = $dbObj->execQuery($query);
$rs3 = $dbObj->fetchArray($result3);
$num3 = $dbObj->_numrows;
//echo
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 55; }
/** Botton Name Action */
$action = $_REQUEST['action'];
$id = $_REQUEST['id'];
if( isset($action) && !empty($action) ) {
switch($action) {
case "Update" :
$num = count($id);
for( $i=0; $i<$num; $i++ ) {
$query6 = " SELECT * FROM qa_indicator_tb WHERE indica_code ='$id[$i]' ";
$result6= mysql_query($query6);
InsertQaindicator ( $id[$i], $ProjectId , $indId , $AcademicYear) ;
}
echo "";
echo "";
echo "";
exit();
break;
} # switch
} # if
} # else
?>
ระบบสารสนเทศเพื่อการบริหาร
execQuery($query);
$numrows = $dbObj->_numrows;
/** Paging */
$display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page'];
$start = ( ($display * $limit) - $limit );
/** Paging */
if( isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable2 WHERE indId='$indId' ORDER BY $OrderBy $ASCDESC ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM $myTable2 WHERE indId='$indId' ORDER BY $myTablePK ASC ";
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
|
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|