-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdomains.php
More file actions
233 lines (213 loc) · 6.85 KB
/
domains.php
File metadata and controls
233 lines (213 loc) · 6.85 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
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
<!DOCTYPE html>
<?php
include_once 'connection-script.php';
session_start();
if(!isset($_SESSION['email']))
{
header('Location: index.php');
}
?>
<html>
<head>
<meta charset="utf-8">
<title>Questions</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/hover.css">
<script type="text/javascript"></script>
</head>
<body style="background-color: black; margin-top: 60px; height:auto">
<header>
<div class="sub_header">
<p class="compile"><a href="code-compile-run/code-compile-run.php">Code compile and run</a></p>
</div>
<div class='container'>
<h1>Select your Domain</h1>
</div>
</header>
<div id="header" class="header">
<?php
$mail=$_SESSION['email'];
$query="SELECT * from student where semail='$mail'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$filename=$row['studentid']."_dp";
$id=$row['studentid'];
?>
<ul><p><a href="homepage_student.php">NAME</a></p>
<?php
if(file_exists('pictures/'.$filename.'.jpg'))
{
echo '<li style="margin:-3% 1% 1% 0%;"><a href="#"><img src="pictures/'.$filename.'.jpg" ><p class="usrname">'.$row['fname'].'</p></a>';
}
else if(file_exists('pictures/'.$filename.'.gif'))
{
echo '<li style="margin:-3% 1% 1% 0%;"><a href="#"><img src="pictures/'.$filename.'.gif" ><p class="usrname">'.$row['fname'].'</p></a>';
}
else if(file_exists('pictures/'.$filename.'.png'))
{
echo '<li style="margin:-3% 1% 1% 0%;"><a href="#"><img src="pictures/'.$filename.'.png" ><p class="usrname">'.$row['fname'].'</p></a>';
}
else
{
echo '<li style="margin:-3% 1% 1% 0%;"><a href="#"><img src="icons/user.png"><p class="usrname">'.$row['fname'].'</p></a>';
}
?>
<ul>
<li><a href="edit-profile.php">My Profile</a></li>
<li><a href="table.php">My submissions</a></li>
</ul>
</li>
<li style=" margin:-3% 1% 1% 0%;"><a href="signout-script.php">Log Out</a></li>
</ul>
</div>
<div class="navig" style="color:#ef7126">
<p><a style="color:#ef7126" href="homepage_student.php">Home</a> > <a style="color:#ef7126" href="domains.php">Domains</a></p>
</div>
<div class='container'>
<ul>
<li>
<a class='normal' href='questions.php?domain=contol'>
<img src="icons/control.png">
</a>
<div class='info'>
<h3>CONTROL STATEMENTS</h3>
<p>If.. Then.. Else..<br>Control the flow of your programs with the control statements.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=array'>
<img src="icons/array1.png">
</a>
<div class='info'>
<h3>ARRAYS</h3>
<p>The position you hold is what matters the most.<br> Take care of the indices.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=strings'>
<img src="icons/string.png">
</a>
<div class='info'>
<h3>STRINGS</h3>
<p>Letters, words and sentences!<br>See their magic while you play with them.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=recursion'>
<img src="icons/recursion1.png">
</a>
<div class='info'>
<h3>RECURSION</h3>
<p>Break it up!<br>This will make your problems seem much smaller and conquerable.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=datastructures'>
<img src="icons/ds.png">
</a>
<div class='info'>
<h3>DATA STRUCTURE</h3>
<p>Manage your time along with the time complexity of these problems and learn how to store data efficiently.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=oops'>
<img src="icons/oops.png">
</a>
<div class='info'>
<h3>OBJECT ORIENTED PROGRAMMING</h3>
<p>Create your own classes.<br>Play with the methods.<br>Manage your fields.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=inputoutput'>
<img src="icons/i_o.png">
</a>
<div class='info'>
<h3>INPUT / OUTPUT</h3>
<p>Give yourself a kick start by solving these basic questions.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=algorithms'>
<img src="icons/algo.png">
</a>
<div class='info'>
<h3>ALGORITHMS</h3>
<p>Try out these famous algorithms which takes up a large part of computer science.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=ra'>
<img src="icons/sql.png">
</a>
<div class='info'>
<h3>DATABASE</h3>
<p>What will be the use of such complex applications when the data could not be stored?<br>Master this storage facility of data.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=sql'>
<img src="icons/sql1.png">
</a>
<div class='info'>
<h3>SQL</h3>
<p>Master the official language of communication with the databases.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=brainstormers'>
<img src="icons/brain.png">
</a>
<div class='info'>
<h3>BRAIN STORMERS</h3>
<p>Play with numbers, strings, pointers all at one place!<br>Make them your puppets and let them dance on your tune.</p>
</div>
</li>
<li>
<a class='normal' href='questions.php?domain=aptitude'>
<img src="icons/aptitude1.png">
</a>
<div class='info'>
<h3>APTITUDE</h3>
<p>Get ready to face the world!<br>Challenge your brain to do better than its best.</p>
</div>
</li>
</ul>
</div>
<script type="text/javascript">
// - Noel Delgado | @pixelia_me
var nodes = document.querySelectorAll('li'),
_nodes = [].slice.call(nodes, 0);
var getDirection = function (ev, obj) {
var w = obj.offsetWidth,
h = obj.offsetHeight,
x = (ev.pageX - obj.offsetLeft - (w / 2) * (w > h ? (h / w) : 1)),
y = (ev.pageY - obj.offsetTop - (h / 2) * (h > w ? (w / h) : 1)),
d = Math.round( Math.atan2(y, x) / 1.57079633 + 5 ) % 4;
return d;
};
var addClass = function ( ev, obj, state ) {
var direction = getDirection( ev, obj ),
class_suffix = "";
obj.className = "";
switch ( direction ) {
case 0 : class_suffix = '-top'; break;
case 1 : class_suffix = '-right'; break;
case 2 : class_suffix = '-bottom'; break;
case 3 : class_suffix = '-left'; break;
}
obj.classList.add( state + class_suffix );
};
// bind events
_nodes.forEach(function (el) {
el.addEventListener('mouseover', function (ev) {
addClass( ev, this, 'in' );
}, false);
el.addEventListener('mouseout', function (ev) {
addClass( ev, this, 'out' );
}, false);
});
</script>
</body>
</html>