-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
198 lines (173 loc) · 7.22 KB
/
home.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
<?php
session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once("connection_pdo.php");
if (!isset($_SESSION['username'])) {
header("location: login.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homepage</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css">
<link rel="stylesheet" href="css/style.css">
<style>
/* Make the admin panel button fixed at the bottom */
.admin-btn {
position: fixed;
bottom: 20px;
right: 20px;
padding: 15px 25px;
font-size: 18px;
background-color: #28a745;
color: white;
border: none;
border-radius: 50px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
/* Make the marksheet button bigger and more prominent */
.marksheet-btn {
padding: 20px 40px;
font-size: 24px;
background-color: #007bff;
color: white;
border-radius: 8px;
transition: background-color 0.3s;
display: inline-block;
}
.marksheet-btn:hover {
background-color: #0056b3;
}
/* Add a subtle background color and some padding to fill space */
.main-content {
padding: 50px 20px;
background-color: #f9f9f9;
min-height: 70vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
/* Decorative element for filling empty space */
.decorative-box {
width: 100%;
height: 50px;
background-color: #efefef;
margin-top: 30px;
border-radius: 10px;
}
/* Add simple text under the blank space */
.simple-text {
font-family: Arial, sans-serif;
font-size: 18px;
color: #555;
text-align: center;
margin-top: 40px;
}
</style>
</head>
<body>
<!-- navbar section -->
<header class="navbar-section">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a class="navbar-brand" href="#"> Debating Tool</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="room_plan.php">Room Plan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="marksheet.php">Marksheet</a>
</li>
<li class="nav-item">
<div class="dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person"></i>
</a>
<ul class="dropdown-menu mt-2 mr-0" aria-labelledby="dropdownMenuLink">
<li>
<?php
// Fetch user information
$id = $_SESSION['id'];
$stmt = $connection_pdo->prepare("SELECT * FROM users WHERE id = :id");
$stmt->bindParam(':id', $id);
$stmt->execute();
$user = $stmt->fetch(PDO::FETCH_ASSOC);
if ($user) {
echo "<a class='dropdown-item' href='edit.php?id={$user['id']}'>Change Profile</a>";
}
?>
</li>
<li><a class="dropdown-item" href="logout.php">Logout</a></li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="name">
<center>Welcome
<?php echo $_SESSION['username']; ?>
!
</center>
</div>
<section class="main-content">
<div>
<!-- Make the marksheet button more prominent -->
<a href="marksheet.php" class="btn marksheet-btn">Go to Marksheet</a>
</div>
<!-- Decorative element to fill space -->
<div class="decorative-box"></div>
<!-- Add simple text below the blank space -->
<div class="simple-text">
<p>Welcome to the Debating Tool System. Feel free to explore the available features!</p>
</div>
</section>
<!-- Add the admin panel button at the bottom right -->
<a href="admin_home.php" class="btn admin-btn">Go to Admin Panel</a>
<!-- footer section -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-12 col-sm-12">
<p class="logo">Debating Tool</p>
</div>
<div class="col-lg-5 col-md-12 col-sm-12">
<ul class="d-flex">
<li><a href="home.php">Home</a></li>
<li><a href="marksheet.php">Marksheet</a></li>
</ul>
</div>
<div class="col-lg-2 col-md-12 col-sm-12">
<p>©
<a href="https://github.com/Cybersky4" target="_blank" style="color: inherit; text-decoration: underline;">2024_Cyber</a>,
<a href="https://github.com/silverhadch" target="_blank" style="color: inherit; text-decoration: underline;">2024_silverhadch</a>
</p>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-oBqDVmMz4fnFO9gybHiEBh8R+Klv0CpYn3zC8a8gWm2b3ddp6K69YYcR8WoZP4p6e"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-cuFcMI3J9YgMZ9xgjQwAri1XshYqRf01Ok3Lg4tLft7B9tvzF7Ib54f9prWfpyiY"
crossorigin="anonymous"></script>
</body>
</html>