Add JSA_System-main
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch Chrome against localhost",
|
||||
"url": "http://localhost:8080",
|
||||
"webRoot": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
210
adminProfile.php
Normal file
@ -0,0 +1,210 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
?>
|
||||
|
||||
<!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>Profile's | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 300px;
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 20px;
|
||||
background: #161616;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.images img {
|
||||
border-radius: 50%;
|
||||
margin-bottom: 30px;
|
||||
position: center;
|
||||
width: 170px;
|
||||
}
|
||||
html, body {
|
||||
height: 50%;
|
||||
}
|
||||
button {
|
||||
margin-left: 125px;
|
||||
padding: 10px 15px;
|
||||
color: white;
|
||||
background-color: purple;
|
||||
transition: 0.5s;
|
||||
letter-spacing: 4px;
|
||||
}
|
||||
.right-container {
|
||||
align-items: center;
|
||||
background: black;
|
||||
width: 400px;
|
||||
height: 500px;
|
||||
padding: 20px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
h3 {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.gradienttext {
|
||||
margin-top: 37rem;
|
||||
margin-bottom: 3rem;
|
||||
font-size: 30px;
|
||||
}
|
||||
p {
|
||||
font-size: 18px;
|
||||
margin-bottom: 20px;
|
||||
color: aliceblue;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
color: white;
|
||||
}
|
||||
table td {
|
||||
padding: 10px 0;
|
||||
font-size: 17px;
|
||||
}
|
||||
table td input {
|
||||
width: calc(100% - 20px);
|
||||
padding: 8px;
|
||||
margin: 1px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.credit a {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-weight: 800;
|
||||
}
|
||||
.credit {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 100px;
|
||||
width: 120%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="adminmenu.php" class="logo">
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
<?php
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's details
|
||||
$sql = "SELECT * FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$data = mysqli_query($conn, $sql);
|
||||
$check_event = mysqli_num_rows($data) > 0;
|
||||
if ($check_event) {
|
||||
while ($row = mysqli_fetch_assoc($data)) {
|
||||
?>
|
||||
<h3 class="gradienttext">PROFILE DETAILS</h3>
|
||||
<div class="images"><img src="pic/profiles.png"></div>
|
||||
<div class="right-container">
|
||||
<form method="post" action="adminProfile2.php">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="ID">Id :</label></td>
|
||||
<td><input id="ID" name="ID" type="text" value="<?php echo $row['Admin_ID']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Pass">Password :</label></td>
|
||||
<td><input id="Pass" name="Pass" type="text" value="<?php echo $row['Admin_Pass']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Name">Name :</label></td>
|
||||
<td><input id="Name" name="Name" type="text" value="<?php echo $row['Admin_Name']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="PhoneNum">Phone Number :</label></td>
|
||||
<td><input id="PhoneNum" name="PhoneNum" type="number" value="<?php echo $row['Admin_PhoneNum']; ?>" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="submit" value="submit" name="submit">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "<p>No profile details found.</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
30
adminProfile2.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/* include db connection file */
|
||||
include("connection.php");
|
||||
session_start();
|
||||
if(isset($_POST['submit'])){
|
||||
/* capture values from HTML form */
|
||||
$ID = $_POST['ID'];
|
||||
$Pass = $_POST['Pass'];
|
||||
$Name = $_POST['Name'];
|
||||
$PhoneNum = $_POST['PhoneNum'];
|
||||
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Update the renter table
|
||||
$sql = "UPDATE admin SET Admin_ID = '$ID', Admin_Pass = '$Pass', Admin_Name = '$Name', Admin_PhoneNum = '$PhoneNum' WHERE Admin_ID = '$AccID'";
|
||||
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
echo "<script>alert('Updated is successfull')</script>";
|
||||
$_SESSION['AccID'] = $ID;
|
||||
echo "<script>window.location = 'adminProfile.php'</script>";
|
||||
exit();
|
||||
} else {
|
||||
echo "<script>alert('ID is already exist')</script>";
|
||||
echo "<script>window.location = 'adminProfile.php'</script>";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
133
adminmenu.php
Normal file
@ -0,0 +1,133 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="adminmenu.php" class="logo"><span><?php echo $userName; ?>'s</span></a>
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="slider-wrapper">
|
||||
<div class="slider">
|
||||
<div class="nav-arrow left" onclick="scrollToSection(-1)"><i class="fa fa-arrow-left" aria-hidden="true"></i></div>
|
||||
<div class="nav-arrow right" onclick="scrollToSection(1)"><i class="fa fa-arrow-right" aria-hidden="true"></i></div>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<h1>Homepage <span>Management</span></h1>
|
||||
<p>Hi, Admin please kindly proceed or approve order that in your queue. You can upload some events for promote it to other users</p>
|
||||
<br><br>
|
||||
<button class="btn" onclick="scrollToSection(1)">MORE <i class="fa-solid fa-briefcase"></i></button>
|
||||
</div>
|
||||
<div class="home-img">
|
||||
<img src="pic/admin.jpg" alt="Admin">
|
||||
</div>
|
||||
</section>
|
||||
<section class="services" id="services">
|
||||
<div class="service-container">
|
||||
<div class="boxes">
|
||||
<div class="card">
|
||||
<a href="report.php"><img src="pic/report.jpg" alt="Report"></a>
|
||||
<h2>Report</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="renterList.php"><img src="pic/list.jpg" alt="List"></a>
|
||||
<h2>List</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="viewFeedback.php"><img src="pic/feedback.jpg" alt="Feedback"></a>
|
||||
<h2>Feedback</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="approval.php"><img src="pic/approv.jpeg" alt="Order"></a>
|
||||
<h2>Order</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="postEvents.php"><img src="pic/event.png" alt="Event"></a>
|
||||
<h2>Event</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="newAdmin.php"><img src="pic/profile.jpg" alt="Profile"></a>
|
||||
<h2>+ Acc</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script>
|
||||
let currentSection = 0;
|
||||
|
||||
function scrollToSection(direction) {
|
||||
const sections = document.querySelectorAll('.slider section');
|
||||
currentSection = (currentSection + direction + sections.length) % sections.length;
|
||||
sections[currentSection].scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
216
approval.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
|
||||
// Handling form submission
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if (isset($_POST['submit']) || isset($_POST['reject'])) {
|
||||
if (isset($_POST['checkbox'])) {
|
||||
$successMessage = "";
|
||||
foreach ($_POST['checkbox'] as $orderID) {
|
||||
// Process each selected checkbox individually
|
||||
if (isset($_POST['submit'])) {
|
||||
$sql = "UPDATE orders SET Approve_Status = 1, Checks_Status = 1 WHERE OrderID = ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("s", $orderID);
|
||||
$stmt->execute();
|
||||
$successMessage = "Order(s) had been Approved!";
|
||||
} elseif (isset($_POST['reject'])) {
|
||||
$sql = "UPDATE orders SET Approve_Status = 0, Checks_Status = 1 WHERE OrderID = ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("s", $orderID);
|
||||
$stmt->execute();
|
||||
$successMessage = "Order(s) had been rejected!";
|
||||
}
|
||||
}
|
||||
// Redirect after processing all selected checkboxes
|
||||
echo "<script>alert('$successMessage');</script>";
|
||||
echo "<script>window.location = 'approval.php'</script>";
|
||||
exit(); // Exit after redirection
|
||||
} else {
|
||||
echo "<script>alert('Please select at least one checkbox.');</script>";
|
||||
echo "<script>window.location = 'approval.php'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch data
|
||||
$sql = "SELECT * FROM orders WHERE Checks_Status = 0";
|
||||
$result = $conn->query($sql);
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Approval | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
.table-common {
|
||||
width: 882px; /* Adjust the width as needed */
|
||||
border-collapse: collapse; /* Add this to collapse the border */
|
||||
margin: auto; /* Center the table horizontally */
|
||||
}
|
||||
|
||||
.table-common th,
|
||||
.table-common td {
|
||||
border: 1px solid white; /* Add a single border to each cell */
|
||||
padding: 10px 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.table-actions input {
|
||||
margin-left: 10px;
|
||||
background: purple;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.table-actions input:hover {
|
||||
background: #e91e63;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="adminmenu.php" class="logo">
|
||||
<span><?php echo $userName; ?>'s</span>
|
||||
</a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br>
|
||||
<table width="882" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h1>Approval Site</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<form method="post" id="approval-form">
|
||||
<table class="table-common" id="table-1">
|
||||
<thead>
|
||||
<tr align="center" bgcolor="purple">
|
||||
<th width="33">NO</th>
|
||||
<th width="232">RENTER ID</th>
|
||||
<th width="157">PLACE NUMBER</th>
|
||||
<th width="82">License</th>
|
||||
<th width="170">DATE</th>
|
||||
<th width="82">APPROVAL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<?php
|
||||
if ($result->num_rows > 0) {
|
||||
$no = 1;
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo "<tr align='center'>";
|
||||
echo "<td>{$no}</td>";
|
||||
echo "<td>{$row['Renter_ID']}</td>";
|
||||
echo "<td>{$row['Place_Num']}</td>";
|
||||
echo "<td>{$row['License']}</td>";
|
||||
echo "<td>{$row['Dates']}</td>";
|
||||
echo "<td><input type='checkbox' name='checkbox[]' value='{$row['OrderID']}'></td>";
|
||||
echo "</tr>";
|
||||
$no++;
|
||||
}
|
||||
} else {
|
||||
echo "<tr align='center'><td colspan='6'>No Order Yet</td></tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-actions" style="text-align: right; margin-top: 20px;">
|
||||
<input type="submit" name="submit" id="submit" value="Approve" onclick="return confirmSubmit();">
|
||||
<input type="submit" name="reject" id="reject" value="Reject" onclick="return confirmReject();">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
<script>
|
||||
function confirmSubmit() {
|
||||
var checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
|
||||
if (checkboxes.length === 0) {
|
||||
alert("Please select at least one checkbox to APPROVE.");
|
||||
return false;
|
||||
}
|
||||
return confirm("Are you sure you want to APPROVE?");
|
||||
}
|
||||
|
||||
function confirmReject() {
|
||||
var checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
|
||||
if (checkboxes.length === 0) {
|
||||
alert("Please select at least one checkbox to reject the order.");
|
||||
return false;
|
||||
}
|
||||
return confirm("SERIOUS AR !!!Are you sure you want to reject ?");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
18
connection.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$servername = "localhost";
|
||||
$username = "root"; // default username for XAMPP
|
||||
$password = ""; // default password for XAMPP
|
||||
$database = "groupproject"; // your database name
|
||||
|
||||
// Create connection
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
|
||||
// Check connection
|
||||
if (isset($conn)) {
|
||||
echo "";
|
||||
}
|
||||
else {
|
||||
die("Connection failed : " . $conn->connect_error);
|
||||
}
|
||||
?>
|
||||
228
event.css
Normal file
@ -0,0 +1,228 @@
|
||||
/* Styling the body */
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
/* Styling section, giving background image and dimensions */
|
||||
section {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background: #161616;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Styling the left floating section */
|
||||
section .leftBox {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
position: sticky;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Styling the background of left floating section */
|
||||
section .leftBox .content {
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
/* Styling the hover effect of left floating section */
|
||||
section .leftBox .content:hover {
|
||||
background: #e91e63;
|
||||
transition: ease-in-out 2.0s;
|
||||
}
|
||||
|
||||
/* Styling the header of left floating section */
|
||||
section .leftBox .content h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 50px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Styling the paragraph of left floating section */
|
||||
section .leftBox .content p {
|
||||
margin: 10px 0 0;
|
||||
padding: 0;
|
||||
text-transform: uppercase;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* Styling the events section */
|
||||
section .events {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
/* Styling the event list */
|
||||
section .events ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Styling the individual event */
|
||||
section .events ul li {
|
||||
background: #fff;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Styling the time class of events section */
|
||||
section .events ul li .time {
|
||||
background: #262626;
|
||||
color: #fff;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
flex: 1 1 150px;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
/* Styling the hover effect of events section */
|
||||
section .events ul li:hover .time {
|
||||
background: #e91e63;
|
||||
}
|
||||
|
||||
/* Styling the header of time class of events section */
|
||||
section .events ul li .time h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
/* Styling the details class of events section */
|
||||
section .events ul li .details {
|
||||
padding: 20px;
|
||||
background: #161616;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
flex: 3 1 300px;
|
||||
}
|
||||
|
||||
/* Styling the header of the details class of events section */
|
||||
section .events ul li .details h3 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 22px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Styling the paragraph of details class of events section */
|
||||
section .events ul li .details p {
|
||||
margin: 10px 0 0;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Styling the links of details class of events section */
|
||||
section .events ul li .details a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
padding: 10px 15px;
|
||||
border: 1.5px solid #262626;
|
||||
margin-top: 8px;
|
||||
font-size: 18px;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
/* Styling the details class's hover effect */
|
||||
section .events ul li .details a:hover {
|
||||
background: #e91e63;
|
||||
color: #fff;
|
||||
border-color: #e91e63;
|
||||
}
|
||||
|
||||
|
||||
button[type="submit"] {
|
||||
background-color: #6a0dad;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
button[type="submit"]:hover {
|
||||
background-color: #551a8b;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
border: 1px solid #d1d1d1;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
resize: vertical;
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
|
||||
textarea:focus {
|
||||
border-color: #6a0dad;
|
||||
outline: none;
|
||||
box-shadow: 0 0 5px rgba(106, 13, 173, 0.5);
|
||||
}
|
||||
|
||||
input {
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
padding: 10px;
|
||||
border: 1px solid #d1d1d1;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
resize: vertical;
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: #6a0dad;
|
||||
outline: none;
|
||||
box-shadow: 0 0 5px rgba(106, 13, 173, 0.5);
|
||||
background-color: #6a0dad;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
a.delete-button {
|
||||
display: inline-block;
|
||||
background-color: #6a0dad;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: background-color 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
a.delete-button:hover {
|
||||
background-color: #551a8b;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
30
forgot.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
<link rel="stylesheet" href="lsf.css">
|
||||
<title>Forgot | UITM BAZAAR</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="containers" id="containers">
|
||||
<div class="form-container forgot">
|
||||
<form method="post" action="forgot.php">
|
||||
<h1>Forgot Password</h1>
|
||||
<br>
|
||||
<input type="text" placeholder="ID" name="AccID" id="AccID" required>
|
||||
<input type="password" placeholder=" New Password" name="AccNPass" required>
|
||||
<a href="login.html">Return to Login Page?</a>
|
||||
<button type="submit" name= Submit>Reset</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
41
forgot.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
include('connection.php');
|
||||
session_start();
|
||||
|
||||
if (isset($_POST['Submit'])) {
|
||||
// Get user input
|
||||
$AccID = $_POST['AccID'];
|
||||
$AccNPass = $_POST['AccNPass'];
|
||||
|
||||
// Prepare SQL statement to check if the ID exists
|
||||
$sql = "SELECT Renter_ID FROM renter WHERE Renter_ID = ?";
|
||||
|
||||
// Prepare and execute the statement with prepared statements
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("s", $AccID);
|
||||
$stmt->execute();
|
||||
|
||||
// Get the result set
|
||||
$result = $stmt->get_result();
|
||||
|
||||
// Check if there's a matching user
|
||||
if ($result->num_rows > 0) {
|
||||
// Update password if user exists
|
||||
$update_sql = "UPDATE renter SET Renter_Pass = ? WHERE Renter_ID = ?";
|
||||
$update_stmt = $conn->prepare($update_sql);
|
||||
$update_stmt->bind_param("ss", $AccNPass, $AccID);
|
||||
|
||||
if ($update_stmt->execute()) {
|
||||
// Password updated successfully
|
||||
echo "<script>alert('Reset Password successfully')</script>";
|
||||
echo "<script>window.location = 'login.html'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "<script>alert('Wrong ID or Password')</script>";
|
||||
echo "<script>window.location = 'forgot.html'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
40
login.html
Normal file
@ -0,0 +1,40 @@
|
||||
xam<!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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
<link rel="stylesheet" href="lsf.css">
|
||||
<title>Login | UITM BAZAAR</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container" id="container">
|
||||
<div class="form-container sign-in">
|
||||
<form method="post" action="login.php">
|
||||
<h1>Sign In</h1>
|
||||
<br>
|
||||
<input type="text" placeholder="ID" name="AccID" size="12" required>
|
||||
<input type="password" placeholder="Password" name="AccPass" required>
|
||||
<a href="forgot.html">Forget Your Password?</a>
|
||||
<button type="submit" name= Submit>Sign In</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="toggle-container">
|
||||
<div class="toggle">
|
||||
<div class="toggle-panel toggle-right">
|
||||
<h1>Hello, Friend!</h1>
|
||||
<p>Register with your personal details to use all site features</p>
|
||||
<a href="signin.html"><button class="hidden" id="register">Sign Up</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
34
login.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
session_start(); // Start the session
|
||||
include("connection.php");
|
||||
|
||||
if (isset($_POST['Submit'])) {
|
||||
$AccID = $_POST['AccID'];
|
||||
$AccPass = $_POST['AccPass'];
|
||||
$AccAdminID = $AccID;
|
||||
|
||||
$sql = "SELECT * FROM renter WHERE Renter_ID = '$AccID' AND Renter_Pass = '$AccPass'";
|
||||
$query = mysqli_query($conn, $sql);
|
||||
$column = mysqli_num_rows($query);
|
||||
|
||||
if ($column == 0) {
|
||||
$sql = "SELECT * FROM admin WHERE Admin_ID = '$AccID' AND Admin_Pass = '$AccPass'";
|
||||
$query = mysqli_query($conn, $sql);
|
||||
$column = mysqli_num_rows($query);
|
||||
|
||||
if ($column == 0) {
|
||||
echo "<script>alert('ID Or Password is incorrect')</script>";
|
||||
echo "<script>window.location = 'login.html'</script>";
|
||||
exit();
|
||||
} else {
|
||||
$_SESSION['AccAdminID'] = $AccAdminID;
|
||||
echo "<script>window.location = 'adminmenu.php'</script>";
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
$_SESSION['AccID'] = $AccID;
|
||||
echo "<script>window.location = 'rentermenu.php'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
8
logout.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (isset($_SESSION['AccID'])) {
|
||||
unset($_SESSION["AccID"]);
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
8
logoutAdmin.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (isset($_SESSION['AccAdminID'])) {
|
||||
unset($_SESSION["AccAdminID"]);
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
225
lsf.css
Normal file
@ -0,0 +1,225 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
|
||||
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
||||
body{
|
||||
background-image: url('pic/markets.png');
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container{
|
||||
background: transparent;
|
||||
background-color: #fff;
|
||||
border-radius: 30px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 768px;
|
||||
max-width: 100%;
|
||||
min-height: 480px;
|
||||
opacity: .9;
|
||||
backdrop-filter: blur(70px);
|
||||
}
|
||||
|
||||
.container p{
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0.3px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.container a{
|
||||
opacity: .9;
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
text-decoration: none;
|
||||
margin: 15px 0 10px;
|
||||
}
|
||||
|
||||
.container button{
|
||||
background-color: #512da8;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding: 10px 45px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
margin-top: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.container button.hidden{
|
||||
background-color: transparent;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.container form{
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
margin-left: 80px;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container input{
|
||||
background-color: #eee;
|
||||
border: none;
|
||||
margin: 8px 0;
|
||||
padding: 10px 15px;
|
||||
font-size: 13px;
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.containers{
|
||||
background: transparent;
|
||||
background-color: #fff;
|
||||
border-radius: 30px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
min-height: 330px;
|
||||
opacity: .9;
|
||||
backdrop-filter: blur(70px);
|
||||
}
|
||||
|
||||
.containers p{
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0.3px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.containers span{
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.containers a{
|
||||
opacity: .9;
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
text-decoration: none;
|
||||
margin: 15px 0 10px;
|
||||
}
|
||||
|
||||
.containers button{
|
||||
background-color: #512da8;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding: 10px 45px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
margin-top: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.containers button .hidden{
|
||||
background-color: transparent;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.containers form{
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 0 40px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.containers input{
|
||||
background-color: #eee;
|
||||
border: none;
|
||||
margin: 8px 0;
|
||||
padding: 10px 15px;
|
||||
font-size: 13px;
|
||||
border-radius: 8px;
|
||||
width: 250px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.form-container{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sign-in{
|
||||
left: 0;
|
||||
width: 50%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.forgot{
|
||||
position: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.sign-up{
|
||||
left: 0;
|
||||
width: 50%;
|
||||
opacity: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.toggle-container{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 60%;
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
border-radius: 150px 0 0 100px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.toggle{
|
||||
background-color: #512da8;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, #5c6bc0, #512da8);
|
||||
color: #fff;
|
||||
position: relative;
|
||||
left: -100%;
|
||||
height: 100%;
|
||||
width: 200%;
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.toggle-panel{
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 0 30px;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
.toggle-right{
|
||||
right: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
192
newAdmin.php
Normal file
@ -0,0 +1,192 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
?>
|
||||
|
||||
<!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>New Acc Admin | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 300px;
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 20px;
|
||||
background: #161616;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.images img {
|
||||
border-radius: 50%;
|
||||
margin-bottom: 30px;
|
||||
position: center;
|
||||
width: 170px;
|
||||
}
|
||||
html, body {
|
||||
height: 50%;
|
||||
}
|
||||
button {
|
||||
margin-left: 125px;
|
||||
padding: 10px 15px;
|
||||
color: white;
|
||||
background-color: purple;
|
||||
transition: 0.5s;
|
||||
letter-spacing: 4px;
|
||||
}
|
||||
.right-container {
|
||||
align-items: center;
|
||||
background: black;
|
||||
width: 400px;
|
||||
height: 500px;
|
||||
padding: 20px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
h3 {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.gradienttext {
|
||||
margin-top: 37rem;
|
||||
margin-bottom: 3rem;
|
||||
font-size: 30px;
|
||||
}
|
||||
p {
|
||||
font-size: 18px;
|
||||
margin-bottom: 20px;
|
||||
color: aliceblue;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
color: white;
|
||||
}
|
||||
table td {
|
||||
padding: 10px 0;
|
||||
font-size: 17px;
|
||||
}
|
||||
table td input {
|
||||
width: calc(100% - 20px);
|
||||
padding: 8px;
|
||||
margin: 1px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.credit a {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-weight: 800;
|
||||
}
|
||||
.credit {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 100px;
|
||||
width: 120%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="adminmenu.php" class="logo">
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
<h3 class="gradienttext">CREATE NEW ADMIN ACCOUNT</h3>
|
||||
<div class="images"><img src="pic/profiles.png"></div>
|
||||
<div class="right-container">
|
||||
<form method="post" action="newAdmin2.php">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="ID">Id :</label></td>
|
||||
<td><input id="ID" name="ID" type="text" value="" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Pass">Password :</label></td>
|
||||
<td><input id="Pass" name="Pass" type="text" value="" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Name">Name :</label></td>
|
||||
<td><input id="Name" name="Name" type="text" value="" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="PhoneNum">Phone Number :</label></td>
|
||||
<td><input id="PhoneNum" name="PhoneNum" type="number" value="" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="submit" value="submit" name="submit">CREATE</button>
|
||||
</form>
|
||||
</div>
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
27
newAdmin2.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/* include db connection file */
|
||||
include("connection.php");
|
||||
|
||||
if(isset($_POST['submit'])){
|
||||
/* capture values from HTML form */
|
||||
$id = $_POST['ID'];
|
||||
$pass = $_POST['Pass'];
|
||||
$name = $_POST['Name'];
|
||||
$phonenum = $_POST['PhoneNum'];
|
||||
|
||||
// Insert into user table
|
||||
$sql = "INSERT INTO admin (Admin_ID,Admin_Pass,Admin_Name,Admin_PhoneNum) VALUES ('$id','$pass','$name','$phonenum')";
|
||||
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
echo "<script>alert('Sign In Successfull')</script>";
|
||||
} else {
|
||||
echo "<script>alert('Renter ID is already exist or error type entering')</script>";
|
||||
}
|
||||
echo "<script>window.location = 'newAdmin.php'</script>";
|
||||
exit();
|
||||
|
||||
mysqli_close($conn); // Close connection
|
||||
}
|
||||
?>
|
||||
270
payment.php
Normal file
@ -0,0 +1,270 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
|
||||
// Fetching records from the place table for the current user
|
||||
$sql_places = "SELECT * FROM orders WHERE Renter_ID = '$AccID' ";
|
||||
$result_places = mysqli_query($conn, $sql_places);
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if (isset($_POST['delete'])) {
|
||||
foreach ($_POST['delete'] as $orderID) {
|
||||
$sql = "DELETE FROM orders WHERE OrderID = ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("s", $orderID);
|
||||
$stmt->execute();
|
||||
}
|
||||
echo "<script>alert('Order had been deleted.');</script>";
|
||||
echo "<script>window.location = 'payment.php'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Payment | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
.table-common{
|
||||
width: 1050px;
|
||||
height: 95px;
|
||||
border: 1;
|
||||
border-collapse: collapse;
|
||||
align: center;
|
||||
cellpadding: 1;
|
||||
cellspacing: 1;
|
||||
}
|
||||
.table-common tr{
|
||||
padding: 10px 20px;
|
||||
border: 1px solid white;
|
||||
}
|
||||
.table-common thead tr{
|
||||
text-align: center;
|
||||
background-color: purple;
|
||||
}
|
||||
.table-common td{
|
||||
border: 1px solid white;
|
||||
font-size: 18px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
tbody td h1{
|
||||
text-align: center;
|
||||
margin-left: 100px;
|
||||
}
|
||||
.table-actions input{
|
||||
margin-left: 10px;
|
||||
background: purple;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.table-actions input:hover{
|
||||
background: #e91e63;
|
||||
}
|
||||
button{
|
||||
padding: 10px 15px;
|
||||
margin-left: 7px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
button:hover{
|
||||
background: #e91e63;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="rentermenu.php" class="logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br>
|
||||
<table width="882" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1>PAYMENT SITE</h1></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table-common" id="table-1" width="1402" height="152" border="1" align="center" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="33">NO</td>
|
||||
<td width="150">RENTER ID</td>
|
||||
<td width="82">PLACE NUMBER</td>
|
||||
<td width="82">PEDDLING LICENSE</td>
|
||||
<td width="180">DATE</td>
|
||||
<td width="82">APPROVAL</td>
|
||||
<td width="250">ACTION</td>
|
||||
<td width="100">PAY</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($result_places->num_rows > 0) {
|
||||
$no = 1;
|
||||
while ($row = $result_places->fetch_assoc()) {
|
||||
$isApproved = $row['Approve_Status'] == 1;
|
||||
$isChecks = $row['Checks_Status'] == 0;
|
||||
$isPay = $row['Pay_Status'] == 1;
|
||||
if ($isApproved OR $isChecks) {
|
||||
echo "<tr align='center'>";
|
||||
echo "<td>{$no}</td>";
|
||||
echo "<td>{$row['Renter_ID']}</td>";
|
||||
echo "<td>{$row['Place_Num']}</td>";
|
||||
echo "<td>{$row['License']}</td>";
|
||||
echo "<td>{$row['Dates']}</td>";
|
||||
echo "<td>" . ($row['Approve_Status'] ? '<i class="fa fa-check"></i>' : 'Pending') . "</td>";
|
||||
echo "<td>";
|
||||
echo "<form action='payment.php' method='POST' style='display:inline;'>";
|
||||
echo "<input type='hidden' name='OrderID' value='" . $row['OrderID'] . "'>";
|
||||
echo "<input type='hidden' name='Renter_ID' value='" . $row['Renter_ID'] . "'>";
|
||||
echo "<input type='hidden' name='Place_Num' value='" . $row['Place_Num'] . "'>";
|
||||
echo "<input type='hidden' name='License' value='" . $row['License'] . "'>";
|
||||
echo "<input type='hidden' name='Dates' value='" . $row['Dates'] . "'>";
|
||||
echo "<input type='hidden' name='delete[]' value='" . $row['OrderID'] . "'>";
|
||||
echo "<button type='submit' name='deleteButton' onclick='confirmCancel(event)'" . ($row['Approve_Status'] && !$isPay ? '' : ' disabled') . ">Cancel</button>";
|
||||
echo "</form>";
|
||||
echo "<form action='payment2.php' method='POST' style='display:inline;'>";
|
||||
echo "<input type='hidden' name='OrderID' value='" . $row['OrderID'] . "'>";
|
||||
echo "<input type='hidden' name='Renter_ID' value='" . $row['Renter_ID'] . "'>";
|
||||
echo "<input type='hidden' name='Place_Num' value='" . $row['Place_Num'] . "'>";
|
||||
echo "<input type='hidden' name='License' value='" . $row['License'] . "'>";
|
||||
echo "<input type='hidden' name='Dates' value='" . $row['Dates'] . "'>";
|
||||
echo "<button type='submit'" . ($row['Approve_Status'] && !$isPay ? '' : ' disabled') . ">Pay</button>";
|
||||
echo "</form>";
|
||||
echo "</td>";
|
||||
echo "<td>" . ($row['Pay_Status'] ? '<i class="fa fa-check"></i>' : '❌') . "</td>";
|
||||
echo "</tr>";
|
||||
$no++;
|
||||
} else {
|
||||
echo "<tr align='center'>";
|
||||
echo "<td>{$no}</td>";
|
||||
echo "<td>{$row['Renter_ID']}</td>";
|
||||
echo "<td>{$row['Place_Num']}</td>";
|
||||
echo "<td>{$row['License']}</td>";
|
||||
echo "<td>{$row['Dates']}</td>";
|
||||
echo "<td>" . ($row['Approve_Status'] ? '' : '❌') . "</td>";
|
||||
echo "<td>";
|
||||
echo "<form action='payment.php' method='POST' onsubmit='return confirm(\"Are you sure you want to delete this row?\");'>";
|
||||
echo "<input type='hidden' name='delete[]' value='" . $row['OrderID'] . "'>";
|
||||
echo "<button type='delete' name='deleteButton'" . ($row['Approve_Status'] ? 'disabled' : '') . ">Delete</button>";
|
||||
echo "</form>";
|
||||
echo "</td>";
|
||||
echo "<td>" . ($row['Pay_Status'] ? '<i class="fa fa-check"></i>' : 'Reject') . "</td>";
|
||||
echo "</tr>";
|
||||
$no++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "<tr align='center'><td colspan='8'>No Order Being Made</td></tr>";
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<h1 style="font-size: 15px; position: bottom; margin: -4.375rem 0 5rem 21.875rem; text-align: center; width: 800px;">YOU HAVE TO WAIT FOR ADMIN TO APPROVE YOUR ORDER, IF ✔ IN APPROVAL THAT MEANS YOUR ORDER HAD BEEN APPROVED, IF ❌ IN APPROVAL THAT MEANS YOUR ORDER HAD BEEN REJECTED</h1>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class="btns" onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class="btns" onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
<script type="text/javascript">
|
||||
function confirmCancel(event) {
|
||||
if (!confirm("Are you sure you want to cancel this order?")) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
175
payment2.php
Normal file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
|
||||
// Retrieve data from the previous page
|
||||
$Renter_ID = $AccID;
|
||||
$OrderID = $_POST['OrderID'];
|
||||
$Place_Num = $_POST['Place_Num'];
|
||||
$License = $_POST['License'];
|
||||
$Dates = $_POST['Dates'];
|
||||
|
||||
// Check if the payment button was clicked
|
||||
if (isset($_POST['payment_type'])) {
|
||||
// Update the payment status in the database
|
||||
$sql = "UPDATE orders SET Pay_Status = 1 WHERE OrderID = '$OrderID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>User Website</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style>
|
||||
.button-row a {
|
||||
margin-top: 30px;
|
||||
font-size: 15px;
|
||||
width: 100px;
|
||||
margin-left: 50px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--main-color, purple);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
margin-left: 50%;
|
||||
}
|
||||
.button-row a:hover {
|
||||
background-color: #6b1c6e;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "rentermenu.php" class = "logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br>
|
||||
<table width="882" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center"><h1>Payment Site</h1></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<form action="receipt.php" method="post">
|
||||
<input type="hidden" name="OrderID" value="<?php echo $OrderID; ?>">
|
||||
<input type="hidden" name="Renter_ID" value="<?php echo $AccID; ?>">
|
||||
<input type="hidden" name="Place_Num" value="<?php echo $Place_Num; ?>">
|
||||
<input type="hidden" name="License" value="<?php echo $License; ?>">
|
||||
<input type="hidden" name="Dates" value="<?php echo $Dates; ?>">
|
||||
<table width="883" height="125" border="0" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<button type="submit" name="payment_type" value="Debit credit">
|
||||
<img src="pic/debit.png" width="336" height="336" alt=""/>
|
||||
</button>
|
||||
</td>
|
||||
<td align="center">
|
||||
<button type="submit" name="payment_type" value="Online banking">
|
||||
<img src="pic/onlinebank.png" width="346" height="319" alt=""/>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<br><button type="submit" name="payment_type" value="Debit credit" style="background: none; border: none; color: white;">Debit / Credit Card</button>
|
||||
</td>
|
||||
<td align="center">
|
||||
<br><button type="submit" name="payment_type" value="Online banking" style="background: none; border: none; color: white;">Online Banking</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="button-row">
|
||||
<a href="payment.php" class="button">BACK</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class="btns" onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class="btns" onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li><a href="sentFeedback.php">Rate Us</a></li>
|
||||
<li><a href="sawEvents.php">Event</a></li>
|
||||
<li><a href="renterProfile.php">Profile</a></li>
|
||||
<li><a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a></li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
pic/Invoice.pdf
Normal file
BIN
pic/admin.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
pic/admin.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
pic/approv.jpeg
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
pic/approval.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
pic/approve.jpg
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
pic/back.jpg
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
pic/debit.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
pic/event.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
pic/events.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
pic/feedback.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
pic/feedback.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
pic/home.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
pic/list.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
pic/markets.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
pic/onlinebank.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
pic/payment.jpg
Normal file
|
After Width: | Height: | Size: 144 KiB |
BIN
pic/plan.jpeg
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
pic/postevent.jpg
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
pic/profile.avif
Normal file
BIN
pic/profile.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
pic/profile2.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
pic/profiles.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
pic/receipt.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
pic/rent.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
pic/report.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
pic/uitm.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
192
postEvents.php
Normal file
@ -0,0 +1,192 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
|
||||
// Function to generate a unique Event ID
|
||||
function generateUniqueId($conn) {
|
||||
do {
|
||||
// Generate a random Event ID (you can customize this format)
|
||||
$EventID = 'EVE' . rand(10000, 99999);
|
||||
|
||||
// Check if this Event ID already exists in the database
|
||||
$checkQuery = "SELECT Event_ID FROM event WHERE Event_ID = '$EventID'";
|
||||
$result = mysqli_query($conn, $checkQuery);
|
||||
} while (mysqli_num_rows($result) > 0); // Repeat until a unique ID is found
|
||||
|
||||
return $EventID;
|
||||
}
|
||||
|
||||
// Handle form submission for posting events
|
||||
if (isset($_POST['submit'])) {
|
||||
// Capture values from HTML form
|
||||
$Location = $_POST['Location'];
|
||||
$Description = $_POST['description'];
|
||||
$Date = $_POST['date'];
|
||||
|
||||
$AdminID = $AccID;
|
||||
// Generate a unique Event ID
|
||||
$EventID = generateUniqueId($conn);
|
||||
|
||||
// Prepare SQL query
|
||||
$sql = "INSERT INTO event (Event_ID, Admin_ID, Location, Description, Dates) VALUES ('$EventID', '$AdminID', '$Location', '$Description', '$Date')";
|
||||
|
||||
// Execute the query
|
||||
$column = mysqli_query($conn, $sql) or die ("Error: " . mysqli_error($conn));
|
||||
|
||||
if ($column != 0) {
|
||||
header('Location: postEvents.php');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle event deletion
|
||||
if (isset($_GET['delete'])) {
|
||||
$eventIdToDelete = $_GET['delete'];
|
||||
$deleteSql = "DELETE FROM event WHERE Event_ID = '$eventIdToDelete'";
|
||||
mysqli_query($conn, $deleteSql) or die("Error: " . mysqli_error($conn));
|
||||
header('Location: postEvents.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
// Fetch event data
|
||||
$sql = "SELECT * FROM event";
|
||||
$data = mysqli_query($conn, $sql);
|
||||
$events = [];
|
||||
|
||||
if (mysqli_num_rows($data) > 0) {
|
||||
while ($row = mysqli_fetch_assoc($data)) {
|
||||
$events[] = $row;
|
||||
}
|
||||
|
||||
// Custom sort function to sort events by date
|
||||
usort($events, function($a, $b) {
|
||||
$dateA = strtotime($a['Dates']);
|
||||
$dateB = strtotime($b['Dates']);
|
||||
return $dateA - $dateB;
|
||||
});
|
||||
}
|
||||
$uniqueEventID = generateUniqueId($conn);
|
||||
mysqli_close($conn); // Data security purposes
|
||||
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="event.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<title>Event | UITM BAZAAR</title>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="adminmenu.php" class="logo">
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<div class="leftBox">
|
||||
<div class="content">
|
||||
<h1>Post a New Event</h1>
|
||||
<form id="eventForm" method="POST" action="postEvents.php">
|
||||
<p>
|
||||
<label for="Eventid">Event ID : </label>
|
||||
<input type="text" name="Eventid" id="Eventid" value="<?php echo $uniqueEventID; ?>" required readonly>
|
||||
</p>
|
||||
<p>
|
||||
<label for="Location">Location : </label>
|
||||
<input type="text" name="Location" id="Location" required>
|
||||
</p>
|
||||
<p>
|
||||
<label for="description">Description : </label>
|
||||
<textarea id="description" name="description" required></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="date">Date : </label>
|
||||
<input type="date" id="date" name="date" required>
|
||||
</p>
|
||||
<p>
|
||||
<button type="submit" name="submit">Post Event</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="events">
|
||||
<ul>
|
||||
<?php foreach ($events as $event): ?>
|
||||
<li>
|
||||
<div class="time">
|
||||
<h2><?php echo $event['Dates']; ?></h2>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h3><?php echo $event['Location']; ?></h3>
|
||||
<p><?php echo $event['Description']; ?></p>
|
||||
<a href="postEvents.php?delete=<?php echo $event['Event_ID']; ?>" class="delete-button" onclick="return confirm('Are you sure you want to delete this event?')">Delete</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
30
postEvents2.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// Include database connection file
|
||||
include("connection.php");
|
||||
|
||||
// Enable error reporting for debugging
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
if (isset($_POST['submit'])) {
|
||||
// Capture values from HTML form
|
||||
$EventID = $_POST['Eventid'];
|
||||
$AdminID = $_POST['Adminid'];
|
||||
$Description = $_POST['description'];
|
||||
$Date = $_POST['date'];
|
||||
|
||||
// Prepare SQL query
|
||||
$sql = "INSERT INTO event (Event_ID, Admin_ID, Description, Dates) VALUES ('".$EventID."','".$AdminID."','".$Description."','".$Date. "')";
|
||||
|
||||
|
||||
// Execute the query
|
||||
$column = mysqli_query($conn, $sql) or die ("Error: " .mysqli_error($conn));
|
||||
|
||||
if($column != 0) {
|
||||
header('Location: postEvents.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
mysqli_close($conn); //data security purposes
|
||||
}
|
||||
?>
|
||||
281
proof.php
Normal file
@ -0,0 +1,281 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$PlaceNum = $_POST['place'];
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Proof | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: var(--bg-color, rgb(15,15,15));
|
||||
color: var(--text-color, white);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 40px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 15px;
|
||||
}
|
||||
hr {
|
||||
border: 1px solid #ccc;
|
||||
margin: 20px auto;
|
||||
width: 50%;
|
||||
}
|
||||
strong {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.button-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px; /* Adjust as needed */
|
||||
}
|
||||
|
||||
.button-row a {
|
||||
margin-left: 50px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--main-color, purple);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.button-row a:hover {
|
||||
background-color: #6b1c6e;
|
||||
}
|
||||
.button-row button {
|
||||
margin-right: 50px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--main-color, purple);
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.button-row button:hover {
|
||||
background-color: #6b1c6e;
|
||||
}
|
||||
footer {
|
||||
padding: 20px 0;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
}
|
||||
form {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: black;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
fieldset {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
td {
|
||||
margin-right: 30px;
|
||||
padding: 10px;
|
||||
font-size: 20px;
|
||||
|
||||
}
|
||||
input[type="text"],
|
||||
select {
|
||||
width: calc(100% - 20px);
|
||||
padding: 8px;
|
||||
margin: 5px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
label {
|
||||
font-size: 20px;
|
||||
}
|
||||
.hom-img h1{
|
||||
font-size: 40px;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.hom-img img{
|
||||
margin-left: 430px;
|
||||
margin-bottom: 30px;
|
||||
position: center;
|
||||
width: 170px;
|
||||
}
|
||||
.tapak-message {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 60px; /* Adjust as needed */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "rentermenu.php" class = "logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="centered">
|
||||
<div class="tapak-message">
|
||||
<br><br>
|
||||
Fill In Your Details <br><br>
|
||||
</div>
|
||||
<form name="borang" method="POST" action="proof2.php">
|
||||
<input type="hidden" name="place" value="<?php echo $PlaceNum; ?>">
|
||||
<fieldset>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="ID">Renter ID:</label></td>
|
||||
<td><input type="text" name="ID" id="ID" value="<?php echo $AccID; ?>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Category Type :</td>
|
||||
<td>
|
||||
<select name='categoryType' id='categoryType'>
|
||||
<option value='Food'>FOOD & DRINK</option>
|
||||
<option value='Toys'>TOYS</option>
|
||||
<option value='Clothes'>CLOTHES</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Dates :</td>
|
||||
<td><input type="date" name="dates" id="dates" min="<?php echo date('Y-m-d'); ?>" max="<?php echo date('Y-m-d', strtotime('+1 month')); ?>" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Peddling License :</td>
|
||||
<td><input type="text" name="Licences" id="Licences" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<br>
|
||||
<div class="button-row">
|
||||
<a href="rentPlace.php" class="button">BACK</a>
|
||||
<button type="submit" value="submit" name="submit" class="button">SUBMIT</button>
|
||||
</div>
|
||||
|
||||
</form><br>
|
||||
|
||||
<footer class="footer" id="footer" style="margin-top: 100px;">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class = btns onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class = btns onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
75
proof2.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/* include db connection file */
|
||||
include("connection.php");
|
||||
if(isset($_POST['submit'])){
|
||||
session_start();
|
||||
/* capture values from HTML form */
|
||||
$Place = $_POST['place'];
|
||||
$renterId = $_POST['ID'];
|
||||
$category= $_POST['categoryType'];
|
||||
$license = $_POST['Licences'];
|
||||
$date = $_POST['dates'];
|
||||
$approve = False;
|
||||
$check = False;
|
||||
$pay = False;
|
||||
|
||||
//Admin ID
|
||||
$adminSql = "SELECT Admin_ID FROM admin ORDER BY Admin_ID ASC LIMIT 1";
|
||||
$adminResult = mysqli_query($conn, $adminSql);
|
||||
$adminRow = mysqli_fetch_assoc($adminResult);
|
||||
$adminId = $adminRow['Admin_ID'];
|
||||
|
||||
//Order ID
|
||||
function generateOrderID() {
|
||||
return "Ord" . str_pad(mt_rand(0, 99999), 5, '0', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
// Function to check if the generated order ID already exists in the database
|
||||
function isOrderIDExists($conn, $new0rderID) {
|
||||
$stmt = $conn->prepare("SELECT COUNT(*) FROM orders WHERE OrderID = ?");
|
||||
$stmt->bind_param("s", $newOrderID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($count);
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
return $count > 0;
|
||||
}
|
||||
|
||||
do {
|
||||
$newOrderID = generateOrderID();
|
||||
} while (isOrderIDExists($conn, $newOrderID));
|
||||
|
||||
// Check if the combination of Place_Num and Dates already exists
|
||||
$checkSql = "SELECT * FROM orders WHERE Place_Num = '$Place' AND Dates = '$date'";
|
||||
$checkResult = mysqli_query($conn, $checkSql);
|
||||
|
||||
if(mysqli_num_rows($checkResult) > 0) {
|
||||
// Combination already exists, show error message
|
||||
echo "<script>alert('Selected of Place at that Date is already booked. Please choose another Place or Date.')</script>";
|
||||
echo "<script>window.location = 'rentPlace.php'</script>";
|
||||
exit();
|
||||
}
|
||||
else{
|
||||
// Insert into user table
|
||||
$sql = "INSERT INTO orders (OrderID, Place_Num, Renter_ID, Admin_ID, License, Dates, Category_Type, Approve_Status, Checks_Status, Pay_Status) VALUES ('".$newOrderID."','".$Place."', '".$renterId."', '".$adminId."', '".$license."', '".$date."', '".$category."','".$approve."','".$check."','".$pay."')";
|
||||
|
||||
$column = mysqli_query($conn, $sql);
|
||||
|
||||
if($column != 0) {
|
||||
echo "<script>alert('Your order is successfull, please wait until management approve your order rent')</script>";
|
||||
echo "<script>window.location = 'rentermenu.php'</script>";
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
echo "<script>alert('ID Or Connection is Error, Please contact our Admin !!!')</script>";
|
||||
echo "<script>window.location = 'login.html'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mysqli_close($conn); //data security purposes
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
299
receipt.php
Normal file
@ -0,0 +1,299 @@
|
||||
<?php
|
||||
include("connection.php");
|
||||
|
||||
session_start();
|
||||
$AccID = $_SESSION['AccID'];
|
||||
if (!isset($_POST['payment_type'])) {
|
||||
echo "Invalid request.";
|
||||
exit();
|
||||
}
|
||||
|
||||
$OrderID = $_POST['OrderID'];
|
||||
$Renter_ID = $_POST['Renter_ID'];
|
||||
$Place_Num = $_POST['Place_Num'];
|
||||
$License = $_POST['License'];
|
||||
$Dates = $_POST['Dates'];
|
||||
$Pay_AmountTotal = 100;
|
||||
$payment_type = $_POST['payment_type'];
|
||||
|
||||
// Generate unique Transaction_No
|
||||
$Transaction_No = uniqid('txn');
|
||||
|
||||
// Insert data into the payment table
|
||||
$payDate = date('Y-m-d');
|
||||
|
||||
$sql = "INSERT INTO payment (Transaction_No, OrderID, Renter_ID, Pay_Type, Pay_Date, Pay_AmountTotal)
|
||||
VALUES ('$Transaction_No', '$OrderID', '$Renter_ID', '$payment_type', '$payDate', '$Pay_AmountTotal')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$paymentId = $Transaction_No;
|
||||
$sql = "UPDATE orders SET Pay_Status = 1 WHERE OrderID = '$OrderID'";
|
||||
|
||||
$result = mysqli_query($conn, $sql);
|
||||
} else {
|
||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||
exit();
|
||||
}
|
||||
|
||||
// Fetching the user's name for display
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$Renter_ID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<title>Receipt | UITM BAZAAR</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.container {
|
||||
width: 80%;
|
||||
margin: 200px auto;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
img{
|
||||
margin-left: 20%;
|
||||
}
|
||||
h1 {
|
||||
text-align: left;
|
||||
}
|
||||
.invoice-details {
|
||||
margin: 20px 0;
|
||||
}
|
||||
.invoice-details div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.invoice-details label {
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
}
|
||||
.invoice-details span {
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
}
|
||||
.buttons {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.buttons button {
|
||||
margin: 5px;
|
||||
padding: 20px 25px;
|
||||
font-size: 2em;
|
||||
cursor: pointer;
|
||||
}
|
||||
.invoice-footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 1.5em;
|
||||
color: #555;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
th, td {
|
||||
color: black;
|
||||
font-size: 27px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.invoice-header {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.container-logo {
|
||||
height: 200px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
.invoice-title {
|
||||
font-size: 2em;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function printInvoice() {
|
||||
window.print();
|
||||
}
|
||||
|
||||
function goToNext() {
|
||||
window.location.href = "rentermenu.php";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "rentermenu.php" class = "logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="container">
|
||||
<div class="invoice-header">
|
||||
<table class="table-1" align="left" width="924" height="145" border="0">
|
||||
<tr>
|
||||
<td width="150" align="left"><img src="pic/uitm.png" width="100" height="100" alt=""/></td>
|
||||
<td width="500" align="left"><h1>Invoice</h1></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="invoice-details">
|
||||
<div>
|
||||
<label>Transaction No:</label>
|
||||
<span id="transactionNo"><?php echo $Transaction_No; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Renter ID:</label>
|
||||
<span id="renterId"><?php echo $Renter_ID; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Pay Type:</label>
|
||||
<span id="payType"><?php echo $payment_type; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Pay Date:</label>
|
||||
<span id="payDate"><?php echo $payDate; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Pay Amount Total:</label>
|
||||
<span id="payAmountTotal">RM<?php echo $Pay_AmountTotal; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Place Number:</label>
|
||||
<span id="placeNumber"><?php echo $Place_Num; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Item</th>
|
||||
<th>Description</th>
|
||||
<th>Quantity</th>
|
||||
<th>Price</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Place Rental</td>
|
||||
<td>Rental of place number <?php echo $Place_Num; ?></td>
|
||||
<td>1</td>
|
||||
<td>RM<?php echo $Pay_AmountTotal; ?></td>
|
||||
<td>RM<?php echo $Pay_AmountTotal; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="buttons">
|
||||
<button onclick="printInvoice()">Print</button>
|
||||
<button onclick="goToNext()">Next</button>
|
||||
</div>
|
||||
<div class="invoice-footer">
|
||||
<p>Thank you for your business!</p>
|
||||
<p>If you have any questions about this invoice, please contact us.</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class = btns onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class = btns onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
270
rentPlace.php
Normal file
@ -0,0 +1,270 @@
|
||||
<?php
|
||||
// Start the session
|
||||
session_start();
|
||||
|
||||
// Check if user is logged in
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
// Redirect to login page if not logged in
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
// Include the database connection file
|
||||
include("connection.php");
|
||||
|
||||
// Get the user ID from the session
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetch the user's name from the database
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Rent | UITM BAZAAR</title>
|
||||
<!-- Link to external CSS file -->
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<!-- Link to Font Awesome for icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-image: url(pic/back.jpg);
|
||||
color: #fff;
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
input {
|
||||
background-color: transparent;
|
||||
color: white;
|
||||
text-align: center;
|
||||
width: 35px;
|
||||
font-size: 30px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
#confirm-button {
|
||||
display: block;
|
||||
margin: -170px auto;
|
||||
padding: 10px 20px;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
text-align: center;
|
||||
border: none;
|
||||
}
|
||||
.back-button {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
background-color: #007BFF;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.floating-image img {
|
||||
margin-left: 140px;
|
||||
position: absolute;
|
||||
top: 55%;
|
||||
left: 20px;
|
||||
transform: translateY(-50%);
|
||||
width: 300px;
|
||||
height: auto;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin-left: 20%;
|
||||
}
|
||||
.tapak-selector {
|
||||
margin-bottom: 170px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 100px;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
}
|
||||
.tapak {
|
||||
width: 70px;
|
||||
height: 40px;
|
||||
background-color: #ccc;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tapak.selected {
|
||||
background-color: purple;
|
||||
}
|
||||
.tapak.disabled {
|
||||
background-color: red;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.tapak-message {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="rentermenu.php" class="logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<form method="post" action="proof.php">
|
||||
<div class="tapak-message">
|
||||
<br><br>
|
||||
Please select your place / tapak
|
||||
<div class="container">
|
||||
<div class="tapak-selector">
|
||||
<div class="row">
|
||||
<div class="tapak" data-place="1">1</div>
|
||||
<div class="tapak" data-place="2">2</div>
|
||||
<div class="tapak" data-place="3">3</div>
|
||||
<div class="tapak" data-place="4">4</div>
|
||||
<div class="tapak" data-place="5">5</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="tapak" data-place="6">6</div>
|
||||
<div class="tapak" data-place="7">7</div>
|
||||
<div class="tapak" data-place="8">8</div>
|
||||
<div class="tapak" data-place="9">9</div>
|
||||
<div class="tapak" data-place="10">10</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="tapak" data-place="11">11</div>
|
||||
<div class="tapak" data-place="12">12</div>
|
||||
<div class="tapak" data-place="13">13</div>
|
||||
<div class="tapak" data-place="14">14</div>
|
||||
<div class="tapak" data-place="15">15</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="place" id="selected-place" value="">
|
||||
<button id="confirm-button" name="submit">Confirm</button>
|
||||
<div class="floating-image"><img src="pic/plan.jpeg"></div>
|
||||
</form>
|
||||
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class="btns" onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class="btns" onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
<script>
|
||||
const tapaks = document.querySelectorAll('.tapak');
|
||||
let selectedTapak = null;
|
||||
const selectedPlaceInput = document.getElementById('selected-place');
|
||||
const confirmButton = document.getElementById('confirm-button');
|
||||
|
||||
tapaks.forEach(tapak => {
|
||||
tapak.addEventListener('click', () => {
|
||||
if (tapak.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedTapak) {
|
||||
selectedTapak.classList.remove('selected');
|
||||
}
|
||||
|
||||
tapak.classList.add('selected');
|
||||
selectedTapak = tapak;
|
||||
selectedPlaceInput.value = tapak.getAttribute('data-place');
|
||||
});
|
||||
});
|
||||
|
||||
confirmButton.addEventListener('click', (e) => {
|
||||
if (!selectedTapak) {
|
||||
e.preventDefault(); // Prevent form submission
|
||||
alert('Please select a place/tapak before proceeding.');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
161
renterList.php
Normal file
@ -0,0 +1,161 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
?>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>RentList | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
.table-common {
|
||||
margin-left: 30px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#table-1 {
|
||||
border: 1px solid white;
|
||||
font-size: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
#table-1 tr {
|
||||
border: 1px solid white;
|
||||
font-size: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
#table-1 td {
|
||||
border: 1px solid white;
|
||||
font-size: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
#table-1 tr:nth-child(even) {
|
||||
background-color: black;
|
||||
}
|
||||
#table-1 tr:hover {
|
||||
background-color: #de55de;
|
||||
transform: scale(1.03); /* Add pop-up effect */
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "adminmenu.php" class = "logo">
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br>
|
||||
<table width="882" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center"><h1>RENTER DATABASE</h1></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table-common" id="table-1" width="882" height="152" border="1" align="center" cellpadding="1" cellspacing="1">
|
||||
<tbody>
|
||||
<tr align="center" style="background-color: purple; transform: none; transition: none;">
|
||||
<td width="300">RENTER ID</td>
|
||||
<td width="500">RENTER NAME</td>
|
||||
<td width="200">PHONE NUMBER</td>
|
||||
<td width="50">AGE</td>
|
||||
<td width="200">EMAIL</td>
|
||||
<td width="200">PLACE NUMBER</td>
|
||||
<td width="400">DATES</td>
|
||||
</tr>
|
||||
<?php
|
||||
$conn = mysqli_connect("localhost", "root", "", "groupproject");
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
$sql = "SELECT renter.Renter_ID, renter.Renter_Name, renter.Renter_PhoneNum, renter.Renter_Age, renter.Renter_Email, orders.Place_Num, orders.Dates FROM renter INNER JOIN orders ON renter.Renter_ID = orders.Renter_ID ORDER BY orders.dates";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
|
||||
echo "<td>" . $row["Renter_ID"] . "</td>";
|
||||
echo "<td>" . $row["Renter_Name"] . "</td>";
|
||||
echo "<td>" . $row["Renter_PhoneNum"] . "</td>";
|
||||
echo "<td>" . $row["Renter_Age"] . "</td>";
|
||||
echo "<td>" . $row["Renter_Email"] . "</td>";
|
||||
echo "<td>" . $row["Place_Num"] . "</td>";
|
||||
echo "<td>" . $row["Dates"] . "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
} else {
|
||||
echo "<tr><td colspan='5'>No results found</td></tr>";
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer" style="margin-bottom: 200px;">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
253
renterProfile.php
Normal file
@ -0,0 +1,253 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
?>
|
||||
|
||||
<!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>Profile | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 300px;
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 20px;
|
||||
background: #161616;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.images img {
|
||||
border-radius: 50%;
|
||||
margin-bottom: 30px;
|
||||
position: center;
|
||||
width: 170px;
|
||||
}
|
||||
html, body {
|
||||
height: 50%;
|
||||
}
|
||||
button {
|
||||
margin-left: 125px;
|
||||
padding: 10px 15px;
|
||||
color: white;
|
||||
background-color: purple;
|
||||
transition: 0.5s;
|
||||
letter-spacing: 4px;
|
||||
}
|
||||
.right-container {
|
||||
align-items: center;
|
||||
background: black;
|
||||
width: 400px;
|
||||
height: 500px;
|
||||
padding: 20px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
h3 {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.gradienttext {
|
||||
margin-top: 67rem;
|
||||
margin-bottom: 3rem;
|
||||
font-size: 30px;
|
||||
}
|
||||
p {
|
||||
font-size: 18px;
|
||||
margin-bottom: 20px;
|
||||
color: aliceblue;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
color: white;
|
||||
}
|
||||
table td {
|
||||
padding: 10px 0;
|
||||
font-size: 17px;
|
||||
}
|
||||
table td input {
|
||||
width: calc(100% - 20px);
|
||||
padding: 8px;
|
||||
margin: 1px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.credit a {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-weight: 800;
|
||||
}
|
||||
.credit {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 100px;
|
||||
width: 120%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<title>Profile's | UITM BAZAAR</title>
|
||||
<header class="header">
|
||||
<a href="rentermenu.php" class="logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's details
|
||||
$sql = "SELECT * FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$data = mysqli_query($conn, $sql);
|
||||
$check_event = mysqli_num_rows($data) > 0;
|
||||
if ($check_event) {
|
||||
while ($row = mysqli_fetch_assoc($data)) {
|
||||
?>
|
||||
<h3 class="gradienttext">PROFILE DETAILS</h3>
|
||||
<div class="images"><img src="pic/profiles.png"></div>
|
||||
<div class="right-container">
|
||||
<form method="post" action="renterProfile2.php">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="ID">Id :</label></td>
|
||||
<td><input id="ID" name="Id" type="text" value="<?php echo $row['Renter_ID']; ?>" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Pass">Password :</label></td>
|
||||
<td><input id="Pass" name="Pass" type="text" value="<?php echo $row['Renter_Pass']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Name">Name :</label></td>
|
||||
<td><input id="Name" name="Name" type="text" value="<?php echo $row['Renter_Name']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Age">Age :</label></td>
|
||||
<td><input id="Age" name="Age" type="number" value="<?php echo $row['Renter_Age']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="PhoneNum">Phone No :</label></td>
|
||||
<td><input id="PhoneNum" name="PhoneNum" type="number" value="<?php echo $row['Renter_PhoneNum']; ?>" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="Email">Email :</label></td>
|
||||
<td><input id="Email" name="Email" type="email" value="<?php echo $row['Renter_Email']; ?>" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="submit" value="submit" name="submit">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "<p>No profile details found.</p>";
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class="btns" onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class="btns" onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
32
renterProfile2.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/* include db connection file */
|
||||
include("connection.php");
|
||||
session_start();
|
||||
if(isset($_POST['submit'])){
|
||||
/* capture values from HTML form */
|
||||
$Pass = $_POST['Pass'];
|
||||
$Name = $_POST['Name'];
|
||||
$PhoneNum = $_POST['PhoneNum'];
|
||||
$Age = $_POST['Age'];
|
||||
$Email = $_POST['Email'];
|
||||
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Update the renter table
|
||||
$sql = "UPDATE renter SET Renter_Pass = '$Pass', Renter_Name = '$Name', Renter_PhoneNum = '$PhoneNum', Renter_Age = '$Age', Renter_Email = '$Email' WHERE Renter_ID = '$AccID'";
|
||||
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
echo "<script>alert('Data Had Been Saved')</script>";
|
||||
echo "<script>window.location = 'renterProfile.php'</script>";
|
||||
exit();
|
||||
} else {
|
||||
echo "<script>alert('Renter ID is already exist or error type entering')</script>";
|
||||
echo "<script>window.location = 'renterProfile.php'</script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
mysqli_close($conn); // Close connection
|
||||
}
|
||||
?>
|
||||
169
rentermenu.php
Normal file
@ -0,0 +1,169 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Renter | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="rentermenu.php" class="logo">Welcome <span><?php echo $userName; ?>'s</span></a>
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="slider-wrapper">
|
||||
<div class="slider">
|
||||
<div class="nav-arrow left" onclick="scrollToSection(-1)"><i class="fa fa-arrow-left" aria-hidden="true"></i></div>
|
||||
<div class="nav-arrow right" onclick="scrollToSection(1)"><i class="fa fa-arrow-right" aria-hidden="true"></i></div>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br><br><br>
|
||||
<h1>Renter's Site <span>Page</span></h1>
|
||||
<p>Hi, Welcome to our UiTM Rent Night Market Website. We offer a comprehensive market rent system designed to streamline your rental needs. Whether you're looking to rent a place, manage your profile, or send feedback, we have got you covered.</p>
|
||||
|
||||
<br><br>
|
||||
<a onclick="scrollToFooter()" class="btn">MORE
|
||||
<i class="fa-solid fa-briefcase"></i>
|
||||
</a>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="home-img">
|
||||
<img src="pic/uitm.png" alt="UITM">
|
||||
</div>
|
||||
</section>
|
||||
<section class="services" id="services">
|
||||
<div class="service-container">
|
||||
<div class="boxes">
|
||||
<div class="card">
|
||||
<a href="rentPlace.php"><img src="pic/rent.png" alt=></a>
|
||||
<h2>Rent Place</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="sawEvents.php"><img src="pic/event.png" ></a>
|
||||
<h2>Event</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="payment.php"><img src="pic/payment.jpg" ></a>
|
||||
<h2>Payment</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="sentFeedback.php"><img src="pic/feedback.jpg" ></a>
|
||||
<h2>Feedback</h2>
|
||||
</div>
|
||||
<div class="card">
|
||||
<a href="renterProfile.php"><img src="pic/profile.jpg" ></a>
|
||||
<h2>Profile</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class = btns onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class = btns onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script>
|
||||
let currentSection = 0;
|
||||
|
||||
function scrollToSection(direction) {
|
||||
const sections = document.querySelectorAll('.slider section');
|
||||
currentSection = (currentSection + direction + sections.length) % sections.length;
|
||||
sections[currentSection].scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
|
||||
}
|
||||
function scrollToFooter() {
|
||||
const footer = document.getElementById('footer');
|
||||
footer.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
</script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
255
report.php
Normal file
@ -0,0 +1,255 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
// Fetch data for Bar Chart (order table)
|
||||
$sql1 = "SELECT Category_Type, COUNT(Category_Type) as Quantity FROM orders GROUP BY Category_Type";
|
||||
|
||||
$result1 = $conn->query($sql1);
|
||||
|
||||
$labels1 = [];
|
||||
$data1 = [];
|
||||
|
||||
if ($result1->num_rows > 0) {
|
||||
while($row = $result1->fetch_assoc()) {
|
||||
$labels1[] = $row["Category_Type"];
|
||||
$data1[] = $row["Quantity"];
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch data for Pie Chart (report table)
|
||||
$sql2 = "SELECT Department, COUNT(Department) as Quantity FROM report GROUP BY Department";
|
||||
$result2 = $conn->query($sql2);
|
||||
|
||||
$labels2 = [];
|
||||
$data2 = [];
|
||||
|
||||
if ($result2->num_rows > 0) {
|
||||
while($row = $result2->fetch_assoc()) {
|
||||
$labels2[] = $row["Department"];
|
||||
$data2[] = $row["Quantity"];
|
||||
}
|
||||
}
|
||||
|
||||
// Close MySQL connection
|
||||
$conn->close();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Report | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
.chart-container {
|
||||
margin-top: 300px;
|
||||
margin-bottom: 100px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
.chart-box {
|
||||
flex: 1 1 calc(33.333% - 20px);
|
||||
margin: 10px;
|
||||
max-width: calc(33.333% - 20px);
|
||||
}
|
||||
.chart-box #chart1{
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
canvas {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "adminmenu.php" class = "logo">
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="chart-container">
|
||||
<div class="chart-box" >
|
||||
<canvas id="chart1"></canvas>
|
||||
</div>
|
||||
<div class="chart-box">
|
||||
<canvas id="chart2"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
// Retrieve the labels and data for the bar chart from PHP variables
|
||||
var barLabels = <?php echo json_encode($labels1); ?>;
|
||||
var barData = <?php echo json_encode($data1); ?>;
|
||||
// Define the colors to be used for the bar chart
|
||||
var barColors = ["blue", "green", "red", "orange", "brown"];
|
||||
|
||||
// Retrieve the labels and data for the pie chart from PHP variables
|
||||
var pieLabels = <?php echo json_encode($labels2); ?>;
|
||||
var pieData = <?php echo json_encode($data2); ?>;
|
||||
// Define the colors to be used for the pie chart
|
||||
var pieColors = ["blue", "green", "red", "orange", "brown", "purple"];
|
||||
|
||||
// Debugging: insert the values to the console to verify data
|
||||
console.log("Bar Chart Labels:", barLabels);
|
||||
console.log("Bar Chart Data:", barData);
|
||||
console.log("Pie Chart Labels:", pieLabels);
|
||||
console.log("Pie Chart Data:", pieData);
|
||||
|
||||
// Bar Chart
|
||||
new Chart(document.getElementById('chart1'), {
|
||||
type: 'bar', //set chart type
|
||||
data:
|
||||
{
|
||||
labels: barLabels, //set label for x-axis
|
||||
datasets:
|
||||
[{
|
||||
backgroundColor: barColors, //set color for each bar
|
||||
data: barData, // set the data for the bar
|
||||
}]
|
||||
},
|
||||
options:
|
||||
{
|
||||
plugins:
|
||||
{
|
||||
legend: { display: false }, //hide the legend
|
||||
title:
|
||||
{
|
||||
display: true,
|
||||
text: 'TYPE OF RENTER CATEGORY', //display chart title
|
||||
color: 'white',
|
||||
font: {
|
||||
size: 24 // Change the title font size here
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Renter Category',
|
||||
color: 'white',
|
||||
font: {
|
||||
size: 18 // Change the x-axis title font size here
|
||||
}
|
||||
}
|
||||
},
|
||||
y:
|
||||
{
|
||||
title:
|
||||
{
|
||||
display: true,
|
||||
text: 'Quantity',
|
||||
color: 'white',
|
||||
font: {
|
||||
size: 18 // Change the y-axis title font size here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Pie Chart
|
||||
new Chart(document.getElementById('chart2'), {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: pieLabels,
|
||||
datasets: [{
|
||||
backgroundColor: pieColors,
|
||||
data: pieData,
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Report from Department',
|
||||
color: 'white',
|
||||
font: {
|
||||
size: 24 // Change the title font size here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
163
sawEvents.php
Normal file
@ -0,0 +1,163 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Events | UITM BAZAAR</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Available Events</title>
|
||||
<link rel="stylesheet" href="event.css" type="text/css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "rentermenu.php" class = "logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section>
|
||||
<div class="leftBox">
|
||||
<div class="content">
|
||||
<h1>Upcoming Events</h1>
|
||||
<p>Check out the upcoming events:</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="events">
|
||||
<ul>
|
||||
<?php
|
||||
$sql = "SELECT * FROM event";
|
||||
$data = mysqli_query($conn, $sql);
|
||||
$check_event = mysqli_num_rows($data) > 0;
|
||||
|
||||
// Fetch events and sort by date
|
||||
$events = [];
|
||||
if ($check_event) {
|
||||
while ($row = mysqli_fetch_assoc($data)) {
|
||||
$events[] = $row;
|
||||
}
|
||||
|
||||
// Custom sort function to sort events by date
|
||||
usort($events, function($a, $b) {
|
||||
$dateA = strtotime($a['Dates']);
|
||||
$dateB = strtotime($b['Dates']);
|
||||
return $dateA - $dateB;
|
||||
});
|
||||
|
||||
foreach ($events as $event) {
|
||||
?>
|
||||
<li>
|
||||
<div class="time">
|
||||
<h2><?php echo $event['Dates']; ?></h2>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h3><?php echo $event['Location']; ?></h3>
|
||||
<p><?php echo $event['Description']; ?></p>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "<li>No upcoming events.</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class = btns onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class = btns onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
29
script.js
Normal file
@ -0,0 +1,29 @@
|
||||
function showPopup() {
|
||||
document.getElementById('popup').style.display = 'block';
|
||||
}
|
||||
|
||||
// JavaScript function to close popup
|
||||
function closePopup() {
|
||||
document.getElementById('popup').style.display = 'none';
|
||||
}
|
||||
|
||||
// Call the showPopup function when the page loads
|
||||
window.onload = function() {
|
||||
closePopup();
|
||||
};
|
||||
|
||||
function showPopup2() {
|
||||
document.getElementById('popup2').style.display = 'block';
|
||||
}
|
||||
|
||||
// JavaScript function to close popup
|
||||
function closePopup2() {
|
||||
document.getElementById('popup2').style.display = 'none';
|
||||
}
|
||||
|
||||
// Call the showPopup function when the page loads
|
||||
window.onload = function() {
|
||||
closePopup2();
|
||||
};
|
||||
|
||||
|
||||
230
selectReceipt.php
Normal file
@ -0,0 +1,230 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
|
||||
// Fetching records from the orders and payment tables for the current user
|
||||
$sql_places = "SELECT o.*, p.* FROM orders o
|
||||
LEFT JOIN payment p ON o.OrderID = p.OrderID
|
||||
WHERE o.Renter_ID = '$AccID'";
|
||||
$result_places = mysqli_query($conn, $sql_places);
|
||||
|
||||
$sql_receipt = "SELECT * FROM payment WHERE Renter_ID = '$AccID' ";
|
||||
$result_receipt = mysqli_query($conn, $sql_receipt);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Select Receipt | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
tbody tr td h1{
|
||||
margin-left: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
.table-common{
|
||||
width: 1050px;
|
||||
height: 95px;
|
||||
border: 1px solid white;
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
.table-common thead tr{
|
||||
background-color: purple;
|
||||
color: white;
|
||||
}
|
||||
.table-common td, .table-common th{
|
||||
border: 1px solid white;
|
||||
font-size: 18px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.table-actions input, .table-actions button{
|
||||
margin-left: 10px;
|
||||
background: purple;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.table-actions input:hover, .table-actions button:hover{
|
||||
background: #e91e63;
|
||||
}
|
||||
button{
|
||||
padding: 10px 15px;
|
||||
margin-left: 7px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
button:hover{
|
||||
background: #e91e63;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="rentermenu.php" class="logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br>
|
||||
<table width="882" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1>RECEIPT</h1></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table-common" id="table-1" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
<th>ORDER ID</th>
|
||||
<th>PLACE NUMBER</th>
|
||||
<th>PAYMENT TYPE</th>
|
||||
<th>PAY DATE</th>
|
||||
<th>PAY STATUS</th>
|
||||
<th>Receipt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($result_receipt->num_rows > 0) {
|
||||
$no = 1;
|
||||
while ($row = $result_places->fetch_assoc()) {
|
||||
$isPay = $row['Pay_Status'] == 1;
|
||||
if ($isPay) {
|
||||
echo "<tr align='center'>";
|
||||
echo "<td>{$no}</td>";
|
||||
echo "<td>{$row['OrderID']}</td>";
|
||||
echo "<td>{$row['Place_Num']}</td>";
|
||||
echo "<td>{$row['Pay_Type']}</td>";
|
||||
echo "<td>{$row['Pay_Date']}</td>";
|
||||
echo "<td>" . ($isPay ? '<i class="fa fa-check"></i>' : '❌') . "</td>";
|
||||
echo "<td>";
|
||||
echo "<form action='viewReceipt.php' method='POST' style='display:inline;'>";
|
||||
echo "<input type='hidden' name='OrderID' value='" . $row['OrderID'] . "'>";
|
||||
echo "<input type='hidden' name='Renter_ID' value='" . $row['Renter_ID'] . "'>";
|
||||
echo "<input type='hidden' name='Place_Num' value='" . $row['Place_Num'] . "'>";
|
||||
echo "<input type='hidden' name='Transaction_No' value='" . $row['Transaction_No'] . "'>";
|
||||
echo "<input type='hidden' name='Pay_AmountTotal' value='" . $row['Pay_AmountTotal'] . "'>";
|
||||
echo "<input type='hidden' name='Pay_Date' value='" . $row['Pay_Date'] . "'>";
|
||||
echo "<input type='hidden' name='Pay_Type' value='" . $row['Pay_Type'] . "'>";
|
||||
echo "<input type='hidden' name='License' value='" . $row['License'] . "'>";
|
||||
echo "<input type='hidden' name='Dates' value='" . $row['Dates'] . "'>";
|
||||
echo "<button type='submit' name='submit'>View</button>";
|
||||
echo "</form>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
$no++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "<tr align='center'><td colspan='8'>No Payment Being Made</td></tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class="btns" onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class="btns" onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
<script type="text/javascript">
|
||||
function confirmCancel(event) {
|
||||
if (!confirm("Are you sure you want to cancel this order?")) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
261
sentFeedback.php
Normal file
@ -0,0 +1,261 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit()
|
||||
;}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Feedback | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href = "style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: var(--bg-color, rgb(15,15,15));
|
||||
color: var(--text-color, white);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 40px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 15px;
|
||||
}
|
||||
hr {
|
||||
border: 1px solid #ccc;
|
||||
margin: 20px auto;
|
||||
width: 50%;
|
||||
}
|
||||
strong {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
button {
|
||||
margin-left: 130px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--main-color, purple);
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #6b1c6e;
|
||||
}
|
||||
footer {
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
}
|
||||
form {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: black;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
fieldset {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table td{
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
select {
|
||||
width: calc(100% - 20px);
|
||||
padding: 8px;
|
||||
margin: 5px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
label {
|
||||
font-size: 17px;
|
||||
}
|
||||
legend {
|
||||
font-size: 20px;
|
||||
}
|
||||
.hom-img h1{
|
||||
font-size: 40px;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.hom-img img{
|
||||
margin-left: 43rem;
|
||||
margin-bottom: 30px;
|
||||
position: center;
|
||||
width: 170px;
|
||||
}
|
||||
textarea{
|
||||
width: 300px;
|
||||
height: 70px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<title>Feedback | UITM BAZAAR</title>
|
||||
<a href= "rentermenu.php" class = "logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<br><br>
|
||||
<div class="hom-img">
|
||||
<h1>FEEDBACK</h1><br>
|
||||
<img src="pic/uitm.png" alt="">
|
||||
</div>
|
||||
|
||||
<form name="borang" method="POST" action="sentFeedback2.php">
|
||||
<fieldset>
|
||||
<legend>We glad that you give us feedback, so we can improve !</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Renter ID : </td>
|
||||
<td><input type="text" name="renterid" id="renterid" value="<?php echo $AccID; ?>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Department :</td>
|
||||
<td>
|
||||
<select name="department" id="department">
|
||||
<option value="Research">Research</option>
|
||||
<option value="Industrial">Industrial Linkage</option>
|
||||
<option value="Vendor">Vendor Affairs</option>
|
||||
<option value="Administrative">Administrative</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Feedback:</td>
|
||||
<td><textarea name="feedback" id="feedback" required></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="checkbox" id="checkbox1" name="checkbox1" value="option1" required>
|
||||
<label for="checkbox1" required>Yes, I have read and understand the UiTM Cawangan Perak, Kampus Tapah policies.</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<br>
|
||||
<button type="submit" value="submit" name="submit" onclick="return semak();">SUBMIT</button>
|
||||
<button type="reset" value="Clear Form">RESET</button>
|
||||
</form><br>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class = btns onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class = btns onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
42
sentFeedback2.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// Include database connection file
|
||||
include("connection.php");
|
||||
|
||||
function generateUniqueId($conn) {
|
||||
do {
|
||||
// Generate a random report ID (you can customize this format)
|
||||
$reportId = 'REP' . rand(1000, 9999);
|
||||
|
||||
// Check if this report ID already exists in the database
|
||||
$checkQuery = "SELECT Report_ID FROM report WHERE Report_ID = '$reportId'";
|
||||
$result = mysqli_query($conn, $checkQuery);
|
||||
} while (mysqli_num_rows($result) > 0); // Repeat until a unique ID is found
|
||||
|
||||
return $reportId;
|
||||
}
|
||||
|
||||
if (isset($_POST['submit'])) {
|
||||
// Capture values from HTML form
|
||||
$rentid = $_POST['renterid'];
|
||||
$dept = $_POST['department'];
|
||||
$fback = $_POST['feedback'];
|
||||
|
||||
// Generate a unique Report ID
|
||||
$repid = generateUniqueId($conn);
|
||||
|
||||
// Insert into report table
|
||||
$sql = "INSERT INTO report (Report_ID, Renter_ID, Department, Feedback)
|
||||
VALUES ('$repid', '$rentid', '$dept', '$fback')";
|
||||
|
||||
if (mysqli_query($conn, $sql)) {
|
||||
echo "<script>alert('Data Been Saved.');</script>";
|
||||
echo "<script>window.location = 'sentFeedback.php'</script>";
|
||||
exit();
|
||||
} else {
|
||||
echo "Error: " . mysqli_error($conn);
|
||||
echo "<script>window.location = 'sentFeedback.php'</script>";
|
||||
exit();
|
||||
}
|
||||
mysqli_close($conn); // Close the database connection
|
||||
}
|
||||
?>
|
||||
41
signin.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
<link rel="stylesheet" href="lsf.css">
|
||||
<title>Sign In | UITM BAZAAR</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container" id="container">
|
||||
<div class="form-container sign-in">
|
||||
<form method="post" action="signin.php">
|
||||
<h1>Create Account</h1><br>
|
||||
<input type="text" placeholder="ID / NO IC" name="ID" required>
|
||||
<input type="password" placeholder="Password" name="Pass" required>
|
||||
<input type="text" placeholder="Name" name="Name" required>
|
||||
<input type="Number" placeholder="Phone Number" name="PhoneNum" required>
|
||||
<input type="Number" placeholder="Age" name="Age" required>
|
||||
<input type="text" placeholder="Email" name="Email" required>
|
||||
<button type="submit" name=submit>Sign Up</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="toggle-container">
|
||||
<div class="toggle">
|
||||
<div class="toggle-panel toggle-right">
|
||||
<h1>Welcome Back!</h1>
|
||||
<p>Enter your personal details to use all site features</p>
|
||||
<a href="login.html"><button class="hidden" id="login">Sign In</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
29
signin.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/* include db connection file */
|
||||
include("connection.php");
|
||||
|
||||
if(isset($_POST['submit'])){
|
||||
/* capture values from HTML form */
|
||||
$id = $_POST['ID'];
|
||||
$pass = $_POST['Pass'];
|
||||
$name = $_POST['Name'];
|
||||
$phonenum = $_POST['PhoneNum'];
|
||||
$age = $_POST['Age'];
|
||||
$email = $_POST['Email'];
|
||||
|
||||
// Insert into user table
|
||||
$sql = "INSERT INTO renter (Renter_ID,Renter_Pass,Renter_Name,Renter_PhoneNum,Renter_Age,Renter_Email) VALUES ('$id','$pass','$name','$phonenum','$age','$email')";
|
||||
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
echo "<script>alert('Sign In Successfull')</script>";
|
||||
echo "<script>window.location = 'login.html'</script>";
|
||||
} else {
|
||||
echo "<script>alert('Renter ID is already exist or error type entering')</script>";
|
||||
echo "<script>window.location = 'signin.html'</script>";
|
||||
}
|
||||
|
||||
mysqli_close($conn); // Close connection
|
||||
}
|
||||
?>
|
||||
401
style.css
Normal file
@ -0,0 +1,401 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
scroll-behavior: smooth;
|
||||
font-family: "Poppins", sans-serif;
|
||||
}
|
||||
:root {
|
||||
--bg-color: rgb(15, 15, 15);
|
||||
--second-bg-color: #161616;
|
||||
--text-color: white;
|
||||
--main-color: purple;
|
||||
}
|
||||
html {
|
||||
font-size: 62.5%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
body {
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 3rem 9%;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(10px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
z-index: 100;
|
||||
}
|
||||
.logo {
|
||||
font-size: 3rem;
|
||||
color: var(--text-color);
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
.logo:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
.navbar a {
|
||||
font-size: 1.8rem;
|
||||
color: white;
|
||||
margin-left: 4rem;
|
||||
font-weight: 500;
|
||||
transition: 0.3s ease-in-out;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
.navbar a:hover,
|
||||
.navbar a.active {
|
||||
color: var(--main-color);
|
||||
border-bottom: 3px solid var(--main-color);
|
||||
}
|
||||
#menu-icon {
|
||||
font-size: 3rem;
|
||||
color: var(--main-color);
|
||||
display: none;
|
||||
}
|
||||
section {
|
||||
min-height: 100vh;
|
||||
padding: 10rem 9%;
|
||||
}
|
||||
.home {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 8rem;
|
||||
}
|
||||
span {
|
||||
color: var(--main-color);
|
||||
}
|
||||
.logo span {
|
||||
color: var(--main-color);
|
||||
}
|
||||
.home-content h1 {
|
||||
font-size: 6rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.home-img {
|
||||
margin-top: 30px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.home-img img {
|
||||
position: relative;
|
||||
border-radius: 50%;
|
||||
width: 32vw;
|
||||
box-shadow: 0 0 25px var(--main-color);
|
||||
cursor: pointer;
|
||||
transition: 0.4s ease-in-out;
|
||||
}
|
||||
.home-img img:hover {
|
||||
box-shadow: 0 0 50px var(--main-color), 0 0 100px var(--main-color);
|
||||
}
|
||||
.home-content p {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.social-icons a {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
background: transparent;
|
||||
border: 0.2rem solid var(--main-color);
|
||||
font-size: 2rem;
|
||||
border-radius: 50%;
|
||||
color: var(--main-color);
|
||||
margin: 3rem 1.5rem 3rem 0;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
.social-icons a:hover {
|
||||
color: white;
|
||||
transform: scale(1.3) translateY(-5px);
|
||||
background-color: var(--main-color);
|
||||
box-shadow: 0 0 25px var(--main-color);
|
||||
}
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 1rem 2.8rem;
|
||||
background: var(--bg-color);
|
||||
border-radius: 4rem;
|
||||
font-size: 1.6rem;
|
||||
color: var(--main-color);
|
||||
border: 2px solid var(--main-color);
|
||||
letter-spacing: 0.1rem;
|
||||
font-weight: 600;
|
||||
transition: 0.3s ease-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn:hover {
|
||||
transform: scale(1.05);
|
||||
background: var(--main-color);
|
||||
color: var(--text-color);
|
||||
border: 2px solid var(--main-color);
|
||||
box-shadow: 0 0 25px var(--main-color);
|
||||
}
|
||||
.heading {
|
||||
text-align: center;
|
||||
font-size: 8rem;
|
||||
}
|
||||
.services {
|
||||
background-color: var(--second-bg-color);
|
||||
}
|
||||
.services h2 {
|
||||
font-size: 40px;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
.service-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 2rem;
|
||||
}
|
||||
.services-box h3 {
|
||||
font-size: 2.6rem;
|
||||
}
|
||||
.services-box p {
|
||||
font-size: 1.6rem;
|
||||
margin: 1rem 0 3rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.services-box .btn {
|
||||
background-color: transparent;
|
||||
}
|
||||
.services-box .btn:hover {
|
||||
color: var(--main-color);
|
||||
background-color: black;
|
||||
}
|
||||
.boxes {
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
height: 500px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: stretch;
|
||||
gap: 1.25rem;
|
||||
transition: all 400ms;
|
||||
}
|
||||
.card {
|
||||
margin-top: 100px;
|
||||
background-color: transparent;
|
||||
flex: 1;
|
||||
height: 70%;
|
||||
transition: all 400ms;
|
||||
cursor: pointer;
|
||||
}
|
||||
.card img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.card h2 {
|
||||
text-align: center;
|
||||
}
|
||||
.card:nth-child(odd) {
|
||||
translate: 0 -20px;
|
||||
}
|
||||
.card:nth-child(even) {
|
||||
translate: 0;
|
||||
}
|
||||
.card:hover {
|
||||
flex: 3;
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 15px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--main-color);
|
||||
}
|
||||
::webkit-scrollbar-track {
|
||||
background-color: var(--bg-color);
|
||||
width: 50px;
|
||||
}
|
||||
.footer {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 40px 0;
|
||||
background-color: black;
|
||||
}
|
||||
.footer .social {
|
||||
text-align: center;
|
||||
padding-bottom: 25px;
|
||||
color: white;
|
||||
}
|
||||
.footer .social a {
|
||||
font-size: 25px;
|
||||
color: var(--main-color);
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border: 2px solid var(--main-color);
|
||||
line-height: 42px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
margin: 0 10px;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
.footer .social a:hover {
|
||||
transform: scale(1.2) translateY(-10px);
|
||||
background-color: var(--main-color);
|
||||
color: var(--text-color);
|
||||
box-shadow: 0 0 25px var(--main-color);
|
||||
}
|
||||
.footer ul {
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
font-size: 18px;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.footer ul li a {
|
||||
color: white;
|
||||
border-bottom: 3px solid transparent;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
.footer ul li a:hover {
|
||||
border-bottom: 3px solid var(--main-color);
|
||||
}
|
||||
.footer ul li {
|
||||
display: inline-block;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.footer .copyright {
|
||||
margin-top: 50px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
color: white;
|
||||
}
|
||||
.popup {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
background-color: var(--second-bg-color);
|
||||
padding: 3rem 1.8rem;
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 4rem;
|
||||
font-size: 1.6rem;
|
||||
color: var(--main-color);
|
||||
border: 2px solid var(--main-color);
|
||||
letter-spacing: 0.1rem;
|
||||
font-weight: 600;
|
||||
z-index: 9999;
|
||||
}
|
||||
.popup h2 {
|
||||
text-align: center;
|
||||
}
|
||||
.popup p {
|
||||
text-align: center;
|
||||
}
|
||||
.popup img {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
margin-top: -50px;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.btns {
|
||||
display: inline-block;
|
||||
padding: 1rem 2.8rem;
|
||||
background: var(--bg-color);
|
||||
border-radius: 4rem;
|
||||
font-size: 1.6rem;
|
||||
color: var(--main-color);
|
||||
border: 2px solid var(--main-color);
|
||||
letter-spacing: 0.1rem;
|
||||
font-weight: 600;
|
||||
transition: 0.3s ease-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btns:hover {
|
||||
transform: scale(1.05);
|
||||
background: var(--main-color);
|
||||
color: var(--text-color);
|
||||
border: 2px solid var(--main-color);
|
||||
box-shadow: 0 0 25px var(--main-color);
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
padding: 2rem;
|
||||
}
|
||||
.slider-wrapper {
|
||||
width: 100%;
|
||||
background: var(--bg-color);
|
||||
overflow: hidden;
|
||||
}
|
||||
.slider {
|
||||
display: flex;
|
||||
aspect-ratio: 16 / 8;
|
||||
overflow-x: auto;
|
||||
scroll-snap-type: x mandatory;
|
||||
scroll-behavior: smooth;
|
||||
box-shadow: 0 1.5rem 3rem -0.75rem hsla(0, 0%, 0%, 0.25);
|
||||
border-radius: 0rem;
|
||||
-ms-overflow-style: none; /* Hide scrollbar IE and Edge */
|
||||
scrollbar-width: none; /* Hide scrollbar Firefox */
|
||||
}
|
||||
.slider::-webkit-scrollbar {
|
||||
display: none; /* Hide scrollbar Chrome, Safari and Opera */
|
||||
}
|
||||
.slider section {
|
||||
scroll-snap-align: start;
|
||||
flex: 1 0 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.slider-nav {
|
||||
display: flex;
|
||||
column-gap: 1rem;
|
||||
position: absolute;
|
||||
bottom: 1.25rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 1;
|
||||
}
|
||||
.slider-nav a {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: 50%;
|
||||
background-color: #fff;
|
||||
opacity: 0.75;
|
||||
transition: opacity ease 250ms;
|
||||
}
|
||||
.slider-nav a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.nav-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: white;
|
||||
font-size: 2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
border-radius: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.nav-arrow.left {
|
||||
left: 1rem;
|
||||
}
|
||||
.nav-arrow.right {
|
||||
right: 1rem;
|
||||
}
|
||||
125
style2.css
Normal file
@ -0,0 +1,125 @@
|
||||
/* Importing Google font - Poppins */
|
||||
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: "Poppins", sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
background-image: url("images/hero-bg.jpg");
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: black; /* Change background color to semi-transparent black */
|
||||
z-index: 101; /* Ensure the sidebar appears in front of other elements */
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.sidebar:hover {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
color: #fff; /* Change logo color to white */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 25px 10px 15px;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 43px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.logo h2 {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
margin-left: 15px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar:hover .logo h2 {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar .links {
|
||||
list-style: none;
|
||||
margin-top: 20px;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: none;
|
||||
height: calc(100% - 140px);
|
||||
}
|
||||
|
||||
.sidebar .links::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.links li {
|
||||
display: flex;
|
||||
border-radius: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.links li:hover {
|
||||
cursor: pointer;
|
||||
background: purple;
|
||||
}
|
||||
|
||||
.links h4 {
|
||||
color: #fff; /* Change heading color to white */
|
||||
font-size: 20px;
|
||||
display: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.sidebar:hover .links h4 {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.links hr {
|
||||
margin: 10px 8px;
|
||||
border: 1px solid #fff; /* Change HR color to white */
|
||||
}
|
||||
|
||||
.sidebar:hover .links hr {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.links li span i{
|
||||
font-size: 30px;
|
||||
padding: 12px 10px;
|
||||
color: #fff; /* Change icon color to white */
|
||||
}
|
||||
.links li span img{
|
||||
position: center;
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.links li a {
|
||||
padding: 10px;
|
||||
color: #fff; /* Change link color to white */
|
||||
display: none;
|
||||
font-size: 15px;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sidebar:hover .links li a {
|
||||
display: block;
|
||||
}
|
||||
233
viewFeedback.php
Normal file
@ -0,0 +1,233 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['AccAdminID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
include("connection.php");
|
||||
$AccID = $_SESSION['AccAdminID'];
|
||||
|
||||
// Fetching the user's name
|
||||
$sql = "SELECT Admin_Name FROM admin WHERE Admin_ID = '$AccID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Admin_Name'];
|
||||
|
||||
// Handle deletion if delete request is received
|
||||
if (isset($_POST['delete']) && isset($_POST['Report_ID'])) {
|
||||
$reportId = $_POST['Report_ID'];
|
||||
$deleteSql = "DELETE FROM report WHERE Report_ID = '$reportId'";
|
||||
if ($conn->query($deleteSql) === TRUE) {
|
||||
echo "<script>alert('Row deleted successfully');</script>";
|
||||
echo "<script>window.location = 'viewFeedback.php'</script>";
|
||||
exit();
|
||||
} else {
|
||||
echo "<script>alert('Error: " . $conn->error . "');</script>";
|
||||
echo "<script>window.location = 'viewFeedback.php'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Feedback | UITM BAZAAR</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<style type="text/css">
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.table-common button:hover {
|
||||
background: #e91e63;
|
||||
}
|
||||
input {
|
||||
color: white;
|
||||
margin-left: 26%;
|
||||
padding: 1rem;
|
||||
font: inherit;
|
||||
font-size: 18px;
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
background: hsl(231, 14%, 10%);
|
||||
border: 2px solid #2b2c37;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
transition: all 0.35s ease-in-out;
|
||||
}
|
||||
input::placeholder {
|
||||
color: #727884;
|
||||
}
|
||||
input:focus {
|
||||
border: 2px solid #de55de;
|
||||
box-shadow: 1px 1px 20px #de55de;
|
||||
}
|
||||
.table-common {
|
||||
margin-left: 50px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#table-1 {
|
||||
border: 1px solid white;
|
||||
font-size: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
#table-1 tr {
|
||||
border: 1px solid white;
|
||||
font-size: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
#table-1 td {
|
||||
border: 1px solid white;
|
||||
font-size: 15px;
|
||||
padding: 10px;
|
||||
}
|
||||
.footer{
|
||||
margin-top: 210px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function filterTable() {
|
||||
let input = document.getElementById('searchInput');
|
||||
let filter = input.value.toUpperCase();
|
||||
let table = document.getElementById('table-1');
|
||||
let tr = table.getElementsByTagName('tr');
|
||||
let noResults = document.getElementById('noResults');
|
||||
let hasResults = false;
|
||||
for (let i = 1; i < tr.length; i++) {
|
||||
let td = tr[i].getElementsByTagName('td')[2];
|
||||
if (td) {
|
||||
let txtValue = td.textContent || td.innerText;
|
||||
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
||||
tr[i].style.display = '';
|
||||
hasResults = true;
|
||||
} else {
|
||||
tr[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
noResults.style.display = hasResults ? 'none' : 'block';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="adminmenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/admin.png"></span>
|
||||
<a href="newAdmin.php">New Admin Acc</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="adminProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logoutAdmin.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class="header">
|
||||
<a href="adminmenu.php" class="logo">
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="report.php">Report</a>
|
||||
<a href="renterList.php">Renter List</a>
|
||||
<a href="viewFeedback.php">Feedback</a>
|
||||
<a href="approval.php">Order</a>
|
||||
<a href="postEvents.php">Events</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="home" id="home">
|
||||
<div class="home-content">
|
||||
<br><br>
|
||||
<table width="882" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><h1 style="margin-left: 220px;">FEEDBACK LIST</h1></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<form method="GET" action="">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="searchInput" name="search" placeholder="Search by Department" value="<?php echo isset($_GET['search']) ? htmlspecialchars($_GET['search']) : ''; ?>" onkeyup="filterTable()">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
<br><br>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table-common" id="table-1" width="882" border="1" cellpadding="1" cellspacing="1">
|
||||
<tbody>
|
||||
<tr align="center" style="background-color: purple">
|
||||
<td width="150">Report ID</td>
|
||||
<td width="150">Renter ID</td>
|
||||
<td width="150">Department</td>
|
||||
<td width="300">Feedback</td>
|
||||
<td width="150">Action</td>
|
||||
</tr>
|
||||
<?php
|
||||
$conn = mysqli_connect("localhost", "root", "", "groupproject");
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
$search = isset($_GET['search']) ? $conn->real_escape_string($_GET['search']) : '';
|
||||
$sql = "SELECT Report_ID, Renter_ID, Department, Feedback FROM report";
|
||||
if ($search) {
|
||||
$sql .= " WHERE Department LIKE '%$search%'";
|
||||
}
|
||||
|
||||
$result = $conn->query($sql);
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . $row["Report_ID"] . "</td>";
|
||||
echo "<td>" . $row["Renter_ID"] . "</td>";
|
||||
echo "<td>" . $row["Department"] . "</td>";
|
||||
echo "<td>" . $row["Feedback"] . "</td>";
|
||||
echo "<td>
|
||||
<form method='POST' action='' onsubmit='return confirm(\"Are you sure you want to delete this row?\");'>
|
||||
<input type='hidden' name='Report_ID' value='" . $row["Report_ID"] . "'>
|
||||
<button type='submit' name='delete'>Delete</button>
|
||||
</form>
|
||||
</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
} else {
|
||||
echo "<tr><td colspan='5'>No results found</td></tr>";
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer" id="footer">
|
||||
<p class="copyright">
|
||||
NextGen Techne © | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
26
viewFeedback2.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/* include db connection file */
|
||||
include("dbconn.php");
|
||||
|
||||
if(isset($_POST['confirm'])){
|
||||
/* capture values from HTML form */
|
||||
$admin = "";
|
||||
$id = $_POST['Renter_ID'];
|
||||
$license = $_POST['Renter_License'];
|
||||
$date = $_POST['Renter_Date'];
|
||||
$category= $_POST['Category_Type'];
|
||||
$status = false;
|
||||
|
||||
|
||||
// Insert into user table
|
||||
$sql = "INSERT INTO place (Place_Num,Renter_ID,Admin_ID, Renter_License, Renter_Date, Category_Type, Status)
|
||||
VALUES ('".$id."', '".$admin."', '".$license."', '".$date."', '".$category."','".$status."')";
|
||||
|
||||
mysqli_query($conn, $sql) or die ("Error: " .mysqli_error($conn));
|
||||
|
||||
|
||||
echo "<p>Data has been saved";
|
||||
|
||||
mysqli_close($conn); //data security purposes
|
||||
}
|
||||
?>
|
||||
286
viewReceipt.php
Normal file
@ -0,0 +1,286 @@
|
||||
<?php
|
||||
include("connection.php");
|
||||
|
||||
session_start();
|
||||
$AccID = $_SESSION['AccID'];
|
||||
if (!isset($_SESSION['AccID'])) {
|
||||
header('Location: login.html');
|
||||
exit();
|
||||
}
|
||||
|
||||
$OrderID = $_POST['OrderID'];
|
||||
$Renter_ID = $_POST['Renter_ID'];
|
||||
$Place_Num = $_POST['Place_Num'];
|
||||
$License = $_POST['License'];
|
||||
$Dates = $_POST['Dates'];
|
||||
$Pay_Date = $_POST['Pay_Date'];
|
||||
$Pay_AmountTotal = $_POST['Pay_AmountTotal'];
|
||||
$payment_type = $_POST['Pay_Type'];
|
||||
$Transaction_No = $_POST['Transaction_No'];
|
||||
|
||||
|
||||
// Fetching the user's name for display
|
||||
$sql = "SELECT Renter_Name FROM renter WHERE Renter_ID = '$Renter_ID'";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
$user = mysqli_fetch_assoc($result);
|
||||
$userName = $user['Renter_Name'];
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
<link rel="stylesheet" href="style2.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<title>Receipt | UITM BAZAAR</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.container {
|
||||
width: 80%;
|
||||
margin: 200px auto;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
img{
|
||||
margin-left: 20%;
|
||||
}
|
||||
h1 {
|
||||
text-align: left;
|
||||
}
|
||||
.invoice-details {
|
||||
margin: 20px 0;
|
||||
}
|
||||
.invoice-details div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.invoice-details label {
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
}
|
||||
.invoice-details span {
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
width: 150px;
|
||||
}
|
||||
.buttons {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.buttons button {
|
||||
margin: 5px;
|
||||
padding: 20px 25px;
|
||||
font-size: 2em;
|
||||
cursor: pointer;
|
||||
}
|
||||
.invoice-footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 1.5em;
|
||||
color: #555;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
th, td {
|
||||
color: black;
|
||||
font-size: 27px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.invoice-header {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.container-logo {
|
||||
height: 200px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
.invoice-title {
|
||||
font-size: 2em;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function printInvoice() {
|
||||
window.print();
|
||||
}
|
||||
|
||||
function goToNext() {
|
||||
window.location.href = "rentermenu.php";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<div class="logo">
|
||||
<img src="pic/profiles.png" alt="logo">
|
||||
<h2><?php echo $userName; ?>'s</h2>
|
||||
</div>
|
||||
<ul class="links">
|
||||
<h4>Main Menu</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/home.png"></span>
|
||||
<a href="rentermenu.php">Main Menu</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Advanced</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/receipt.png"></span>
|
||||
<a href="selectReceipt.php">Receipt</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Account</h4>
|
||||
<li>
|
||||
<span class="material-symbols-outlined"><img src="pic/profile2.png"></span>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
<hr>
|
||||
<h4>Sign Out</h4>
|
||||
<li class="logout-link">
|
||||
<span class="material-symbols-outlined"><i class="fa-solid fa-right-from-bracket"></i></span>
|
||||
<a href="logout.php">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<header class = "header">
|
||||
<a href= "rentermenu.php" class = "logo">Welcome
|
||||
<span><?php echo $userName; ?>'s</span></a>
|
||||
|
||||
<i class="fa-solid fa-bars" id="menu-icon"></i>
|
||||
|
||||
<nav class="navbar">
|
||||
<a href="rentPlace.php">Rent Place</a>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
<a href="payment.php">Payment</a>
|
||||
<a href="sentFeedback.php">Sent Feedback</a>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="container">
|
||||
<div class="invoice-header">
|
||||
<table class="table-1" align="left" width="924" height="145" border="0">
|
||||
<tr>
|
||||
<td width="150" align="left"><img src="pic/uitm.png" width="100" height="100" alt=""/></td>
|
||||
<td width="500" align="left"><h1>Invoice</h1></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="invoice-details">
|
||||
<div>
|
||||
<label>Transaction No:</label>
|
||||
<span id="transactionNo"><?php echo $Transaction_No; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Renter ID:</label>
|
||||
<span id="renterId"><?php echo $Renter_ID; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Order ID:</label>
|
||||
<span id="OrderID"><?php echo $OrderID; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Pay Type:</label>
|
||||
<span id="Pay_Type"><?php echo $payment_type; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Rent Date:</label>
|
||||
<span id="Dates"><?php echo $Dates; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Pay Date:</label>
|
||||
<span id="Pay_Date"><?php echo $Pay_Date; ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<label>Place Number:</label>
|
||||
<span id="placeNumber"><?php echo $Place_Num; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Item</th>
|
||||
<th>Description</th>
|
||||
<th>Quantity</th>
|
||||
<th>Price</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Place Rental</td>
|
||||
<td>Rental of place number <?php echo $Place_Num; ?></td>
|
||||
<td>1</td>
|
||||
<td>RM<?php echo $Pay_AmountTotal; ?></td>
|
||||
<td>RM<?php echo $Pay_AmountTotal; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="buttons">
|
||||
<button onclick="printInvoice()">Print</button>
|
||||
<button onclick="goToNext()">Next</button>
|
||||
</div>
|
||||
<div class="invoice-footer">
|
||||
<p>Thank you for your business!</p>
|
||||
<p>If you have any questions about this invoice, please contact us.</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer" id="footer">
|
||||
<div class="social">
|
||||
<a onclick="showPopup()"><i class="fa-solid fa-phone"></i></a>
|
||||
<a onclick="showPopup2()"><i class="fa-solid fa-envelope"></i></a>
|
||||
</div>
|
||||
<div id="popup" class="popup">
|
||||
<h2>This is Our No Phone!</h2><br>
|
||||
<p>016-430 6562</p>
|
||||
<button class = btns onclick="closePopup()">Close</button>
|
||||
</div>
|
||||
|
||||
<div id="popup2" class="popup">
|
||||
<h2>This is Our Email!</h2><br>
|
||||
<p>uitm@student.uitm.edu.my</p>
|
||||
<button class = btns onclick="closePopup2()">Close</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="sentFeedback.php">Rate Us</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="sawEvents.php">Event</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="renterProfile.php">Profile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://bendahari.uitm.edu.my/index.php/component/contact/category/55-cawangan-negeri-perak-kampus-tapah">Website</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
© NextGen Techne | All Rights Reserved
|
||||
</p>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||