Viewing file: InsertPlaningIn.php (5.65 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;
/** Config Table for This Page */
$myTable = "project_tb";
$Project_code= $_POST['Project_code'];
$Faculty_code = $_POST['Faculty_code'];
$Teacher_code = $_POST['Teacher_code'];
$Project_plan = $_POST['Project_plan'];
$Orderlist = $_POST['Orderlist'];
$Training_name = htmlspecialchars( trim( $_POST['Training_name'] ) );
$programId = $_POST['programId'];
$Year = $_POST['Year'];
$MoneyS_C = $_POST['MoneyS_C'];
$MoneyId = $_POST['MoneyId'];
$Ind = $_POST['Ind'];
$Date = trim( $_POST['Date'] );
$Budget_use = $_POST['Budget_use'];
///*-------- นำค่า id มาเพิ่มให้กับค่ารหัสครั้งละ1 -----------*//
$query = " SELECT * FROM $myTable ORDER BY codeId DESC ";
$result = $dbObj->execQuery($query);
$rss= $dbObj->fetchArray($result);
$myTable = $rss[0]+1 ; // นำค่า id มาเพิ่มให้กับค่ารหัสสมาชิกครั้งละ1
// if($myTable2>=100) {
$ProjectNo = "$Project$myTable" ;
$Spending_use ="$Budget_use";
//### Call Function ( table --> 'project_tb' )
InsertProject( $Training_code, $Project_code, $ProjectId, $MoneyId, $MoneyS_C, $Faculty_code, $Teacher_code, $Ind, $Orderlist, $Project_plan, $Training_name, $Date, $Budget_use, $Spending_use, $programId, $Budget_Year, $Year );
} # else
?>
MIS -- Teacher
bool(false)
|