| Server IP : 61.19.30.66 / Your IP : 216.73.216.59 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/gpa/ |
Upload File : |
<?
require_once "config/confiteacher.inc.php";
require_once "head.php";
$teach=$objResult["teachcode"];
?>
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=tis-620">
<meta http-equiv="refresh" content="1; url=javascript:history.go(-2)">
</head>
<title>ฝ่ายบริหารงานวิชาการ</title>
<script language="JavaScript" type="text/JavaScript">
function check_key_number() {
use_key=event.keyCode
if (use_key != 13 && (use_key < 48) || (use_key > 57)) {
event.returnValue = false;
}
}
</script>
</head>
<body>
<?
require_once "config/connectdb.php";
$year=date(" Y ")+542;
//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
for($i=1;$i<=$_POST["hdnLine"];$i++)
{
$strSQL = "UPDATE klw SET ";
$strSQL .="v2 = '".$_POST["v2$i"]."' ";
$strSQL .=",v3 = '".$_POST["v3$i"]."' ";
$strSQL .=",v4 = '".$_POST["v4$i"]."' ";
$strSQL .=",v5 = '".$_POST["v5$i"]."' ";
$strSQL .=",v6 = '".$_POST["v6$i"]."' ";
$strSQL .=",comteach =$teach ";
$strSQL .="WHERE UserID = '".$_POST["hdnid$i"]."' ";
$objQuery = mysql_query($strSQL);
}
//header("location:competclasssavetotal1.php]");
exit();
}
$sql2="SELECT years FROM config";
$result2 = mysql_query($sql2);
while (list($years) = mysql_fetch_row($result2)) {
$xsc_years = $years;
$strSQL = "SELECT * FROM klw where cllass='$_GET[cllass]' and room= '$_GET[id]' order by ordinal+1 asc";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$i = 1;
}
$c1=1;
$c2=2;
$c3=3;
?>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><div align="right"><font color="#ff0000" size="2"><font color="#333333">ยินดีต้อนรับ
<?=$objResult["name"];?> :</font> <font color="#ff0000"><? echo "$teach";?>
<font color="#666666">เข้าสู่ระบบค่ะ </font></font></font></div></td>
</tr>
<tr>
<td><div align="right"><font color="#666666" size="2">
| <a href="main.php">หน้าหลักระบบ</a>
| <a href="logout.php">ออกจากระบบ</a></font></div></td>
</tr>
<table width="773" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="198"><a href="javascript:history.go(-2)">ย้อนกลับ</a></font></a>
</td>
<td width="575"><table width="100%" border="0" cellspacing="1" cellpadding="1">
</table></td>
</tr>
</table>
<form name="frmMain" method="post" action="competclasssavetotal1.php?Action=Save" >
<table width="100%" border="0" bgcolor="#999999">
<center><font size='3' color='red'> หน้าแสดงแก้ไขรายคน</font></center>
<tr bgcolor="#FFFFFF">
<th width="10"> <div align="center"></div></th>
<th width="10"> <div align="center">#</div></th>
<th width="10"> <div align="center">ID Student</div></th>
<th width="120"> <div align="center">Name </div></th>
<th width="10"> <div align="center">Room/ordinal</div></th>
<th width="10"> <div align="center">แก้ปัญหา
<br>
<a href="competclasssavetotal1.php?id=<? echo "$_GET[id]"; ?>&&cllass=<? echo "$_GET[cllass]"; ?>"><? echo "$c1"; ?></a>
<a href="competclasssavetotal2.php?id=<? echo "$_GET[id]"; ?>&&cllass=<? echo "$_GET[cllass]"; ?>"><? echo "$c2"; ?></a>
<a href="competclasssavetotal3.php?id=<? echo "$_GET[id]"; ?>&&cllass=<? echo "$_GET[cllass]"; ?>"><? echo "$c3"; ?></a>
</div></th>
<th width="10"> <div align="center">การคิด</div></th>
<th width="10"> <div align="center">การแก้ปัญหา</div></th>
<th width="10"> <div align="center">ทักษะชีวิต</div></th>
<th width="10"> <div align="center">การใช้เทคโนโลยี</div></th>
</tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
if($bg == "#EEEEEE") { //ส่วนของการ สลับสี
$bg = "#FFFFFF";
} else {
$bg = "#EEEEEE";
}
$i = $i + 1;
$class=$objResult["room"];
?>
<tr bgcolor="<?=$bg?>">
<td><div align="center">
<input type="hidden" name="hdnid<?=$i;?>" size="5" value="<?=$objResult["UserID"];?>">
<td><?=$i?></td>
</div></td>
<td><?=$objResult["Username"];?></td>
<td><?=$objResult["Name"];?> <?=$objResult["surname"];?></td>
<td><?=$objResult["room"];?>/ <?=$objResult["ordinal"];?></td>
<td><input type="text" name="v2<?=$i;?>" size="3" onkeypress="check_key_number();" maxlength="1" value="1" ></td>
<td><input type="text" name="v3<?=$i;?>" size="3" onkeypress="check_key_number();" maxlength="1" value="1" ></td>
<td><input type="text" name="v4<?=$i;?>" size="3" onkeypress="check_key_number();" maxlength="1" value="1" ></td>
<td><input type="text" name="v5<?=$i;?>" size="3" onkeypress="check_key_number();" maxlength="1" value="1" ></td>
<td><input type="text" name="v6<?=$i;?>" size="3" onkeypress="check_key_number();" maxlength="1" value="1" ></td>
</tr>
<?
$i = $i;
}
?>
</table>
<input type="submit" name="submit" value="บันทึก">
<input type="hidden" name="hdnLine" value="<?=$i;?>">
</form>
</body>
</html>