-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamanagerwelcome.php
96 lines (85 loc) · 2.78 KB
/
amanagerwelcome.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
<?php
session_start();
if (!isset($_SESSION['managerusername'])) {
header("Location: amanagerindex.php");
}
$temp = $_SESSION['managerusername'];
if(isset($_GET['delete'])){
$id = $_GET['delete'];
mysqli_query($conn, "DELETE FROM manager WHERE managerusername = '$managerusername'");
header('location:amanagerwelcome.php');
};
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="welcome.css">
<title>Welcome</title>
<style>
table {
border-collapse: collapse;
width: 100%;
color: black; font-family: monospace;
font-size: 25px;
text-align: left;
}
th {
background-color: white; color: red;
}
tr:nth-child(even) {background-color: #f2f2f2}
</style>
<link rel="stylesheet" href="profile.css">
</head>
<body>
<div>
</div>
<div class="banner">
<?php echo "<h1>Welcome " . $_SESSION['managerusername'] . "</h1>"; ?>
<div>
<table>
<h2>Dashboard</h2>
<tr>
<th>Your ID</th>
<th>Name</th>
<th>Email</th>
</tr>
<?php
include 'model/config.php';
$sql = "SELECT * FROM manager WHERE managerusername='$temp'";
$result = mysqli_query($conn, $sql);
while($row = $result->fetch_assoc()){
echo "<tr><td>".$row['id']."</td><td>".$row['managerusername']."</td><td>".$row['managermail']."</td></tr>";
}
?>
</table>
<div>
</div>
<div>
</table>
<a href="amanager_page.php">Add New Center</a>
<td>
<a href="amanagerwelcome.php?delete={$rows['managerusername']}" class="btn"> <i class="fas fa-trash"></i><a href="amanagerindex.php"> Delete </a></a>
</td>
<div>
<style>
a:link, a:visited {
background-color: white;
color: black;
border: 2px solid white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
color: white;
}
</style>
<a href="amanagerlogout.php">Logout</a>
</div>
</div>
</body>
</html>