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 :  E:/Inetpub/www/news/elearning/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/news/elearning/admin/exams_results.php
<?php
require '../configs/app_top.php';
if(!is_admin_logged_in()) { redirect(generate_admin_link("login")); exit;}

$title = "ผลการสอบ";

$idadmin=$_SESSION["admin_id"];
$admin=$_SESSION["adm_username"];

$sql1 = "select count(*) as count FROM " . TBL_SUBJECTS . " s INNER JOIN " . TBL_CATEGORY . " c ON s.`sb_category_id` = c.`ct_id` WHERE 1 ";
try {
  $stmt = $DB->prepare($sql1);
  $stmt->execute();
  $results = $stmt->fetchAll();
  $total = $results[0]["count"];
  $pagination = new Pagination($total, $_GET["pagenum"], 20);
  $total_pages = $pagination->total_pages();

  if ($total_pages > 0) {
    $sql2 = "select s.`sb_id`, s.`sb_name`, s.`sb_category_id`, s.`active`, c.`ct_name`, `sb_duration`  "
            . "FROM " . TBL_SUBJECTS . " s INNER JOIN " . TBL_CATEGORY . " c ON s.`sb_category_id` = c.`ct_id` "
            . "WHERE idam='$idadmin' ORDER BY s.sb_name ASC "
            . "LIMIT " . $pagination->get_lower_limit() . " , " . 20 . "";

    $stmt = $DB->prepare($sql2);
    $stmt->execute();
    $results = $stmt->fetchAll();
  }
} catch (Exception $ex) {
  echo $ex->getMessage();
}


include './includes/header.php';
?>
    <!-- GLOBAL STYLES -->
    <link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" href="assets/css/main.css" />
    <link rel="stylesheet" href="assets/css/theme.css" />
    <link rel="stylesheet" href="assets/css/MoneAdmin.css" />
    <link rel="stylesheet" href="assets/plugins/Font-Awesome/css/font-awesome.css" />
    <!--END GLOBAL STYLES -->
  <?php if ($ERROR_TYPE <> "") { ?>
        <div class="col-12">
          <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-12">

    <div class="panel panel-info">
      <div class="panel-heading"><span class="glyphicon glyphicon-cog"></span> <?php echo $title; ?></div>
      <div class="panel-body">
        <div class="margin10">
          <div class="padding5 clearfix"></div>
          <?php if ($total_pages > 0) { ?>

            <table class="table table-hover table-datatable table-striped table-bordered">
              <thead>
                <tr>
                  <th style="text-align: left;">ชื่อวิชา</th>
                  <th style="text-align: center;">หมวดหมู่</th>
                  <th style="text-align: center;">เวลาสอบ</th>
                  <th style="text-align: center;">สถานะ</th>
                  <th style="text-align: center;">จัดการ</th>
				  
                  </tr>
                </thead>
                <tbody>
                  <?php foreach ($results as $r) { ?>
                    <tr>
                      <td style="text-align: left;"><?php echo "<span class='glyphicon glyphicon-zoom-out'></span>&nbsp;"; ?><a href="<?php echo generate_site_link("score_subject", "s=".$r["sb_id"]); ?> " target='_blank' ><?php echo safe_output($r["sb_name"]) ?></a></td>
                      <td style="text-align: center;"><?php echo safe_output($r["ct_name"]) ?></td>
					  <td style="text-align: center;"><span class="glyphicon glyphicon-time"></span> <?php echo safe_output($r["sb_duration"]) ?> นาที</td>
                      <td style="text-align: center;">
                        <?php if ($r["active"] == "yes") { ?>
						<span class="glyphicon glyphicon-ok"></span>
                        <span class="label label-success">เปิดสอบ</span>
                        <?php } else { ?>
						<span class="glyphicon glyphicon-remove"></span>
                        <span class="label label-danger">ปิดสอบ</span>
                        <?php } ?>
                        
                      </td>
	                 <td style="text-align: center;">
<a href="../exls.php?idsubject=<?php echo $r["sb_id"] ?>">
<span class="glyphicon glyphicon-export"></span>
<span class="label label-info">Export</span>
</a>

<?php 
$sbid=$r["sb_id"];
include '../configs/host.php';
$chk_results="select `exp_subjects`.`sb_name`,`exp_test_results`.`tr_total_question`,`exp_subjects`.`idam` from `exp_subjects` INNER JOIN `exp_test_results` ON `exp_subjects`.`sb_id` = `exp_test_results`.`tr_subject_id` where `sb_id`='$sbid' GROUP BY `exp_subjects`.`sb_name`,
  `exp_test_results`.`tr_total_question`,`exp_subjects`.`idam` ORDER BY `exp_subjects`.`idam`";
$result3=mysql_query($chk_results);
$total3=mysql_num_rows($result3);

?>
<?php if($total3>0){ ?>
<a data-href="<?php echo generate_admin_link("clear_test", "mode=delete&id=" . ($r["sb_id"]) . "&" . get_all_get_params(array("id"))); ?>" data-toggle="modal" data-target="#confirm-delete"  href="javascript:void(0);">
<span class="glyphicon glyphicon-trash"></span>
<span class="label label-warning">เคลียร์ผลสอบ</span>
</a>
<?php } else { ?>

<span class="glyphicon glyphicon-trash"></span>
<span class="label label-success">  ไม่มีผลการสอบ  </span>

<?php } ?>
					 </td>
				  
                    </tr>
                  <?php } ?>
                </tbody>

              </table>

              <div class="col-12 center">
                <ul class="pagination">
                  <?php $pagination->display_links($PAGE_NAME); ?>
                </ul>
              </div>

              <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
              <div class="modal-dialog"  style="width: 530px;">
                <div class="modal-content">
                  <div class="modal-header">
                    <h4>เคลียร์ผลสอบ</h4>
                  </div>
                  <div class="modal-body">เฉพาะรายวิชาที่เลือก<br>
                    การเคลียร์ผลสอบจะทำให้ผลการสอบว่าง นักเรียนสามารถสอบได้อีกครั้ง ?
                  </div>
                  <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">ยกเลิก</button>
                    <a href="#" class="btn btn-danger danger">เคลียร์</a>
                  </div>
                </div>
              </div>
            </div>
          <?php } else { ?>
            <h3>ไม่พบแบบทดสอบในฐานข้อมูล.</h3>
          <?php } ?>


        </div>
      </div>
    </div>
  </div>
</div>
<script>
  jQuery(function() {
    jQuery('#confirm-delete').on('show.bs.modal', function(e) {
      jQuery(this).find('.danger').attr('href', jQuery(e.relatedTarget).data('href'));
    });
  });
</script>
<?php
include './includes/footer.php';
require '../configs/app_bottom.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit