-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
81 lines (65 loc) · 2.86 KB
/
index.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
error_reporting(0);
session_start();
session_destroy();
if ($_SESSION['message']) // this is to check if the session has any message or not
{
$message = $_SESSION['message'];
echo "<script type='text/javascript'> // this is javascript code
alert('$message');
</script>";
}
$host = "localhost";
$user = "root";
$password = "";
$db = "student_management_sys";
$data = mysqli_connect($host, $user, $password, $db); // this is to connect the page to the database
$sql = "SELECT * FROM teacher"; // this is to select all the data from the database
$result = mysqli_query($data, $sql); // this is to execute the query
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Management System</title>
<link rel="icon" href="image/logo2.png">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;400;700&display=swap" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-icons.css" rel="stylesheet">
<link rel="stylesheet" href="css/templatemo-festava-live.css?v=<?php echo time(); ?>">
<link rel="stylesheet" href="css/style.css?v=<?php echo time(); ?>">
</head>
<body>
<?php
include "views/navbar.php";
include "views/sections.php";
include "views/footer.php";
?>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous">
</script>
<button id="backToTop" class="back-to-top">↑</button>
<script>
document.addEventListener("DOMContentLoaded", function() {
var backToTopButton = document.getElementById("backToTop");
window.onscroll = function() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
backToTopButton.style.display = "block";
} else {
backToTopButton.style.display = "none";
}
};
backToTopButton.addEventListener("click", function() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
});
});
</script>
</body>
</html>