Your IP : 216.73.217.87
<?php
include 'db_connect.php';
$name = $_GET['name'];
$class = $_GET['class'];
$division = $_GET['division'];
$pin = $_GET['testId'];
if (isset($_GET['testId']) && (isset($_GET['name']) && $_GET['name']!='')&& (isset($_GET['class']) && $_GET['class']!='') && (isset($_GET['division']) && $_GET['division']!='')) {
$query = "SELECT * FROM test WHERE pin='$pin'";
$results = mysqli_query($db, $query);
$test = mysqli_fetch_assoc($results);
}
else{
header("location: message.php?type=inv_data&testId=$pin&name=$name&class=$class&division=$division");
}
if(!$test && json_decode($test['settings'])->visible != 'true'){
header("location: message.php?type=not_found&testId=$pin&name=$name&class=$class&division=$division");
}
else if(json_decode($test['settings'])->allow_guest=='false' && $_GET['guest']=='true'){
header("location: message.php?type=no_annonymous&testId=$pin&name=$name&class=$class&division=$division");
}
else if(json_decode($test['settings'])->require_profile == 'true' && !isset($_SESSION['logged'])){
header("location: message.php?type=auth&path=quiz&testId=$pin&name=$name&class=$class&division=$division");
}
include 'form_save.php';
$content = json_decode($test['content']);
?>
<!DOCTYPE html>
<html lang="bg">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $test['name'] ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="css/main.css" rel="stylesheet">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="manifest" href="images/site.webmanifest">
<link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div id="imgModal" class="imgModal" onclick="this.style.display='none'" style="z-index:2;">
<span class="close" onclick="document.getElementByID('imgModal').style.display='none'">×</span>
<img class="imgModal-content" id="img">
<div id="caption"></div>
</div>
<!-- Bootstrap --->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
<?php include 'db_close.php' ?>
</body>
</html>