ACADEMIC STAFF
ACADEMIC STAFF
academic_promotion_system/
└── css/
USE academic_promotion;
db.php
<?php
$host = "localhost";
$dbname = "academic_promotion";
if ($conn->connect_error) {
?>
Index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<nav>
</nav>
</body>
</html>
add_stuff.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<label>Name:</label>
<label>Position:</label>
<label>Department:</label>
<label>Hire Date:</label>
<label>Publications:</label>
<label>Teaching Years:</label>
<label>Performance Score:</label>
</form>
<?php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$position = $_POST['position'];
$department = $_POST['department'];
$hire_date = $_POST['hire_date'];
$publications = $_POST['publications'];
$teaching_years = $_POST['teaching_years'];
$performance_score = $_POST['performance_score'];
$sql = "INSERT INTO staff (name, position, department, hire_date, publications, teaching_years,
performance_score)
} else {
?>
</body>
</html>
View_staff.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<table border="1">
<tr>
<th>ID</th>
<th>Name</th>
<th>Position</th>
<th>Department</th>
<th>Hire Date</th>
<th>Publications</th>
<th>Teaching Years</th>
<th>Performance Score</th>
</tr>
<?php
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['name']}</td>
<td>{$row['position']}</td>
<td>{$row['department']}</td>
<td>{$row['hire_date']}</td>
<td>{$row['publications']}</td>
<td>{$row['teaching_years']}</td>
<td>{$row['performance_score']}</td>
</tr>";
?>
</table>
</body>
</html>
Style.css
body {
background-color: #f8f9fa;
margin: 20px;
h1 {
color: #333;
}
nav a {
margin-right: 15px;
text-decoration: none;
color: #007BFF;
form {
margin: 20px 0;
form label {
display: block;
padding: 10px;
width: 100%;
max-width: 400px;
margin-bottom: 15px;
table {
width: 100%;
border-collapse: collapse;
padding: 10px;
text-align: left;
birth_certificate_system/
└── css/
USE birth_registration;
CREATE TABLE birth_records (
);
db.php
<?php
$host = "localhost";
$dbname = "birth_registration";
if ($conn->connect_error) {
?>
Index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<nav>
</nav>
</body>
</html>
register_birth.php
<?php include 'db.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Register Birth</title>
</head>
<body>
<label>Child's Name:</label>
<label>Date of Birth:</label>
<label>Gender:</label>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
<label>Place of Birth:</label>
<label>Mother's Name:</label>
<label>Contact Number:</label>
</form>
<?php
if (isset($_POST['submit'])) {
$child_name = $_POST['child_name'];
$dob = $_POST['dob'];
$gender = $_POST['gender'];
$place_of_birth = $_POST['place_of_birth'];
$father_name = $_POST['father_name'];
$mother_name = $_POST['mother_name'];
$contact_number = $_POST['contact_number'];
?>
</body>
</html>
View_request.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>View Requests</title>
</head>
<body>
<tr>
<th>ID</th>
<th>Child's Name</th>
<th>Date of Birth</th>
<th>Gender</th>
<th>Status</th>
<th>Actions</th>
</tr>
<?php
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['child_name']}</td>
<td>{$row['date_of_birth']}</td>
<td>{$row['gender']}</td>
<td>{$row['status']}</td>
<td>
<a href='approve_request.php?id={$row['id']}&status=Approved'>Approve</a> |
<a href='approve_request.php?id={$row['id']}&status=Rejected'>Reject</a>
</td>
</tr>";
?>
</table>
</body>
</html>
Approve_request.php
<?php
$id = $_GET['id'];
$status = $_GET['status'];
} else {
?>
body {
margin: 20px;
background-color: #f8f9fa;
h1 {
color: #333;
nav a {
margin-right: 15px;
text-decoration: none;
color: #007BFF;
form {
margin: 20px 0;
form label {
display: block;
margin: 10px 0 5px;
padding: 10px;
width: 100%;
max-width: 400px;
margin-bottom: 15px;
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
padding: 10px;
text-align: left;
a{
color: #007BFF;
text-decoration: none;
}
USE birth_registration;
);
birth_certificate_system/
├── css/
USE birth_registration;
);
);
db.php
<?php
$host = "localhost";
$dbname = "birth_registration";
if ($conn->connect_error) {
?>
register_user.php
<?php
include 'db.php';
if (isset($_POST['register'])) {
$username = $_POST['username'];
$sql = "INSERT INTO users (username, password, role) VALUES ('$username', '$password', '$role')";
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>User Registration</title>
</head>
<body>
<h2>Register</h2>
<label>Username:</label>
<label>Password:</label>
</form>
</body>
</html>
Login.php
<?php
session_start();
include 'db.php';
if (isset($_POST['login'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
// Verify password
if (password_verify($password, $row['password'])) {
$_SESSION['user_id'] = $row['id'];
$_SESSION['username'] = $row['username'];
// Redirect to homepage
header("Location: index.php");
} else {
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<h2>Login</h2>
<label>Username:</label>
<label>Password:</label>
</form>
</body>
</html>
Logout.php
<?php
session_start();
session_destroy();
header("Location: index.php");
exit;
?>
Index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<nav>
</nav>
<nav>
</nav>
<a href="logout.php">Logout</a>
</body>
</html>
register_birth.php
<?php
session_start();
include 'db.php';
if (!isset($_SESSION['username'])) {
header("Location: login.php");
exit;
if (isset($_POST['submit'])) {
$child_name = $_POST['child_name'];
$dob = $_POST['dob'];
$gender = $_POST['gender'];
$place_of_birth = $_POST['place_of_birth'];
$father_name = $_POST['father_name'];
$mother_name = $_POST['mother_name'];
$contact_number = $_POST['contact_number'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Register Birth</title>
</head>
<body>
<label>Child's Name:</label>
<label>Date of Birth:</label>
<label>Gender:</label>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select><br>
<label>Place of Birth:</label>
<label>Father's Name:</label>
<label>Mother's Name:</label>
<label>Contact Number:</label>
</form>
</body>
</html>
Views_request.php
<?php
session_start();
header("Location: index.php");
exit;
}
include 'db.php';
<tr>
<th>ID</th>
<th>Child's Name</th>
<th>Date of Birth</th>
<th>Status</th>
<th>Actions</th>
</tr>";
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['child_name']}</td>
<td>{$row['date_of_birth']}</td>
<td>{$row['status']}</td>
<td><a href='approve_request.php?id={$row['id']}&status=Approved'>Approve</a> |
<a href='approve_request.php?id={$row['id']}&status=Rejected'>Reject</a></td>
</tr>";
echo "</table>";
?>
Approve_request.php
<?php
session_start();
header("Location: index.php");
exit;
include 'db.php';
$id = $_GET['id'];
$status = $_GET['status'];
} else {
?>
Style.css
body {
margin: 20px;
background-color: #f8f9fa;
h1 {
color: #333;
form {
margin: 20px 0;
form label {
display: block;
padding: 10px;
width: 100%;
max-width: 400px;
margin-bottom: 15px;
a{
color: #007BFF;
text-decoration: none;
a:hover {
text-decoration: underline;
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
table th, table td {
padding: 10px;
text-align: left;
gas_delivery_system/
├── css/
);
);
db.php
<?php
$host = "localhost"; // Database server
if ($conn->connect_error) {
?>
register_user.php
<?php
include 'db.php';
if (isset($_POST['register'])) {
$username = $_POST['username'];
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>User Registration</title>
</head>
<body>
<h2>Register</h2>
<label>Username:</label>
<label>Password:</label>
</form>
</html>
login.php
<?php
session_start();
include 'db.php';
if (isset($_POST['login'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
// Verify password
if (password_verify($password, $row['password'])) {
$_SESSION['user_id'] = $row['id'];
$_SESSION['username'] = $row['username'];
$_SESSION['role'] = $row['role'];
// Redirect to homepage
header("Location: index.php");
} else {
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<h2>Login</h2>
<label>Username:</label>
<label>Password:</label>
</form>
</body>
</html>
Logout.php
<?php
session_start();
session_destroy();
header("Location: index.php");
exit;
?>
index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<nav>
</nav>
<nav>
</nav>
<a href="logout.php">Logout</a>
</body>
</html>
order.php
<?php
session_start();
include 'db.php';
if (!isset($_SESSION['username'])) {
header("Location: login.php");
exit;
if (isset($_POST['order'])) {
$quantity = $_POST['quantity'];
$user_id = $_SESSION['user_id'];
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Order Gas</title>
</head>
<body>
<h2>Order Gas</h2>
</form>
</body>
</html>
view_orders.php
<?php
session_start();
header("Location: index.php");
exit;
include 'db.php';
<tr>
<th>Order ID</th>
<th>User ID</th>
<th>Quantity</th>
<th>Status</th>
<th>Actions</th>
</tr>";
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['user_id']}</td>
<td>{$row['quantity']}</td>
<td>{$row['status']}</td>
<td>
<a href='approve_order.php?id={$row['id']}&status=Delivered'>Approve</a> |
<a href='approve_order.php?id={$row['id']}&status=Rejected'>Reject</a>
</td>
</tr>";
echo "</table>";
?>
Approve_order.php
<?php
session_start();
header("Location: index.php");
exit;
include 'db.php';
if (isset($_GET['id']) && isset($_GET['status'])) {
$id = $_GET['id'];
$status = $_GET['status'];
} else {
?>
Style.css
body {
background-color: #f4f4f9;
margin: 0;
padding: 0;
}
h1, h2 {
color: #333;
text-align: center;
nav {
text-align: center;
margin: 20px;
nav a {
margin: 0 10px;
text-decoration: none;
color: #0066cc;
form {
width: 300px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 8px;
}
form input {
width: 100%;
padding: 10px;
margin: 10px 0;
border-radius: 5px;
form button {
width: 100%;
padding: 10px;
background-color: #0066cc;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
form button:hover {
background-color: #004d99;
table {
width: 80%;
table, th, td {
text-align: center;
padding: 10px;
th {
background-color: #f1f1f1;
Background image
/* Basic Reset */
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
font-family: Arial, sans-serif;
background-size: cover;
background-attachment: fixed;
color: #fff;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
h1, h2 {
color: #fff;
text-align: center;
nav {
text-align: center;
margin: 20px;
}
nav a {
margin: 0 10px;
text-decoration: none;
font-size: 1.2em;
nav a:hover {
/* Form Styles */
form {
padding: 30px;
border-radius: 10px;
width: 100%;
max-width: 400px;
form label {
font-size: 1.1em;
margin-bottom: 8px;
display: block;
color: #fff;
form input {
width: 100%;
padding: 12px;
margin: 10px 0;
border-radius: 8px;
background-color: #f4f4f4;
form input:focus {
border-color: #00bfff;
outline: none;
background-color: #fff;
form button {
width: 100%;
padding: 12px;
background-color: #00bfff;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 1.1em;
form button:hover {
background-color: #ff6600;
/* Table Styles */
table {
width: 80%;
border-collapse: collapse;
border-radius: 10px;
padding: 15px;
text-align: center;
table th {
background-color: #333;
color: #fff;
text-transform: uppercase;
table td {
background-color: #f9f9f9;
color: #333;
table td a {
color: #ff6600;
text-decoration: none;
table td a:hover {
color: #00bfff;
/* Responsive Design */
body {
padding: 10px;
form {
width: 90%;
margin: 10px;
table {
width: 100%;
margin-top: 15px;
MOVIE SYSTEM
USE movies_db;
);
CREATE TABLE movies (
description TEXT,
release_date DATE
);
user_name VARCHAR(100),
review TEXT,
);
<?php
$host = 'localhost';
$user = 'root';
$password = '';
$dbname = 'movies_db';
$conn = new mysqli($host, $user, $password, $dbname);
if ($conn->connect_error) {
?>
Add_movie.php
<!DOCTYPE html>
<html>
<head>
<title>Add Movie</title>
</head>
<body>
<h1>Add Movie</h1>
<label for="title">Title:</label>
<label for="description">Description:</label>
<textarea id="description" name="description" required></textarea><br>
</form>
<?php
if (isset($_POST['add_movie'])) {
$title = $_POST['title'];
$description = $_POST['description'];
$release_date = $_POST['release_date'];
$sql = "INSERT INTO movies (title, description, release_date) VALUES (?, ?, ?)";
$stmt = $conn->prepare($sql);
if ($stmt->execute()) {
} else {
?>
</body>
</html>
Review_movie.php
<!DOCTYPE html>
<html>
<head>
<title>Submit/View/Edit Review</title>
</head>
<body>
<h1>Reviews</h1>
<?php
?>
</select><br>
<label for="review">Review:</label>
</form>
<?php
if (isset($_POST['submit_review'])) {
$movie_id = $_POST['movie_id'];
$user_name = $_POST['user_name'];
$review = $_POST['review'];
$rating = $_POST['rating'];
if ($check->num_rows > 0) {
$sql = "UPDATE reviews SET review = ?, rating = ? WHERE movie_id = ? AND user_name = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param('siis', $review, $rating, $movie_id, $user_name);
$stmt->execute();
} else {
$sql = "INSERT INTO reviews (movie_id, user_name, review, rating) VALUES (?, ?, ?, ?)";
$stmt = $conn->prepare($sql);
$stmt->execute();
?>
<h2>All Reviews</h2>
<?php
$result = $conn->query("
FROM reviews
");
?>
<hr>
</body>
</html>
register.php
<!DOCTYPE html>
<html>
<head>
<title>Register</title>
</head>
<body>
<h1>Register</h1>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br>
<label for="password">Password:</label>
</form>
<?php
if (isset($_POST['register'])) {
$username = $_POST['username'];
$stmt = $conn->prepare($sql);
if ($stmt->execute()) {
} else {
?>
</body>
</html>
Login.php
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<label for="username">Username:</label>
<label for="password">Password:</label>
</form>
<?php
session_start();
if (isset($_POST['login'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $conn->prepare($sql);
$stmt->bind_param('s', $username);
$stmt->execute();
$result = $stmt->get_result();
$user = $result->fetch_assoc();
$_SESSION['user_id'] = $user['id'];
$_SESSION['username'] = $user['username'];
header("Location: index.php");
exit;
} else {
?>
</body>
</html>
Logout.php
<?php
session_start();
session_destroy();
header("Location: login.php");
exit;
?>
Index.php
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit;
include('db.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
</head>
<body>
<a href="logout.php">Logout</a>
<hr>
<!-- The rest of the page code (movies and reviews display) -->
</body>
</html>