-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.php
executable file
·70 lines (68 loc) · 3.16 KB
/
index.php
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
<?php
require_once("includes/global.php");
session_start();
if (!isset($_SESSION['teamid'])) header("Location: login.php") && die();
elseif ($_SESSION['status'] == 2) header("Location: question.php") && die();
elseif ($_SESSION['status'] == 3) header("Location: done.php") && die();
metadetails();
?>
</head>
<body>
<div id="main-content" class="box center">
<?php
if ($_SESSION['language'] == 1 || $_SESSION['language'] == 2) {
if ($_SESSION['stage'] == '0') {
if ($_SESSION['language'] == 1) {
echo('<h2>printf("%s","Hey C Coders!");</h2><br/>');
GetInstructions('c');
} else {
echo('<h2>cout<<"Howdy C++ Aficionados!";</h2><br/>');
GetInstructions('cpp');
}
}
elseif ($_SESSION['stage'] == '2a' || $_SESSION['stage'] == '2b') {
echo '<h2>Welcome to Stage 2!!</h2><br/>';
echo <<<CONTENT
<ul id="Rules">
<li>The second round will be an offline round of 30 minutes.</li>
<li>You will be given 3 questions with logical errors.</li>
<li>Use of Compilers is prohibited except the inline one provided.</li>
<li>Marks will be provided based on the time of completion and correctness of solution.</li>
<li>All Answers will be locked and cannot be altered after 30 minutes.</li>
<li><strong>Do NOT refresh the page or hit the Back button.</strong></li>
<li>Any act of dishonesty will result in immediate disqualification.</li>
<li>The Decision of the Judges is final & beyond reproach.</li>
</ul>
<button class="btn btn-large btn-primary centerh" onclick="window.location.href = 'starttest.php'" style="width: 150px;" id="btn-start">Lets Start!</button>
CONTENT;
}
elseif ($_SESSION['stage'] == '3a' || $_SESSION['stage'] == '3b') {
echo '<h2>Welcome to Stage 3!!</h2><br/>';
echo <<<CONTENT
<ul id="Rules">
<li>The second round will be an offline round of 1 hour.</li>
<li>You will be given 2 questions with no errors.</li>
<li>Your task is to analyze the code & explain the working of the code.</li>
<li>Marks will be provided based on the time of completion and correctness of explanation.</li>
<li>All Answers will be locked and cannot be altered after 1 hour.</li>
<li><strong>Do NOT refresh the page or hit the Back button.</strong></li>
<li>Any act of dishonesty will result in immediate disqualification.</li>
<li>The Decision of the Judges is final & beyond reproach.</li>
</ul>
<button class="btn btn-large btn-primary centerh" onclick="window.location.href = 'starttest.php'" style="width: 150px;" id="btn-start">Lets Start!</button>
CONTENT;
}
} else {
?>
<h2>Welcome to Game Of Bugs !!</h2><br/>
<span style="font-size: 1.5em"> Are you ready to start ? Select your language of Choice to proceed to Rules & Instructions.</span></br/>
<div id="clang" onclick="AjaxGet('lang.php?lang=c', 'main-content');"></div>
<div id="cpplang" onclick="AjaxGet('lang.php?lang=cpp', 'main-content');"></div>
</div>
<?php }
AjaxGet();
?>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>