Viewing file: InsertResult.php (5.45 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");
ConnectDB();
$Flag = true;
$Stand_code = htmlspecialchars(trim($_POST[Stand_code]));
$Term = htmlspecialchars(trim($_POST[Term]));
$Times = htmlspecialchars(trim($_POST[Times]));
$S11 = trim($_POST[S11]);
$S12 = trim($_POST[S12]);
$S13 = trim($_POST[S13]);
$S14 = trim($_POST[S14]);
$S15 = trim($_POST[S15]);
$S16 = trim($_POST[S16]);
$S17 = trim($_POST[S17]);
$S18 = trim($_POST[S18]);
$S19 = trim($_POST[S19]);
/////////////////////////
$S21 = trim($_POST[S21]);
$S22 = trim($_POST[S22]);
$S23 = trim($_POST[S23]);
$S24 = trim($_POST[S24]);
$S25 = trim($_POST[S25]);
$S26 = trim($_POST[S26]);
$S27 = trim($_POST[S27]);
$S28 = trim($_POST[S28]);
$S29 = trim($_POST[S29]);
$S210 = trim($_POST[S210]);
//////////////////////
$S31 = trim($_POST[S31]);
$S32 = trim($_POST[S32]);
$S33 = trim($_POST[S33]);
$S34 = trim($_POST[S34]);
$S35 = trim($_POST[S35]);
$S36 = trim($_POST[S36]);
///////////////////////
$S41 = trim($_POST[S41]);
$S42 = trim($_POST[S42]);
$S43 = trim($_POST[S43]);
$S44 = trim($_POST[S44]);
$S45 = trim($_POST[S45]);
$S46 = trim($_POST[S46]);
/////////////////////////
$S51 = trim($_POST[S51]);
$S52 = trim($_POST[S52]);
$S53 = trim($_POST[S53]);
$S54 = trim($_POST[S54]);
$S55 = trim($_POST[S55]);
//////////////////////////
$S61 = trim($_POST[S61]);
$S62 = trim($_POST[S62]);
////////////////////////
$S71 = trim($_POST[S71]);
$S72 = trim($_POST[S72]);
$S73 = trim($_POST[S73]);
$S74 = trim($_POST[S74]);
$S75 = trim($_POST[S75]);
$S76 = trim($_POST[S76]);
$S77 = trim($_POST[S77]);
$S78 = trim($_POST[S78]);
$S79 = trim($_POST[S79]);
$S710 = trim($_POST[S710]);
$S711 = trim($_POST[S711]);
$S712 = trim($_POST[S712]);
///////////////////////////
$S81 = trim($_POST[S81]);
$S82 = trim($_POST[S82]);
/////////////////////////////
$S91 = trim($_POST[S91]);
$S92 = trim($_POST[S92]);
$S93 = trim($_POST[S93]);
$S94 = trim($_POST[S94]);
$S95 = trim($_POST[S95]);
$S96 = trim($_POST[S96]);
$S97 = trim($_POST[S97]);
$S98 = trim($_POST[S98]);
////////////////////////////////////
$sql = "Select * From qa_result_tb Where Trem='$Term' And Times='$Times'" ;
$result = mysql_query($sql) or die("Error".mysql_error());
$row = mysql_num_rows($result);
if ($row >= 1)
{
$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 period time long or short
if ($Term =="")
{
$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 period time long or short
if ($Times =="")
{
$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 Address
if( $Flag)
{
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);
$msg.="<li>ระบบจัดเก็บข้อมูลเรียบร้อยแล้ว";
echo"<meta http-equiv=\"refresh\" content=\"2;URL=ResultList.php\">\n";
}
CloseDB();
?>
<html>
<head>
<title>Inserting Q.A Result </title>
<link rel="stylesheet" href="../../css/style1.css" type="text/css">
<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" leftmargin="0" topmargin="0"marginwidth="0"marginheight="0">
<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">::ฟอร์มการเพิ่มข้อมูล
Q.A Result::</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="#006633"> <div align="center"><b><font color="#CCFF00" 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"><strong><font size="3" face="Tahoma"><span><?php echo $msg;?></span></font></strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#006633"> <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 ";
}
?>
|