-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgquiz.php
172 lines (149 loc) · 5.53 KB
/
gquiz.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?php
/*!
* **************************************************************
**************** ProQuiz V2.0.0b ******************************
***************************************************************/
/* documentation at: http://proquiz.softon.org/documentation/
/* Designed & Maintained by
/* - Softon Technologies
/* Developer
/* - Manzovi
/* For Support Contact @
/* - [email protected]
/* version 2.0.0 beta (2 Feb 2011)
/* Licensed under GPL license:
/* http://www.gnu.org/licenses/gpl.html
*/
?><?php include_once('functions.php'); ?>
<?php
if(empty($_SESSION['UA_DETAILS'])){
header('Location:login.php?error=take_quiz');
}elseif(getSettings($db,'gquiz')!='1'){
if(getSettParam($db,'gquiz')!='installed'){
header('Location:quiz_menu.php?error=quiz_notinstalled');
}else{
header('Location:quiz_menu.php?error=quiz_disabled');
}
}elseif(getSettParam($db,'gquiz')!='installed'){
header('Location:quiz_menu.php?error=quiz_notinstalled');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo SITETITLE; ?></title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/login.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/quiz.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.cookies.2.2.0.min.js"></script>
<script type="text/javascript" src="js/jquery.corner.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript">
$('.headDisp').corner("5px");
$('.divText div').corner("5px");
$('.divData div').corner("5px");
$('.listRows').corner('5px');
$('.listCols').corner('5px');
</script>
<script type="text/javascript">
jQuery(document).ready(function() {
$('#quiz_setup').validate();
});
</script>
<link rel="stylesheet" href="css/timer_dark.css" media="screen" type="text/css" />
<!--[if IE 7]>
<link href="css/ie7fix.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script src="js/jquery.lwtCountdown-1.0.js" type="text/javascript"></script>
<?php if(!empty($_SESSION['PQ_QUIZ']) || !empty($_SESSION['RESULTS'])){ ?>
<script src="js/quiz.js" type="text/javascript"></script>
<?php } ?>
<?php include_once('common_header.php'); ?>
</head>
<body>
<?php
if(!empty($_SESSION['PQ_QUIZ'])){
include_once('timer.php');
}
?>
<div id="wrapper">
<div id="header"><img src="images/banner.jpg" width="800px" width="154px" /></div>
<!-- Menu Start -->
<div id="menu">
<div class="corner-left"></div>
<div id="menuCenter">
<?php include_once('menu.php'); ?>
</div>
<div class="corner-right"></div>
</div> <!-- menu End -->
<!-- Start Sidebar -->
<div id="sidebar">
<div class="sideCnt">
<?php include_once('sidebar.php'); ?>
</div>
<div id="sideFooter">
<div class="corner-bLeft"></div>
<div id="sideBtmCenter"><span>→ SHOW / HIDE ←</span></div>
<div class="corner-bRight"></div>
</div>
</div> <!-- sidebar End -->
<div id="content">
<!-- Start Final Summary -->
<?php
if(empty($_SESSION['PQ_QUIZ']) && !empty($_SESSION['RESULTS'])){
include_once('modules/summary.php');
}else{
?>
<!-- End Summary -->
<div class="pqMain">
<div class="cntHolder">
<?php if(!empty($_SESSION['PQ_QUIZ'])){ ?>
<div class="start_quiz_hld"></div>
<?php } ?>
<div class="pagination">
<?php
if(!empty($_SESSION['PQ_QUIZ'])){
include_once('modules/pagination.php');
}
?>
</div>
<!-- Setup Start -->
<?php
if(empty($_SESSION['PQ_QUIZ']) && empty($_SESSION['RESULTS'])){
include('modules/setup.php');
} ?>
<!-- Setup End -->
<style>
form li {
float: none;
}
</style>
<form name="pq_quiz_form" id="pq_quiz_form" action="<?php $_SERVER['PHP_SELF']; ?>?action=process_quiz" method="post" >
<?php
if(!empty($_SESSION['PQ_QUIZ'])){
foreach($_SESSION['PQ_QUIZ']['DATA'] as $key=>$value){
getQuizModule($value,$key+1);
}
}
?>
<!-- Footer Buttons -->
<?php
if(!empty($_SESSION['PQ_QUIZ'])){
include('modules/buttons.php');
} ?>
<!-- End Footer Buttons -->
<div id="pq_answer">
<input type="hidden" name="current_qstn" id="current_qstn" value="" />
<input type="hidden" name="total_qstn" id="total_qstn" value="" />
</div>
</form>
</div>
</div>
<?php } // summary else statment ends ?>
</div> <!-- content End -->
<!-- Footer Include -->
<div id="footer"><?php include_once('footer.php'); ?></div> <!-- wrraper End -->
</body>
</html>