forked from prakharsingh1312/cusiege
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgodmode.php
More file actions
82 lines (74 loc) · 2.61 KB
/
Copy pathgodmode.php
File metadata and controls
82 lines (74 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
session_start();
include('Assets/php/dbconfig.php');
if ($_SERVER['PHP_AUTH_USER']!="prakhar" ||$_SERVER['PHP_AUTH_PW']!="popatpanda") {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Chal Nikal';
exit;
}
else{
include('pre3.php');
for($i=1;$i<=$_SESSION['numq'];$i++)
if($_SESSION['done'][$i]==1)
$query=mysqli_query($dbconfig,"DELETE FROM check_req WHERE questionid=$i");
}
?><!doctype html>
<html>
<head>
<link rel='icon' href='icon/favicon.ico' type='image/x-icon'>
<title>Godmode</title>
<link rel="stylesheet" href="Assets/css/style.css">
<meta http-equiv="refresh" content="10"/>
<link href="https://fonts.googleapis.com/css?family=Cabin+Sketch" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
<link rel='icon' href='icon/favicon.ico' type='image/x-icon'>
</head>
<body>
</html>
<div id="wrapperlead" class='divlead'> <div class='divlead'>
<center>
<br>
<?php
if(isset($_SESSION['oi']))
{
echo "The Question has already been answered.";
unset($_SESSION['oi']);
}
if(isset($_SESSION['cs']))
{
echo "Answer Confirmed.";
unset($_SESSION['cs']);
}
if(isset($_SESSION['ds']))
{
echo "Entry Deleted (marks deducted).";
unset($_SESSION['ds']);
}
?><br><br>
<table cellspacing="10" cellpadding="15">
<tr>
<th>Question No.</th>
<th>UserName</th>
<th>Team Name</th>
<th>Controls</th>
</tr>
<?php
$i=$_GET['i'];
$result = mysqli_query($dbconfig,"SELECT username,teamname, questionid FROM check_req ORDER BY time");
if (mysqli_num_rows($result)) {
while ($row = mysqli_fetch_assoc($result)) {
echo "<tr>
<td>{$row['questionid']}</td>
<td>{$row['username']}</td>
<td>{$row['teamname']}</td>
<td><form method='post' action='confirm.php'><input type='hidden' name='user' value='{$row['username']}'><button type='submit' id='button' value='{$row['questionid']}' name='confirm'>Confirm</button></form><form method='post' action='delete.php'><input type='hidden' name='user' value='{$row['username']}'><button type='submit' id='button' value='{$row['questionid']}' name='delete'>Delete</button></form></td>
</tr>";
}
}
?>
</table>
</center>
</div></div>
</body>
</html>