-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
103 lines (96 loc) · 3.13 KB
/
admin.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
<?php
include "header.html"
?>
<html>
<head>
</head>
<body>
<?php
include "connect.php";
if(isset($_POST['username'])&&isset($_POST['password'])){
$uname = $_POST['username'];
$pass = md5($_POST['password']);
$query = "select * from admin where username = '$uname' AND password = '$pass'";
$result = mysqli_query($connection,$query);
if(mysqli_fetch_assoc($result)){
//echo "Login successful";
echo "<div class=\"panel panel-success\" align=\"center\" style=\"margin-right: 10%;margin-left: 10%;margin-top: 5%;\">";
echo "<div class=\"panel-heading\">Registration Requests</div>
<div class=\"panel-body\">
<table class=\"table table-hover table-responsive\">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>College Name</th>
<th>Mobile</th>
<th>Workshop Type</th>
<th>Laptop Availability</th>
</tr>
</thead>";
$query = "select * from registration";
$result = mysqli_query($connection,$query);
echo "<tbody>";
while($row = mysqli_fetch_assoc($result)){
echo "<tr>";
echo "<td>".$row['name']."</td>";
echo "<td>".$row['email']."</td>";
echo "<td>".$row['college']."</td>";
echo "<td>".$row['mobile']."</td>";
echo "<td>".$row['workshoptype']."</td>";
echo "<td>".$row['laptop']."</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
echo "</div>";
echo "</div>";
//Display Display Coordinators Requests
echo "<div class=\"panel panel-success\" align=\"center\" style=\"margin-right: 10%;margin-left: 10%;margin-top: 5%;max-height: 150px;overflow-y: scroll;\">";
echo "<div class=\"panel-heading\">Requests for coordinators to visit their college</div>
<div class=\"panel-body\">
<table class=\"table table-hover table-responsive\">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>College Name</th>
<th>Mobile</th>
<th>Expected count</th>
</tr>
</thead>";
$query = "select * from request";
$result = mysqli_query($connection,$query);
echo "<tbody>";
while($row = mysqli_fetch_assoc($result)){
echo "<tr>";
echo "<td>".$row['name']."</td>";
echo "<td>".$row['email']."</td>";
echo "<td>".$row['college']."</td>";
echo "<td>".$row['mobile']."</td>";
echo "<td>".$row['count']."</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
echo "</div>";
echo "</div>";
}
else {
include "loginpanel.html?msg = Wrong Username or password";
}
}
else{
include "loginpanel.html";
}
if(isset($_GET['msg'])){
echo "<div class=\"alert alert-danger\" style='margin-right: 20%;margin-left: 20%;margin-top: 2%' role=\"alert\">";
echo $_GET['msg'];
echo "</div>";
}
?>
<?php
include "footer.html"
?>
</body>
</html>