-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage_classes.php
98 lines (84 loc) · 3.44 KB
/
manage_classes.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/home.css">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<link rel="stylesheet" type='text/css' href="css/manage.css">
<title>SSRMS</title>
</head>
<body>
<div class="title">
<a href="dashboard.php"><img src="./images/logo1.png" alt="" class="logo"></a>
<span class="heading">Class Section</span>
<a href="logout.php" style="color: white; text-decoration:none;"><span class="fa fa-sign-out"></span> Logout</a>
</div>
<div class="nav">
<ul>
<li>
<a href="dashboard.php">Dashboard</a>
</li>
<li class="dropdown" onclick="toggleDisplay('1')">
<a href="" class="dropbtn">Classes  
<span class="fa fa-angle-down"></span>
</a>
<div class="dropdown-content" id="1">
<a href="add_classes.php">Add Class</a>
<a href="manage_classes.php">Manage Class</a>
</div>
</li>
<li class="dropdown" onclick="toggleDisplay('2')">
<a href="#" class="dropbtn">Students  
<span class="fa fa-angle-down"></span>
</a>
<div class="dropdown-content" id="2">
<a href="add_students.php">Add Students</a>
<a href="manage_students.php">Manage Students</a>
</div>
</li>
<li class="dropdown" onclick="toggleDisplay('3')">
<a href="#" class="dropbtn">Results  
<span class="fa fa-angle-down"></span>
</a>
<div class="dropdown-content" id="3">
<a href="add_results.php">Add Results</a>
<a href="manage_results.php">Manage Results</a>
</div>
</li>
</ul>
</div>
<div class="main">
<?php
include('init.php');
include('session.php');
$db = mysqli_select_db($conn,'simplestresult');
$sql = "SELECT `name`, `id` FROM `class`";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
echo "<table>
<caption>Manage Classes</caption>
<tr>
<th>#</th>
<th>NAME</th>
<th>ACTION</th>
</tr>";
$cnt=1;
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>$cnt</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td><a href='delete-class.php?id=".$row['id']."' style='color:#F66; text-decoration:none;'><span class='fa fa-trash'></span> Remove</a></td>";
echo "</tr>";
$cnt++; }
echo "</table>";
} else {
echo "0 results";
}
?>
</div>
</body>
</html>