Viewing file: Insert7131.php (4.8 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( "../includes/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "people_tb";
$myTable3 = "medical_fee";
$Teacher_code = $_POST['Teacher_code'];
$Spouse_name = trim($_POST['Name1']);
$Fathe_name = trim($_POST['Name2']);
$Mother_name = trim($_POST['Name3']);
$Child_name = trim($_POST['Name4']);
$Spouse_card = trim($_POST['Idcard1']);
$Fathe_card = trim($_POST['Idcard2']);
$Mother_card = trim($_POST['Idcard3']);
$Child_card = trim($_POST['Idcard4']);
$People_birth = dmyE2ymdT($_REQUEST['Birth_date']);
$People_rank = trim($_POST['Rank']);
if($_POST['People_legal']!=" ") {
$People_legal = "Y";
} else {
$People_legal = "N";
}
if($_POST['People_incom']!=" ") {
$People_incom = "Y";
} else {
$People_incom = "N";
}
// $Date = dmyE2ymdT($_REQUEST['mDate']);
// $Training_name = trim( $_POST['Training_name'] ); //ขออนุมัติ
/* $query = " SELECT * FROM $myTable2 ORDER BY agreeId DESC ";
$result = $dbObj->execQuery($query);
$rss= $dbObj->fetchArray($result);
$myTable2 = $rss[0]+1 ; // นำค่า id มาเพิ่มให้กับค่ารหัสสมาชิกครั้งละ1
$Noagree = "$Ageer$myTable2" ;
$Flag = "Y";
/*-----------------*/
// $Budget_use = 0;
// $num = count($_POST['Budget_agree'])-1;
/* for($j=0;$j<=$num;$j++)
{
$Budget_use += $_POST['Budget_agree'][$j];
}*/
InsertFormAgree ($Noagree , $maNo , $Teacher_code, $contId, $Training_code , $MoneyS_C , $Training_name , $Date, $Dayout, $Smtotal, $STtotal , $Vehicletotal, $Crgestotal , $Budget_use ,$Filetex , $Flag , $Year_std );
/* --------------------------------------------------------------------------------- */
/* $agreeId = mysql_insert_id();
$num_values = count($_POST['agreeName'])-1;
for($i=0;$i<=$num_values;$i++)
{
$agreeName = $_POST['agreeName'][$i];
$Budget_agree=$_POST['Budget_agree'][$i];
InsertFormTypeAgree($agreeId , $agreeName , $Budget_agree);
} */
} # else
?>
MIS -- Teacher
freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|