Viewing file: FunctionDB.php (138.37 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("Config.php");
//*------Function ติอต่อฐานข้อมูล-----*//
function ConnectDB()
{
global $con;
global $_Config_REGDBHost, $_Config_REGDBUser, $_Config_REGDBPass, $_Config_REGDBName;
$con = mysql_connect($_Config_REGDBHost, $_Config_REGDBUser, $_Config_REGDBPass);
if (!$con)
die("Can't Connect DataBase ".mysql_error());
mysql_query("SET NAMES 'tis620'");
mysql_select_db($_Config_REGDBName) or die ("Can't Select DataBase REGDB");
}
//*--------------------*//
function
CloseDB()
{
global $con;
mysql_close($con);
}
//*--------------------------------*//
function
InsertTreat($Code_1,$Name,$Price,$Description_1,$Description_2,$Description_3)
{
global $conn;
$sql = "INSERT INTO treatment_tb (Code_1,Name,Price,Description_1,Description_2,Description_3)";
$sql = $sql."VALUES ('$Code_1','$Name','$Price','$Description_1','$Description_2','$Description_3')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------*//
function
InsertLab_type($Code_id,$Lab,$Description)
{
global $conn;
$sql = "INSERT INTO labtype_tb (Code_id,Lab,Description)";
$sql = $sql."VALUES ('$Code_id','$Lab','$Description')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------*//
function
InsertFormation($InforName,$InforDetail,$Teacher_code,$Date,$Flage)
{
global $conn;
$sql = "INSERT INTO formation_tb (InforName,InforDetail,Teacher_code,Date,Flage)";
$sql = $sql."VALUES ('$InforName','$InforDetail','$Teacher_code','$Date','$Flage')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------------*//
function
Inserttooth($Code_id,$Description_1,$Description_2)
{
global $conn;
$sql = "INSERT INTO tooth_tb (Code_id,Description_1,Description_2)";
$sql = $sql."VALUES ('$Code_id','$Description_1','$Description_2')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------------*//
function
InsertDescription($Code_id,$Description_1,$Description_2)
{
global $conn;
$sql = "INSERT INTO descriptionplan_tb (Code_id,Description_1,Description_2)";
$sql = $sql."VALUES ('$Code_id','$Description_1','$Description_2')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------------------*//
function
InsertDentis($Orderlist,$Dental_code,$First_name,$Name,$Lastname,$Name_eng, $Lastname_eng,$Sex,$DateBirth,$Datetype,$Religion,$Address,$Img1,$ProvinceId,$Phone_1, $Phone_2,$Email,$Description_1,$Description_2,$Year_1,$Flag)
{
global $conn;
$sql = "INSERT INTO dentis_tb (Orderlist,Dental_code,First_name,Name,Lastname,Name_eng, Lastname_eng,Sex,DateBirth,Datetype,Religion,Address,Img1,ProvinceId,Phone_1,Phone_2,Email,Description_1,Description_2,Year_1,Flag)";
$sql = $sql."VALUES ('$Orderlist','$Dental_code','$First_name','$Name','$Lastname','$Name_eng',' $Lastname_eng','$Sex','$DateBirth','$Datetype','$Religion','$Address','$Img1','$ProvinceId','$Phone_1','$Phone_2','$Email','$Description_1','$Description_2','$Year_1','$Flag')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------------------*//
function
InsertTreatcat($Code_id,$Description_1,$Description_2)
{
global $conn;
$sql = "INSERT INTO treatcat_tb (Code_id,Description_1,Description_2)";
$sql = $sql."VALUES ('$Code_id','$Description_1','$Description_2')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertDiagnosis($Code_id,$Description_1,$Description_2)
{
global $conn;
$sql = "INSERT INTO diagnosis_tb (Code_id,Description_1,Description_2)";
$sql = $sql."VALUES ('$Code_id','$Description_1','$Description_2')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertPersonDen($HN_code,$Teacher_code,$First_name,$Name,$Lastname,$DateBirth,$Datetype,$Sex,$Hostpital,$Nationality,$Nation,$Religion,$Citizen_id,$Father_name,$Mother_name,$Age,$ProvinceId, $Zipcode,$Phone,$Mobile,$Work,$Education,$Email_name,$Email_1,$Status2, $Status3,$Phone_1,$Mobile_1,$Address,$Img1,$Degree_code, $Person_type,$Club_nid,$Group_1,$Group_2,$Group_3,$Group_4,$Dental_code,$Username,$Password, $Permision)
{
global $conn;
$strSQL = "INSERT INTO personal_den_tb (HN_code,Teacher_code,First_name,Name,Lastname,DateBirth,Datetype,Sex,Hostpital,Nationality,Nation,Religion,Citizen_id,Father_name,Mother_name,Age,ProvinceId, Zipcode,Phone,Mobile,Work,Education,Email_name,Email_1,Status2, Status3,Phone_1,Mobile_1,Address,Img1,Degree_code, Person_type,Club_nid,Group_1,Group_2,Group_3,Group_4,Dental_code,Username,Password, Permision)";
$strSQL = $strSQL." VALUES('$HN_code','$Teacher_code','$First_name','$Name','$Lastname','$DateBirth','$Datetype','$Sex','$Hostpital','$Nationality','$Nation','$Religion','$Citizen_id','$Father_name','$Mother_name','$Age','$ProvinceId',' $Zipcode','$Phone','$Mobile','$Work','$Education','$Email_name','$Email_1','$Status2',' $Status3','$Phone_1','$Mobile_1','$Address','$Img1','$Degree_code',' $Person_type','$Club_nid','$Group_1','$Group_2','$Group_3','$Group_4','$Dental_code','$Username','$Password','$Permision')";
mysql_query($strSQL) or die(" INSERT HAS INCORRECT $result $strSQL".mysql_error());
}
//*-----------------------------------*//
function
InsertPersonHealth($HN_code,$Dentis_code,$First_name,$Name,$Lastname,$DateBirth,$Datetype,$Sex,$Hostpital, $Nationality,$Nation,$Religion,$Citizen_id,$Father_name,$Mother_name,$Age,$ProvinceId, $Zipcode,$Phone,$Mobile,$Work,$Education,$Email_name,$Email_1,$Status2, $Status3,$Phone_1,$Mobile_1,$Address,$Img1,$Degree_code, $Person_type,$Club_nid,$Group_1,$Group_2,$Group_3,$Group_4,$Dental_code)
{
global $conn;
$strSQL = "INSERT INTO personal_health_tb (HN_code,Dentis_code,First_name,Name,Lastname,DateBirth,Datetype,Sex,Hostpital,Nationality,Nation,Religion,Citizen_id,Father_name,Mother_name,Age,ProvinceId, Zipcode,Phone,Mobile,Work,Education,Email_name,Email_1,Status2, Status3,Phone_1,Mobile_1,Address,Img1,Degree_code, Person_type,Club_nid,Group_1,Group_2,Group_3,Group_4,Dental_code,)";
$strSQL = $strSQL." VALUES('$HN_code','$Dentis_code','$First_name','$Name','$Lastname','$DateBirth','$Datetype','$Sex','$Hostpital','$Nationality','$Nation','$Religion','$Citizen_id','$Father_name','$Mother_name','$Age','$ProvinceId',' $Zipcode','$Phone','$Mobile','$Work','$Education','$Email_name','$Email_1','$Status2',' $Status3','$Phone_1','$Mobile_1','$Address','$Img1','$Degree_code',' $Person_type','$Club_nid','$Group_1','$Group_2','$Group_3','$Group_4','$Dental_code')";
mysql_query($strSQL) or die(" INSERT HAS INCORRECT $result $strSQL".mysql_error());
}
//*------------------------------*//
function
InsertTeachPlan($Person_code,$HN_code,$Tooth_code,$Teach_code,$Teacher_code,$Code ,$Time_in,$Time_out,$Date,$Date_1,$Time ,$Religion ,$Teach1,$Teach2,$Teach3,$Teach4, $Teach5,$Teach6,$Teach7,$Teach8,$Teach9,$Teach10,$Teach11,$Teach12,$Teach13,$Teach_13,$Tooth_code1,$Tooth_code3 ,$Tooth_code4,$Tooth_code5,$Tooth_code6,$Tooth_code7,$Tooth_code8,$Tooth_code11,$Tooth_code12)
{
global $conn;
$strSQL = "INSERT INTO teachplan_tb (Person_code,HN_code,Tooth_code,Teach_code,Teacher_code,Code ,Time_in,Time_out,Date,Date_1,Time ,Religion ,Teach1,Teach2,Teach3,Teach4, Teach5,Teach6,Teach7,Teach8,Teach9,Teach10,Teach11,Teach12,Teach13,Teach_13,Tooth_code1,Tooth_code3 ,Tooth_code4,Tooth_code5,Tooth_code6,Tooth_code7,Tooth_code8,Tooth_code11,Tooth_code12)";
$strSQL = $strSQL." VALUES ('$Person_code','$HN_code','$Tooth_code','$Teach_code','$Teacher_code','$Code','$Time_in','$Time_out','$Date','$Date_1','$Time','$Religion','$Teach1','$Teach2','$Teach3','$Teach4','$Teach5','$Teach6','$Teach7','$Teach8','$Teach9','$Teach10','$Teach11','$Teach12','$Teach13','$Teach_13','$Tooth_code1','$Tooth_code3','$Tooth_code4','$Tooth_code5','$Tooth_code6','$Tooth_code7','$Tooth_code8','$Tooth_code11','$Tooth_code12')";
mysql_query($strSQL) or die(" INSERT HAS INCORRECT $result $strSQL".mysql_error());
}
//*------------------------------*//
function
InsertAccount($Person_code,$No_code,$HN_code,$Tooth_code,$Teach_code,$Teacher_code,$Code ,$Time_in,$Time_out,$Date,$Price ,$Mount,$Cost_total,$Percen,$Hostpital,$Roug)
{
global $conn;
$sql = "INSERT INTO account (Person_code,No_code,HN_code,Tooth_code,Teach_code,Teacher_code,Code ,Time_in,Time_out,Date,Price ,Mount,Cost_total,Percen,Hostpital,Roug)";
$sql = $sql."VALUES('$Person_code','$No_code','$HN_code','$Tooth_code','$Teach_code','$Teacher_code','$Code' ,'$Time_in','$Time_out','$Date','$Price' ,'$Mount','$Cost_total','$Percen','$Hostpital','$Roug')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------*//
function
InsertPlanTeach($Person_code,$No_code,$HN_code,$Teach_code,$Tooth_code,$Teacher_code,$Code ,$Time_in,$Img1,$Time_out,$Date,$Religion,$Discrition,$Flag)
{
global $conn;
$sql = "INSERT INTO planteach_tb (Person_code,No_code,HN_code,Teacher_code,Tooth_code,Teach_code,Code ,Time_in,Img1,Time_out,Date,Religion,Discrition,Flag)";
$sql = $sql."VALUES('$Person_code','$No_code','$HN_code','$Teacher_code','$Tooth_code','$Teacher_code','$Code' ,'$Time_in','$Img1','$Time_out','$Date','$Religion','$Discrition','$Flag')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertCommit($Teacher_code,$Title,$Year_com,$Edu,$Edu_job,$Tsis,$Check_tool,$Scp10,$Club_bcnlp,$North_network,$Else_commit,$Houn,$Filetex)
{
global $conn;
$sql = "INSERT INTO committee_tb (Teacher_code,Title,Year_com,Edu,Edu_job,Tsis,Check_tool,Scp10,Club_bcnlp,North_network,Else_commit,Houn,Filtex)";
$sql = $sql."VALUES ('$Teacher_code','$Title','$Year_com','$Edu','$Edu_job','$Tsis','$Check_tool','$Scp10','$Club_bcnlp','$North_network','$Else_commit','$Houn','$Filetex')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------ตารางโครงการบริการวิชาการ------------------*//
/*
function
InsertEdu_Service ($Orderlist, $Project_name, $M21, $M22 ,$M23, $M24, $M31, $M32, $M33, $M34, $M35, $M36, $M37,$M35_Detail , $M4, $M5, $proId, $Budget_Year, $AcademicYear, $Date_start, $Date_finish, $Date_in, $Date_out, $Faculty_code, $M7 ,$Location ,$M8 ,$M8_Detail ,$M9 ,$Budget_fee ,$M101 , $M101_Detail , $M102, $Target_group, $M103, $Budget, $M104, $M1041, $M1041_Detail, $M105 ,$M106 ,$Cradit ,$Budget_colleg ,$M107, $LecturerIn ,$HoursIn ,$M108 ,$LecturerOut, $HoursOut, $M11,$M11_Detail, $M12_Detail, $Filetex1,$Filetex2 )
{
global $conn;
$sql = "INSERT INTO edu_service_tb (Orderlist, Project_name, M21, M22 , M23, M24, M31, M32, M33, M34, M35, M36, M37, M35_Detail , M4, M5, proId, Budget_Year, AcademicYear, Date_start, Date_finish, Date_in, Date_out, Faculty_code, M7 ,Location ,M8 ,M8_Detail ,M9 ,Budget_fee ,M101 , M101_Detail , M102, Target_group, M103, Budget, M104, M1041, M1041_Detail, M105 ,M106 ,Cradit ,Budget_colleg ,M107, LecturerIn ,HoursIn ,M108 ,LecturerOut, HoursOut, M11,M11_Detail, M12_Detail, Filetex1, Filetex2)";
$sql = $sql."VALUES ( '$Orderlist' ,'$Project_name', '$M21' , '$M22' , '$M23' , '$M24' ,'$M31', '$M32', '$M33', '$M34' , '$M35' , '$M36', '$M37' , '$M35_Detail' , '$M4' , '$M5' , '$proId' , '$Budget_Year', '$AcademicYear', '$Date_start' , '$Date_finish' , '$Date_in', '$Date_out' , '$Faculty_code', '$M7' ,'$Location' , '$M8' , '$M8_Detail' , '$M9' , '$Budget_fee' , '$M101' , '$M101_Detail' , '$M102', '$Target_group' ,'$M103', '$Budget', '$M104', '$M1041', '$M1041_Detail', '$M105' ,'$M106' ,'$Cradit' ,'$Budget_colleg' ,'$M107', '$LecturerIn' ,'$HoursIn' , '$M108' ,'$LecturerOut' , '$HoursOut' , '$M11' ,'$M11_Detail' , '$M12_Detail' , '$Filetex1' , '$Filetex2' )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
*/
//*------------ตารางโครงการบริการวิชาการ------------------*//
function
InsertEdu_Service ( $Faculty_code , $Orderlist , $Project_name , $M21 , $M22 ,$M23 , $M24, $M31, $M32, $M33, $M34,$M35, $M36, $M37, $M35_Detail , $M4, $M5, $proId, $AcademicYear, $Date_start, $Date_finish, $Date_in, $Date_out , $Budget_Year, $M7, $Location, $LocationOut ,$M8 , $M8_Detail , $M9 ,$Budget_fee , $M101, $M101_Detail , $M102 , $M103 , $M104 ,$M105 , $M1041 , $M1041_Detail , $M106 , $Cradit , $Budget_colleg , $M107 , $LecturerIn , $HoursIn, $M108 , $LecturerOut , $HoursOut , $Detail , $Budget, $Budget_use , $Target_group , $Fee , $M11, $M11_Detail , $M12_Detail , $Filetex1 , $Filetex2 )
{
global $conn;
$sql = "INSERT INTO edu_service_tb ( Faculty_code , Orderlist , Project_name , M21 , M22 ,M23 , M24, M31, M32, M33, M34,M35, M36, M37, M35_Detail , M4, M5, proId, AcademicYear, Date_start, Date_finish, Date_in, Date_out , Budget_Year, M7, Location, LocationOut ,M8 , M8_Detail , M9 ,Budget_fee ,M101, M101_Detail , M102 , M103 , M104 ,M105 , M1041 , M1041_Detail , M106 , Cradit , Budget_colleg , M107 , LecturerIn ,HoursIn, M108 , LecturerOut , HoursOut , Detail , Budget, Budget_use , Target_group , Fee , M11, M11_Detail , M12_Detail , Filetex1 , Filetex2 ) ";
$sql =$sql. "VALUES ( '$Faculty_code' , '$Orderlist' , '$Project_name' , '$M21' , '$M22' , '$M23' ,'$M24' , '$M31', '$M32' , '$M33' ,'$M34' , '$M35' , '$M36' , '$M37' , '$M35_Detail' , '$M4' , '$M5' , '$proId' , '$AcademicYear' , '$Date_start' , '$Date_finish' , '$Date_in' , '$Date_out' , '$Budget_Year' , '$M7' , '$Location' , '$LocationOut' , '$M8' , '$M8_Detail' , '$M9' , '$Budget_fee' , '$M101' , '$M101_Detail' , '$M102' , '$M103' , '$M104' ,'$M105' , '$M1041' , '$M1041_Detail ' , '$M106', '$Cradit' , '$Budget_colleg' , '$M107' , '$LecturerIn' , '$HoursIn' , '$M108' , '$LecturerOut' , '$HoursOut' , '$Detail' , '$Budget' , '$Budget_use' , '$Target_group' , '$Fee' , '$M11' , '$M11_Detail ' , '$M12_Detail ' , '$Filetex1' , '$Filetex2' ) ";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------------*//
function
Insert_Res_project($Teacher_code,$Project_name,$Year_res,$Duty,$Duty_else,$Apply)
{
global $conn;
$sql = "INSERT INTO res_project_tb (Teacher_code,Project_name,Year_res,Duty,Duty_else,Apply)";
$sql = $sql."VALUES ('$Teacher_code','$Project_name','$Year_res','$Duty','$Duty_else','$Apply')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------*//
function
CheckTeacher_code($Teacher_code)
{
global $conn;
$strSQL = "SELECT * FROM teachertb WHERE Teacher_code = $Teacher_code";
$result = mysql_query($strSQL) or die(" SELECT HAS ERROR $result".mysql_error());
$num = mysql_num_rows($result);
return empty($num);
}
//*--------------------------*//
function
UpdateLimit($Id4)
{
global $conn;
$strSQL = "UPDATE limittb SET Id4=Id4+1 ";
$result = mysql_query($strSQL) or die("$result $strSQL".mysql_error());
}
//*-----------------------------------*//
function
InsertHistory ($Teacher_id,$First_name,$Teacher_name,$Teacher_lastname,$DateBirth, $Sex,$Nationality,$Nation,$Religion,$Citizen_id,$Father_name,$Mother_name, $Status,$Status2,$Status3,$StatusId,$Soulmate,$Total_child,$Address, $districtId, $amphurId,$provinceId,$Img1,$Skill, $Type_Degree,$Degree_code,$Degree_else,$Degree_His1,$Degree_His2, $Degree_His3,$Salary_1,$Salary_2,$Salary_3,$Type_degree1,$Type_degree2, $Type_degree3,$Year_1,$Year_2,$Year_3, $Person_type,$Teacher_type,$Gover_id,$Forum_nid,$Club_nid,$Year_gov, $Year_coll,$Year_fac, $Gover_pos,$Manage_pos,$Faculty_code,$Depart,$Username,$Password, $permission,$date_create)
{
global $conn;
$strSQL = "INSERT INTO personal_tb (Teacher_id,First_name,Teacher_name,Teacher_lastname,DateBirth,Sex,Nationality,Nation,Religion,Citizen_id,Father_name,Mother_name,Status,Status2,Status3,StatusId,Soulmate,Total_child , Address, districtId ,amphurId, provinceId, Img1,Skill,Type_Degree,Degree_code,Degree_else,Degree_His1,Degree_His2,Degree_His3,Salary_1,Salary_2,Salary_3,Type_degree1,Type_degree2,Type_degree3,Year_1,Year_2,Year_3,Person_type,Teacher_type,Gover_id,Forum_nid,Club_nid,Year_gov,Year_coll,Year_fac,Gover_pos,Manage_pos,Faculty_code,Depart,Username,Password,permission,date_create)";
$strSQL = $strSQL." VALUES('$Teacher_id','$First_name','$Teacher_name','$Teacher_lastname','$DateBirth','$Sex','$Nationality','$Nation','$Religion','$Citizen_id','$Father_name','$Mother_name','$Status','$Status2','$Status3','$StatusId','$Soulmate','$Total_child','$Address','$amphurId','$provinceId','$Img1','$Skill','$Type_Degree','$Degree_code','$Degree_else','$Degree_His1','$Degree_His2','$Degree_His3','$Salary_1','$Salary_2','$Salary_3','$Type_degree1','$Type_degree2','$Type_degree3','$Year_1','$Year_2','$Year_3','$Person_type','$Teacher_type','$Gover_id','$Forum_nid','$Club_nid','$Year_gov','$Year_coll','$Year_fac','$Gover_pos','$Manage_pos','$Faculty_code','$Depart','$Username','$Password','$permission',NOW() )";
mysql_query($strSQL) or die(" INSERT HAS INCORRECT $result $strSQL".mysql_error());
}
//*------------------------*//
function
Insert_Position_History($Teacher_code,$Position_id,$Date_post,$Gover_pos,$Manage_pos, $Level,$Salary,$Salary_2,$Salary_3,$Skill, $Order_id,$Ref_doc,$Flag,$date_updated)
{
global $conn;
$strSQL = "INSERT INTO history_position_tb (Teacher_code,Position_id,Date_post,Gover_pos,Manage_pos,Level,Salary,Salary_2,Salary_3,Skill,Order_id,Ref_doc,Flag,date_updated)";
$strSQL = $strSQL." VALUES('$Teacher_code','$Position_id','$Date_post','$Gover_pos','$Manage_pos','$Level','$Salary','$Salary_2','$Salary_3','$Skill','$Order_id','$Ref_doc','$Flag',NOW())";
mysql_query($strSQL) or die(" $strSQL INSERT HAS INCORRECT $result $sql".mysql_error());
}
//*------------------------------*//
function
InsertSalaryType($SalaryId,$Detail,$SalaryStatus,$Flag)
{
global $conn;
$strSQL = "INSERT INTO salary_type_tb (SalaryId,Detail,SalaryStatus,Flag)";
$strSQL = $strSQL." VALUES('$SalaryId','$Detail','$SalaryStatus','$Flag')";
mysql_query($strSQL) or die(" $strSQL INSERT HAS INCORRECT $result $sql".mysql_error());
}
//*------------------------------------------*//
function
Insert_Salary ($Salary,$Teacher_code,$Start_mont,$Start_year,$Cost_1,$Cost_2,$Cost_3,$Cost_4,$Cost_5, $Cost_6,$Cost_7,$Cost_8, $Cost_9,$Cost_10,$Cost_11,$Cost_12,$Cost_13,$Cost_14,$Cost_15,$Cost_16,$Flag)
{
global $conn;
$strsql = "INSERT INTO salary_tb(Salary,Teacher_code,Start_mont,Start_year,Cost_1,Cost_2,Cost_3,Cost_4,Cost_5,Cost_6,Cost_7,Cost_8,Cost_9,Cost_10,Cost_11,Cost_12,Cost_13,Cost_14,Cost_15,Cost_16,Flag)";
$strsql = $strsql. "VALUES ('$Salary','$Teacher_code','$Start_mont','$Start_year','$Cost_1','$Cost_2','$Cost_3','$Cost_4','$Cost_5','$Cost_6','$Cost_7',' $Cost_8','$Cost_9','$Cost_10','$Cost_11','$Cost_12','$Cost_13','$Cost_14','$Cost_15','$Cost_16','$Flag')";
mysql_query($strsql) or die("$strSQL INSERT HAS INCORRECT $result $sql".mysql_error());
}
//*-----------------------------------*//
function
Insert_Salary_repot ($Teacher_code,$Teacher_id,$StatusId,$Faculty_code,$Person_type,$Start_mont,$Start_year,$Salary_1,$Salary_2,$Salary_3,$Costt_1,$Costt_2, $Costt_3,$Costt_4,$Costt_5, $Costt_6,$Costt_7,$Costt_8, $Costt_9,$Costt_10,$Costt_11,$Costt_12,$Costt_13,$Costt_14,$Costt_15,$Costt_16,$Costt_17, $Costt_18,$Costt_19,$Costt_salary,$Costt_to,$Costt_total,$Flag)
{
global $conn;
$strsql = "INSERT INTO salary_repot_tb(Teacher_code,Teacher_id,StatusId,Faculty_code,Person_type,Start_mont,Start_year,Salary_1,Salary_2,Salary_3,Costt_1,Costt_2,Costt_3,Costt_4,Costt_5,Costt_6,Costt_7,Costt_8,Costt_9,Costt_10,Costt_11,Costt_12,Costt_13,Costt_14,Costt_15,Costt_16,Costt_17,Costt_18,Costt_19,Costt_salary,Costt_to,Costt_total,Flag)";
$strsql =
$strsql. "VALUES ('$Teacher_code','$Teacher_id','$StatusId','$Faculty_code','$Person_type','$Start_mont','$Start_year','$Salary_1','$Salary_2','$Salary_3','$Costt_1','$Costt_2','$Costt_3','$Costt_4','$Costt_5','$Costt_6','$Costt_7',' $Costt_8','$Costt_9','$Costt_10','$Costt_11','$Costt_12','$Costt_13','$Costt_14','$Costt_15','$Costt_16','$Costt_17','$Costt_18','Costt_19','$Costt_salary','$Costt_to','$Costt_total','$Flag')";
mysql_query($strsql) or die("$strSQL INSERT HAS INCORRECT $result $sql".mysql_error());
}
///--------InsertFiletex-----------//////
function
InsertFiletex($Research_code,$Filename,$Filetex)
{
global $conn;
$sql = " INSERT INTO research_filetex_tb (Research_code,Filename,Filetex)" ;
$sql =$sql. "VALUES ('$Research_code','$Filename','$Filetex')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------------*//
function
InsertProject_edu($Code_no,$Project_code,$First_name,$Name,$Last_name,$Class,$Addname,$citizenId,$Work,$Addwork,$Room,$Amount,$Program,$Program_1,$Program_2,$Program_3,$Program_4,$Program_5,$Teacher_code,$Faculty_code,$Foot,$programId,$collegeCode,$Code,$Age,$Sex,$Address ,$Amper,$ProvinceId ,$Img1,$Zipcode,$Email,$Phone ,$Education,$Education_1,$Education_2,$Detail,$Flag)
{
global $conn;
$sql = "INSERT INTO persnal_project_tb(Code_no,Project_code,First_name,Name,Last_name,Class,Addname,citizenId,Work,Addwork,Room,Amount,Program,Program_1,Program_2,Program_3,Program_4,Program_5,Teacher_code,Faculty_code,Foot,programId,collegeCode,Code,Age,Sex,Address ,Amper,ProvinceId,Img1,Zipcode,Email,Phone,Education,Education_1,Education_2,Detail,Flag)";
$sql = $sql."VALUES('$Code_no','$Project_code','$First_name','$Name','$Last_name','$Class','$Addname','$citizenId','$Work','$Addwork','$Room','$Amount','$Program','$Program_1','$Program_2','$Program_3','$Program_4','$Program_5','$Teacher_code','$Faculty_code','$Foot','$programId','$collegeCode','$Code','$Age','$Sex','$Address','$Amper','$ProvinceId','$Img1','$Zipcode','$Email','$Phone','$Education','$Education_1','$Education_2','$Detail','$Flag')";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------- ตารางแผนดำนเนิการ projectStdPlan --------*//
function
InsertProjectStd($Teacher_code,$Faculty_code,$programId,$codeId ,$Orderlist_2,$Orderlist,$Project_plan, $Project_name, $Project_rep,$Period,$Budget_Year,$Period_1,$Teacher_code1,$Teacher_code2,$Teacher_code3,$Teacher_code4,$Budget_Year1,$Budget_Year2,$Budget_Year3,$Budget_Year4,$Budget_Year5,$IndNo1,$IndNo2,$IndNo3,$IndNo4,$IndNo5 )
{
global $conn;
$sql = "INSERT INTO projectstdplan_tb ( Teacher_code,Faculty_code,programId,codeId ,Orderlist_2,Orderlist,Project_plan,Project_name,Project_rep,Period,Budget_Year,Period_1,Teacher_code1,Teacher_code2,Teacher_code3,Teacher_code4,Budget_Year1,Budget_Year2,Budget_Year3,Budget_Year4,Budget_Year5,IndNo1,IndNo2,IndNo3,IndNo4,IndNo5 )";
$sql = $sql. " VALUES('$Teacher_code','$Faculty_code','$programId','$codeId ','$Orderlist_2','$Orderlist','$Project_plan','$Project_name','$Project_rep','$Period','$Budget_Year','$Period_1','$Teacher_code1','$Teacher_code2','$Teacher_code3','$Teacher_code4','$Budget_Year1','$Budget_Year2','$Budget_Year3','$Budget_Year4','$Budget_Year5','$IndNo1','$IndNo2','$IndNo3','$IndNo4','$IndNo5') " ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------------*//
function
InsertEdu_Project($Project_name,$Addwork,$Project_desc,$Period,$Start_Date,$Supervisor,$Term, $Faculty_code,$Budget_Year,$Budget,$Budget_use,$Percent_ans,$Result_oper,$Dif_result,$Flag)
{
global $conn;
$sql = "INSERT INTO edu_project_tb (Project_name,Addwork,Project_desc,Period,Start_Date,Supervisor,Term,Faculty_code,Budget_Year,Budget,Budget_use,Percent_ans,Result_oper,Dif_result,Flag)";
$sql = $sql."VALUES('$Project_name','$Addwork','$Project_desc','$Period','$Start_Date','$Supervisor','$Term','$Faculty_code','$Budget_Year','$Budget','$Budget_use','$Percent_ans','$Result_oper','$Dif_result','$Flag')";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//**---------------- ตารางการใช้เงินตามแผน-----------------**//
function
InsertProject ( $Ind, $ProjectId, $Project_code, $ProjectNo, $MoneyId, $MoneyS_C, $programId, $Orderlist , $Faculty_code, $Teacher_code, $Orderlist_2, $Training_name ,$Project_plan, $Date, $Budget_use, $Spending_use, $Budget_Year, $Year , $Training_code ,$Flag , $proId, $date_updated)
{
global $conn;
$sql = "INSERT INTO project_tb ( Ind, ProjectId, Project_code,ProjectNo, MoneyId,MoneyS_C, programId, Orderlist ,Faculty_code, Teacher_code, Orderlist_2, Training_name ,Project_plan, Date, Budget_use, Spending_use, Budget_Year, Year , Training_code ,Flag , proId , date_updated )";
$sql = $sql."VALUES('$Ind','$ProjectId','$Project_code', '$ProjectNo','$MoneyId', '$MoneyS_C', '$programId', '$Orderlist' ,'$Faculty_code', '$Teacher_code', '$Orderlist_2', '$Training_name' ,'$Project_plan', '$Date', '$Budget_use', '$Spending_use', '$Budget_Year', '$Year' , '$Training_code' ,'$Flag' , '$proId', NOW() )";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------InsertProjectName-----------------*//
function
InsertProjectName($Project_code , $programId , $Orderlist ,$codeId, $Orderlist_2, $Project_name , $Project_plan , $Faculty_code , $Teacher_code , $Period_1, $Period , $Project_rep , $Date_start , $Date_finish , $Budget_Year , $Budget_total ,$MoneyS_C , $MoneyId, $January , $February , $March , $April , $May , $June , $July , $Augus , $September , $October , $November , $December )
{
global $conn;
$sql = "INSERT INTO project_type_tb (Project_code ,programId , Orderlist ,codeId, Orderlist_2, Project_name , Project_plan , Faculty_code , Teacher_code , Period_1, Period , Project_rep , Date_start ,Date_finish ,Budget_Year , Budget_total ,MoneyS_C , MoneyId, January , February , March , April , May , June , July , Augus ,September , October , November , December )";
$sql = $sql. "VALUES('$Project_code' , '$programId' , '$Orderlist' ,'$codeId', '$Orderlist_2', '$Project_name' , '$Project_plan' , '$Faculty_code' , '$Teacher_code' , '$Period_1', '$Period' ,'$Project_rep' , '$Date_start' , '$Date_finish' , '$Budget_Year' , '$Budget_total' ,'$MoneyS_C' , '$MoneyId', '$January' , '$February' , '$March' , '$April' , '$May' , '$June' , '$July' , '$Augus' ,'$September ', '$October' , '$November' , '$December' )";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------Insert User----------------*//
function
InsertUser($Teacher_code,$Username,$Password,$PasswordR,$Priority,$Flag, $date_create)
{
global $conn;
$sql = "INSERT INTO user_tb (Teacher_code,Username,Password,PasswordR,Priority,Flag, date_create)";
$sql = $sql."VALUES('$Teacher_code','$Username','$Password','$PasswordR','$Priority','$Flag', NOW () )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------------------*//
function
InsertDecoration($Decoration_name,$Teacher_code,$Year_receive,$Volumn,$Col,$Page,$Orderlist)
{
global $conn;
$sql = "INSERT INTO history_decoration_tb (Decoration_name,Teacher_code,Year_receive,Volumn,Col,Page,Orderlist)";
$sql = $sql."VALUES('$Decoration_name','$Teacher_code','$Year_receive','$Volumn','$Col','$Page','$Orderlist')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------*//
function
InsertAbsent( $Absent_code , $Year , $Absent_type , $Teacher_code , $Absent_times , $Date, $Date_start , $Date_finish , $Address )
{
global $conn;
$sql = "INSERT INTO history_absent_tb (Absent_code,Year,Absent_type,Teacher_code,Absent_times,Date, Date_start,Date_finish,Address)";
$sql = $sql."VALUES('$Absent_code','$Year','$Absent_type','$Teacher_code','$Absent_times','$Date','$Date_start','$Date_finish','$Address')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------------*//
function
InsertAddAbsent($Teacher_code,$Absent_code,$Absent_times,$Year)
{
global $conn;
$sql = "INSERT INTO history_absent (Teacher_code,Absent_code,Absent_times,Year)";
$sql = $sql."VALUES('$Teacher_code','$Absent_code','$Absent_times','$Year')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------*//
function
InsertCourse($Course_id,$Course_name,$Course_nameE,$Degree_Thai,$Short_Thai,$Degree_Eng,$Short_Eng,$Course_type,$TotalUnit,$Term,$Spec,$Affect_class,$Course_desc)
{
global $conn;
$sql = "INSERT INTO course_tb (Course_id,Course_name,Course_nameE,Degree_Thai,Short_Thai,Degree_Eng,Short_Eng,Course_type,TotalUnit,Term,Spec,Affect_class,Course_desc)";
$sql = $sql."VALUES('$Course_id','$Course_name','$Course_nameE','$Degree_Thai','$Short_Thai','$Degree_Eng','$Short_Eng','$Course_type','$TotalUnit','$Term','$Spec','$Affect_class','$Course_desc')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertSubject($Course_code,$SubCate_code,$Subject_group,$Subject_code,$Subject_name,$Unit,$Term,$Class_level,$Total_hour,$Objective,$Detail,$Class_Affect,$Affect_sub)
{
global $conn;
$sql = "INSERT INTO subject_tb (Course_code,SubCate_code,Subject_group,Subject_code,Subject_name,Unit,Term,Class_level,Total_hour,Objective,Detail,Class_Affect,Affect_sub)";
$sql = $sql."VALUES('$Course_code','$SubCate_code','$Subject_group','$Subject_code','$Subject_name','$Unit','$Term','$Class_level','$Total_hour','$Object','$Detail','Class_Affect','$Affect_sub')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------*// Update Degree Count
function
UpdateDegree($Degree_code)
{
global $conn;
$strSQL ="UPDATE degreetb";
$strSQL .=" SET Rate=Rate+1";
$strSQL .=" WHERE Degree_code = $Degree_code";
mysql_query( $strSQL) or die("update error".mysql_error());
}
//*-------ตารางการพัฒนา------------------*//
function
InsertTraining( $Teacher_code , $maNo, $codeId,$No_in, $Dated, $provinceId, $Training_name, $Period_code, $Training_type, $Training_std, $Objective, $Content, $Benefits,$Day, $Capability_1,$Capability_2, $Performance_1,$Performance_2,$Performance_3,$Performance_4,$Performance_5,$PerformanceYear_1,$PerformanceYear_2,$PerformanceYear_3,$PerformanceYear_4, $Skills_1 , $Skills_2, $Skills_3,$Skills_4, $Sources, $Major, $Year_std, $Place, $Place_des, $Date, $Date_start, $Date_finish, $CNEU, $Cradit, $Total_hour, $Budget_use, $Fund, $Fund_resource, $Organiz, $Apply , $Filetex)
{
global $conn;
$sql = "INSERT INTO training_tb ( Teacher_code ,maNo, codeId, No_in, Dated, provinceId, Training_name, Period_code, Training_type, Training_std, Objective, Content, Benefits, Day, Capability_1, Capability_2, Performance_1, Performance_2, Performance_3, Performance_4, Performance_5, PerformanceYear_1, PerformanceYear_2, PerformanceYear_3, PerformanceYear_4, Skills_1 , Skills_2, Skills_3, Skills_4, Sources, Major, Year_std, Place, Place_des, Date, Date_start, Date_finish, CNEU, Cradit, Total_hour, Budget_use, Fund, Fund_resource, Organiz, Apply , Filetex )";
$sql = $sql."VALUES( '$Teacher_code' , '$maNo' , '$codeId' , '$No_in' , '$Dated' , '$provinceId' , '$Training_name' , '$Period_code', '$Training_type' , '$Training_std' , '$Objective', '$Content' , '$Benefits' ,'$Day' , '$Capability_1', '$Capability_2' , '$Performance_1' , '$Performance_2' ,'$Performance_3' ,'$Performance_4' ,'$Performance_5' ,'$PerformanceYear_1' ,'$PerformanceYear_2' ,'$PerformanceYear_3' ,'$PerformanceYear_4' , '$Skills_1' , '$Skills_2', '$Skills_3','$Skills_4', '$Sources' , '$Major' , '$Year_std' , '$Place' , '$Place_des' , '$Date' , '$Date_start' , '$Date_finish' , '$CNEU' , '$Cradit' , '$Total_hour' , '$Budget_use' , '$Fund' , '$Fund_resource' , '$Organiz' , '$Apply' , '$Filetex' )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------*//
function
InsertMedia($Media_name,$Media_type,$Unit,$Producer)
{
global $conn;
$sql = "INSERT INTO mediatb (Media_name,Media_type,Unit,Producer)";
$sql = $sql."VALUES('$Media_name','$Media_type','$Unit','$Producer')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------------*//
function
InsertInfo($Info_name,$Date,$Info_detail,$Organiz,$Supervisor,$Flag)
{
global $conn;
$sql = "INSERT INTO information_tb (Info_name,Date,Info_detail,Organiz,Supervisor,Flag)";
$sql = $sql."VALUES('$Info_name','$Date','$Info_detail','$Organiz','$Supervisor','$Flag')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertComment($Info_name,$Info_detail,$Organiz,$Supervisor,$Flag,$Date )
{
global $conn;
$sql = "INSERT INTO comment_tb (Info_name,Info_detail,Organiz,Supervisor,Flag,Date)";
$sql = $sql."VALUES('$Info_name','$Info_detail','$Organiz','$Supervisor','$Flag' ,NOW() )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertProduct($Teacher_code,$Product_name,$Date_start,$Date_finish,$Term,$Year_prop, $Product_type,$name1,$name2,$name3,$name4,$name5,$name6,$name7,$Fund_resource,$Fund,$Propagate,$Benefit,$Use_ref,$Filetex)
{
global $conn;
$sql = "INSERT INTO edu_product_tb (Teacher_code,Product_name,Date_start,Date_finish,Term,Year_prop, Product_type,name1,name2,name3,name4,name5,name6,name7,Fund_resource,Fund,Propagate,Benefit,Use_ref,Filetex)";
$sql = $sql."VALUES('$Teacher_code','$Product_name','$Date_start','$Date_finish','$Term','$Year_prop','$Product_type','$name1','$name2','$name3','$name4','$name5','$name6','$name7','$Fund_resource','$Fund','$Propagate','$Benefit','$Use_ref','$Filetex')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------*//
function
InsertTeacherList($Teacher_id,$Status,$Teacher_name,$Teacher_lastname)
{
global $conn;
$sql = "INSERT INTO accounttb (Teacher_id,Status,Teacher_name,Teacher_lastname)";
$sql = $sql."VALUES('$Teacher_id','$Status','$Teacher_name','$Teacher_lastname')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertSeminar($Seminar_code,$Department,$Times,$Year,$Date,$Topic_no,$Topic,$Conclude,$Name)
{
global $conn;
$sql = "INSERT INTO seminartb (Seminar_code,Department,Times,Year,Date,Topic_no,Topic,Conclude,Name)";
$sql = $sql."VALUES('$Seminar_code','$Department','$Times','$Year','$Date','$Topic_no','$Topic','$Conclude','$Name')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------------*//
function
InsertStdUnit($Course_code,$Yearcome,$Maleunit,$Femaleunit,$Totalunit)
{
global $conn;
$sql = "INSERT INTO studentunittb (Course_code,Yearcome,Maleunit,Femaleunit,Totalunit)";
$sql = $sql."VALUES('$Course_code','$Yearcome','$Maleunit','$Femaleunit','$Totalunit')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------ตารางอาคาร -----------------*//
function
InsertBuilding($BuildD_ID,$Build_name,$Build_type,$Img1,$Short_name,$Class_unit,$Room_unit,$BuildD_Yr ,$BuildD_Pr,$MoneyS_C,$Description)
{
global $conn;
$sql = "INSERT INTO building_tb (BuildD_ID,Build_name,Build_type,Img1,Short_name,Class_unit,Room_unit,BuildD_Yr ,BuildD_Pr,MoneyS_C,Description)";
$sql = $sql."VALUES('$BuildD_ID','$Build_name','$Build_type','$Img1','$Short_name','$Class_unit','$Room_unit','$BuildD_Yr ','$BuildD_Pr','$MoneyS_C','$Description')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------*//
function
InsertDocument($Docom_name,$conditionId,$Img1)
{
global $conn;
$sql = "INSERT INTO Document_tb (Docom_name,conditionId,Img1)";
$sql = $sql."VALUES('$Docom_name','$conditionId','$Img1')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------- ตาราง---------------*//
function
InsertReport($Report_name,$projectId,$Stand_code ,$Ind_code, $code, $conditionId,$Filename)
{
global $conn;
$sql = "INSERT INTO qa_report_tb (Report_name, projectId, Stand_code, Ind_code,code, conditionId,Filename)";
$sql = $sql."VALUES('$Report_name','$projectId','$Stand_code','$Ind_code','$code','$conditionId','$Filename')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------- ตาราง---------------*//
function
InsertQaReport($Report_name,$projectId,$Stand_code , $Ind_code,$ReportId,$Filename)
{
global $conn;
$sql = "INSERT INTO qa_qareport_tb (Report_name, projectId, Stand_code, Ind_code,ReportId,Filename)";
$sql = $sql."VALUES('$Report_name','$projectId','$Stand_code','$Ind_code','$ReportId','$Filename')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------------------------*//
function
InsertRoom( $Room_name, $BuildD_No, $roomtyId, $Room_code ,$Size, $Area, $Eletric_meter ,$Img1 )
{
global $conn;
$sql = "INSERT INTO room_tb ( Room_name, BuildD_No, roomtyId, Room_code , Size, Area, Eletric_meter , Img1 )";
$sql = $sql."VALUES ( '$Room_name' , '$BuildD_No' , '$roomtyId' , '$Room_code' , '$Size' , '$Area' , '$Eletric_meter' , '$Img1' )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------*//
function
Update_Room_Unit($BuildD_No)
{
$strSQL ="UPDATE building_tb";
$strSQL .=" SET Room_unit=Room_unit+1";
$strSQL .=" WHERE BuildD_No = $BuildD_No";
mysql_query( $strSQL) or die("update error".mysql_error());
}
//*--------------------*//
function
InsertInstructor($First_name,$Name,$Lastname,$Sex,$Status,$Degree,$Exper,$Skill,$Img1,$Addr_work,$Addr_home,$Tel,$Email)
{
$sql = "INSERT INTO instructor_tb (First_name,Name,Lastname,Sex,Status,Degree,Exper,Skill,Img1,Addr_work,Addr_home,Tel,Email)";
$sql = $sql."VALUES('$First_name','$Name','$Lastname','$Sex','$Status','$Degree','$Exper','$Skill','$Img1','$Addr_work','$Addr_home','$Tel','$Email')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------*//
function
InsertMag($Magazine_name,$Magazine_type,$Ex_article,$Author,$Vol,$Year,$Month)
{
$sql = "INSERT INTO magazine_tb (Magazine_name,Magazine_type,Ex_article,Author,Vol,Year,Month)";
$sql = $sql."VALUES ('$Magazine_name','$Magazine_type','$Ex_article','$Author','$Vol','$Year','$Month')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertActivity ($Activity_name,$Activity_type,$Perform,$Activity,$Period,$Budget,$Budget_use,$Dif_result, $Source,$Target,$Amount,$Supervisor,$Duty,$Objective,$Index_mature,$Affect_class, $Ec41_1,$Ec41_2 ,$Ec41_3,$Ec41_4,$Ec41_5,$Ec41_6,$Ec41_7,$Ec41_8,$Ec41_9,$Ec41_10,$Ec41_11,$Ec42_1, $Ec42_2,$Ec42_3,$Ec42_4,$Ec42_5,$Ec42_6,$Ec42_7,$Ec42_8,$Ec42_9,$Ec42_10, $Ec42_11,$Ec42_12,$Ec42_13,$Ec42_14,$Ec42_15,$Ec43_1,$Ec43_2,$Ec43_3,$Ec43_4,$Ec43_5, $Ec43_6,$Ec43_7,$Ec43_8,$Ec43_9,$Ec43_10,$Ec44_1,$Ec44_2,$Ec44_3,$Ec44_4,$Ec44_5, $Ec44_6,$Ec44_7,$Ec44_8,$Ec44_9,$Ec44_10,$Ec44_11,$Ec44_12,$Ec44_13,$Ec44_14,$Ec44_15,$Result_oper)
{
$sql = "INSERT INTO std_activity_tb (Activity_name,Activity_type,Perform,Activity,Period,Budget,Budget_use,Dif_result,Source,Target,Amount,Supervisor,Duty,Objective,Index_mature,Affect_class,Ec41_1,Ec41_2 ,Ec41_3,Ec41_4,Ec41_5,Ec41_6,Ec41_7,Ec41_8,Ec41_9,Ec41_10,Ec41_11,Ec42_1,Ec42_2,Ec42_3,Ec42_4,Ec42_5,Ec42_6,Ec42_7,Ec42_8,Ec42_9,Ec42_10,Ec42_11,Ec42_12,Ec42_13,Ec42_14,Ec42_15,Ec43_1,Ec43_2,Ec43_3,Ec43_4,Ec43_5,Ec43_6,Ec43_7,Ec43_8,Ec43_9,Ec43_10,Ec44_1,Ec44_2,Ec44_3,Ec44_4,Ec44_5,Ec44_6,Ec44_7,Ec44_8,Ec44_9,Ec44_10,Ec44_11,Ec44_12,Ec44_13,Ec44_14,Ec44_15,Result_oper)";
$sql = $sql."VALUES ('$Activity_name','$Activity_type','$Perform','$Activity','$Period','$Budget','$Budget_use','$Dif_result','$Source','$Target','$Amount','$Supervisor','$Duty','$Objective','$Index_mature','$Affect_class','$Ec41_1','$Ec41_2','$Ec41_3','$Ec41_4','$Ec41_5','$Ec41_6','$Ec41_7','$Ec41_8','$Ec41_9','$Ec41_10','$Ec41_11','$Ec42_1','$Ec42_2','$Ec42_3','$Ec42_4','$Ec42_5','$Ec42_6','$Ec42_7','$Ec42_8','$Ec42_9','$Ec42_10','$Ec42_11','$Ec42_12','$Ec42_13','$Ec42_14','$Ec42_15','$Ec43_1','$Ec43_2','$Ec43_3','$Ec43_4','$Ec43_5','$Ec43_6','$Ec43_7','$Ec43_8','$Ec43_9','$Ec43_10','$Ec44_1','$Ec44_2','$Ec44_3','$Ec44_4','$Ec44_5','$Ec44_6','$Ec44_7','$Ec44_8','$Ec44_9','$Ec44_10','$Ec44_11','$Ec44_12','$Ec44_13','$Ec44_14','$Ec44_15','$Result_oper')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertScho($Scholarship_name,$Scholarship_type,$Source,$Fund,$Period)
{
$sql = "INSERT INTO scholarship_tb (Scholarship_name,Scholarship_type,Source,Fund,Period)";
$sql = $sql."VALUES ('$Scholarship_name','$Scholarship_type','$Source','$Fund','$Period')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------*//
function
InsertStudent ($Course_code,$ProvinceId,$Class,$Orderlist,$Student_id,$First_name,$Name,$Lastname,$Sex,$DateBirth, $Religion,$Address,$Img1,$Father_name,$Mother_name,$Address2,$Telno,$Pre_inst,$Pre_gpa, $Select_Method,$Term,$Date_in,$Institute,$Teacher_code,$Affect_class,$Scholarship_code, $Address_cur,$Coll_in,$Coll_out,$Circle_duty,$Circle,$Succ_Status)
{
$sql = "INSERT INTO student_tb (Course_code,ProvinceId,Class,Orderlist,Student_id,First_name,Name,Lastname,Sex,DateBirth,Religion,Address,Img1,Father_name,Mother_name,Address2,Telno,Pre_inst,Pre_gpa,Select_Method,Term,Date_in,Institute,Teacher_code,Affect_class,Scholarship_code,Address_cur,Coll_in,Coll_out,Circle_duty,Circle,Succ_Status)";
$sql = $sql."VALUES ('$Course_code','$ProvinceId','$Class','$Orderlist','$Student_id','$First_name','$Name','$Lastname','$Sex','$DateBirth','$Religion','$Address','$Img1','$Father_name','$Mother_name','$Address2','$Telno','$Pre_inst','$Pre_gpa','$Select_Method','$Term','$Date_in','$Institute','$Teacher_code','$Affect_class','$Scholarship_code','$Address_cur','$Coll_in','$Coll_out','$Circle_duty','$Circle','$Succ_Status')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------*//
function
InsertEmployer ($Term,$Course_code,$Series,$x1,$x2,$x3,$x4,$x5,$x6,$x7,$x8,$x9,$x10,$x11,$x12,$x13,$sd1,$sd2,$sd3,$sd4,$sd5,$sd6,$sd7,$sd8,$sd9,$sd10,$sd11,$sd12,$sd13,$rate1,$rate2,$rate3,$rate4,$rate5,$rate6,$rate7,$rate8,$rate9,$rate10,$rate11,$rate12,$rate13)
{
$sql = "INSERT INTO std_employer_tb (Term,Course_code,Series,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,sd1,sd2,sd3,sd4,sd5,sd6,sd7,sd8,sd9,sd10,sd11,sd12,sd13,rate1,rate2,rate3,rate4,rate5,rate6,rate7,rate8,rate9,rate10,rate11,rate12,rate13)";
$sql = $sql."VALUES ('$Term','$Course_code','$Series','$x1','$x2','$x3','$x4','$x5','$x6','$x7','$x8','$x9','$x10','$x11','$x12','$x13','$sd1','$sd2','$sd3','$sd4','$sd5','$sd6','$sd7','$sd8','$sd9','$sd10','$sd11','$sd12','$sd13','$rate1','$rate2','$rate3','$rate4','$rate5','$rate6','$rate7','$rate8','$rate9','$rate10','$rate11','$rate12','$rate13')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------------- Record Graduate 's Student-----------------*//
function
InsertStdSucc ($Student_id,$Year_grad,$Pass_test,$Times,$Past_test,$Place,$Work_addr,$Work_place,$Contact_addr,$Work_status,$Position,$Level,$Depart_name,$Depart,$Date_w1, $Date_w11,$Date_w2,$Date_w22,$Date_w3,$Date_w33,$Work_change,$Income_m,$Income_y, $Status,$Learn_flag,$Degree1,$Degree2,$Award_in,$Award_out)
{
$sql = "INSERT INTO std_success_tb (Student_id,Year_grad,Pass_test,Times,Past_test,Place,Work_addr,Work_place,Contact_addr,Work_status,Position,Level,Depart_name,Depart,Date_w1,Date_w11,Date_w2,Date_w22,Date_w3,Date_w33,Work_change,Income_m,Income_y,Status,Learn_flag,Degree1,Degree2,Award_in,Award_out)";
$sql = $sql."VALUES ('$Student_id','$Year_grad','$Pass_test','$Times','$Past_test','$Place','$Work_addr','$Work_place','$Contact_addr','$Work_status','$Position','$Level','$Depart_name','$Depart','$Date_w1','$Date_w11','$Date_w2','$Date_w22','$Date_w3','$Date_w33','$Work_change','$Income_m','$Income_y','$Status','$Learn_flag','$Degree1','$Degree2','$Award_in','$Award_out')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertProb($Problem,$officerId1,$studentCode,$prefixId,$studentName,$studentSurname,$Prob1,$Prob2,$Prob3,$Prob4,$Prob_detail1,$Prob_detail2, $Prob_detail3,$Prob_detail4,$Recom,$Date_meet,$Unit_meet)
{
$sql = "INSERT INTO advice_problem_tb (Problem,officerId1,studentCode,prefixId,studentName,studentSurname,Prob1,Prob2,Prob3,Prob4,Prob_detail1,Prob_detail2,Prob_detail3,Prob_detail4,Recom,Date_meet,Unit_meet)";
$sql = $sql."VALUES ('$Problem','$officerId1','$studentCode','$prefixId','$studentName','$studentSurname','$Prob1','$Prob2','$Prob3','$Prob4','$Prob_detail1','$Prob_detail2','$Prob_detail3','$Prob_detail4','$Recom','$Date_meet','$Unit_meet')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------------*//
function
InsertSubject_group($SubCate_code,$Eng_name,$Short_name,$Thai_name,$Description)
{
$sql = "INSERT INTO subject_group_tb (SubCate_code,Eng_name,Short_name,Thai_name,Description)";
$sql = $sql."VALUES ('$SubCate_code','$Eng_name','$Short_name','$Thai_name','$Description')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------*//
function
InsertSubject_cate($Cate_name,$Cate_nameE)
{
$sql = "INSERT INTO subject_category_tb (Cate_name,Cate_nameE)";
$sql = $sql."VALUES ('$Cate_name','$Cate_nameE')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertFaculty($Faculty_name,$FacultyStatus, $Faculty_nameE)
{
$sql = "INSERT INTO faculty_tb (Faculty_name,FacultyStatus, Faculty_nameE)";
$sql = $sql."VALUES ('$Faculty_name','$FacultyStatus','$Faculty_nameE')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------*//
function
InsertSubCate($Cate_name,$Cate_nameE)
{
$sql = "INSERT INTO subject_category_tb (Cate_name,Cate_nameE)";
$sql = $sql."VALUES ('$Cate_name','$Cate_nameE')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------------------*//
function
InsertPi_Cri($Stand_code,$Ind_code,$qaId,$Trem,$codeId,$Indicate,$Source,$IncFor,$Awa,$Att,$Ach1,$Ach2,$Ach3,$Ach4,$E_awa,$E_att,$E_ach1,$E_ach2,$P11,$S11,$T11,$P1,$P2,$P3,$PTotal,$S1,$S2,$S3,$STotal,$T1,$T2,$T3,$TTotal)
{
$sql = "INSERT INTO qa_pi_cri_tb (Stand_code,Ind_code,qaId,Trem,codeId,Indicate,Source,IncFor,Awa,Att,Ach1,Ach2,Ach3,Ach4,E_awa,E_att,E_ach1,E_ach2,P11,S11,T11,P1,P2,P3,PTotal,S1,S2,S3,STotal,T1,T2,T3,TTotal)";
$sql = $sql."VALUES ('$Stand_code','$Ind_code','$qaId','$Trem','$codeId','$Indicate','$Source','$IncFor','$Awa','$Att','$Ach1','$Ach2','$Ach3','$Ach4','$E_awa','$E_att','$E_ach1','$E_ach2','$P11','$S11','$T11','$P1','$P2','$P3','$PTotal','$S1','$S2','$S3','$STotal','$T1','$T2','$T3','$TTotal')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------------*//
function
InsertPlan ( $Teacher_code, $programId , $Course_code, $Status , $conditionId1 , $conditionId2 , $courseId , $Start_date , $Objective , $Mainidea , $Title_name , $Total_hour , $Total_std , $Assess_code , $Method_code , $Place , $Media , $Appendix , $Res_unit , $Apply , $Asses1 , $Asses2 , $Asses3 , $Asses4,$Filetex,$date_updated )
{
global $conn;
$sql = " INSERT INTO tech_plan_tb (Teacher_code , programId , Course_code, Status , conditionId1 , conditionId2 , courseId , Start_date , Objective , Mainidea , Title_name , Total_hour , Total_std , Assess_code , Method_code , Place , Media , Appendix , Res_unit , Apply , Asses1 , Asses2 , Asses3 , Asses4 ,Filetex, date_updated ) ";
$sql .= " VALUES('$Teacher_code' , '$programId' , '$Course_code', '$Status' , '$conditionId1' , '$conditionId2' , '$courseId' , '$Start_date' , '$Objective' , '$Mainidea' , '$Title_name' , '$Total_hour' , '$Total_std' , '$Assess_code' , '$Method_code' , '$Place' , '$Media' , '$Appendix' , '$Res_unit' , '$Apply' , '$Asses1' , '$Asses2' , '$Asses3' , '$Asses4','$Filetex', NOW() ) " ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
/*---------------------*/
function
InsertMTP ($Plan_code,$Teacher_code,$courseId,$M1,$M2,$M3,$M4,$M5,$M6,$M7,$M8,$M9,$M10,$M11,$M12,$M13,$M14,$M15,$M16,$M17,$M18,$M19,$M20,$M21,$M_else,$Else_desc)
{
$sql = "INSERT INTO techplan_method_tb (Plan_code,Teacher_code,courseId,M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16,M17,M18,M19,M20,M21,M_else,Else_desc)";
$sql = $sql."VALUES ('$Plan_code','$Teacher_code','$courseId','$M1','$M2','$M3','$M4','$M5','$M6','$M7','$M8','$M9','$M10','$M11','$M12','$M13','$M14','$M15','$M16','$M17','$M18','$M19','$M20','$M21','$M_else','$Else_desc')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------------*//
function
InsertSpt($Plan_code,$Teacher_code,$courseId,$Sp1,$Sp2,$Sp3,$Sp4,$Sp5,$Sp6,$Sp7,$Sp8,$Sp9,$Sp10)
{
$sql = "INSERT INTO tech_spec_tb (Plan_code,Teacher_code,courseId,Sp1,Sp2,Sp3,Sp4,Sp5,Sp6,Sp7,Sp8,Sp9,Sp10)";
$sql = $sql."VALUES('$Plan_code','$Teacher_code','$courseId','$Sp1','$Sp2','$Sp3','$Sp4','$Sp5','$Sp6','$Sp7','$Sp8','$Sp9','$Sp10')";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------*//
function
InsertMan($Acc_code,$Teacher_code,$Student_id,$Acc_name,$Store,$Img1,$Fix_History, $Contact, $Date_buy, $Date_year,$Price,$Fix_budget,$Status,$Status_1,$Statistic,$Description)
{
$sql = "INSERT INTO manament_tb (Acc_code,Teacher_code,Student_id,Acc_name,Store,Img1,Fix_History,Contact,Date_buy,Date_year,Price,Fix_budget,Status,Status_1,Statistic,Description)";
$sql = $sql."VALUES ('$Acc_code','$Teacher_code','$Student_id','$Acc_name','$Store','$Img1','$Fix_History','$Contact','$Date_buy','$Date_year','$Price','$Fix_budget','$Status','$Status_1','$Statistic','$Description')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------------*//
function
InsertManage($Acc_code,$Teacher_code,$Student_id,$Acc_name,$Store,$Img1,$Fix_History, $Contact, $Date_buy, $Date_year,$Price,$Fix_budget,$Status,$Status_1,$Statistic,$Description)
{
$sql = "INSERT INTO manage_tb (Acc_code,Teacher_code,Student_id,Acc_name,Store,Img1,Fix_History,Contact,Date_buy,Date_year,Price,Fix_budget,Status,Status_1,Statistic,Description)";
$sql = $sql."VALUES ('$Acc_code','$Teacher_code','$Student_id','$Acc_name','$Store','$Img1','$Fix_History','$Contact','$Date_buy','$Date_year','$Price','$Fix_budget','$Status','$Status_1','$Statistic','$Description')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------ตรางหนังสือ--------------------*//
function
InsertBook($Book_code,$Year,$No,$No_in,$conditionId,$Status,$Store_1,$Faculty_code,$Date_buy,$Description,$Img1)
{
$sql = "INSERT INTO bookmant_tb (Book_code,Year,No,No_in,conditionId,Status,Store_1,Faculty_code,Date_buy,Description,Img1)";
$sql = $sql."VALUES ('$Book_code','$Year','$No','$No_in','$conditionId','$Status','$Store_1','$Faculty_code','$Date_buy','$Description','$Img1')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertPerson($code,$Teacher_code,$No,$No_in,$Date_buy,$Faculty_code,$Year,$Statistic,$Description)
{
$sql = "INSERT INTO bookPerson_tb (code,Teacher_code,No,No_in,Date_buy,Faculty_code,Year,Statistic,Description)";
$sql = $sql."VALUES ('$code','$Teacher_code','$No','$No_in','$Date_buy','$Faculty_code','$Year','$Statistic','$Description')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----ตารางครุภัณฑ์-------------------*//
function
InsertAcc($Dura,$suId, $procId, $Acc_code,$Acc_no,$Acc_name,$Acc_module,$Acc_type_code,$MoneyS_C, $Fix_detail, $Date_buy, $Date_finish, $Year, $Price, $Fund , $Faculty_code, $Status, $RoomId ,$Statistic, $In_document ,$Price_document , $Modify_detail ,$Modify_document , $Sell_id , $Img1,$date_updated )
{
$sql = "INSERT INTO accessories_tb (Dura, suId, procId, Acc_code,Acc_no, Acc_name, Acc_module, Acc_type_code, MoneyS_C, Fix_detail, Date_buy, Date_finish, Year , Price, Fund , Faculty_code, Status, RoomId ,Statistic, In_document , Price_document , Modify_detail , Modify_document, sell_id, Img1, date_updated)";
$sql = $sql."VALUES ('$Dura','$suId' , '$procId' , '$Acc_code','$Acc_no','$Acc_name','$Acc_module','$Acc_type_code','$MoneyS_C','$Fix_detail','$Date_buy', '$Date_finish','$Year','$Price','$Fund' , '$Faculty_code', '$Status', '$RoomId' ,'$Statistic','$In_document' ,'$Price_document' , '$Modify_detail' , '$Modify_document', '$Sell_id' , '$Img1', NOW() )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------------*//
function
InsertGrade($Student_id,$Class,$Term,$Tb,$Tp,$Total,$Gpa,$Total_unit,$Total_gpa)
{
$sql = "INSERT INTO grade_tb (Student_id,Class,Term,Tb,Tp,Total,Gpa,Total_unit,Total_gpa)";
$sql = $sql."VALUES ('$Student_id','$Class','$Term','$Tb','$Tp','$Total','$Gpa','$Total_unit','$Total_gpa')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------*//
function
InsertStand($Stand_code,$Trem,$qaId,$Topic)
{
$sql = "INSERT INTO qa_standard_tb (Stand_code,Trem,qaId,Topic)";
$sql = $sql."VALUES ('$Stand_code','$Trem','$qaId','$Topic')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------------*//
function
InsertResult ($Term,$Times,$Assessor,$S11,$S12,$S13,$S14,$S15,$S16,$S17,$S18,$S19,$S21,$S22,$S23,$S24,$S25,$S26,$S27,$S28,$S29,$S210,$S31,$S32,$S33,$S34,$S35,$S36,$S41,$S42, $S43,$S44,$S45,$S46,$S51,$S52,$S53,$S54,$S55,$S61,$S62,$S71,$S72,$S73,$S74,$S75,$S76,$S77,$S78,$S79,$S710,$S711,$S712,$S81,$S82,$S91,$S92,$S93,$S94,$S95,$S96, $S97,$S98)
{
$sql = "INSERT INTO qa_result_tb (Term,Times,Assessor,S11,S12,S13,S14,S15,S16,S17,S18,S19,S21,S22,S23,S24,S25,S26,S27,S28,S29,S210,S31,S32,S33,S34,S35,S36,S41,S42,S43,S44,S45,S46,S51,S52,S53,S54,S55,S61,S62,S71,S72,S73,S74,S75,S76,S77,S78,S79,S710,S711,S712,S81,S82,S91,S92,S93,S94,S95,S96,S97,S98)";
$sql = $sql."VALUES ('$Term','$Times','$Assessor','$S11','$S12','$S13','$S14','$S15','$S16','$S17','$S18','$S19','$S21','$S22','$S23','$S24','$S25','$S26','$S27','$S28','$S29','$S210','$S31','$S32','$S33','$S34','$S35','$S36','$S41','$S42','$S43','$S44','$S45','$S46','$S51','$S52','$S53','$S54','$S55','$S61','$S62','$S71','$S72','$S73','$S74','$S75','$S76','$S77','$S78','$S79','$S710','$S711','$S712','$S81','$S82','$S91','$S92','$S93','$S94','$S95','$S96','$S97','$S98')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------------------------*//
function
InsertCulActivity($Activity_name,$Activity_type,$Perform,$Activity,$Period,$Fund,$Source,$Target,$Amount,$Supervisor,$Duty,$Objective,$Index_mature,$Spec,$Affect_class,$Asses)
{
$sql = "INSERT INTO cul_activity_tb (Activity_name,Activity_type,Perform,Activity,Period,Fund,Source,Target,Amount,Supervisor,Duty,Objective,Index_mature,Spec,Affect_class,Asses)";
$sql = $sql."VALUES ('$Activity_name','$Activity_type','$Perform','$Activity','$Period','$Fund','$Source','$Target','$Amount','$Supervisor','$Duty','$Objective','$Index_mature','$Spec','$Affect_class','$Asses')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------------------*//
function
InsertHealth($Student_id,$Weight,$Height,$Date_note,$B_group,$Presure,$Symptom,$Disease,$Treat,$Place_Treat,$Medicine,$Bad_Medic,$Bad_Food)
{
$sql = "INSERT INTO std_health_tb (Student_id,Weight,Height,Date_note,B_group,Presure,Symptom,Disease,Treat,Place_Treat,Medicine,Bad_Medic,Bad_Food)";
$sql = $sql."VALUES ('$Student_id','$Weight','$Height','$Date_note','$B_group','$Presure','$Symptom','$Disease','$Treat','$Place_Treat','$Medicine','$Bad_Medic','$Bad_Food')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------------------*//
function
InsertPunish($Student_id,$Date_note,$Punish_type,$Perform,$Consider)
{
$sql = "INSERT INTO std_punish_tb (Student_id,Date_note,Punish_type,Perform,Consider)";
$sql = $sql."VALUES ('$Student_id','$Date_note','$Punish_type','$Perform','$Consider')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---ตาราง qa_prioject_tb---------*//
function
InsertPi_qa($Stand_code,$Ind_code,$Indicate,$Source,$IncFor,$Awa,$Att1,$Att2,$Att3,$Att4,$codeId,$Trem,$qaId)
{
global $conn;
$sql = "INSERT INTO qa_project_tb (Stand_code,Ind_code,Indicate,Source,IncFor,Awa, Att1,Att2,Att3,Att4,codeId,Trem,qaId)";
$sql = $sql."VALUES ('$Stand_code','$Ind_code','$Indicate','$Source','$IncFor','$Awa','$Att1','$Att2','$Att3','$Att4','$codeId','$Trem','$qaId' )";
mysql_query($sql) or die("$sql Insert has incorrect ".mysql_error());
}
//*---------------------------*//
function
InsertRelProject($Project_name,$Term,$Budget_year,$Objective,$Target,$Period,$Start_Date,$Budget,$Budget_use,$Dif_result,$Fund_resource,$Director,$Join_co,$Join_type, $Result_oper)
{
global $conn;
$sql = "INSERT INTO foreign_relation_tb (Project_name,Term,Budget_year,Objective,Target,Period,Start_Date,Budget,Budget_use,Dif_result,Fund_resource,Director,Join_co,Join_type,Result_oper)";
$sql = $sql."VALUES('$Project_name','$Term','$Budget_year','$Objective','$Target','$Period','$Start_Date','$Budget','$Budget_use','$Dif_result','$Fund_resource','$Director','$Join_co','$Join_type','$Result_oper')";
mysql_query($sql) or die("$sql Insert has incorrect ".mysql_error());
}
//*-----------------*//
function
InsertFur($Student_id,$Date_note,$Case_ab,$Unit)
{
$sql = "INSERT INTO std_absent_tb (Student_id,Date_note,Case_ab,Unit)";
$sql = $sql."VALUES ('$Student_id','$Date_note','$Case_ab','$Unit')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------Insert All Budget------------*//
function
InsertCost4($Year_budget,$Month,$Date_note,$Cost1,$Cost2,$Cost3,$Cost4,$Cost5,$Cost6,$Cost7)
{
$sql = "INSERT INTO finance4_tb (Year_budget,Month,Date_note,Cost1,Cost2,Cost3,Cost4,Cost5,Cost6,Cost7)";
$sql = $sql."VALUES ('$Year_budget','$Month','$Date_note','$Cost1','$Cost2','$Cost3','$Cost4','$Cost5','$Cost6','$Cost7')";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------------------*//
function
InsertCost3 ($Year_budget,$Month,$Date_note,$Cost1,$Cost2,$Cost3,$Cost4,$Cost5,$Cost6)
{
$sql = "INSERT INTO finance3_tb (Year_budget,Month,Date_note,Cost1,Cost2,Cost3,Cost4,Cost5,Cost6)";
$sql = $sql."VALUES ('$Year_budget','$Month','$Date_note','$Cost1','$Cost2','$Cost3','$Cost4','$Cost5','$Cost6')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------------*//
function
InsertCost2($Year_budget,$Date_note,$Cost1,$Cost2)
{
$sql = "INSERT INTO finance2_tb (Year_budget,Date_note,Cost1,Cost2)";
$sql = $sql."VALUES ('$Year_budget','$Date_note','$Cost1','$Cost2')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------- InsertFinance -------------*//////////
function
InsertFinance( $Year, $Month, $Date, $DrCost, $InCost,$Cost1, $Cost2, $Cost3, $Cost4, $Cost5, $Cost6,$Cost7,$CrCost,$SumCost,$TotalCost,$date_updated )
{
$sql = "INSERT INTO finance_tb ( Year, Month, Date, DrCost, InCost,Cost1, Cost2, Cost3, Cost4,Cost5, Cost6,Cost7,CrCost,SumCost,TotalCost,date_updated)";
$sql = $sql." VALUES ('$Year','$Month','$Date','$DrCost','$InCost','$Cost1','$Cost2','$Cost3','$Cost4','$Cost5','$Cost6','$Cost7','$CrCost','$SumCost','$TotalCost',NOW() )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------- InsertState -------------*//////////
function
InsertState($State,$Year_State,$Date_note,$No,$Disciption,$Cost1,$Cost2,$Cost3,$Cost4,$Cost5,$CostSum)
{
$sql = "INSERT INTO state_tb (State,Year_State,Date_note,No,Disciption,Cost1,Cost2,Cost3,Cost4,Cost5,CostSum)";
$sql = $sql." VALUES ('$State','$Year_State','$Date_note','$No','$Disciption','$Cost1','$Cost2','$Cost3','$Cost4','$Cost5','$CostSum')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------*//
function
InsertAccType($Acc_type,$Acc_Etype,$Year )
{
global $conn;
$sql = "INSERT INTO accessories_type_tb (Acc_type,Acc_Etype,Year )";
$sql = $sql."VALUES('$Acc_type','$Acc_Etype','$Year' )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--- -----*//
function
InsertDocontion ($Docom_name)
{
global $conn;
$sql = "INSERT INTO Docontion_tb (Docom_name)";
$sql = $sql."VALUES('$Docom_name')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------Insert User-------*//
function
InsertMoneySource($MoneyS_M)
{
global $conn;
$sql = "INSERT INTO money_source_tb (MoneyS_M)";
$sql = $sql."VALUES('$MoneyS_M')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------------nsert Relate---------------*//
function
InsertRel($Project_name,$Organize,$Objective,$Contact,$Address,$Email,$Website,$Country)
{
global $conn;
$sql = "INSERT INTO relation_tb (Project_name,Organize,Objective,Contact,Address,Email,Website,Country)";
$sql = $sql."VALUES('$Project_name','Organize','$Objective','$Contact','$Address','$Email','$Website','$Country')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------ ระบบแพทย์แผนไทย -----------*//
function
InsertPersonMed($HN_code,$Teacher_code,$massegeId,$prefixId,$Name,$Lastname,$Datetype,$DateBirth,$Sex,$Hostpital,$Nationality,$Nation,$Religion,$Citizen_id,$Address,$Age,$amphurId,$districtId,$provinceId,$Zipcode,$Phone,$Mobile,$Work,$Education,$Email_name,$State_bank,$Status2, $Status3,$Img1,$Degree_code,$Club_nid,$Group_1,$Group_2,$Group_3,$Group_4,$MedCode)
{
global $conn;
$strSQL = "INSERT INTO personalMed (HN_code,Teacher_code,massegeId,prefixId,Name,Lastname,Datetype,DateBirth,Sex,Hostpital,Nationality,Nation,Religion,Citizen_id,Address,Age,amphurId,districtId,provinceId,Zipcode,Phone,Mobile,Work,Education,Email_name,State_bank,Status2, Status3,Img1,Degree_code,Club_nid,Group_1,Group_2,Group_3,Group_4,MedCode) " ;
$strSQL = $strSQL." VALUES('$HN_code','$Teacher_code','massegeId','$prefixId','$Name','$Lastname','$Datetype','$DateBirth','$Sex','$Hostpital','$Nationality','$Nation','$Religion','$Citizen_id','$Address','$Age','$amphurId','$districtId','$provinceId','$Zipcode','$Phone','$Mobile','$Work','$Education','$Email_name','$State_bank','$Status2',' $Status3','$Img1','$Degree_code','$Club_nid','$Group_1','$Group_2','$Group_3','$Group_4','$MedCode' )";
mysql_query($strSQL) or die(" INSERT HAS INCORRECT $result $strSQL".mysql_error());
}
//*----------------Massege-------------- *//
function
InsertMassege($Orderlist,$Dental_code,$First_name,$Name,$Lastname,$Name_eng, $Lastname_eng,$Sex,$DateBirth,$Datetype,$Religion,$Address,$Img1,$provinceId,$Phone_1,$Phone_2,$StatusId,$Email,$Description_1,$Description_2,$Year_1,$Flag)
{
global $conn;
$sql = "INSERT INTO massege_db (Orderlist,Dental_code,First_name,Name,Lastname,Name_eng, Lastname_eng,Sex,DateBirth,Datetype,Religion,Address,Img1,provinceId,Phone_1,Phone_2,StatusId,Email,Description_1,Description_2,Year_1,Flag)";
$sql = $sql."VALUES ('$Orderlist','$Dental_code','$First_name','$Name','$Lastname','$Name_eng',' $Lastname_eng','$Sex','$DateBirth','$Datetype','$Religion','$Address','$Img1','$provinceId','$Phone_1','$Phone_2','$StatusId','$Email','$Description_1','$Description_2','$Year_1','$Flag')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------ตารางราคา-------------*//
function
InsertThprice($Code_1,$Name,$Price,$Description_1,$Description_2,$Description_3)
{
global $conn;
$sql ="INSERT INTO treatMed_tb ( Code_1,Name,Price,Description_1,Description_2,Description_3)" ;
$sql =$sql. " VALUES ('$Code_1','$Name','$Price','$Description_1','$Description_2','$Description_3')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------------InsertAccount----------*//
function
InsertThAccount($personId,$No,$No_code,$HN_code,$Tooth_code,$Teach_code,$Teacher_code,$massegeId,$Code ,$Time_in,$Time_out,$Date,$Price ,$Mount,$Cost_total,$Percen,$prefixId,$Roug)
{
global $conn;
$sql = "INSERT INTO accountMed_db(personId,No,No_code,HN_code,Tooth_code,Teach_code,Teacher_code,massegeId,Code ,Time_in,Time_out,Date,Price ,Mount,Cost_total,Percen,prefixId,Roug)";
$sql = $sql."VALUES('$personId','$No','$No_code','$HN_code','$Tooth_code','$Teach_code','$Teacher_code','$massegeId','$Code' ,'$Time_in','$Time_out','$Date','$Price' ,'$Mount','$Cost_total','$Percen','$prefixId','$Roug')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางขอไปราชการ-----------------*//
function
InsertFormA($Training_code,$Teacher_code,$code,$ProjectId,$No_in,$Detail,$Date,$Date_start,$Date_finish,$Training_name,$Training_type,$Day,$Year_std,$TeacherId,$Flag1,$Flag2,$Budget_use)
{
global $conn;
$sql ="INSERT INTO formaoffice (Training_code,Teacher_code,code,ProjectId,No_in,Detail,Date,Date_start,Date_finish,Training_name,Training_type,Day,Year_std,TeacherId,Flag1,Flag2,Budget_use)" ;
$sql =$sql. " VALUES ('$Training_code','$Teacher_code','$code','$ProjectId','$No_in','$Detail','$Date','$Date_start','$Date_finish','$Training_name','$Training_type','$Day','$Year_std','$TeacherId','$Flag1','$Flag2','$Budget_use')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางขอใช้รถยนต์---------------*//
function
InsertFormCar( $code ,$makeWord, $Make, $Training_name , $Training_type ,$Date , $Date_start , $Date_finish ,$object , $PersonIn , $Personly, $provinceId , $Detail, $Place, $TelNo , $usecar, $Time_start, $Time_finish,$Teacher_code,$Budget_year , $Status , $CarNo ,$date_updated)
{
global $conn;
$sql ="INSERT INTO formcaroffice (code ,makeWord, Make, Training_name , Training_type ,Date , Date_start , Date_finish ,object , PersonIn ,Personly, provinceId, Detail, Place, TelNo , usecar, Time_start, Time_finish,Teacher_code,Budget_year,Status , CarNo, date_updated)" ;
$sql =$sql. " VALUES ('$code','$makeWord','$Make','$Training_name','$Training_type','$Date','$Date_start','$Date_finish','$object','$PersonIn','$Personly','$provinceId','$Detail','$Place','$TelNo','$usecar',' $Time_start','$Time_finish','$Teacher_code','$Budget_year' ,'$Status' ,'$CarNo' ,NOW() )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---- ตาราง----------*//
function
InsertStdScho($Scholarship_code,$Date_rec,$Student_id,$Consider)
{
global $conn;
$sql = "INSERT INTO std_scholarship_tb (Scholarship_code,Date_rec,Student_id,Consider)";
$sql = $sql."VALUES('$Scholarship_code','$Date_rec','$Student_id','$Consider')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------ตารางรถยนต์ ----------*//
function
InsertMobile( $Acc_code, $Acc_name,$Kind, $Band_name, $CodeNo, $Date_start, $Date_finish, $Word , $Budget_year,$Price,$MoneyS_C ,$Description,$Img1,$Teacher_code,$Year,$date_updated )
{
global $conn;
$sql =" INSERT INTO automobile_tb ( Acc_code, Acc_name, Kind, Band_name,CodeNo, Date_start, Date_finish, Word , Budget_year, Price, MoneyS_C , Description, Img1,Teacher_code,Year,date_updated)";
$sql = $sql. " VALUES ('$Acc_code','$Acc_name','$Kind','$Band_name','$CodeNo','$Date_start','$Date_finish','$Word','$Budget_year','$Price','$MoneyS_C','$Description','$Img1','$Teacher_code','$Year', NOW() )";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---ตารางการใช้-น้ำมัน--------*//
function
InsertOil( $carId , $CarmoId ,$Mile_start , $Mile_finish , $Num_Mile, $Num_Lish , $Lish_start , $Price_start , $Num_start ,$Lish_finish , $Price_finish , $Num_finish , $Teacher_code )
{
global $conn;
$sql =" INSERT INTO autocar_tb ( carId , CarmoId, Mile_start , Mile_finish , Num_Mile, Num_Lish , Lish_start , Price_start , Num_start ,Lish_finish , Price_finish , Num_finish , Teacher_code,date_updated)";
$sql = $sql. " VALUES ('$carId' , '$CarmoId', '$Mile_start' ,'$Mile_finish' , '$Num_Mile', '$Num_Lish', '$Lish_start' , '$Price_start' , '$Num_start' ,'$Lish_finish' , '$Price_finish' , '$Num_finish' , '$Teacher_code', NOW() )";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----ตารางตำแหน่งราชการ---------*//
function
InsertStPosition($Position_name,$Position_nameE)
{
global $conn;
$sql = " INSERT INTO position_tb ( Position_name,Position_nameE) ";
$sql = $sql. "VALUES ('$Position_name','$Position_nameE')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----ตารางกลุ่มงาน---------*//
function
InsertConFaculty ( $Faculty_code , $Group_name , $Group_nameE )
{
global $conn;
$sql = " INSERT INTO facultycon_tb (Faculty_code , Group_name , Group_nameE) ";
$sql = $sql. "VALUES ('$Faculty_code' , '$Group_name' , '$Group_nameE')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------ตารางผู้วิจัย-----------*//
function
InsertTeacher($Research_code,$Teacher_code,$R_position)
{
global $conn;
$sql = " INSERT INTO research_char_tb (Research_code,Teacher_code,R_position) ";
$sql = $sql. "VALUES ('$Research_code','$Teacher_code','$R_position')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------- ตารางแผนยุทธ์ศาสตร์---------------*///
function
InsertStrategyplan( $Nocode, $Strategyname,$Budget_Year )
{
global $conn;
$sql = " INSERT INTO projstrategy_tb ( Nocode, Strategyname,Budget_Year )" ;
$sql =$sql." VALUES ('$Nocode','$Strategyname','$Budget_Year')";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------- ตารางแผนกลยุทธ์---------------//*
function
InsertStrategymap($StrateId,$StrateName,$Nostrate,$Budget_Year)
{
global $conn;
$sql = "INSERT INTO prostrategymap_tb ( StrateId,StrateName,Nostrate,Budget_Year )";
$sql = $sql. " VALUES ('$StrateId','$StrateName','$Nostrate','$Budget_Year') ";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*------------- ตรารางกลวิธี ------------//*
function
InsertPlanStrategy( $StratempId, $StrateId, $Noplan, $PlanStaName,$Budget_Year )
{
global $conn;
$sql =" INSERT INTO proplanstrateg_tb ( StratempId, StrateId, Noplan, PlanStaName,Budget_Year ) " ;
$sql = $sql. " VALUES ('$StratempId', '$StrateId','$Noplan', '$PlanStaName','$Budget_Year')";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*-------------research_public_tb---------------*//
function
InsertPublic ($Research_code, $ReTyId , $RePbId1,$AreaRePbId1, $RePbId2, $AreaRePbId2, $RePbId3, $AreaRePbId3, $RePbId4, $AreaRePbId4 , $RePbId5, $AreaRePbId5, $RePbId6, $RePbId7, $RePbId8 , $RePbId9 ,$RePbId10, $AreaRePbId10, $RePbId11, $collegeCode)
{
global $conn;
$sql = "INSERT INTO research_public_tb (Research_code, ReTyId , RePbId1,AreaRePbId1, RePbId2, AreaRePbId2, RePbId3, AreaRePbId3, RePbId4, AreaRePbId4 , RePbId5, AreaRePbId5, RePbId6, RePbId7, RePbId8 , RePbId9 , RePbId10, AreaRePbId10, RePbId11, collegeCode)";
$sql = $sql. " VALUES ('$Research_code', '$ReTyId','$RePbId1','$AreaRePbId1','$RePbId2','$AreaRePbId2', '$RePbId3','$AreaRePbId3','$RePbId4','$AreaRePbId4', '$RePbId5', '$AreaRePbId5','$RePbId6', '$RePbId7', '$RePbId8','$RePbId9','$RePbId10','$AreaRePbId10','$RePbId11','$collegeCode')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------ตารางงานวิจัย------------*///
function
InsertResearch( $collegeCode , $Research_name , $Branch , $Research_type , $Research_char , $Research_char_else, $ReFormId, $Research_Form_else, $Year_prop , $ResearchDI , $ReTyId, $ReAcId, $Year_start , $Year_finish , $Fund_resourceIn, $Fund_resourceOut, $FundIn, $FundOut, $FundUse, $Resource_des , $r_type , $academic_year , $fiscal_year , $academic_year_finish , $fiscal_year_finish ,$km, $ReId )
{
global $conn; $sql = "INSERT INTO research_tb (collegeCode , Research_name , Branch ,Research_type , Research_char , Research_char_else, ReFormId, Research_Form_else, Year_prop , ResearchDI, ReTyId, ReAcId , Year_start ,Year_finish , Fund_resourceIn, Fund_resourceOut, FundIn, FundOut , FundUse, Resource_des , r_type , academic_year , fiscal_year , academic_year_finish , fiscal_year_finish , km, ReId )";
$sql = $sql." VALUES ( '$collegeCode' , '$Research_name' , '$Branch' , '$Research_type' , '$Research_char' , '$Research_char_else' , '$ReFormId' , '$Research_Form_else' , '$Year_prop' , '$ResearchDI' , '$ReTyId' , '$ReAcId' , '$Year_start' , '$Year_finish' , '$Fund_resourceIn' , '$Fund_resourceOut' , '$FundIn' , ' $FundOut' , '$FundUse' , '$Resource_des' , '$r_type' , '$academic_year' , '$fiscal_year' , '$academic_year_finish' , '$fiscal_year_finish' , '$km' , '$ReId' )" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*--------- ตารางเอกสารงานวิจัย---research_file_tb --------*//
function
InsertResearchText ( $Research_code, $collegeCode, $importance, $objective, $scope , $receive , $quality , $abbStract , $Filetex )
{
global $conn; $sql = "INSERT INTO research_file_tb ( Research_code, collegeCode, importance, objective, scope , receive , quality , abbStract , Filetex ) " ;
$sql = $sql." VALUES ('$Research_code', '$collegeCode','$importance', '$objective', '$scope' , '$receive' , '$quality' , '$abbStract' , '$Filetex')" ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*----------- research_success_tb ------------//*r
function
InsertSuccess ( $Research_code , $collegeCode ,$Success , $Knowledge ,$proId, $outreacId , $outSouse, $courseId )
{
global $conn; $sql = " INSERT INTO research_success_tb ( Research_code , collegeCode ,Success ,Knowledge ,proId, outreacId , outSouse, courseId ) " ;
$sql = $sql. "VALUES ('$Research_code', ' $collegeCode' ,'$Success' , '$Knowledge' ,'$proId', '$outreacId' ,'$outSouse', '$courseId' ) ";
mysql_query($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*---------- ตารางโครงการ --------------*//
function
InsertQaProject($Project_code,$projectId, $Ind_code,$ProjectPBRI,$ProjectSKA,$ProjectSMS ,$Trem)
{
global $conn; $sql = " INSERT INTO projectqa_type_tb (Project_code, projectId, Ind_code,ProjectPBRI,ProjectSKA,ProjectSMS ,Trem )" ;
$sql = $sql. "VALUES ('$Project_code','$projectId','$Ind_code','$ProjectPBRI','$ProjectSKA','$ProjectSMS' ,'$Trem') ";
mysql_query($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*------- ตารางแผนกับกลยุทธ์-------------*//
function
InsertStrproject($Project_code,$StratempId,$Trem)
{
global $conn; $sql =" INSERT INTO projectstra_type_tb ( Project_code,StratempId,Trem) " ;
$sql = $sql. " VALUES ('$Project_code','$StratempId','$Trem') " ;
mysql_query($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*------------ ตารางบุคลากร ------------------*//
function
InsertTachername($First_name,$Teacher_name,$Teacher_lastname,$DateBirth,$Sex, $Nationality,$Nation,$Religion,$Citizen_id,$Father_name,$Mother_name,$Status,$Status2,$Status3,$StatusId,$Soulmate,$Total_child,$Address,$districtId,$amphurId,$provinceId,$Img1,$Skill,$Type_Degree,$Degree_code,$Degree_else,$Degree_His1,$Degree_His1_Major,$Degree_His1_Institute,$Degree_His1_End_Year,$Type_degree1,$Degree_His2,$Degree_His2_Major,$Degree_His2_Institute,$Degree_His2_End_Year,$Type_degree2,$Degree_His3,$Degree_His3_Major,$Degree_His3_Institute,$Degree_His3_End_Year, $Type_degree3,$Person_type,$Teacher_type, $Gover_id,$Forum_nid,$Club_nid,$Year_gov,$Year_coll, $Year_fac, $Manage_pos, $Faculty_code, $PositionId,$Username,$Password,$permission)
{
global $conn; $sql ="INSERT INTO personal_tb (First_name,Teacher_name,Teacher_lastname,DateBirth,Sex, Nationality,Nation,Religion,Citizen_id,Father_name,Mother_name,Status,Status2,Status3,StatusId,Soulmate,Total_child,Address,districtId,amphurId,provinceId,Img1,Skill,Type_Degree,Degree_code,Degree_else,Degree_His1,Degree_His1_Major,Degree_His1_Institute,Degree_His1_End_Year,Type_degree1,Degree_His2,Degree_His2_Major,Degree_His2_Institute,Degree_His2_End_Year,Type_degree2,Degree_His3,Degree_His3_Major,Degree_His3_Institute,Degree_His3_End_Year,Type_degree3,Person_type,Teacher_type, Gover_id,Forum_nid,Club_nid,Year_gov,Year_coll,Year_fac,Manage_pos, Faculty_code,PositionId,Username,Password,permission) ";
$sql =$sql. "VALUES ('$First_name','$Teacher_name','$Teacher_lastname','$DateBirth','$Sex','$Nationality','$Nation','$Religion','$Citizen_id','$Father_name','$Mother_name','$Status','$Status2','$Status3','$StatusId','$Soulmate','$Total_child','$Address','$districtId','$amphurId','$provinceId','$Img1','$Skill','$Type_Degree','$Degree_code','$Degree_else','$Degree_His1','$Degree_His1_Major','$Degree_His1_Institute','$Degree_His1_End_Year','$Type_degree1','$Degree_His2','$Degree_His2_Major','$Degree_His2_Institute','$Degree_His2_End_Year','$Type_degree2','$Degree_His3','$Degree_His3_Major','$Degree_His3_Institute','$Degree_His3_End_Year','$Type_degree3','$Person_type','$Teacher_type','$Gover_id','$Forum_nid','$Club_nid','$Year_gov','$Year_coll','$Year_fac','$Manage_pos','$Faculty_code','$PositionId','$Username','$Password','$permission')";
mysql_query($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*---------ตารางวันลาสะสม------------*///
function
InsertAccumu($Year,$Teacher_code,$Times_total ,$Absent_code )
{
global $conn; $sql =" INSERT INTO history_accumu (Year,Teacher_code,Times_total , Absent_code)";
$sql = $sql. "VALUES ('$Year','$Teacher_code','$Times_total' ,'$Absent_code' )";
mysql_query($sql) or die ("$sql INSERT HAS INCORRECT".mysql_error());
}
//*---------ตารางโน๊ตบุค------------*///
function
InsertCom($studentCode,$acadYear, $prefixName,$studentName,$studentSurname,$Date, $NotebookCode,$notebookName,$MaxAddress,$date_updated){
global $conn;
$sql =" INSERT INTO stu_notebook (studentCode, acadYear, prefixName,studentName,studentSurname,Date, NotebookCode,notebookName,MaxAddress,date_updated)";
$sql = $sql. "VALUES ('$studentCode', '$acadYear' , '$prefixName','$studentName','$studentSurname','$Date', '$NotebookCode','$notebookName','$MaxAddress' ,NOW() )";
mysql_query($sql) or die ("$sql INSERT HAS INCORRECT".mysql_error());
}
//*----------ตารางแผนปฏิบัติการปรับปรุง---------------*//
function
InsertMissionName ($Faculty_code, $subId, $Budget_Year, $AcademicYear, $Orderlist, $codeId, $plId, $Project_plan , $Teacher_code , $Date_start , $Date_finish , $January , $February , $March , $April , $May , $June , $July , $Augus , $September , $October , $November , $December , $Budget_total, $MoneyS_C , $MoneyId ,$date_updated )
{
global $conn;
$sql = "INSERT INTO project_type_tb (Faculty_code, subId, Budget_Year, AcademicYear, Orderlist, codeId, plId, Project_plan , Teacher_code , Date_start , Date_finish , January , February , March , April , May , June , July , Augus , September , October , November , December , Budget_total, MoneyS_C , MoneyId ,date_updated )";
$sql = $sql. "VALUES ('$Faculty_code', '$subId', '$Budget_Year', '$AcademicYear', '$Orderlist', '$codeId', '$plId' , '$Project_plan' ,'$Teacher_code' , '$Date_start' , '$Date_finish' , '$January' , '$February' , '$March' , '$April' , '$May' , '$June' , '$July' , '$Augus' , '$September' , '$October' , '$November' ,'$December' , ' $Budget_total','$MoneyS_C' , '$MoneyId',NOW() )";
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------ตารางแผน project_plan ---------------*//
function
InsertMissionPlan( $ProjectId , $Faculty_code, $subId, $Budget_Year, $AcademicYear, $Orderlist, $codeId, $Project_plan , $Objective, $Indsuccess , $Operation , $TargetGroup , $resuExpected , $Teacher_code , $Teacher_code1 )
{
global $conn;
$sql ="INSERT INTO project_plan( ProjectId , Faculty_code, subId, Budget_Year, AcademicYear, Orderlist, codeId, Project_plan , Objective, Indsuccess , Operation ,TargetGroup , resuExpected , Teacher_code , Teacher_code1,date_updated ) ";
$sql = $sql. "VALUE ('$ProjectId' , '$Faculty_code', '$subId', '$Budget_Year', '$AcademicYear', '$Orderlist', '$codeId', '$Project_plan' , '$Objective', '$Indsuccess' , '$Operation' ,'$TargetGroup' , '$resuExpected' , '$Teacher_code' , '$Teacher_code1', NOW() ) " ;
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
//*---------------ตารางเกณฑ์การประเมิน--------------------*//
function
InsertElement($indId,$AcademicYear,$elementsDetail )
{
global $conn;
$sql="INSERT INTO qa_elements_tb (indId, AcademicYear, elementsDetail ) " ;
$sql =$sql. "VALUE ('$indId' , '$AcademicYear', '$elementsDetail' )";
mysql_query($sql) or die ("$sql Insert has incorrect".mysql_error()) ;
}
//*-----------ตารางผลคะแนนประกัน-----------------*//
function
InsertIndictor($elemCode, $indId,$AcademicYear,$CriteriaNo , $stanCriteria )
{
global $conn;
$sql =" INSERT INTO qa_indicator_tb ( elemCode, indId,AcademicYear,CriteriaNo , stanCriteria ) ";
$sql =$sql. "VALUE ('$elemCode', '$indId' , '$AcademicYear' , '$CriteriaNo' , '$stanCriteria' ) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางเกณฑ์คะแนน-----------------*//
function
InsertIndictorPI($elemCode, $indId,$AcademicYear, $stanCriteriaPI )
{
global $conn;
$sql =" INSERT INTO qa_indicatorpi_tb ( elemCode, indId,AcademicYear, stanCriteriaPI ) ";
$sql =$sql. "VALUE ( '$elemCode', '$indId', '$AcademicYear', '$stanCriteriaPI' ) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางประกัน projectqa_type_tb ----------------*//
function
InsertQaindicator ( $indica_code, $proId, $ProjectId , $indId , $AcademicYear)
{
global $conn;
$sql =" INSERT INTO projectqa_type_tb ( indica_code, proId, ProjectId , indId , AcademicYear ) ";
$sql =$sql. "VALUE ('$indica_code' , '$proId' , '$ProjectId', '$indId' ,'$AcademicYear' ) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางผลคะแนนการประเมิน--------------*//
function
InsertPidicator ( $AcademicYear, $indId ,$ProjectId, $No, $elemId, $piId, $qaSuccess)
{
global $conn;
$sql =" INSERT INTO qa_result_tb ( AcademicYear, indId ,ProjectId, No, elemId, piId, qaSuccess, date_updated) ";
$sql =$sql. "VALUE ('$AcademicYear', '$indId' ,'$ProjectId', '$No', '$elemId', '$piId', '$qaSuccess', NOW()) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
function
UpdatePidicator ( $result_code, $AcademicYear, $indId ,$ProjectId, $No, $elemId, $piId, $qaSuccess)
{
global $conn;
$sql =" UPDATE qa_result_tb SET AcademicYear = '$AcademicYear' , indId = '$indId' ,ProjectId = '$ProjectId', No = '$No', elemId = '$elemId', piId = '$piId' , qaSuccess = '$qaSuccess' , date_updated = NOW() ";
$sql =$sql. "WHERE result_code = '$result_code' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางประกัน-----------------*//
function
InsertPerformance( $indId , $indica_code, $elemId, $Teacher_code, $Teacher_code1, $AcademicYear, $Detailperformance , $Development )
{
global $conn;
$sql =" INSERT INTO qa_performance ( indId , indica_code, elemId, Teacher_code, Teacher_code1, AcademicYear, Detailperformance , Development, date_updated) ";
$sql =$sql. "VALUE ('$indId' , '$indica_code', '$elemId', '$Teacher_code', '$Teacher_code1', '$AcademicYear', '$Detailperformance' , '$Development',NOW() ) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางเอกสารประกัน-----------------*//
function
InsertReportIndictor($ProjectId, $indica_code, $indId,$AcademicYear, $No, $OrderNo , $Report_name ,$Filename )
{
global $conn;
$sql =" INSERT INTO qa_report_tb ( ProjectId, indica_code, indId, AcademicYear, No, OrderNo , Report_name, Filename , date_updated) ";
$sql =$sql. "VALUE ( '$ProjectId' , '$indica_code' , '$indId' , '$AcademicYear' , '$No' , '$OrderNo' , '$Report_name', '$Filename' , NOW() ) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//* --------------------- ตารางเอกสารแผน-------------*//
function
InsertReportProject($ProjectId, $Budget_Year, $Faculty_code, $codeNo, $Report_name, $ReportId, $Filename )
{
global $conn;
$sql = "INSERT INTO project_report_tb ( ProjectId, Budget_Year, Faculty_code, codeNo, Report_name, ReportId, Filename) ";
$sql = $sql. "VALUE ( '$ProjectId' , '$Budget_Year' , '$Faculty_code' , '$codeNo' , '$Report_name' , '$ReportId' , '$Filename' ) " ;
mysql_query ($sql) or die ("$sql Insert Has Incorrect".mysql_error() ) ;
}
//*-----------ตารางผลคะแนนการประเมิน qa_result_indicator -----------------*//
function
InsertIndicator ( $AcademicYear, $indId , $No, $elemId, $piId, $qaSuccess)
{
global $conn;
$sql =" INSERT INTO qa_result_indicator ( AcademicYear, indId , No, elemId, piId, qaSuccess, date_updated) ";
$sql =$sql. "VALUE ('$AcademicYear', '$indId' , '$No', '$elemId', '$piId', '$qaSuccess', NOW()) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางน้ำหนักคะแนน -----------------*//
function
InsertPIidicator ( $AcademicYear, $indId , $elemId, $piId, $piNo, $Nopid, $qaSuccess)
{
global $conn;
$sql =" INSERT INTO qa_result_indicator ( AcademicYear, indId , elemId, piId, piNo, Nopid, qaSuccess, date_updated) ";
$sql =$sql. "VALUE ('$AcademicYear', '$indId' , '$elemId', '$piId', '$piNo', '$Nopid' , '$qaSuccess', NOW()) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
function
UpdatePIidicator ( $resultIn_code, $AcademicYear, $indId , $elemId, $piId, $piNo , $Nopid, $qaSuccess)
{
global $conn;
$sql =" UPDATE qa_result_indicator SET AcademicYear = '$AcademicYear' , indId = '$indId', elemId = '$elemId', piId = '$piId' , piNo='$piNo' , Nopid='$Nopid' , qaSuccess = '$qaSuccess' , date_updated = NOW() ";
$sql =$sql. "WHERE resultIn_code = '$resultIn_code' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*--------ตารางแก้ไขแผน----------------*//
function
InsertUpProject ($ProjectId, $Date, $upNo, $Training_name, $Orderlist , $Project_plan , $Budget ,$nameDetail , $Teacher_code , $Month, $Budget_Year, $Year_std ,$Status1, $Status2 ,$Status3, $Status4, $Filetex ,$date_updated )
{
global $conn;
$sql ="INSERT INTO formproject_edit_tb ( ProjectId, Date, upNo, Training_name, Orderlist , Project_plan , Budget ,nameDetail , Teacher_code , Month, Budget_Year, Year_std ,Status1, Status2 ,Status3, Status4, Filetex, date_updated ) " ;
$sql =$sql. "VALUE ('$ProjectId ', '$Date' , '$upNo' , '$Training_name' , '$Orderlist' , '$Project_plan' , '$Budget' , '$nameDetail', '$Teacher_code' , '$Month' , '$Budget_Year', '$Year_std' , '$Status1' , '$Status2' , '$Status3' , '$Status4' , '$Filetex' ,NOW() ) " ;
mysql_query ($sql ) or die ("$sql Insert Has incorrect".mysql_error()) ;
}
//*------- ตารางผลการเรียนรู้ -----------------*//
function
InsertOutcom ($outId, $programId,$AcademicYear,$outNo , $outcomName )
{
global $conn;
$sql ="INSERT INTO tech_outcom_tb (outId, programId, AcademicYear, outNo , outcomName ) " ;
$sql = $sql. " VALUE ('$outId' , '$programId' , '$AcademicYear' , '$outNo' , '$outcomName' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางผลการเรียนรู้----------------*//
function
InsertCoseOutcom( $comId , $programId, $AcademicYear, $outNo , $coseName )
{
global $conn;
$sql ="INSERT INTO tech_coseoutcom (comId , programId, AcademicYear, outNo , coseName ) " ;
$sql = $sql. " VALUE ('$comId' , '$programId' , '$AcademicYear' , '$outNo' , '$coseName' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางรายวิชา----------------*//
function
InsertCorseMethod( $programId, $semester, $acadYear, $TotalStudent, $studentYear, $dayId , $startTime, $endTime ,$TotalWeek , $Method_code,$Place, $courseCode,$courseId,$conditionId, $Date_start,$Date_finish, $Res_unit )
{
global $conn;
$sql ="INSERT INTO tech_corseplan_tb (programId, semester, acadYear, TotalStudent, studentYear, dayId , startTime, endTime ,TotalWeek , Method_code,Place, courseCode,courseId,conditionId, Date_start,Date_finish,Res_unit ) " ;
$sql = $sql. " VALUE ('$programId' , '$semester','$acadYear', '$TotalStudent', '$studentYear','$dayId' , '$startTime', '$endTime' ,'$TotalWeek' , '$Method_code','$Place', '$courseCode','$courseId','$conditionId', '$Date_start','$Date_finish', '$Res_unit' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางผู้รับผิดชอบรายวิชา----------------*//
function
InsertCourseTeacher($programId, $corsett, $courseId , $acadYear , $Teacher_code , $CourseTeach )
{
global $conn;
$sql ="INSERT INTO tech_courseteacher (programId, corsett, courseId , acadYear , Teacher_code , CourseTeach) " ;
$sql = $sql. " VALUE ('$programId' , '$corsett' , '$courseId' , '$acadYear' , '$Teacher_code' , '$CourseTeach' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
function
UpdateCourseTeacher( $programId, $corsett, $courseId , $acadYear , $Teacher_code , $CourseTeach)
{
global $conn;
$sql =" UPDATE tech_courseteacher SET programId = '$programId' , corsett='$corsett' , courseId = '$courseId', acadYear = '$acadYear', Teacher_code='$Teacher_code', CourseTeach = '$CourseTeach' ";
$sql =$sql. "WHERE costtId = '$costtId' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*------- ตารางแผนการสอนรายวิชา----------------*//
function
InsertMethod( $Teacher_code , $acadYear, $costtId, $courseId , $programId, $Week , $Date_start , $Hour , $Unit , $Objective ,$Content ,$LearnAactive , $Aess1, $Aess2, $Aess3, $Asses1 ,$Asses2, $Asses3 ,$Filetex )
{
global $conn;
$sql ="INSERT INTO tech_planmethod (Teacher_code , acadYear, costtId, courseId , programId, Week , Date_start , Hour , Unit , Objective ,Content ,LearnAactive , Aess1, Aess2, Aess3, Asses1 ,Asses2, Asses3 ,Filetex ) " ;
$sql = $sql. " VALUE ('$Teacher_code' , '$acadYear' , '$costtId' , '$courseId' , '$programId' , '$Week' , '$Date_start' , '$Hour' , '$Unit' , '$Objective' ,'$Content' ,'$LearnAactive' , '$Aess1','$Aess2','$Aess3' , '$Asses1' ,'$Asses2', '$Asses3' ,'$Filetex' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางผลการเรียนรู้การสอนรายวิชา----------------*//
function
InsertOucomTeach ( $cosId, $ttpId , $Teacher_code, $programId, $AcademicYear)
{
global $conn;
$sql ="INSERT INTO tech_methodcom_tb ( cosId, ttpId , Teacher_code, programId, AcademicYear) " ;
$sql = $sql. " VALUE ( '$cosId' , '$ttpId' , '$Teacher_code' , '$programId', '$AcademicYear' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางวิธีการสอนรายวิชา----------------*//
function
InsertIngTeach ( $tcId, $ttpId , $programId )
{
global $conn;
$sql ="INSERT INTO tech_imgmethod_tb ( tcId, ttpId , programId ) " ;
$sql = $sql. " VALUE ( '$tcId' , '$ttpId' , '$programId' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางคุณลักษณะของแผนการสอน----------------*//
function
InsertLessonPlan ( $lessId, $ttpId , $programId )
{
global $conn;
$sql ="INSERT INTO tech_lesson_plans ( lessId , ttpId , programId ) " ;
$sql = $sql. " VALUE ( '$lessId' , '$ttpId' , '$programId' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางหัวข้อแผนการสอนรายวิชา Topics ----------------*//
function
InsertCategoryTopic($CatId, $Teacher_code, $costtId, $programId, $courseId, $Lesson, $Destination, $acadYear,$TopicName,$Filetex )
{
global $conn;
$sql ="INSERT INTO tech_categorytopic (CatId, Teacher_code, costtId, programId, courseId, Lesson, Destination, acadYear, TopicName , Filetex ) " ;
$sql = $sql. " VALUE ( '$CatId', '$Teacher_code' , '$costtId', '$programId', '$courseId', '$Lesson', '$Destination', '$acadYear','$TopicName' , '$Filetex' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางหัวข้อแผนการสอนรายวิชา----------------*//
function
InsertCategoryDetail ($TopId, $costtId, $programId, $courseId, $Lesson, $acadYear, $DetailCatName ,$Filetex )
{
global $conn;
$sql ="INSERT INTO tech_categorydetail (TopId, costtId, programId, courseId, Lesson, acadYear, DetailCatName ,Filetex ) " ;
$sql = $sql. " VALUE ( '$TopId' , '$costtId' , '$programId' , '$courseId' , '$Lesson' , '$acadYear' , '$DetailCatName','$Filetex' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------- ระบบพัฒนาบุคลากร dev_hrperson --------------*//
function
InsertPersonaldev ($Teacher_code, $id, $pcode ,$fname , $lname , $birthdate , $sex , $appointdate , $startdate , $fperson , $statusId, $posid, $poscode, $levelcode, $salary, $cercode, $cerid, $fposition, $deptcode, $tcode, $workcode, $Dev_type, $schstartdate, $schstopdate )
{
global $conn;
$sql = "INSERT INTO dev_hrperson (Teacher_code, id, pcode ,fname , lname , birthdate , sex , appointdate , startdate , fperson , statusId, posid, poscode, levelcode, salary, cercode, cerid, fposition, deptcode, tcode, workcode, Dev_type, schstartdate, schstopdate ) " ;
$sql = $sql. "VALUE ('$Teacher_code', '$id' , '$pcode' ,'$fname' , '$lname' , '$birthdate' , '$sex' , '$appointdate' , '$startdate' , '$fperson' , '$statusId' , '$posid' , '$poscode' , '$levelcode' , '$salary' , '$cercode' , '$cerid' , '$fposition' , '$deptcode' , '$tcode' , '$workcode' , '$Dev_type' , '$schstartdate' , '$schstopdate' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*---------- dev_his-------------*//
function
InsertHisTraining ($Teacher_code , $perid , $Date, $No_in, $Dated, $cname , $orders , $Training_code, $startdate , $enddate , $daycount , $day, $Year_std ,$traincenter, $provcode ,$countrycode, $univId, $unit, $moneybudget1, $moneybudget2, $moneybudget3, $moneybudget4, $money , $Training_std , $moneycenter, $Content, $unitpoint , $Skills , $cdevcode, $Orgskills ,$Groskills , $Perskills ,$Hiskills , $Training_type, $traindept )
{
global $conn;
$sql = "INSERT INTO dev_his (Teacher_code ,perid , Date, No_in, Dated, cname , orders , Training_code , startdate , enddate , daycount , day, Year_std , traincenter, provcode ,countrycode, univId , unit, moneybudget1, moneybudget2, moneybudget3, moneybudget4, money , Training_std , moneycenter, Content, unitpoint , Skills , cdevcode, Orgskills ,Groskills , Perskills ,Hiskills , Training_type, traindept ) " ;
$sql =$sql. "VALUE ('$Teacher_code' , '$perid' , '$Date' , '$No_in', '$Dated', '$cname' , '$orders ', '$Training_code' , '$startdate' , '$enddate' , '$daycount' , '$day' , '$Year_std' , '$traincenter' , '$provcode' ,'$countrycode', '$univId' , '$unit', '$moneybudget1', '$moneybudget2', '$moneybudget3', '$moneybudget4', '$money' , '$Training_std' , '$moneycenter', '$Content', '$unitpoint' , '$Skills' , '$cdevcode', '$Orgskills' ,'$Groskills' , '$Perskills' ,'$Hiskills' , '$Training_type', '$traindept' ) " ;
mysql_query ($sql ) or die ("$sql Insert Has incorrect".mysql_error() ) ;
}
//*--------------dev_dev_hreduhis----------- *//
function
InsertHreduhis ($perid , $levelPos , $levelHig, $levelcode , $qcode, $qname , $Major , $institute , $univId, $countrycode , $startdeerdate, $enddeerdate , $eyear , $qflag , $mflag )
{
global $conn;
$sql ="INSERT INTO dev_hreduhis (perid , levelPos , levelHig, levelcode , qcode, qname , Major , institute , univId, countrycode , startdeerdate , enddeerdate , eyear , qflag , mflag ) " ;
$sql =$sql. "VALUE ('$perid' , '$levelPos' , '$levelHig' , '$levelcode' , '$qcode', '$qname' , '$Major' , '$institute' ,'$univId' , '$countrycode' , '$startdeerdate' , '$enddeerdate' , '$eyear' , '$qflag' , '$mflag' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------------------ dev_config----------------*//
function
InsertConfigdev ($deptId, $shortpre , $longpre ,$deptname )
{
global $conn ;
$sql = "INSERT INTO dev_config (deptId, shortpre , longpre , deptname ) ";
$sql = $sql. "VALUE ('$deptId', '$shortpre' , '$longpre' ,'$deptname' ) " ;
mysql_query($sql) or die ("$sql Insert Has incorrect".mysql_error()) ;
}
//*---------------dev_coursedu--------------*//
function
InsertCourseEdu ( $perid , $Certificates , $Course , $univName , $countryname , $startdate , $enddate ,$Expertise , $ExpertiseDetail ,$Flag )
{
global $conn;
$sql = " INSERT INTO dev_coursedu ( perid , Certificates , Course , univName , countryname , startdate , enddate ,Expertise , ExpertiseDetail ,Flag ) " ;
$sql = $sql. " VALUE ( '$perid' , '$Certificates' , '$Course' , '$univName' , '$countryname' , '$startdate' , '$enddate','$Expertise' , '$ExpertiseDetail' ,'$Flag' ) " ;
mysql_query($sql) or die ("$sql Insert Has incorrect".mysql_error()) ;
}
//*------- ตารางผู้รับผิดชอบโครงการ---------------*//
function
InsertProjectTeacher($proId, $ProjectId, $Budget_Year , $Teacher_code , $ProjectTeach )
{
global $conn;
$sql ="INSERT INTO project_teacher (proId, ProjectId, Budget_Year , Teacher_code , ProjectTeach) " ;
$sql = $sql. " VALUE ('$proId' , '$ProjectId' , '$Budget_Year' , '$Teacher_code' , '$ProjectTeach' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------ตารางพันธกิจหลัก----------------*//
function
InsertMissTopic($no_Orderlist , $mission_plan , $Budget_Year )
{
global $conn;
$sql =" INSERT INTO project_mission (no_Orderlist , mission_plan , Budget_Year ) " ;
$sql = $sql. " VALUE ('$no_Orderlist' , '$mission_plan' , '$Budget_Year' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*-------ตารางพันธกิจรอง--------*//
function
InsertSubmission($missId, $sub_Orderlist , $submission_plan )
{
global $conn;
$sql =" INSERT INTO project_submission (missId, sub_Orderlist , submission_plan ) " ;
$sql = $sql. " VALUE ('$missId', ' $sub_Orderlist' , '$submission_plan' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*----------ตารางปีงบประมาณ---------------*//
function
InsertYear ($Budget_Year, $AcademicYear )
{
global $conn;
$sql =" INSERT INTO project_year (Budget_Year, AcademicYear ) " ;
$sql = $sql. " VALUE ('$Budget_Year', '$AcademicYear' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------------ตารางตัวบ่งชี้้ประกันคุณภาพการศึกษา-------------------*//
function
InsertQacator( $elemId , $qaId , $indicaNo , $Indicator , $AcademicYear )
{
global $conn;
$sql =" INSERT INTO qa_indicator ( elemId , qaId , indicaNo , Indicator , AcademicYear ) " ;
$sql = $sql. " VALUE ( '$elemId' , '$qaId' , '$indicaNo' , '$Indicator' , '$AcademicYear' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------ตารางการโครงการแผนปรับเพิ่ม-----------------*//
function
InsertProjectPlan( $plId, $Project_plan , $codeId, $Orderlist, $programId, $Budget_Year, $AcademicYear, $subId, $Flag, $Faculty_code, $conId, $Indsuccess , $Objective , $TargetGroup , $Operation , $Date_start , $Date_finish, $evaluate , $resuExpected )
{
global $conn ;
$sql = "INSERT INTO project_plan ( plId, Project_plan , codeId, Orderlist, programId, Budget_Year, AcademicYear, subId, Flag, Faculty_code, conId, Indsuccess , Objective,TargetGroup, Operation , Date_start , Date_finish, evaluate , resuExpected ) " ;
$sql =$sql. " VALUE ( '$plId' , '$Project_plan' , '$codeId' , '$Orderlist' , '$programId' , '$Budget_Year' , '$AcademicYear', '$subId' , '$Flag' , '$Faculty_code' , '$conId' , '$Indsuccess' , '$Objective' , '$TargetGroup' , '$Operation' , '$Date_start' , '$Date_finish' , '$evaluate' , '$resuExpected' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------------ตารางการขอใช้เงินแผนปรับเพิ่ม----------------*//
function
InsertProjectSub($proId, $Faculty_code, $subId, $codeId, $Budget_Year, $AcademicYear, $courseId, $Orderlist, $plId, $Project_plan , $Date_start , $Date_finish , $January , $February , $March , $April , $May , $June , $July , $Augus , $September , $October , $November , $December , $Budget_total, $MoneyS_C , $MoneyId, $Flag, $Flag1, $date_updated )
{
global $conn ;
$sql =" INSERT INTO project_type_tb (proId, Faculty_code, subId, codeId, Budget_Year, AcademicYear, courseId , Orderlist, plId, Project_plan , Date_start , Date_finish , January , February , March , April , May , June , July , Augus , September , October , November , December , Budget_total, MoneyS_C , MoneyId, Flag, Flag1, date_updated ) " ;
$sql =$sql. "VALUE ( '$proId' , '$Faculty_code' , '$subId' , '$codeId' , '$Budget_Year' , '$AcademicYear' , '$courseId' , '$Orderlist' , '$plId' , '$Project_plan' , '$Date_start' , '$Date_finish' , '$January' , '$February' , '$March' , '$April' , '$May' , '$June' , '$July' , '$Augus' , '$September' , '$October' , '$November' , '$December' ,'$Budget_total' , '$MoneyS_C' , '$MoneyId', '$Flag', '$Flag1' , NOW() ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางผู้รับผิดชอบกิจกรรม---------------*//
function
InsertProjectAtivity($proId, $ProjectId, $Budget_Year , $Teacher_code , $ProjectTeach )
{
global $conn;
$sql ="INSERT INTO project_ativity (proId, ProjectId, Budget_Year , Teacher_code , ProjectTeach) " ;
$sql = $sql. " VALUE ('$proId' , '$ProjectId' , '$Budget_Year' , '$Teacher_code' , '$ProjectTeach' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*-----------ตารางผลคะแนนการประเมินตนเอง-----------------*//
function
InsertResultAcademic( $AcademicYear, $Flag , $qaId, $indId , $No, $elemId, $piId, $qaSuccess)
{
global $conn;
$sql =" INSERT INTO qa_standard_result ( AcademicYear, Flag , qaId, indId , No, elemId, piId, qaSuccess, date_updated) ";
$sql =$sql. "VALUE ('$AcademicYear', '$Flag' , '$qaId' , '$indId' , '$No', '$elemId', '$piId', '$qaSuccess', NOW()) ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
function
UpdateResultAcademic( $piresId, $AcademicYear, $Flag , $qaId, $indId , $No, $elemId, $piId, $qaSuccess)
{
global $conn;
$sql =" UPDATE qa_standard_result SET AcademicYear = '$AcademicYear' ,Flag='$Flag' , qaId='$qaId' , indId = '$indId' , No = '$No', elemId = '$elemId', piId = '$piId' , qaSuccess = '$qaSuccess' , date_updated = NOW() ";
$sql =$sql. "WHERE piresId = '$piresId' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*----------ตารางคณะกรรมการผู้ประเมิน---------------*//
function
InsertCommitteeQa ($Topic ,$AcademicYear )
{
global $conn;
$sql =" INSERT INTO qa_data_tb (Topic , AcademicYear ) " ;
$sql = $sql. " VALUE ('$Topic' ,'$AcademicYear' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางวิทยากรโครงการบริการวิชาการ----------------*//
function
InsertOutInstructor ($code , $outreacId )
{
global $conn;
$sql ="INSERT INTO edu_instructor ( outreacId , code ) " ;
$sql = $sql. " VALUE ( '$outreacId' ,'$code' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
function
UpdateOutInstructor( $outreacId ,$code )
{
global $conn;
$sql =" UPDATE edu_instructor SET outreacId='$outreacId' , code='$code' ";
$sql =$sql. "WHERE outreacId = '$outreacId' and code='$code' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*----------ตารางผลสอบสภา--------------*//
function
InsertCoseResult( $Results , $ResultsStu, $acadYear )
{
global $conn;
$sql =" INSERT INTO course_results (Results , ResultsStu, acadYear ) " ;
$sql = $sql. " VALUE ('$Results' ,'$ResultsStu', '$acadYear' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------ตารางการเผยแพร่งานวิจัย---------------*//
function
InsertPubliczing($Research_code, $Feature, $Warsan , $Quality , $Proceeding ,$Results, $DatabaseName, $JournalName, $Year,$Issue, $Page, $fiscal_year_finish , $academic_year_finish, $MeetingName, $Agencies , $DatePublic ,$Filetex )
{
global $conn;
$sql ="INSERT INTO research_dissemination (Research_code, Feature , Warsan, Quality , Proceeding , Results, DatabaseName, JournalName, Year, Issue, Page, fiscal_year_finish , academic_year_finish, MeetingName, Agencies , DatePublic ,Filetex ) ";
$sql = $sql. "VALUE ( '$Research_code', '$Feature' ,'$Warsan' ,'$Quality' , '$Proceeding' , '$Results' , '$DatabaseName', '$JournalName', '$Year', '$Issue' , '$Page', '$fiscal_year_finish' , '$academic_year_finish', '$MeetingName', '$Agencies' , '$DatePublic' ,'$Filetex' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------------ตารางดาว์โหลดงานวิจัย--------------*//
function
InsertDownload( $Research_Id, $Research_code, $Category , $Agency , $Name_info ,$Filetex )
{
global $conn;
$sql ="INSERT INTO research_download ( Research_Id, Research_code, Category , Agency , Name_info ,Filetex ) " ;
$sql =$sql. "VALUE ( '$Research_Id' , '$Research_code' , '$Category' , '$Agency' , '$Name_info' , '$Filetex' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------------ตารางตัวชี้วัดกลยุทธ์-------------*//
function
InsertMetric( $StrateId , $StratempId , $NoMetric, $MetricName )
{
global $conn;
$sql ="INSERT INTO prometricstrateg ( StrateId , StratempId , NoMetric, MetricName ) " ;
$sql =$sql. "VALUE ( '$StrateId' , '$StratempId' , '$NoMetric' , '$MetricName' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------------ตารางตัวชี้แผนงาน------------*//
function
InsertMetricplan( $StaplanId , $StratempId , $NoMetricPo, $Metricproject )
{
global $conn;
$sql ="INSERT INTO prometricplan ( StaplanId , StratempId, NoMetricPo, Metricproject ) " ;
$sql =$sql. "VALUE ( '$StaplanId' , '$StratempId' , '$NoMetricPo' , '$Metricproject' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------------ตาราง Room_Rent------------*//
function
InsertFormRoom( $Rent_code, $RoomNo, $Teacher_code, $Faculty_code, $Rent_date, $Room_code, $Date_start, $Time_start , $Date_finish, $Time_finish, $Topic, $Make, $Check_format, $Detail_format, $Check_tool, $Detail_tool, $Check_food, $Detail_food,$Status, $Detail)
{
global $conn;
$sql ="INSERT INTO room_rent ( Rent_code, RoomNo, Teacher_code, Faculty_code, Rent_date, Room_code, Date_start, Time_start , Date_finish, Time_finish, Topic, Make, Check_format, Detail_format, Check_tool, Detail_tool, Check_food, Detail_food, Status ,Detail ) " ;
$sql =$sql. "VALUE ( '$Rent_code', '$RoomNo', '$Teacher_code' , '$Faculty_code', '$Rent_date', '$Room_code', '$Date_start', '$Time_start', '$Date_finish', '$Time_finish', '$Topic', '$Make', '$Check_format', '$Detail_format', '$Check_tool', '$Detail_tool', '$Check_food', '$Detail_food' , '$Status' , '$Detail') " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------------ตารางเบิกเงิน-----------------------*//
function
InsertFormMoney ( $maNo , $Teacher_code, $codeId, $Training_code , $WithMon, $Matter, $Training_name , $Date, $Date_start, $Date_finish , $Day, $MOut ,$MInput , $Time_start , $Time_finish , $Hour , $Minute ,$SMDay, $Smtotal, $ST, $STDay ,$STtotal , $Vehicle1 ,$Vehicle2 , $Vehicle3, $Vehicle4 , $Vehicle5, $Vehicletotal, $Crges1 ,$Crges2, $Crges3, $Crgestotal , $Budget_use ,$Document ,$provinceId ,$Filetext ,$Flag , $Year_std )
{
global $conn ;
$sql ="INSERT IGNORE INTO formofficemoney(maNo , Teacher_code, codeId, Training_code , WithMon, Matter, Training_name , Date, Date_start, Date_finish , Day, MOut ,MInput , Time_start , Time_finish , Hour , Minute ,SMDay, Smtotal, ST, STDay ,STtotal , Vehicle1 ,Vehicle2 , Vehicle3, Vehicle4 ,Vehicle5, Vehicletotal, Crges1 , Crges2, Crges3, Crgestotal , Budget_use ,Document , provinceId , Filetext ,Flag , Year_std) ";
$sql =$sql. "VALUE ( '$maNo' , '$Teacher_code', '$codeId', '$Training_code' , '$WithMon' , '$Matter', '$Training_name' , '$Date' , '$Date_start' , '$Date_finish' , '$Day' , '$MOut' ,'$MInput' , '$Time_start' , '$Time_finish' , '$Hour' , '$Minute' ,'$SMDay', '$Smtotal' , '$ST' , '$STDay' ,'$STtotal' , '$Vehicle1' ,'$Vehicle2' , '$Vehicle3', '$Vehicle4' ,'$Vehicle5', '$Vehicletotal' , '$Crges1' , '$Crges2' , '$Crges3' , '$Crgestotal' , '$Budget_use' , '$Document' ,'$provinceId' ,'$Filetext' ,'$Flag' , '$Year_std' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*---------------ตารางบันทึกการใช้เงิน-------------*//
function
InsertFormContract ( $Teacher_code ,$maNo, $provinceId, $Training_name, $Date, $Date_start ,$Date_finish, $WithMon, $MoneyS_C, $Day , $Detail , $Budget, $Flag2 ,$Flag ,$Year_std )
{
global $conn ;
$sql = "INSERT INTO formcontract (Teacher_code ,maNo, provinceId, Training_name, Date , Date_start , Date_finish, WithMon, MoneyS_C, Day , Detail , Budget, Flag2 ,Flag ,Year_std ) ";
$sql =$sql. " VALUE ( '$Teacher_code' ,'$maNo', '$provinceId', '$Training_name', '$Date', '$Date_start' , '$Date_finish', '$WithMon', '$MoneyS_C' , '$Day' , '$Detail' , '$Budget', '$Flag2' ,'$Flag' ,'$Year_std' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*---------ตารางยืมเงิน-----------------------*//
function
InsertFormAgree( $Noagree , $maNo , $Teacher_code, $contId, $Training_code , $MoneyS_C , $Training_name , $Date, $Dayout, $Smtotal, $STtotal , $Vehicletotal, $Crgestotal , $Budget_use ,$Filetex , $Flag , $Year_std )
{
global $conn;
$sql = " INSERT INTO formagree ( Noagree , maNo , Teacher_code, contId, Training_code , MoneyS_C , Training_name , Date, Dayout, Smtotal, STtotal , Vehicletotal, Crgestotal , Budget_use ,Filetex , Flag , Year_std ) ";
$sql = $sql. "VALUE ( '$Noagree' , '$maNo' , '$Teacher_code' , '$contId' , '$Training_code' , '$MoneyS_C' , '$Training_name' , '$Date' , '$Dayout' , '$Smtotal' , '$STtotal' , '$Vehicletotal', '$Crgestotal' , '$Budget_use' ,'$Filetex' , '$Flag' , '$Year_std' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*----------ตารางหมวดเอกสาร----------------------*//
function
InsertDocContion( $Faculty_code , $DoconName )
{
global $conn;
$sql =" INSERT INTO docontion_tb ( Faculty_code , DoconName ) ";
$sql = $sql. "VALUE ( '$Faculty_code' , '$DoconName' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*----------ตารางเอกสาร-----------------*//
function
InsertDocname ($docoId, $Teacher_code, $Faculty_code , $DocoumName, $Filetex ,$suppId, $sell_id )
{
global $conn;
$sql =" INSERT INTO document_tb ( docoId, Teacher_code, Faculty_code , DocoumName, Filetex, suppId, sell_id , date_updated ) ";
$sql = $sql. "VALUE ( '$docoId' , '$Teacher_code' , '$Faculty_code' , '$DocoumName' , '$Filetex' , '$suppId' , '$sell_id' , NOW() ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*-------ตารางประเภทห้อง--------------*//
function
InsertRoomType($Room_type_name )
{
global $conn;
$sql =" INSERT INTO room_type_tb ( Room_type_name ) ";
$sql = $sql. "VALUE ( '$Room_type_name') ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------ตาราง----------------------*//
function
InsertSell ($sell_name, $sell_address , $sell_tel , $sell_fax , $sell_Sales ,$sell_mobile ,$Mail )
{
global $conn;
$sql =" INSERT INTO accessories_sell (sell_name, sell_address , sell_tel , sell_fax , sell_Sales ,sell_mobile ,Mail ) ";
$sql = $sql. "VALUE ( '$sell_name' , '$sell_address' , '$sell_tel' ,' $sell_fax' , '$sell_Sales' ,'$sell_mobile' ,'$Mail ') ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------------ตาราง formagree_type -----------*//
function
InsertFormTypeAgree( $agreeId, $agreeName , $Budget_agree )
{
global $conn;
$sql =" INSERT INTO formagree_type (agreeId, agreeName , Budget_agree ) ";
$sql =$sql. "VALUE ('$agreeId' , '$agreeName' , '$Budget_agree' )";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
/*------------------------------------------*/
function
InsertAccCont ( $Acc_type_code, $NameCont_y, $NameCont_n ,$Dura )
{
global $conn ;
$sql ="INSERT INTO accessories_cont (Acc_type_code, NameCont_y, NameCont_n ,Dura )" ;
$sql =$sql. "VALUE ('$Acc_type_code', '$NameCont_y', '$NameCont_n' , '$Dura' )";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
/*---------------------------------*/
function
InsertAccGroup( $accContId , $NameGroup_y, $NameGroup_n ,$Dura )
{
global $conn;
$sql = "INSERT INTO accessories_group( accContId ,NameGroup_y, NameGroup_n ,Dura ) ";
$sql = $sql. "VALUE ('$accContId' , '$NameGroup_y', '$NameGroup_n' , '$Dura' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
/*-----------ตารางบูรณาการงานบริการวิชาการ--------------*/
function
InsertIntegration ( $Mint , $courseId, $Research_code,$proId, $outreacId, $activityId, $Flag , $Budget_Year )
{
global $conn;
$sql ="INSERT INTO edu_integration ( Mint , courseId, Research_code, proId, outreacId, activityId, Flag, Budget_Year ) ";
$sql = $sql."VALUE ( '$Mint' , '$courseId' , '$Research_code' , '$proId' , '$outreacId' , '$activityId' , '$Flag' ,'$Budget_Year' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางบุคลากรเข้าร่วมโครงการบริการวิชาการ----------------*//
function
InsertOutTeacher ( $Teacher_code, $OutTeacher, $outreacId )
{
global $conn;
$sql ="INSERT INTO edu_servicteacher ( Teacher_code, OutTeacher , outreacId ) " ;
$sql = $sql. " VALUE ('$Teacher_code' , '$OutTeacher' , '$outreacId' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
function
UpdateOutTeacher( $Teacher_code, $OutTeacher , $outreacId )
{
global $conn;
$sql =" UPDATE edu_servicteacher SET Teacher_code='$Teacher_code' , OutTeacher='$OutTeacher' , outreacId='$outreacId' ";
$sql =$sql. "WHERE outreacId = '$outreacId' and servitId='$servitId' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*--------ตาราง----------------------*//
function
Insert7131($sell_name, $sell_address , $sell_tel )
{
global $conn;
$sql =" INSERT INTO accessories_sell (sell_name, sell_address , sell_tel ) ";
$sql = $sql. "VALUE ( '$sell_name' , '$sell_address' , '$sell_tel' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*---------ตารางเบิกค่ารักษา------------*//
function
InsertMedical ($Teacher_code , $People_Id , $People_legal , $People_incom , $Disease , $Hospital , $Hospital_belong , $In_date , $Out_date , $Amount , $Receipt , $Authority1 , $Authority2 , $Authority3 ,$Withdraw_money , $Au1_1 , $Au1_2, $Au1_3 , $Au1_4 ,$Au2_1 ,$Au2_2 ,$Au2_3 ,$Au2_4 ,$date_updated )
{
global $conn;
$sql = "INSERT INTO medical_fee (Teacher_code , People_Id , People_legal ,People_incom , Disease , Hospital , Hospital_belong , In_date , Out_date , Amount , Receipt , Authority1 , Authority2 , Authority3 , Withdraw_money , Au1_1 , Au1_2, Au1_3 , Au1_4 , Au2_1 , Au2_2 ,Au2_3 , Au2_4 ,date_updated ) " ;
$sql = $sql. "VALUE ( '$Teacher_code' , '$People_Id' , '$People_legal' , '$People_incom' , '$Disease' , '$Hospital' , '$Hospital_belong' , '$In_date' , '$Out_date' , '$Amount' , '$Receipt' , '$Authority1' , '$Authority2' , '$Authority3' , '$Withdraw_money' , '$Au1_1' ,'$Au1_2' , '$Au1_3' , '$Au1_4' , '$Au2_1' ,'$Au2_2' , '$Au2_3' , '$Au2_4' , NOW() )";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*---------ตารางเบิกค่าเล่าเรียนของบุตร------------*//
function
Insert7232 ($Teacher_code , $Spouse_Id , $Au2_1 , $Au2_2 , $Au2_3 , $Au2_4 , $Position , $Belong_to , $Position1 , $Belong_to1 , $Father , $Mother , $People_Id , $Replace_died , $Maintain_fee , $Tuition_fee , $Amount1 ,$Au5_1 , $Au5_2 , $Amount2, $Au6_1 , $Au6_2 ,$Au6_3 ,$Au6_4 , $Flag )
{
global $conn;
$sql = "INSERT INTO child_study (Teacher_code , Spouse_Id , Au2_1 , Au2_2 , Au2_3 , Au2_4 , Position , Belong_to , Position1 , Belong_to1 , Father , Mother , People_Id , Replace_died , Maintain_fee , Tuition_fee , Amount1 , Au5_1 , Au5_2 , Amount2, Au6_1 , Au6_2 ,Au6_3 ,Au6_4 , Flag ) " ;
$sql = $sql. "VALUE ( '$Teacher_code' , '$Spouse_Id' , '$Au2_1' , '$Au2_2' , '$Au2_3' , '$Au2_4' , '$Position' , '$Belong_to' , '$Position1' , '$Belong_to1' , '$Father' , '$Mother' , '$People_Id' , '$Replace_died' , '$Maintain_fee' , '$Tuition_fee' , '$Amount1' ,'$Au5_1' , '$Au5_2' , '$Amount2', '$Au6_1' , '$Au6_2' ,'$Au6_3' ,'$Au6_4' , '$Flag' )";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*-----------ตารางเงินเดือน----------------*//
function
InsertSalaryMont ( $saTC , $SalaryId ,$Teacher_code , $Start_mont , $salaryMont , $Start_year , $SalaryStatus )
{
global $conn;
$sql ="INSERT INTO salarymont_tb ( saTC , SalaryId, Teacher_code , Start_mont , salaryMont , Start_year , SalaryStatus )";
$sql =$sql. "VALUE ( '$saTC' , '$SalaryId' , '$Teacher_code' , '$Start_mont' , '$salaryMont' , '$Start_year' , '$SalaryStatus' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------ตาราเงินเดือนประจำ----------------*//
function
InsertSalary($Teacher_code, $Start_mont ,$Start_year , $Salary_1, $Salary_2, $Salary_3 )
{
global $conn ;
$sql ="INSERT INTO salary_tb (Teacher_code, Start_mont ,Start_year , Salary_1, Salary_2, Salary_3 )";
$sql = $sql. "VALUE ( '$Teacher_code', '$Start_mont' , '$Start_year' ,'$Salary_1', '$Salary_2', '$Salary_3' )";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*----------ตารางธนาคาร---------------*//
function
InsertBankSalary ($Teacher_code , $accountBank , $Bank, $Branch ,$typeAccout )
{
global $conn;
$sql ="INSERT INTO salarybank_tb (Teacher_code , accountBank , Bank, Branch ,typeAccout )";
$sql =$sql. "VALUE ('$Teacher_code' , '$accountBank' , '$Bank' , '$Branch' , '$typeAccout' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------ตารางโครงการทำนุบำรุง------- *//
function
InsertEduActivity ( $Orderlist , $plId , $proId , $Project_name , $IntegraCos ,$IntegraRes , $IntegraTeac, $projectName, $AdvisingName, $Objective, $projectResults,$projectMmetrics, $projectHow, $Budget_Year, $AcademicYear , $Date_start , $Date_finish, $Operation, $operationDetail , $Budget, $budgetName, $Achievement , $achievementName , $Average, $numberGroup, $Number , $budgetUse ,$budgetMa , $budgetIn , $budgetInName ,$Faculty_code ,$Filetex1,$Filetex2 )
{
global $conn;
$sql = "INSERT INTO edu_activity_tb ( Orderlist , plId , proId , Project_name , IntegraCos ,IntegraRes , IntegraTeac, projectName, AdvisingName, Objective, projectResults, projectMmetrics, projectHow, Budget_Year, AcademicYear , Date_start , Date_finish, Operation, operationDetail , Budget, budgetName, Achievement , achievementName , Average, numberGroup, Number , budgetUse ,budgetMa , budgetIn , budgetInName ,Faculty_code ,Filetex1, Filetex2 ) " ;
$sql = $sql. "VALUE ( '$Orderlist' , '$plId' , '$proId' , '$Project_name' , '$IntegraCos' , '$IntegraRes' , '$IntegraTeac' , '$projectName' , '$AdvisingName' , '$Objective' , '$projectResults' , '$projectMmetrics' , '$projectHow' , '$Budget_Year' , '$AcademicYear' , '$Date_start' , '$Date_finish' , '$Operation' , ' $operationDetail' , '$Budget' , '$budgetName' , '$Achievement' , '$achievementName' , '$Average' , '$numberGroup' , '$Number' , '$budgetUse' ,' $budgetMa' ,' $budgetIn' , '$budgetInName' , '$Faculty_code' , '$Filetex1' , '$Filetex2' ) ";
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*------- ตารางบุคลากรเข้าร่วมโครงการทำนุบำรุง----------------*//
function
InsertOutActivity ( $activityId ,$Teacher_code )
{
global $conn;
$sql ="INSERT INTO edu_activteacher ( activityId , Teacher_code ) " ;
$sql = $sql. " VALUE ( '$activityId' ,'$Teacher_code' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
function
UpdateOutActivity( $activityId ,$Teacher_code )
{
global $conn;
$sql =" UPDATE edu_activteacher SET activityId='$activityId' ,Teacher_code='$Teacher_code' ";
$sql =$sql. "WHERE activityId = '$activityId' and activId ='$activId' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*------ตารางนักศึกษาเข้าร่วมโครงการทำนุบำรุง----------*//
function
InsertInstudentId ($activityId ,$studentId )
{
global $conn;
$sql ="INSERT INTO edu_activstudent (activityId , studentId) " ;
$sql =$sql. "VALUE ('$activityId' ,'$studentId' )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*------ตารางเครื่องมือวัสดุครุภัณฑ์----------*//
function
InsertAccDuraDent( $Date,$studentCode, $Faculty_code,$Acc_code, $Acc_name,$Acc_type_code,$AccId ,$Budget_year )
{
global $conn;
$sql ="INSERT INTO durable_student (Date, studentCode, Faculty_code, Acc_code, Acc_name, Acc_type_code, AccId , Budget_year, add_updated ) " ;
$sql =$sql. "VALUE ( '$Date' , '$studentCode' , '$Faculty_code' ,'$Acc_code','$Acc_name' , '$Acc_type_code' , '$AccId' , '$Budget_year' , NOW() )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*--------ตารางพัสดุ---------------------------*/
function
InsertFormSupplie ( $Date, $maNo ,$Faculty_code, $Objective , $Teacher_code, $sell_id, $Reason , $Day, $proId, $ProjectId, $procId, $MoneyS_C , $Budget_Year , $Budget_use , $Howsupplie, $Amountotal ,$Vat , $sumTotal ,$status )
{
global $conn;
$sql ="INSERT INTO formsupplie (Date, maNo , Faculty_code, Objective ,Teacher_code, sell_id, Reason , Day, proId, ProjectId, procId ,MoneyS_C , Budget_Year , Budget_use , Howsupplie, Amountotal ,Vat , sumTotal ,status )";
$sql = $sql. "VALUE ( '$Date', '$maNo' , '$Faculty_code' , '$Objective' , '$Teacher_code', '$sell_id', '$Reason' , '$Day' , '$proId' , '$ProjectId' , '$procId' , '$MoneyS_C' , '$Budget_Year' , '$Budget_use' , '$Howsupplie' , '$Amountotal' , '$Vat' , '$sumTotal' ,'$status' )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*--------ตารางรายการพัสดุ---------------------------*//
function
InsertFormTypeSupplie($suppId , $supplieName , $Number, $Unit, $Price, $Amount )
{
global $conn;
$sql = "INSERT INTO formsupplie_type (suppId , supplieName , Number, Unit, Price, Amount ,Datepurc ) ";
$sql = $sql. "VALUE ('$suppId' , '$supplieName' , '$Number', '$Unit' , '$Price' , '$Amount' ,NOW() )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*-----------ตารางการใช้เงินตามแผนโครงการ--------------//*
function
InsertFormProject( $Teacher_code, $code, $Orderlist, $Project_plan, $ProjectId, $Date,$Training_name, $Year_std, $TeacherId, $Flag ,$Flag1, $Flag2, $Budget_use, $Spending_use , $proNo , $date_updated )
{
global $conn ;
$sql ="INSERT INTO formproject ( Teacher_code, code, Orderlist, Project_plan, ProjectId, Date,Training_name, Year_std, TeacherId, Flag ,Flag1, Flag2, Budget_use, Spending_use , proNo , date_updated )";
$sql = $sql. " VALUES ( '$Teacher_code' , '$code' , '$Orderlist' , '$Project_plan' , '$ProjectId' , '$Date' , '$Training_name' , '$Year_std' , '$TeacherId', '$Flag' ,'$Flag1', '$Flag2', '$Budget_use', '$Spending_use' ,'$proNo', NOW() ) " ;
mysql_query($sql) or die ("$sql Insert has incorrect".mysql_error());
}
//*------- ตารางกรรมการพัสดุ----------------*//
function
InsertSupplieTeacher($suppId, $Typework , $Teacher_code , $Duty )
{
global $conn;
$sql ="INSERT INTO res_project_tb ( suppId, Typework , Teacher_code , Duty) " ;
$sql = $sql. " VALUE ('$suppId' , '$Typework' , '$Teacher_code' , '$Duty' ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
function
UpdateSupplieTeacher($suppId, $Typework, $Teacher_code , $Duty)
{
global $conn;
$sql =" UPDATE res_project_tb SET Typework = '$Typework' , suppId='$suppId' , Teacher_code='$Teacher_code', Duty = '$Duty' ";
$sql =$sql. "WHERE suppId = '$suppId' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*--------------------------*/
function
InsertPurchase ( $suppId, $purchaseNo , $Date , $priceSupplie ,$Day , $Datepur , $Mount, $Budget_Year )
{
global $conn;
$sql ="INSERT INTO formpurchase ( suppId, purchaseNo , Date , priceSupplie ,Day , Datepur , Mount, Budget_Year ,date_updated ) " ;
$sql = $sql. " VALUE ( '$suppId' , '$purchaseNo' , '$Date' , '$priceSupplie' ,'$Day' , '$Datepur' , '$Mount' , '$Budget_Year' , NOW() ) " ;
mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
//*--------ตารางรายการพัสดุ---------------------------*//
/* function
InsertaccSupplie($suId , $supplieCode, $suppId ,$NameSupplie , $Number, $Unit, $Price, $subStatus, $Acc_type_code ,$Date , $Faculty_code )
{
global $conn;
$sql = "INSERT INTO accesssupplie (suId , supplieCode, suppId ,NameSupplie , Number, Unit, Price, subStatus , Acc_type_code ,Date ,Faculty_code ) ";
$sql = $sql. "VALUE ('$suId' , '$supplieCode' , '$suppId' , '$NameSupplie' , '$Number', '$Unit' , '$Price' , '$subStatus', '$Acc_type_code' ,'$Date','$Faculty_code' )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
function
UpdateaccSupplie($suId , $supplieCode, $suppId ,$supplieName , $Number, $Unit, $Price, $subStatus, $Acc_type_code)
{
global $conn;
$sql =" UPDATE accesssupplie SET suId='$suId' , supplieCode='$supplieCode' , suppId='$suppId' , supplieName='$supplieName' , Number='$Number', Unit='$Unit' , Price='$Price' , subStatus='$subStatus', Acc_type_code='$Acc_type_code' ";
$sql =$sql. "WHERE suppId = '$suppId' and suId='$suId' ";
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*-----------ตารางวัสดทั่วไป-------------------------*/
function
InsertWasteSupplie($suId , $suppId, $supplieCode, $NameSupplie, $Number ,$Unit )
{
global $conn;
$sql = "INSERT INTO accesssupplie (suId , suppId, supplieCode, NameSupplie, Number,Unit, Date ) ";
$sql = $sql. "VALUE ('$suId' , '$suppId', '$supplieCode' , '$NameSupplie' , '$Number', '$Unit',NOW() )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*-----------ตารางรับจ่ายพัสดุ-------------------------*/
function
InsertWaste ($assuId , $suId , $suppId, $Type , $userNum , $fasuId, $Date )
{
global $conn;
$sql = "INSERT INTO accesssupplie_tb (assuId ,suId , suppId, Type , userNum , fasuId, Date) ";
$sql = $sql. "VALUE ( '$assuId' , '$suId' , '$suppId' , '$Type' , '$userNum' , '$fasuId' , NOW() )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*-----------ตารางเบิกจ่ายพัสดุ-------------------------*/
function
InsertWasteAcount ( $supcrId, $assuId , $suId , $userDr , $userCr , $sumTotal ,$SubCode ,$AccountPage, $Date )
{
global $conn;
$sql = "INSERT INTO accesssuppliecadit (supcrId, assuId , suId ,userDr , userCr , sumTotal , SubCode ,AccountPage ,Date ) ";
$sql = $sql. "VALUE ( '$supcrId' , '$assuId' , '$suId' , '$userDr' , '$userCr' , '$sumTotal' , '$SubCode' , '$AccountPage' , NOW() )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*-----------ตารางเบิกจ่ายพัสดุ-------------------------*/
function
InsertFormWasteCr( $Date , $maNo , $billNo , $Faculty_code , $Day , $NameDetail , $Teacher_code , $Budget_Year , $Budget_use )
{
global $conn;
$sql = "INSERT INTO formsuppliecadit (Date , maNo , billNo , Faculty_code , Day , NameDetail, Teacher_code , Budget_Year , Budget_use ) ";
$sql = $sql. "VALUE ( '$Date' , '$maNo' , '$billNo' , '$Faculty_code' , '$Day' , '$NameDetail' , '$Teacher_code' , '$Budget_Year' , '$Budget_use' )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
/*------------------ตารางคลังพัสดุ------------------*/
function
InsertStockpile ($SupplieCago, $Faculty_code )
{
global $conn;
$sql = "INSERT INTO facultysupplie ( SupplieCago, Faculty_code ) ";
$sql = $sql. "VALUE ( '$SupplieCago' , '$Faculty_code' )" ;
mysql_query ($sql) or die ("$sql Insert has incorrect".mysql_error());
}
?>
|