403Webshell
Server IP : 104.21.80.248  /  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_start.php
<?php
require './configs/app_top.php';
$title = "เริ่มทำแบบทดสอบ";
try {
  $sql = "select `sb_id`,`sb_category_id`, `sb_name`, `sb_duration`, `sb_index`, `sb_count`,`start_date` ,`end_date` "
          . "FROM " . TBL_SUBJECTS . " WHERE 1 AND sb_id = :id LIMIT 1 ";

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


include './includes/header.php';
?>
<style type="text/css">
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height:90px;
}
</style>
<div class="padding30"></div>
<?php if ($ERROR_TYPE <> "") { ?>
  <div class="col-12 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="preload">
<img src="loading_spinner.gif" /></div>
<div class="content">

<div class="container">
<br/>



<div class="clearfix"></div>
<div class="row">
  <div class="col-6 center">
    <div class="well well-lg">
      <div id="loginForm">
        <form class="form-horizontal" method="post" id="form1" name="form1" action="<?php echo generate_site_link("exams_auth"); ?>">
          <input type="hidden" value="start" name="mode">
          <input type="hidden" value="<?php echo intval($results[0]["sb_id"]); ?>" name="eid">
          <input type="hidden" value="<?php echo safe_output($results[0]["sb_name"]); ?>" name="ename">
          <input type="hidden" value="<?php echo safe_output($results[0]["sb_duration"]); ?>" name="etime">
          <input type="hidden" value="<?php echo safe_output($results[0]["sb_index"]); ?>" name="eindex">
<input type="hidden" value="<?php echo intval($results[0]["sb_count"]); ?>" name="ecount">
<?php 
$category_id=$results[0]["sb_category_id"];
$class=$_SESSION["user_class"];
$rest2 = substr("$class", 0,-2);
$chk_class= substr("$rest2", -1);

$start_date=$results[0]["start_date"];
$end_date=$results[0]["end_date"];
$today = strtotime(date("Y-m-d H:i"));
$start = strtotime("$start_date");
$end = strtotime("$end_date");

if ($today >= $start && $today <= $end) {

?>	

          <fieldset>
            <div class="form-group col-12 center" >
              <div class="padding10"></div>
              <div class="help-block" style="color: #000;">วิชา : <strong><?php echo $results[0]["sb_name"]; ?></strong></div>
              <div class="help-block" style="color: #000;">เวลาสอบ : <strong><?php echo $results[0]["sb_duration"] . " นาที"; ?> &nbsp;&nbsp; จำนวน : <?php echo $results[0]["sb_index"] . " ข้อ"; ?></strong></div>
<?php 
//ตรวจสอบว่าเข้าระบบมาหรือไม่ และมีสิทธ์ในระดับชั้นใด
if ($class<>"" and $chk_class=="$category_id") {?>			  
              <button class="btn btn-success loginbutton" type="submit">เริ่มสอบ</button>
<?php 
} else {
echo "<div class='alert alert-warning'><font color='#FF0000'><center><h3>คุณยังไม่มีสิทธิ์เข้าสอบในรายวิชานี้</h3><br></center></font></div>";
if($class=="") { echo "<button class='btn btn-warning loginbutton' value='login.php' type='submit'>เข้าระบบก่อน</button>"; } else { echo "<div class='alert alert-warning'><font color='#FF0000'>ระดับชั้นเรียนกับรายวิชาที่สอบไม่ตรงกัน</font></div>";}
}
?>	
		  
            </div>
          </fieldset>
<?php 
} else {
echo "<div><center><h3><font color='red'>แบบทดสอบนี้ไม่ได้อยู่ในช่วงเวลาสอบ</font></h3><br><div class='alert alert-warning'>สามารถสอบได้ในช่วงเวลา<br> $start_date ถึง $end_date</div></center></div>";
}
?>		  
        </form>
      </div>

    </div>
  </div>
</div>

<div class="padding30 clearfix"></div>
<div class="padding30 clearfix"></div>



<script>
	$(function() {
		$(".preload").fadeOut(2000, function() {
			$(".content").fadeIn(1000);
		});
	});
</script> 
</div>
<?php
include './includes/footer.php';
require './configs/app_bottom.php';
?>

Youez - 2016 - github.com/yon3zu
LinuXploit