"; echo "


กรุณาทำการ Login ก่อน

"; echo ""; exit(); } else { /** Configuration */ require_once( "../configuration.php" ); require_once( $_Config_absolute_path . "/includes/framework.php" ); require_once( "../include/Function.php" ); /** Create Database Object */ $dbObj = new DBConn; //=== SESSION $Username = $valid_user; /** Config Table for This Page */ $myTable = "training_tb"; $myTablePK = "Training_code"; $myTalbleOrder = "Date_start "; $myTableField1 = "Training_name"; $myTableField2 = "Budget_use"; $myTableField3 = "Date_start"; $query = " SELECT * FROM $myTable WHERE Year_std ='$Budget_Year' "; $result0 = $dbObj->execQuery($query); $rs0 = $dbObj->fetchArray($result0); /** Paging */ $page = $_GET['page']; if( $page == "" ) { $page = 1; } /** จำนวนข้อมูล ต่อ 1 หน้า */ $perpage = $_REQUEST['perpage']; if( $perpage == "" ) { $perpage =20; } /** Searching */ $keyword = trim( $_REQUEST['keyword'] ); $selectType = $_REQUEST['selectType']; $param = "keyword=$keyword&selectTypeBook=$selectTypeBook"; } # else ?>
execQuery($query); $numrows = $dbObj->_numrows; /** Paging */ $display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page']; $start = ( ($display * $limit) - $limit ); /** Paging */ if( $keyword != "" ) { // ใส่ Keyword if( $selectType != "" ) { // เลือกรายการใน List switch( $selectType ) { case 1 : if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) AND $myTableField1 LIKE '%$keyword%' ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) AND $myTableField1 LIKE '%$keyword%' ORDER BY $myTalbleOrder ASC "; } break; case 2 : if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) AND $myTableField2 LIKE '%$keyword%' ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) AND $myTableField2 LIKE '%$keyword%' ORDER BY $myTalbleOrder ASC "; } break; case 3 : if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) AND $myTableField3 LIKE '%$keyword%' ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) AND $myTableField3 LIKE '%$keyword%' ORDER BY $myTalbleOrder ASC "; } break; } # switch } else { // หาเฉพาะที่ใส่ Keyword if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' AND ( $myTableField1 LIKE '%$keyword%' OR $myTableField2 LIKE '%$keyword%' OR $myTableField3 LIKE '%$keyword%' ) ORDER BY $myTalbleOrder ASC "; } } } #if else { if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM $myTable WHERE BINARY Year_std='$Year_std' ORDER BY $myTalbleOrder ASC "; } } $query .= " LIMIT $start, $limit "; $result = $dbObj->execQuery($query); ?>
หน้าหลัก » ตัวชี้วัดสภาการพยาบาล จำนวนข้อมูลต่อหน้า
 
‹ ย้อนกลับ
ค้นหา
0 ) { ?>
ทั้งหมด: รายการ  
fetchArray($result) ) { if( $keyword != "" ) { $Acc_code = eregi_replace( $keyword, "\\0", $rs['Acc_code'] ); $Training_name = eregi_replace( $keyword, "\\0", $rs['Training_name'] ); } else { $Acc_code = $rs['Acc_code']; $Training_name = $rs['Training_name']; } $bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF"; ?> freeresult($result1); ?>
No     จำนวนเงิน
execQuery($query); $rs1 = $dbObj->fetchArray($result1); $dbObj->freeresult($result1); echo " $rs1[First_name] $rs1[Teacher_name]  $rs1[Teacher_lastname]"; ?>
0 ) { ?>
หน้า: 1) { $previous = $display - 1; ?>|« หน้าแรก  « ก่อนหน้า $scroll) { $first = $_GET['page']; $last = ($scroll - 1) + $_GET['page']; } else { $first = 1; $last = $paging; } if($last > $paging ) { $first = $paging - ($scroll - 1); $last = $paging; } for($i=$first; $i<=$last; $i++) { if($display == $i) { echo " [$i] "; } else { //echo " $i "; printf(" %s ", $_SERVER['PHP_SELF'], $Year_std, $i, $perpage, $OrderBy, $ASCDESC, $param , $i ); } } // end..for } // end..if if($display < $paging) { $next = $display + 1; ?> ถัดไป »  หน้าสุดท้าย »|
freeresult($result); $dbObj->freeresult($result0); /** Close the Database */ $dbObj->disconn(); /** Unset Class */ unset($dbObj); ?>