Viewing file: InsertTeachPlan.php (4.59 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start(); if (session_is_registered("valid_user")) { $Username = $valid_user; include("../include/FunctionDB.php"); include("../include/Function.php"); ConnectDB(); $Flag = true; $HN_code = $_POST[HN_code]; $Person_code = $_POST[Person_code]; $Tooth_code = $_POST[Tooth_code]; $Code = $_POST[Code]; $Teacher_code = $_POST[Teacher_code]; //$No_code = htmlspecialchars(trim($_POST[No_code])); $Code = htmlspecialchars(trim($_POST[Code])); $Teach1 = htmlspecialchars(trim($_POST[Teach1])); $Teach2 = htmlspecialchars(trim($_POST[Teach2])); $Teach3 = htmlspecialchars(trim($_POST[Teach3])); $Teach4 = htmlspecialchars(trim($_POST[Teach4])); $Teach5 = htmlspecialchars(trim($_POST[Teach5])); $Teach6 = htmlspecialchars(trim($_POST[Teach6])); $Teach7 = htmlspecialchars(trim($_POST[Teach7])); $Teach8 = htmlspecialchars(trim($_POST[Teach8])); $Teach9 = htmlspecialchars(trim($_POST[Teach9])); $Teach10 = htmlspecialchars(trim($_POST[Teach10])); $Teach11 = htmlspecialchars(trim($_POST[Teach11])); $Teach12 = htmlspecialchars(trim($_POST[Teach12])); $Teach13 = htmlspecialchars(trim($_POST[Teach13])); $Teach_13 = htmlspecialchars(trim($_POST[Teach_13])); $Tooth_code1 = htmlspecialchars(trim($_POST[Tooth_code1])); $Tooth_code3 = htmlspecialchars(trim($_POST[Tooth_code3])); $Tooth_code4 = htmlspecialchars(trim($_POST[Tooth_code4])); $Tooth_code5 = htmlspecialchars(trim($_POST[Tooth_code5])); $Tooth_code6 = htmlspecialchars(trim($_POST[Tooth_code6])); $Tooth_code7 = htmlspecialchars(trim($_POST[Tooth_code7])); $Tooth_code8 = htmlspecialchars(trim($_POST[Tooth_code8])); $Tooth_code11 = htmlspecialchars(trim($_POST[Tooth_code11])); $Tooth_code12 = htmlspecialchars(trim($_POST[Tooth_code12])); $Time_in = htmlspecialchars(trim($_POST[Time_in])); $Time_out = htmlspecialchars(trim($_POST[Time_out])); $Date = $_POST[mYear]."-".$_POST[mMonth]."-".$_POST[mDate]; $Date_1 = $_POST[mYear1]."-".$_POST[mMonth1]."-".$_POST[mDate1]; $Time = htmlspecialchars(trim($_POST[Time])); $Religion = htmlspecialchars(trim($_POST[Religion]));
////////////// นำค่า id มาเพิ่มให้กับค่ารหัสสมาชิกครั้งละ1 //////// //$sql3 = "Select * From account order by Teach_id desc "; //$result3 = mysql_query($sql3) or die("Error $result3".mysql_error()); //$rss = mysql_fetch_row($result3); //$account = $rss [0] +1 ; // นำค่า id มาเพิ่มให้กับค่ารหัสสมาชิกครั้งละ1 //if($account>=100) { //$No_in = "0$account" ; //} //else { //if($account>=10) { //$No_in = "000$account" ; //} //else { //$No_in = "0000$account" ; //} //} //$No_code = "$HN_no$No_in" ; // รหัสสมาชิกเช่น ip0001 /////////////////// Check เลขที่ใบเสร็จ /////////// ///////////////////////////////// { 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); $msg.="<li>ระบบจัดเก็บข้อมูลเรียบร้อยแล้ว"; echo"<meta http-equiv=\"refresh\" content=\"1;URL=TeachList.php?Person_code=$Person_code\">\n"; } CloseDB(); ?> <html> <head> <title>Inserting Treattment</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link href="../css/style1.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF"> <form> <br> <table width="68%" border="0" cellspacing="0"cellpadding="2"align="center"> <tr> <td><div align="center"><span><b><font color="#000000" size="3" face="Tahoma">::ฟอร์มการเพิ่มข้อมูล::</font></b></span></div></td> </tr> <tr> <td> <table width="74%" border="0" cellspacing="1"cellpadding="2"align="center"bordercolor="#0B62D9" class="table"> <tr> <td bgcolor="#CCCCFF"> <div align="center"><b><font color="#003366" size="3" face="Tahoma">ระบบแจ้งการทำงาน</font></b></div></td> </tr> <tr> <td bgcolor="#000000"> <table width="90%" border="0" cellspacing="0"cellpadding="2"align="center"> <tr> <td><font color="#FFFFFF" size="3" face="Tahoma"><strong><span><?php echo $msg;?></span></strong></font></td> </tr> </table></td> </tr> <tr> <td bgcolor="#CCCCFF"> <div align="center"><b><font color="#CCFF00"><?php echo $button;?></font></b></div></td> </tr> </table> </td> </tr> </table> <br> <br> </form> </body> </html> <?php } else { echo"<meta http-equiv=\"refresh\" content=\"3;URL=../../login.php\">\n"; echo"Please Login "; } ?>
|