Skip to content

Commit 5135484

Browse files
committed
Added Survey Option, and Fixed 0 hint error
1 parent 50eab1b commit 5135484

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

survey.php

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui" />
6+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
7+
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
9+
<link href="https://fonts.googleapis.com/css?family=Iceland|Orbitron" rel="stylesheet">
10+
<link href="css/secgen.css" rel="stylesheet" type="text/css">
11+
<link href="css/map.css" rel="stylesheet" type="text/css">
12+
<style>
13+
#middle, #content{
14+
width:800px;
15+
height:auto;
16+
background:#111;
17+
padding:0px;
18+
margin:0px auto;
19+
20+
}
21+
22+
#content{
23+
margin-top:30px;
24+
}
25+
26+
#middle{
27+
border:solid 1px #ABD17D;
28+
border-radius:1em;
29+
}
30+
h1{
31+
color:#ABD17D;
32+
text-align:center;
33+
padding:10px;
34+
}
35+
36+
a{
37+
padding:10px 20px 10px 20px;
38+
background:#111;
39+
border:1px solid #ABD17D;
40+
border-radius: 0.5em;
41+
color:#ABD17D;
42+
text-decoration:none;
43+
}
44+
45+
a:hover, tr:hover{
46+
background:#ABD17D;
47+
color:#000000;
48+
}
49+
</style>
50+
</head>
51+
<body id="main" style="background:url('images/bgadmin.png');">
52+
<a href="index.php">Back</a>
53+
<div id="middle">
54+
<h1>Survey</h1>
55+
</div>
56+
<div id="content">
57+
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSegnaAvkM4xRHe859cJXA72Mz8esVZmNfOvVFbe255IQq82eg/viewform?c=0&w=1" width="800" height="900"></iframe>
58+
</div>
59+
</body>
60+
</html>

template/flagcheck.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$user = $_POST['username'];
77

88
include 'connection.php';
9-
if(!empty($flag) && strlen($flag) <= 70){
9+
if(!empty($flag) && strlen($flag) <= 100){
1010
//time check
1111
$state = mysqli_query($connection, "SELECT value FROM options WHERE name='END_TIME'");
1212
foreach(mysqli_fetch_assoc($state) as $time){
@@ -42,6 +42,7 @@
4242
$bighint = mysqli_num_rows($bigResult);
4343
$normalhint = mysqli_num_rows($norResult);
4444
$totalhint = ($bighint * 2)+$normalhint;
45+
if($totalhint == 0){$totalhint = 1;}
4546
$singlePay = 200 / $totalhint;
4647

4748
$calPoints = mysqli_query($connection, "SELECT HINT_TYPE FROM hint WHERE C_ID='$cid' AND SYSTEM_NAME='$vm' AND TEAM='$team' AND HINT_STATUS='1'");

template/logout.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?php
22
session_start();
3-
session_destroy();
4-
header('location:../index.php');
3+
if($_SESSION['TYPE'] == "N"){
4+
session_destroy();
5+
header('location:../survey.php');
6+
}else if(isset($_SESSION['TYPE']) == "A"){
7+
session_destroy();
8+
header('location:../index.php');
9+
}
510

611
?>

0 commit comments

Comments
 (0)