403Webshell
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/sport/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/gpa/sport/cutgrade.php
<?
require_once "../config/confiteacher.inc.php";
?>



<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=tis-620">

<title>ฝ่ายบริหารงานวิชาการ</title>

</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 transcripsactivi SET ";
		$strSQL .="gradeac = '".$_POST["txtgradeac$i"]."' ";
		$strSQL .="WHERE idacti = '".$_POST["hdnid$i"]."' ";
		
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$sql2="SELECT years FROM config";
$result2 = mysql_query($sql2);
while (list($years) = mysql_fetch_row($result2)) {
$xsc_years = $years;
$strSQL = "SELECT * FROM teacher LEFT JOIN transcriptintall ON
 teacher.teachcode=transcriptintall.teachin JOIN klw ON klw.Username=transcriptintall.idstin WHERE codin = '$_GET[id]' and dayin = '$_GET[dayin]' and timeins = '$_GET[timeins]' and teachin='$_GET[teachin]'  order by room+1 asc,ordinal asc";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$i = 1;

}





?>
<table width="773" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="198"><a href="regis.php"><font color="#FF0000" size="2">หน้าหลัก</font></a>
				  
				  
				  </td>
                  <td width="575"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                     <form method="post" action="stat1.php"> <tr> 
                        <td><div align="center"><font color="#666666" size="2">ค้นหา 
                            : 
                            <input type=text name=txtsearch size=20 class=input>
                            <input name="searchtype" type="radio" value="room" checked>ห้อง
                              <input name="searchtype" type="radio" value="IDstudent" checked>รหัสนักเรียน
							<input name="Submit" type="submit" class="submitad" value="ค้นหา">
                            </font> </div></td>
                      </tr></form>
                    </table></td>
                </tr>
              </table>
<form name="frmMain" method="post" action="savegrade.php?Action=Save">
<table  width="100%" border="0" bgcolor="#999999">
 <center><font size='3' color='red'>กด SAVE เท่านั้น</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="10"> <div align="center">code</div></th>
	 <th width="100"> <div align="center">Name</div></th>
    <th width="10"> <div align="center">100</div></th>
	<th width="10"> <div align="center">Grade</div></th>
	<th width="10"> <div align="center">K</div></th>
	<th width="10"> <div align="center">R</div></th>
	
	

  </tr>
<?
$i =0;

while($objResult = mysql_fetch_array($objQuery))

{
if($bg == "#EEEEEE") { //ส่วนของการ สลับสี 
$bg = "#FFFFFF";
} else {
$bg = "#EEEEEE";
}

	$i = $i + 1;
	$scor1 =$objResult["scor1"];
	$scor2 =$objResult["scor2"];
	$scor3 =$objResult["scor3"];
	$unit=$scor1+$scor2+$scor3;
	$mid =$objResult["mid"];
	$final =$objResult["final"];
$room =$objResult['room'];
$ordinal =$objResult['ordinal'];

?>
  <tr bgcolor="<?=$bg?>">
    <td><div align="center">
	<input type="hidden" name="hdnid<?=$i;?>" size="5" value="<?=$objResult["idin"];?>">
	 <td><?=$i?></td>
	<td><div align="right"><?=$objResult["idstin"];?>
	</div></td>
	<td><div align="right"><?=$objResult["codin"];?>
	</div></td>
   

	
	<td><div align="right"><?=$objResult["Name"];?>&nbsp;&nbsp;<?=$objResult["surname"];?>&nbsp;&nbsp;<? echo "$room"; ?></div></td>
                                        

	<?

$total2=$objResult["total2"];
?>
    
	
	<td><?=$objResult["total2"];?></td>
	
	<td><input type="text" name="grade2<?=$i;?>" size="3" maxlength="2" readonly="readonly" value="
<? 

if($total2 == "")
 {
   echo "";
 }
 else if($total2 == -1)
 {
   echo "ร";
 }
 else if($total2 < 50)
 {
   echo "0";
 }
 else if($total2 < 55)
 {
   echo "1";
 }
 else if($total2 < 60)
 {
   echo "1.5";
 }
  else if($total2 < 65)
 {
   echo "2";
 }
 else if($total2 < 70)
 {
   echo "2.5";
 }
  else if($total2 < 75)
 {
   echo "3";
 }
 else if($total2 < 80)
 {
   echo "3.5";
 }
 else if($total2 >79)
 {
   echo "4";
 }
 else
 {
   echo "มส";
 }
?>
" >
</td>




<td><input type="text" name="k2<?=$i;?>" size="3" maxlength="2" value="

<? if($total2 < 59)
 {
   echo "1";
 }
 else if($total2 < 69)
 {
   echo "2";
 }
 else
 {
   echo "3";
 }
?>
" >
</td>


<td><input type="text" name="r2<?=$i;?>" size="3" maxlength="2" value="

<? if($total2 < 59)
 {
   echo "1";
 }
 else if($total2 < 69)
 {
   echo "2";
 }
 else
 {
   echo "3";
 }
?>
" >
</td>






  </tr>
<?
	  $i = $i;
  }
  ?>
</table>
  <input type="submit" name="submit" value="SAVE">
  <input type="hidden" name="hdnLine" value="<?=$i;?>">
</form>
<?
?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit