-
Notifications
You must be signed in to change notification settings - Fork 0
/
userProfile.php
366 lines (254 loc) · 18.4 KB
/
userProfile.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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<?php
session_start();
$userNo = $_SESSION['userid'] ;
?>
<!--catch the user id-->
<?php
$Id = $_GET['id'];
?>
<!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=utf-8" />
<link rel="stylesheet" href="css/ideacss.css" />
<link rel="stylesheet" href="css/bootstrap.min.css"></link>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="themes_panel.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<title>ideapool Admin Page</title>
<!-- body style/ table margin -->
<style>
.tablecontent
{
margin-left:20em;
margin-left:20em;
margin-top:7em;
margin-bottom:10em;
}
body {
background-image:url(images/body.jpg);
}
.border
{
width: 125px;
height: 100px;
border : 3px solid rgb(229, 255, 255);
}
.profile {
border-radius: 50%;
bottom: 100%;
left: 25px;
z-index: 1;
max-width: 90px;
opacity: 1;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
</style>
<!-- end of the body style -->
</head>
<body>
<!-- header-->
<?php
include('header.php');
?>
<!--start of navigation bar -->
<?php
include("database_connect.php");
$sqll="Select * from register where id=".$userNo;
$result222=mysqli_query($con,$sqll);
while($row222=mysqli_fetch_array($result222)){
if($row222['category']=='Operator'){
?>
<nav class = "navbar navbar-inverse" role = "navigation">
<div class = "navbar-header" style="font-size:20px">
<a class = "navbar-brand" href = "#">Admin Page</a>
</div>
<div style="font-size:20px">
<div class="nav">
<ul class = "nav navbar-nav pull-right">
<li class = "active"><a href = "SearchUser.php">Users</a></li>
<li class = "active"><a href = "editSubmissionCompu.php">Submission</a></li>
<li class = "active"><a href = "newusers.php">New Users</a></li>
<li class = "active"><a href = "allusers.php">Current User</a></li>
</ul>
</div>
</div>
</nav>
<?php } }?>
<!-- Search key-->
<div class="container" id ="tcontent" style="padding-bottom:20px;padding-left:20px;padding-right:20px; margin-left:10px;margin-right:10px;">
<div class="row">
<div class="col-md-3" id="leftcontent" style="margin:15px;padding-right:10px;" >
<!--profile pic and two links-->
<?php
include("database_connect.php");
if(mysqli_connect_errno()){
echo "failed to connect to MySQL.".mysqli_connect_error();
}
$sqlGetData="Select * from register where id=".$Id;
$result=mysqli_query($con,$sqlGetData);
while($row=mysqli_fetch_array($result)){?>
<img src="<?php echo $row['Image']; ?>" class="img-circle person" alt="profile-sample5" style="padding-left: 20px; align:center;"/>
<?php }?>
<p> </p>
<p> </p>
<div class="col-3">
<a href="#Profile" class="btn btn-info" role="button" style="width:240px;background-color: #1aff1a">Profile</a>
<a href="userProfile_post.php?id=<?=$Id?>" class="btn btn-info" role="button" style="width:240px;background-color: #009900">Post</a>
<a href="gameHome.php" class="btn btn-info" role="button" style="width:240px;background-color: #009900">My Games</a>
<a href="leaderboard.php" class="btn btn-info" role="button" style="width:240px;background-color: #009900">Leader Board</a>
<a href="userHistory.php?id=" class="btn btn-info" role="button" style="width:240px;background-color: #009900">History</a>
</div>
<div id="countpro" style="padding-top:10px; margin-left:0px;">
<div style="background:#FFFFFF;width:240px">
<a id="about" class="btn btn-info" role="button" style="background-color: #009900; width:240px; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;">USER ACTIVITIES</a>
<div id="aboutdiv" class="countdetails" style="background-color: #009900;">
<?php include("countUsrActi.php"); //User actions count file?>
<table style=" color:#FFF; margin-top: 0px; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;">
<tr>
<td style="padding-left:20px; padding:10px;">SUBMISSIONS</td>
<td style="padding-left:50px; padding:10px;"><?php echo "$submissions[0]<br>"; ?></td>
</tr>
<tr>
<td style="padding-left:20px; padding:10px;">IMPROVEMENTS</td>
<td style="padding-left:50px; padding:10px;"><?php echo "$improvements[0]<br>"; ?></td>
</tr>
<tr>
<td style="padding-left:20px; padding:10px;">COMMENTS</td>
<td style="padding-left:50px; padding:10px;"><?php echo "$comments[0]<br>"; ?></td>
</tr>
</table>
</div>
</div>
<div>
<?php
include("userprofilereward.php");
?>
</div>
</div>
</div>
<!--link details-->
<div class="col-md-6" id="rightcontent" style="margin:15px 15px 15px;padding-left:5px;" >
<div class="tab-content">
<div id="Profile" class="tab-pane fade in active">
<?php
include("database_connect.php");
if(mysqli_connect_errno()){
echo "failed to connect to MySQL.".mysqli_connect_error();
}
$sqlGetData="Select * from register where id=".$Id;
$result=mysqli_query($con,$sqlGetData);
while($row=mysqli_fetch_array($result)){?>
<div class="row" style="width:785px">
<table>
<tr>
<td style="width:90%">
<h3><?php echo $row['fname']." ".$row['lname']; ?></h3></td>
<?php
$sql="Select * from register where id=".$userNo;
$result22=mysqli_query($con,$sql);
while($row22=mysqli_fetch_array($result22)){
if($row22['category']!='Operator'){
?>
<td style="padding-left:100px;width:10%"><a href="editUserProfile.php?id=<?=$row["id"]?>"><img name="jsbutton" src="images/edit.png" width="25" height="25" border="0" alt="javascript button"></a></td>
<?php }} ?>
</tr>
</table>
</div>
<div id="userprofile" style="padding-left:40px;padding-top:10px">
<div style="padding:30px;background:#FFFFFF;width:730px">
<table style="width:730px">
<tr>
<td style="padding-right:70px"><label for="cat">Category</label></td>
<td><label for="cat"><?php echo $row['category'];?> </label></td>
</tr>
<tr>
<td><p> </p> </td>
<td> <p> </p> </td>
</tr>
<tr>
<td style="padding-right:70px"><label for="uid">University ID</label></td>
<td><label for="uid"><?php echo $row['universityID'];?> </label></td>
</tr>
<tr>
<td><p> </p> </td>
<td> <p> </p> </td>
</tr>
<tr>
<td style="padding-right:70px"><label for="em">Email</label></td>
<td><label for="em"><?php echo $row['emil'];?> </label></td>
</tr>
<tr>
<td><p> </p> </td>
<td><p> </p> </td>
</tr>
<tr>
<td style="padding-right:70px"><label for="gen">Gender</label></td>
<td><label for="gen"><?php echo $row['gender'];?> </label></td>
</tr>
<tr>
<td><p> </p> </td>
<td> <p> </p> </td>
</tr>
<tr>
<td style="padding-right:70px"><label for="ad">Adress</label></td>
<td><label for="ad"><?php echo $row['address'];?> </label></td>
</tr>
<tr>
<td> <p> </p> </td>
<td> <p> </p> </td>
</tr>
<tr>
<td style="padding-right:70px"><label for="con">Contact</label></td>
<td><label for="con"><?php echo $row['contact'];?> </label></td>
</tr>
<tr>
<td> <p> </p> </td>
<td> <p> </p> </td>
</tr>
</table>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<!-- <?php
//include("userprofilereward.php");
?>-->
</div>
<footer>
<div class="container-fluid footer">
<div class="container">
<div class="col-md-4" align="center">
<img src="images/logo.png" class="img img-responsive footerimg" />
</div>
<div class="col-md-4" align="center">
<h6> CONTACT CURTIN </h6>
<br />
<p>
<b>General enquiries</b> <br />
Telephone: +61 8 9266 9266 <br />
Fax: +61 8 9266 3131 <br />
<br /><br/>
<b>Address</b> <br />
Kent Street, <br /> Bentley, <br /> Perth <br />
Western Australia 6102
</p>
</div>
<div class="col-md-4" align="center">
<p><b>LOCATIONS</b> <br /> <br />
Bentley (main campus) <br />
Other WA campuses <br />
Curtin University Sydney <br />
Curtin Sarawak <br />
Curtin Singapore <br />
</p>
</div>
</div>
</div>
</footer>
</body>
</html>