Viewing file: InsertSubject_g.php (3.09 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("../include/FunctionDB.php"); // Subject_code Subject_name Unit Class Total_hour Objective Detail ConnectDB(); $Flag = true; $Subject_category = htmlspecialchars(trim($_POST[Subject_category])); $Thai_name = htmlspecialchars(trim($_POST[Thai_name])); $Short_name = htmlspecialchars(trim($_POST[Short_name])); $Eng_name = htmlspecialchars(trim($_POST[Eng_name])); $Description = htmlspecialchars(trim($_POST[Description]));
///////////////////// check name if ($Thai_name =="") { $msg .="<li>กรุณาระบุ ชื่อกลุ่มวิชา ภาษาไทย"; $button ="<input type=\"button\" value=\"Back to Edit\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">"; $Flag = false; } ///////////////////// check name if ($Short_name =="") { $msg .="<li>กรุณาระบุ ชื่อย่อกลุ่มวิชา เช่น GEN,PED"; $button ="<input type=\"button\" value=\"Back to Edit\" onclick=\"history.back();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">"; $Flag = false; }
///////////////////////// Check Status to Insert Data ///////////////////////////// if( $Flag) { InsertSubject_group($SubCate_code,$Eng_name,$Short_name,$Thai_name,$Description); $msg.="<li>ระบบจัดเก็บข้อมูลเรียบร้อยแล้ว"; $button = "<input type=\"reset\" value=\"Close Windows\" onclick=\"javascript:parent.close();\" style=\"font-weight:bold;color:#FFF;background-color:#036;border-style:outset;border-color:#69F;font-family:Tohoma;\">"; echo"<center><font face=\"Ms San serif\"size=\"6\" color=\"#FF0000\">Complete</font></center>"; echo"<meta http-equiv=\"refresh\" content=\"1;URL=Sub_groupList.php\">"; } CloseDB(); ?> <html> <head> <title>Insert Subject Group....</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link rel="stylesheet" href="file:///C|/Apache2/htdocs/Btech/Subject/cart4.css" type="text/css"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"marginwidth="0"marginheight="0"> <form> <br> <table width="70%" border="0" cellspacing="0"cellpadding="2"align="center"> <tr> <td><div align="center"><span><b><font color="#003399" size="4" face="Tahoma">::แบบฟอร์มการกรอกข้อมูลกลุ่มวิชา::</font></b></span></div></td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="1"cellpadding="0"align="center"bordercolor="#0B62D9" class="table"> <tr> <td bgcolor="#BCDBEB"> <div align="center"><b><font color="#000000" size="4" face="Tahoma">ระบบแจ้งการทำงาน</font></b></div></td> </tr> <tr> <td bgcolor="#000000"> <table width="90%" border="0" cellspacing="0"cellpadding="2"align="center"> <tr> <td><span><b><font color="#FFFFFF"><?php echo $msg;?></font></b></span></td> </tr> </table> </td> </tr> <tr> <td bgcolor="#BCDBEB"> <div align="center"><b><font color="#CCFF00"><?php echo $button;?> <font size="2" face="Tahoma"></font></font></b></div></td> </tr> </table> </td> </tr> </table> <br> </form>
</body> </html>
|