-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
117 lines (114 loc) · 4.5 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
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
<?php
include "DB_connection.php";
include "data/setting.php";
$setting = getSetting($conn);
if ($setting != 0) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to <?=$setting['school_name']?></title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="icon" href="logo.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
</head>
<body class="body-home">
<div class="black-fill"><br /> <br />
<div class="container">
<nav class="navbar navbar-expand-lg bg-light"
id="homeNav">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="logo.png" width="40">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#"><i class="fa-solid fa-house fa-2xs"></i> Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#about">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">Contact</a>
</li>
</ul>
<ul class="navbar-nav me-right mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="login.php"><i class="fa-solid fa-user fa-xs"></i> Login</a>
</li>
</ul>
</div>
</div>
</nav>
<section class="welcome-text d-flex justify-content-center align-items-center flex-column">
<img src="logo.png">
<h4>Welcome to <?=$setting['school_name']?></h4>
<p><?=$setting['slogan']?></p>
</section>
<section id="about"
class="d-flex justify-content-center align-items-center flex-column">
<div class="card mb-3 card-1">
<div class="row g-0">
<div class="col-md-4">
<img src="logo.png" class="img-fluid rounded-start" >
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">About Us</h5>
<p class="card-text"><?=$setting['about']?></p>
<p class="card-text"><small class="text-muted">Sunbeams School</small></p>
</div>
</div>
</div>
</div>
</section>
<section id="contact"
class="d-flex justify-content-center align-items-center flex-column">
<form method="post"
action="req/contact.php">
<h3>Contact Us</h3>
<?php if (isset($_GET['error'])) { ?>
<div class="alert alert-danger" role="alert">
<?=$_GET['error']?>
</div>
<?php } ?>
<?php if (isset($_GET['success'])) { ?>
<div class="alert alert-success" role="alert">
<?=$_GET['success']?>
</div>
<?php } ?>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" name="email" aria-describedby="emailHelp" placeholder="enter your email">
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label class="form-label">Full Name</label>
<input type="text" name="full_name" class="form-control" placeholder="enter your fullname">
</div>
<div class="mb-3">
<label class="form-label">Message</label>
<textarea class="form-control"name="message" rows="4" placeholder="enter your message"></textarea>
</div>
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-paper-plane fa-2xs"></i> Send</button>
</form>
</section>
<div class="text-center text-light">
Copyright © <?=$setting['current_year']?> <?=$setting['school_name']?>. All rights reserved.
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
<?php }else {
header("Location: login.php");
exit;
} ?>