!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/manage/includes/   drwxr-xr-x
Free 50.99 GB of 127.8 GB (39.9%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     FunctionDB2.php (101.18 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

include("./configuration.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 :: $_Config_REGDBHost, $_Config_REGDBUser, $_Config_REGDBPass, $_Config_REGDBName :: ".mysql_error());

    
mysql_query("SET NAMES 'tis620'");

    
mysql_select_db($_Config_REGDBName) or die ("Can't Select DataBase REGDB");

}

///////////////////////      Uses Close DB   ////////////////////////////

function CloseDB()

{

    global 
$con;

    
mysql_close($con);

}

/////////////////////////////  * 1 * InsertTreat  //////////

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());

}

///////////////////////////////////////////////////// **  2  ** ////////////////

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());

}
///////////////////////////////////////////////////// InsertFormation /////////////////////////
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());
}
///////////////////////////////////////////////////// **  2  ** ////////////////
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());

}

/////////////////////////////////////////////////////  **  4 **  ///////////////////////

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());

}

/////////////////////////////////////////////////// ** 5 **  ///////////////////////

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());

}

///////////////////////////////////////////////////// ** 6 ** /////////////////////

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());

}

///////////////////////////////////////////////////// * * 7 * * /////////////////////////

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());

}

//////////////////  * * 8 * *  Insert Person ทันตกรรม /////////

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());

    }

    
//////////////////  * * 8 * *  Insert Personal Health Database//////////

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());

    }

    
///////////////////////  * * 9 * *  InsertTeachPlan ////////////////////////////

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());

}

/////////////// * * * 10 **  InsertAccount  * * * /////

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());

}

/////////////// * * * 11 * * InsertPlanTeach  * * * /////

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());

}

/////////////////////////////  InsertCommit   //////////

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());

}

/////////////////////////////////////////////////////   InsertEdu_Service  //////////
     
function  InsertEdu_Service($Project_name,$Faculty_code,$Date_start,$Date_finish,$Date_in,$Date_out,$Term,$Res,$Detail,$Year_budget,$Budget,$Budget_use,$Target_group,$Objective,$Fund_support ,$Fee,$Response,$Total_time_project ,$Total_time_insi ,$Total_time_inso,$Dif_result,$Result_oper,$Img1)
{
   global 
$conn;
   
$sql "INSERT INTO  edu_service_tb (Project_name,Faculty_code,Date_start,Date_finish,Date_in,Date_out,Term,Res,Detail,Year_budget,Budget,Budget_use,Target_group,Objective,Fund_support, Fee,Response,Total_time_project ,Total_time_insi ,Total_time_inso,Dif_result,Result_oper,Img1)";
   
$sql $sql."VALUES ('$Project_name','$Faculty_code','$Date_start','$Date_finish','$Date_in','$Date_out','$Term','$Res','$Detail','$Year_budget','$Budget','$Budget_use','$Target_group','$Objective','$Fund_support' ,'$Fee','$Response','$Total_time_project','$Total_time_insi' ,'$Total_time_inso','$Dif_result','$Result_oper','$Img1')" ;
   
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
///////////////////////////////////////////////////  Insert_Res_project ///////////////

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());

}

///////////////////////////////////////////////////    CHECK PLANT CODE  /////////////

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);

}

////////////////////////////////////// Check Research Code  /////////////////

function UpdateLimit($Id4)

{

    global 
$conn;

    
$strSQL "UPDATE limittb SET Id4=Id4+1 ";

    
$result mysql_query($strSQL) or die("$result $strSQL".mysql_error());

}

///////////////////////  Insert Personal History To Database  /////////////////////

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());

}

///////////////////////  Insert Personal  Poisiton History To Database  ///////////////

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());

}
///////////////////////  InsertSalaryType To Database  ///////////////

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());

}
////// /////////////// Insert_Salary//////////
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());

}

///////// Insert_Salary_repot //////

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());
         }
////////////////////// Insert Personal Research  ////////////////////
/*
function  
InsertResearch($Teacher_code,$Branch,$Research_name,$Research_type,$Research_char,$R_position,$Research_st,$name1,$name2,$name3,$name4,$name5,$name6,$name7,$name8, $Year_start,$Year_finish,$Fund,$FundIn,$FundOut,$FundUse,$Fund_resource,$Resource_des,$Propagate,$Propagate_des, $Prop_type,$Prop_type1,$Prop_type2,$Prop_type3,$Apply1,$Apply2,$Apply3, $Apply4,$Apply_des,$Year_prop,$abbStract,$r_type,$academic_year,$fiscal_year,$academic_year_finish,$fiscal_year_finish)
{
   global $conn;
   $sql = "INSERT INTO research_tb (Teacher_code,Branch,Research_name,Research_type,Research_char,R_position,Research_st,name1,name2,name3,name4,name5,name6,name7,name8,Year_start,Year_finish,Fund,FundIn,FundOut,FundUse,Fund_resource,Resource_des,Propagate,Propagate_des,Prop_type,Prop_type1,Prop_type2,Prop_type3,Apply1,Apply2,Apply3,Apply4,Apply_des,Year_prop,abbStract,r_type,academic_year,fiscal_year,academic_year_finish,fiscal_year_finish)";
    $sql = $sql."VALUES('$Teacher_code','$Branch','$Research_name','$Research_type','$Research_char','$R_position','$Research_st','$name1','$name2','$name3','$name4','$name5','$name6','$name7','$name8','$Year_start','$Year_finish','$Fund','$FundIn','$FundOut','$FundUse','$Fund_resource','$Resource_des','$Propagate','$Propagate_des','$Prop_type','$Prop_type1','$Prop_type2','$Prop_type3','$Apply1','$Apply2','$Apply3','$Apply4','$Apply_des','$Year_prop','$abbStract','$r_type','$academic_year','$fiscal_year','$academic_year_finish','$fiscal_year_finish')" ;
      mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());
}
*/
////////////////    InsertProject_edu   ///////////////////
 
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());
}
//////////////////////// Eduction Project //////////////////
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());

}

////////////////////// insert Decoration 's teacher

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());

}

/////////////////// InserAbsent ////////////////////////////////

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());

}

/////////////////// InserAddAbsent ////////////////////////////////

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());

}

//////////////     Insert Course ////////////////////////

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());

}

//////////////     Insert Subject ////////////////////////

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());

}

///////////////////////  Insert Training /////////////////////*/

function InsertTraining ($Teacher_code,$Training_name,$Period_code,$Training_type,$Level,$Major,$Year_std,$Place,$Place_des,$Date_start,$Date_finish,$CNEU,$Total_hour,$Fund,$Budget_use,$Fund_resource$Organiz,$Date_send,$Period_prop,$Apply)

{

   global 
$conn;

   
$sql "INSERT INTO training_tb (Teacher_code,Training_name,Period_code,Training_type,Level,Major,Year_std,Place,Place_des,Date_start,Date_finish,CNEU,Total_hour,Fund,Budget_use,Fund_resource,Organiz,Date_send,Period_prop,Apply)";

   
$sql $sql."VALUES('$Teacher_code','$Training_name','$Period_code' ,'$Training_type','$Level','$Major','$Year_std','$Place','$Place_des','$Date_start','$Date_finish','$CNEU','$Total_hour','$Fund','$Budget_use','$Fund_resource','$Organiz','$Date_send','$Period_prop','$Apply')" ;

   
mysql_query($sql) or die("$sql Insert has incorrect".mysql_error());

}

/////////////// Insert Media  /////

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());

}

//////////// Insert Information to Home Page

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());

}


//////////// InsertComment  /////////////////

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());

}
///////////////  Insert Production   //////////////////
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());
}

///////////////  Insert Teacher List   //////////////////

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());

}

//////////////// Insert  Seminar   //////////////

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());

}
///////////////////////// Document_tb  /////////////////
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());
}

///////////////////  Insert Eech room to Building///////////////
Function    InsertRoom($BuildD_No,$Room_type,$Room_code,$Room_name,$Size,$Area,$Img1,$Eletric_meter)
{
   global 
$conn;
   
$sql "INSERT INTO room_tb (BuildD_No,Room_type,Room_code,Room_name,Size,Area,Img1,Eletric_meter)";
    
$sql $sql."VALUES('$BuildD_No','$Room_type','$Room_code','$Room_name','$Size','$Area','$Img1','$Eletric_meter')" ;
      
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());

}

////////////////////////////////////////////////////////////  InsertInstructor  //////

   
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());

}

//////////////////////// insert magazine to database//////////

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());

}

//////////////////////// insert Activity to database//////////

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());

}

/////////////////////// insert Scholarship //////////////////

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());

}

////////////////----   Insert  Student Data ---//////     First_name  Name  Lastname  Sex  BirthDate  Religion  Address  

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());

}

//////////////////////// Record Opinion 's Employer 

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());

}

////////////////  Insert Subject Group 

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());

}

////////////// Insert Subject Category

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());

}

////////////// Insert Faculty

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());

}

////////////// Insert Faculty

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());

}

////////////// Insert Pi -CRI For QA Topic and Detail

    
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());
}
////////////// Insert Method teach Plan  and Specification Teah Plan

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());

}

////////////////////////////////////  InsertMan  /////////

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());

}

////////////////////////////////////  InsertManage  /////////

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());

}

// ////////////  InserBook  ///////////

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());

}
// ////////////  InserPerson  ///////////

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());

}
///////////////////  InsertAcc  ////////

function 

    
InsertAcc($Dura$Acc_code,$Acc_no,$Acc_name,$Acc_module,$Acc_type_code,$MoneyS_C$Fix_detail$Date_buy$Date_finish$Year$Price$Fund $Faculty_code$RoomId ,$Statistic$In_document ,$Price_document $Modify_detail ,$Modify_document ,  $Name $Address$Phone$Img1,$date_updated)

{

   
$sql "INSERT INTO accessories_tb (Dura, Acc_code,Acc_no, Acc_name, Acc_module, Acc_type_code, MoneyS_C, Fix_detail, Date_buy, Date_finish,  Year , Price, Fund , Faculty_code, RoomId ,Statistic, In_document , Price_document , Modify_detail , Modify_document, Name ,Address, Phone, Img1, date_updated)";

   
$sql $sql."VALUES ('$Dura','$Acc_code','$Acc_no','$Acc_name','$Acc_module','$Acc_type_code','$MoneyS_C','$Fix_detail','$Date_buy', '$Date_finish','$Year','$Price','$Fund' , '$Faculty_code', '$RoomId' ,'$Statistic','$In_document' ,'$Price_document' , '$Modify_detail' , '$Modify_document', '$Name' , '$Address', '$Phone', '$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());

}

////////////////////////// 

//code  Project_name  Objective  Target  Period  Budget  Budget_use  Dif_result  Fund_resource  Director  Join_co  Join_type  Result_oper  

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  InsertEs($code,$Ec41_1,$Ec41_2 ,$Ec41_3,$Ec41_4,$Ec41_5,$Ec41_6,$Ec41_7,$Ec41_8)

{

  global $conn;

  $sql = "INSERT INTO std_ec_tb (code,Ec41_1,Ec41_2 ,Ec41_3,Ec41_4,Ec41_5,Ec41_6,Ec41_7,Ec41_8)";

  $sql = $sql."VALUES('$code','$Ec41_1','$Ec41_2 ','$Ec41_3','$Ec41_4','$Ec41_5','$Ec41_6','$Ec41_7','$Ec41_8')";

   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());

}

//////////////     Insert User  ..//////

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());

}

//////////////////// insert 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());
}
///////////////  **-ตารางราคา**  tInsertThprice  /////////
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());
}
 
//////////////**** InsertFormA  ******* FormAoffice*////////////
   
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()); 
          }

//////////////**** InsertFormCar  ******* FormAoffice*////////////
   
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());  
}
//*---------  research_tb  ----------*///
         
function 
           
InsertResearch$collegeCode $Research_name $Branch $Research_type $Research_char $Research_char_else$Year_prop $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 )
{
   global 
$conn;     $sql "INSERT INTO   research_tb   (collegeCode , Research_name , Branch ,Research_type , Research_char , Research_char_else, Year_prop , 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)";
              
$sql $sql." VALUES  ('$collegeCode' , '$Research_name' , '$Branch' , '$Research_type' , '$Research_char' , '$Research_char_else', '$Year_prop' , '$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')" ;
      
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 )
                    {
                        global 
$conn;  $sql " INSERT   INTO   research_success_tb   ( Research_code , collegeCode ,Success  ,Knowledge ) " ;
                        
$sql $sql"VALUES ('$Research_code', ' $collegeCode' ,'$Success'  , '$Knowledge') "
                        
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,$prefixName,$studentName,$studentSurname,$Date$NotebookCode,$notebookName,$MaxAddress,$date_updated){
        global  
$conn
        
$sql =" INSERT  INTO  stu_notebook  (studentCode,prefixName,studentName,studentSurname,Date, NotebookCode,notebookName,MaxAddress,date_updated)";
        
$sql $sql"VALUES ('$studentCode','$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$ProjectId $indId $AcademicYear
           {
               global  
$conn;
               
$sql =" INSERT   INTO   projectqa_type_tb  ( indica_code, ProjectId , indId , AcademicYear )  ";
               
$sql =$sql"VALUE  ('$indica_code' , '$ProjectId', '$indId' ,'$AcademicYear' ) ";
               
mysql_query ($sql)  or  die  ("$sql  Insert  has  incorrect".mysql_error());
           }
           
                
//*-----------ตารางผลคะแนนการประเมิน  qa_result_tb  -----------------*//
           
            
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());
           }
           
             
//*-----------ตาราง qa_performance-----------------*//
            
             
function
                 
InsertPerformance$indId $elemId$Teacher_code$Teacher_code1$AcademicYear$Detailperformance $Development 
           {
               global  
$conn;
               
$sql =" INSERT   INTO    qa_performance  ( indId , elemId, Teacher_code, Teacher_code1, AcademicYear, Detailperformance , Development, date_updated)  ";
               
$sql =$sql"VALUE  ('$indId' , '$elemId', '$Teacher_code', '$Teacher_code1', '$AcademicYear', '$Detailperformance' , '$Development',NOW() ) ";
               
mysql_query ($sql)  or  die  ("$sql  Insert  has  incorrect".mysql_error());
           }
           
           
//*-----------ตาราง qa_report_tb   -----------------*//
            
             
function
                
InsertReportIndictor($ProjectId$indId,$AcademicYear,$OrderNo $Report_name 
            {
               global  
$conn;
               
$sql =" INSERT   INTO   qa_report_tb ( ProjectId, indId, AcademicYear, OrderNo , Report_name, date_updated)  ";
               
$sql =$sql"VALUE  ( '$ProjectId' , '$indId' , '$AcademicYear' , '$OrderNo' , '$Report_name', NOW() ) ";
               
mysql_query ($sql)  or  die  ("$sql  Insert  has  incorrect".mysql_error());
           }
           
            
//* --------------------- ตาราง project_report_tb--------------*//
               
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 ,$Budget_total$Faculty_code,$MoneyS_C$MoneyId$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 ,Budget_total, Faculty_code, MoneyS_C, MoneyId, date_updated )  " ;
            
$sql =$sql"VALUE ('$ProjectId ', '$Date' , '$upNo' , '$Training_name' , '$Orderlist' , '$Project_plan' , '$Budget' , '$nameDetail', '$Teacher_code' , '$Month' , '$Budget_Year', '$Year_std' , '$Budget_total ', '$Faculty_code' , '$MoneyS_C' , '$MoneyId' ,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());
                 
              }
                  
                    
/*-------  ตารางผลการเรียนรู้ ss-----------------*/
       
          
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()) ;
            
            }
  
?>  
  

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0214 ]--