Viewing file: InsertDura.php (4.75 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" );
require_once( "../include/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "durable_tb ";
$myTable2PK = "duraId";
/** Table --> personal_tb */
$query1 = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result1 = $dbObj->execQuery($query1);
$rs1 = $dbObj->fetchArray($result1);
$Teacher_code = $rs1['Teacher_code'];
$Date = dmyE2ymdE2($_REQUEST['mDate']);
//$Date = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate']; // วัน/เดือน/ปีที่เริ่ม
$Faculty_code = $_POST['Faculty_code'];
$Acc_name = trim( $_POST['Acc_name'] );
$Acc_code = $_POST['Acc_code'];
$Room_code = trim( $_POST['Room_code'] ) ;
$Room_name = $_POST['Room_name'];
$Fix_History = $_POST['Fix_History'];
$Store= trim( $_POST['Store'] );
$Detail = trim( $_POST['Detail'] ) ;
$Detail_name = trim( $_POST['Detail_name'] ) ;
$Description = trim( $_POST['Description'] ) ;
$Status = "รอดำเนินการ" ;
///*-------- นำค่า id มาเพิ่มให้กับค่ารหัสสมาชิกครั้งละ1 -----------*//
$query = "Select * From $myTable2 order by duraId desc";
$result= $dbObj->execQuery($query);
$rss = $dbObj->fetchArray($result);
$myTable2 = $rss[0]+1 ; // นำค่า id มาเพิ่มให้กับค่ารหัสสมาชิกครั้งละ1
$DuraNo = "$DuraCo$myTable2" ;
/** Table -->edu_product */
InsertDura($Date,$Faculty_code,$Acc_name,$Acc_type_code,$AccId ,$Acc_code,$Room_code,$Room_name,$Fix_History,$Store,$DetailDura,$DetailDura_name,$Detail,$Detail_name,$Status,$Budget_year,$Teacher_code,$DuraNo,$durableCode );
} # else
?>
ข้อมูลทั่วไปบุคลากร - ข้อมูลการพัฒนาบุคลากร - แก้ไขข้อมูลประวัติการพัฒนาตนเอง
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|