forked from nandishkotadia/JP-code-for-good-hackathon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
adminuser.php
81 lines (54 loc) · 1.68 KB
/
adminuser.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
<?php
require 'core.inc.php';
require 'connect.inc.php';
if(loggedin())
{
//echo $_SESSION['user_id'];
//echo $field;
$query = "SELECT `fullname` FROM corp_reg WHERE `id`='".$_SESSION['user_id']."'";
if($query_run = mysql_query($query))
{
if($query_result = mysql_result($query_run, 0, 'fullname'))
{
$a= $query_result;
}
else
{
}
}
//echo $fullname = getfield('fullname');
echo 'Welcome , '.$a.' <span style=""><a class="logout" style="" href="logout.php">Logout</a></span><br>';
}
$var="Select * from user_details";
$result=mysql_query($var);
?>
<!DOCTYPE html>
<head>
<title>User Data</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap-min.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
<div id="wrapper">
<div class="header">
<h1 style="text-align:center;">RUN & URN<span></span></h1>
<a href="admin.php"><button class="btn btn-primary btn-lg">back</button></a>
</div>
<h3>User Details</h3>
<table class="table table-striped">
<tr><th>Id</th><th>Username</th><th>Phone</th><th>Email</th><th>Distance</th><th>Speed</th><th>Duration</th><th>Earn</th><th>Event Id</th></tr>
<?php
while($row=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" .$row['id']."</td><td> ".$row['username'] ."</td> <td>" .$row['phno'] ."</td><td> " .$row['email'] ."</td><td> " .$row['distance'] ."</td><td> " .$row['speed'] ."</td><td> " .$row['duration'] ."</td><td> " .$row['earn'] ."</td><td> " .$row['eid'] ."</td>";
echo "</tr>";
}
?>
</table>
</form>
</div>
</div>
</body>
</html>