-
Notifications
You must be signed in to change notification settings - Fork 0
/
VVV.php
270 lines (205 loc) · 4.45 KB
/
VVV.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<html>
<head>
<?php
session_start();
$code="notset";
$sha="not set";
$sha=$_SESSION['sha1name'];
$NAME=$_SESSION['name'];
$code=sha1($_SESSION['name']);
if($sha !=$code){
header('Location: login.html');
exit;
}
?>
<title>Answer Sheet Viewer</title>
<script src="Js/aakash.js"></script>
<script language="JavaScript" type="text/javascript">
function confirmLogout(){
var agree = confirm("Are you sure you wish to logout?");
if(agree){
return true;
}else{
return false;
}
}
</script>
<style>
.table_container{
position:absolute;
top:10%;
left:80%;
width:20%;
margin-bottom: 100px
}
table{
position:fixed;
top:17%;
border:5px solid;
border-color:#003566;
font-family: arial, sans-serif;
border-collapse: collapse;
width:20%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
.slideshow-container, .table_container {
float: left;
}
.mySlides {display:none;}
.slideshow-container {
position:absolute;
top:17%;
width: 78%;
margin-left: 5px;
}
.numbertext {
color: black;
font-size: 34px;
padding: 20px 20px;
position: absolute;
border:2px solid;
}
.next{
right:3%;
}
.prev{
right:12%;
}
.next, .prev {
position:fixed;
bottom:10%;
cursor: pointer;
transition: 0.6s ease;
padding: 35px;
}
.prev:hover, .next:hover {
background-color: rgba(0,0,0,0.8);
}
.table_container, .arrow_container{
float:bottom;
}
a{
border:1px outset;
}
#header
{position:absolute;
top:8%;
width:100%;
height:50px;
background:#00a2d1;
font-family:"Lucida Handwriting";
font-family:Verdana, Geneva, sans-serif;
text-align:center;
font-size:35px;
font-weight:bolder;
color:#f9f9f9;
}
ul {
top:0%;
width:100%;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #4CAF50;
font-size: 22px;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-ms-transition-duration: 0.4s;
}
.active {
background-color: #4CAF50;
}
</style>
</head>
<body onload="showSlides(1)">
<div >
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="http://csvtu.ac.in/ew/">CSVTU</a></li>
<li><a href="http://www.gecraipur.ac.in/">GEC Raipur</a></li>
<li><a href="stu.php"><?php echo $_SESSION['name']; ?></a></li>
<li><a href="ImageViewer.php">Back</a></li>
<li style="float:right"><a href="logout.php" onClick="return confirmLogout()">Logout</a></li>
<li style="float:right"><a class="active" href="#about">About</a></li>
</ul>
</div>
<div id="header">
<label>Name:<?php echo $NAME ?>, Roll No.:<?php echo $_SESSION['roll'] ?></label>
</div>
<div class="slideshow-container">
<?php
$folderPath =$_SESSION['subfol'];//image folder path
$numOfFiles = glob($folderPath . "*.{JPG,jpg,gif,png,bmp}", GLOB_BRACE);
$folder = opendir($folderPath);
if($numOfFiles>0){
$n=1;
$tn=sizeof($numOfFiles);
while(false !== ($file = readdir($folder))){
$filePath=$folderPath.$file;
$extension = strtolower(pathinfo($file ,PATHINFO_EXTENSION));
if($extension=='jpg' || $extension=='png' || $extension=='gif'){
?>
<?php print ('<div class="mySlides fade">');
print( '<div class="numbertext">'.$n.' /'.$tn.' </div>'); $n=$n+1; ?>
<img src="<?php echo $filePath; ?>" style="width:100%"/>
<?php echo "</div>"; ?>
<?php
}
}
}
else
{
echo "the folder is empty!!";
}
closedir($folder);
?>
</div>
<div style="text-align:center">
<?php
for($i=1;$i<=$tn;$i++){
echo '<span class="dot" onclick="currentSlide("'.$i.')"></span>';
}
?>
</div>
<div class="table_container">
<table align="right">
<tr>
<th>Question No.</th>
<th>Marks</th>
</tr>
<?php
for($i=1;$i<=10;$i++){
print ("<tr>");
print ("<td>".$i."</td>");
print ('<td><input type="text" name="mark_'.$i.'"></td>');
print ("</tr>");
}
?>
</table>
</div>
<div class="arrow_container" padding-top="20px">
<a class="prev" onclick="plusSlides(-1)" >❮Previous</a>
<a class="next" onclick="plusSlides(1)" >Next❯</a>
</div>
</body>