-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminChoice.php
134 lines (80 loc) · 3.94 KB
/
adminChoice.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
<?php include 'header.php'; ?>
<div class="container">
<div id="adminTopDiv">
<?php
include("adminMenu.php");
?>
</div><!--end of topDiv-->
<div id="adminBottomDiv">
<?php
if(isset($_REQUEST['ad']))
{
echo"<div>";
if($_REQUEST['ad']==1)
echo("<div>
HOME
</div>");
else if($_REQUEST['ad']==2)
echo("<div> USER </div>");
else if($_REQUEST['ad']==3)
echo("<div> RANKING</div>");
echo'</div>';
}
?>
<!--==============================================================================================================-->
<?php
if(isset($_REQUEST['ad1']))
{
echo"<div>";
if($_REQUEST['ad1']==5)
echo("<div>
<form action='insertquiz.php' method='get'>
<table align='center' width='100px' id='addquiz'>
<tr><td><h2 id='h1quizform'>Add New Quiz Here</h2></td></tr>
<tr><td><input type='text' name='txtquizname' placeholder='Enter Quiz Name'></tr></td>
<tr><td><input type='text' name='txtnq' placeholder='No of Questions'></tr></td>
<tr><td><input type='text' name='txtquizdetails' placeholder='Enter Quiz Details' > </td></tr>
<tr><td><input type='submit' value='Next' class='formbtn'><input type='reset' value='Cancel' class='formbtn' > </tr></td>
</table>
</form>
</div>");
else if($_REQUEST['ad1']==6)
echo("<div> REMOVE QUIZ</div>");
echo'</div>';
}
?>
<!--======================================================================================================-->
<?php
if(isset($_REQUEST['ad2']))
{
echo"<div>";
if($_REQUEST['ad2']==7){
$no_ques=$_REQUEST['no_que'];
$currentquizid=$_REQUEST['last_id'];
?>
<div>
<form action='insertque.php' method='get'>
<table align='center' width='100px' id='addquiz'>
<tr><td><h2 id='h1quizform'>Add Questions Here</h2></td></tr>
<tr><td><hr id='queHR'></td></tr>
<input type='hidden' name='txtHideQId' value="<?php echo $currentquizid; ?>">
<?php for($i=1; $i<=$no_ques; $i++){ ?>
<tr><td><input type='text' name='txtques[]' placeholder='Write the Question <?php echo $i; ?>'></td></tr>
<tr><td><input type='text' name='txtopt1[]' placeholder='Option 1'></td></tr>
<tr><td><input type='text' name='txtopt2[]' placeholder='Option 2'></td></tr>
<tr><td><input type='text' name='txtopt3[]' placeholder='Option 3'></td></tr>
<tr><td><input type='text' name='txtopt4[]' placeholder='Option 4'></td></tr>
<tr><td><input type='text' name='txtans[]' placeholder='Ans: 1/2/3/4 ?'></td></tr>
<tr><td><hr id='queHR'></td></tr>
<?php } ?>
<tr><td><input type='submit' value='Add' class='formbtn'><input type='reset' value='Cancel' class='formbtn' > </td></tr>
</table>
</form>
</div>
<?php
}
}
?>
</div><!--end of bottomDiv-->
</div>
<?php include 'footer.php'; ?>