Student Performance Analysis System Report
Student Performance Analysis System Report
2023-2024
Computer Technology
-: SUBMITTED BY :-
PROF. M. U. MUN
SUBMISSION
We are the undersigned solemnly declare that the report of the project work entitled
“STUDENT PERFORMANCE ANALYSIS SYSTEM” is based on our work carried out
during the course of our study under the guidance of PROF M. U. MUN (Lecturer in CM
Dept.) We assert that the statements made and conclusions drawn are an outcome of our
project work.
CERTIFICATE
This is to certify that the following student of this institute have carried the
project work on “STUDENT PERFORMANCE ANALYSIS SYSTEM” under
my guidance in “Diploma in Computer Technology/ Engineering” during the
academic session 2023-24. This work has been in partial fulfillment requirement
for the Award of Diploma in Computer Engineering from Maharashtra State
Board of Technical Education, Mumbai.
Examiner’s Certificate
This is to certify that the following students of final year students of Computer
Technology of Government Polytechnic, Bramhapuri were examined by me for
the project work entitled, “STUDENT PERFORMANCE ANALYSIS
SYSTEM” for academic year 2023-2024 and the project is approved.
Date:- / /
Place: - Bramhapuri Sign and name of examiner
DECLARATION BY THE STUDENTS
We the undersigned solemnly declare that the report of the project work entitled
“STUDENT PERFORMANCE ANALYSIS SYSTEM” is based on my own
work carried out during the course of my study under the supervision of PROF.
[Link] We assert that the statements made and conclusions drawn are an
outcome of my project work.
• The work contained in the project report is original and has been done
by me under the general supervision of my guide.
• The work has not been submitted to any other institute for any other
degree/diploma/certificate in this university or any other university of
INDIA or abroad.
• I have followed the guidelines provided by the MSBTE in writing the project work.
Also we express our special thanks to PROF. M. I .MUN Head of CM Dept and PROF.
S .K. KHARKATE lecturer in CM Dept. for her kind support, valuable suggestions and
allowing us to use all facility that are available in the department during this project.
Our sincere thanks are due to DR. A. W. Pawde Principal of institute for extending the
all possible help and allowing us to use all resources available in the institute.
We would like to thanks all the faculty members of CM and IF Department for their
support and suggestion for the successful completion of this project work.
We would also like to thanks all the non-teaching staff (Technical and Non- Technical)
of CM and IF Department.
SUBMITTED BY
Topic Name :-
List of Figure
Abstract
Chapter 5
5.1 Screenshot
Chapter 7
7.1 Future Scope
7.2 Conclusions
7.3 Reference
LIST OF FIGURES
2 AD Activity Diagram
Performance analysis of outcome based on learning is a system which will strive for
excellence at different levels and diverse dimensions in the field of student’s interests. This
paper proposes a complete EDM framework in a form of a rule based recommender system
that is not developed to analyze and predict the student’s performance only, but also to
exhibit the reasons behind it. The proposed framework analyzes the students’ demographic
data, study related and psychological characteristics to extract all possible knowledge from
students, teachers and parents. Seeking the highest possible accuracy in academic
performance prediction using a set of powerful data mining techniques. The framework
succeeds to highlight the student’s weak points and provide appropriate recommendations.
The realistic case study that has been conducted on 200 students proves the outstanding
performance of the proposed framework in comparison with the existing ones.
CHAPTER-1
Students are the main asset for various universities. Universities and students play an
important role in producing graduates of high qualities with its academic performance
achievement. Academic performance achievement is the level of achievement of the
students’ educational goal that can be measured and tested through examination,
assessments and other form of measurements. However, the academic performance
achievement varies as different kind of students may have different level of performance
achievement.
The current system in our college faces a significant challenge: teachers lack the
capability to accurately predict a student's performance for upcoming semesters based on
their performance up to the fourth semester. This limitation hampers the proactive
support and guidance that educators can offer to students. However, by harnessing the
power of machine learning, this problem can be addressed effectively. Implementing a
student performance analysis system powered by machine learning algorithms will
enable us to utilize past academic data to forecast a student's future performance. This
predictive model will not only benefit the students by providing them with insights into
their academic trajectory but will also empower teachers to offer personalized guidance
and support tailored to each student's specific needs. By leveraging technology in this
manner, we can enhance the overall educational experience and contribute to the
academic success of our students.
.
CHAPTER-2
(SYSTEM DESIGNED)
2.1 DFD LEVEL DATA FLOW DIAGRAM :
Dataset
Collection
Pre-
processing
Random
selection
Trained &
Testing
dataset
FD
LEVEL 1
LEVEL 2
Dataset
collection
EDA
Classify
Pre-
the
processing
dataset
Train
Feature Algorithm
Extraction
Predict Result
Apply
Algorithm
2.2 SYSTEM ARCHITECTURE
ML Algorithms
Data pre-
Machine
processing Feature
dataset learning
extraction
model
Result classifier
Data classification
2.2 ACTIVITY DIAGRAM :
(SYSTEM DESIGNED)
3.1 MODULES:
3.1.1 STUDENT
In the student performance analysis system, the student module serves as a personalized
platform tailored to individual student needs. Students can input their academic data,
including grades, attendance records, and extracurricular activities, into the system. With
this information, the system generates comprehensive reports and visualizations,
allowing students to track their progress over time. Through interactive graphs and
charts, students gain valuable insights into their strengths and areas for improvement,
empowering them to make informed decisions about their academic journey.
Additionally, the module provides a predictive feature that forecasts the student's
performance in upcoming semesters based on historical data and trends. By offering a
user-friendly interface and valuable predictive capabilities, the student module fosters a
proactive approach to academic success and self-improvement.
3.1.2 TEACHER
In contrast, the teacher module of the student performance analysis system provides
educators with a powerful tool for analyzing and managing student performance across
their classes. Teachers have access to a centralized database containing comprehensive
records of all students in their classes, including academic achievements, attendance
records, and behavioral data. Using advanced analytics and visualization tools, teachers
can gain valuable insights into individual student progress and classroom performance
trends. The module enables teachers to generate detailed reports and graphs, facilitating
data-driven decision-making and personalized interventions to support student success.
Moreover, the predictive analytics feature empowers teachers to forecast students'
future performance based on historical data, enabling them to proactively identify at-
risk students and provide targeted support. With its robust analytical capabilities and
predictive insights, the teacher module enhances educators' ability to optimize teaching
strategies, promote student engagement, and foster a culture of continuous
improvement within the classroom.
CHAPTER-4
(IMPLEMENTATION DETAILS)
4.1 CODE :
Index Page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="[Link]">
<title>Home</title>
<style>
.portal_title a {
font-size: 1rem;
color: black;
text-decoration: none;
}
.portal_title h1 {
text-align: center;
}
.option {
text-align: center;
font-size: 1.7rem;
color: green;
}
.option_select {
display: flex;
justify-content: center;
margin: 3rem 2rem;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav ul li {
--c: goldenrod;
color: var(--c);
font-size: 16px;
border: 0.3em solid var(--c);
border-radius: 0.5em;
width: 12em;
height: 3em;
text-transform: uppercase;
font-weight: bold;
font-family: sans-serif;
letter-spacing: 0.1em;
text-align: center;
line-height: 3em;
position: relative;
overflow: hidden;
z-index: 1;
transition: 0.5s;
margin: 1em;
}
nav ul li span {
position: absolute;
width: 25%;
height: 100%;
background-color: var(--c);
transform: translateY(150%);
border-radius: 50%;
left: calc((var(--n) - 1) * 25%);
transition: 0.5s;
transition-delay: calc((var(--n) - 1) * 0.1s);
z-index: -1;
}
nav ul li:hover {
color: black;
}
nav ul li:hover span {
transform: translateY(0) scale(2);
}
nav ul li span:nth-child(1) {
--n: 1;
}
nav ul li span:nth-child(2) {
--n: 2;
}
nav ul li span:nth-child(3) {
--n: 3;
}
nav ul li span:nth-child(4) {
--n: 4;
}
</style>
</head>
<body>
<div class="portal_title">
<h1>Welcome to the 5th Semester Marks Prediction Portal</h1>
<div class="option">Select Any one</div>
<div class="option_select">
<nav>
<ul>
<li>
<a href="/student">Student</a>
<span></span><span></span><span></span><span></span>
</li>
<li>
<a href="/teacher">Teacher</a>
<span></span><span></span><span></span><span></span>
</li>
</ul>
</nav>
</div>
</div>
</body>
</html>
Home Page
<!-- Masthead-->
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end mb-4 page-title">
<h3 class="text-white">Welcome to <?php echo $_SESSION['setting_name'];
?></h3>
<hr class="divider my-4" />
<a class="btn btn-primary btn-xl js-scroll-trigger" href="#menu">Order Now</a>
</div>
</div>
</div>
</header>
<section class="page-section" id="menu">
<div id="menu-field" class="card-deck">
<?php
include'admin/db_connect.php';
$qry = $conn->query("SELECT * FROM product_list order by rand() ");
while($row = $qry->fetch_assoc()):
?>
<div class="col-lg-3">
<div class="card menu-item ">
<img src="assets/img/<?php echo $row['img_path'] ?>" class="card-img-top"
alt="...">
<div class="card-body">
<h5 class="card-title"><?php echo $row['name'] ?></h5>
<p class="card-text truncate"><?php echo $row['description'] ?></p>
<div class="text-center">
<button class="btn btn-sm btn-outline-primary view_prod btn-block" data-
id=<?php echo $row['id'] ?>><i class="fa fa-eye"></i> View</button>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</section>
<script>
$('.view_prod').click(function() {
uni_modal_right('Product', 'view_prod.php?id=' + $(this).attr('data-id'))
})
</script>
Header Page
<script src="admin/assets/vendor/jquery/[Link]"></script>
<script src="admin/assets/vendor/bootstrap-datepicker/js/bootstrap-
[Link]"></script>
Footer Page
<script>
$('.datepicker').datepicker({
format:"yyyy-mm-dd"
})
window.start_load = function(){
$('body').prepend('<di id="preloader2"></di>')
}
window.end_load = function(){
$('#preloader2').fadeOut('fast', function() {
$(this).remove();
})
}
if($bg == 'success')
$('#alert_toast').addClass('bg-success')
if($bg == 'danger')
$('#alert_toast').addClass('bg-danger')
if($bg == 'info')
$('#alert_toast').addClass('bg-info')
if($bg == 'warning')
$('#alert_toast').addClass('bg-warning')
$('#alert_toast .toast-body').html($msg)
$('#alert_toast').toast({delay:3000}).toast('show');
}
window.load_cart = function(){
$.ajax({
url:'admin/[Link]?action=get_cart_count',
success:function(resp){
if(resp > -1){
resp = resp > 0 ? resp : 0;
$('.item_count').html(resp)
}
}
})
}
$('#login_now').click(function(){
uni_modal("LOGIN",'[Link]')
})
$(document).ready(function(){
load_cart()
})
</script>
<!-- Bootstrap core JS-->
<script
src="[Link]
<!-- Third party plugin JS-->
<script src="[Link]
easing/1.4.1/[Link]"></script>
<script src="[Link]
[Link]/1.1.0/[Link]"></script>
<!-- Core theme JS-->
<script src="js/[Link]"></script>
<style>
#uni_modal .modal-footer {
display: none;
}
</style>
<script>
$('#new_account').click(function() {
uni_modal("Create an Account", '[Link]?redirect=[Link]?page=checkout')
})
$('#login-frm').submit(function(e) {
[Link]()
$('#login-frm button[type="submit"]').attr('disabled', true).html('Logging
in...'); if ($(this).find('.alert-danger').length > 0)
$(this).find('.alert-danger').remove();
$.ajax({
url: 'admin/[Link]?action=login2',
method: 'POST',
data: $(this).serialize(),
error: err => {
[Link](err)
$('#login-frm button[type="submit"]').removeAttr('disabled').html('Login');
},
success: function(resp) {
if (resp == 1) {
[Link] =
'<?php echo isset($_GET['redirect']) ? $_GET['redirect'] : '[Link]?page=home'
?>';
} else {
$('#login-frm').prepend(
'<div class="alert alert-danger">Email or password is incorrect.</div>') $
('#login-frm button[type="submit"]').removeAttr('disabled').html('Login');
}
}
})
})
</script>
<style>
#uni_modal .modal-footer {
display: none;
}
</style>
<script>
$('#signup-frm').submit(function(e) {
[Link]()
$('#signup-frm button[type="submit"]').attr('disabled',
true).html('Saving...'); if ($(this).find('.alert-danger').length > 0)
$(this).find('.alert-danger').remove();
$.ajax({
url: 'admin/[Link]?action=signup',
method: 'POST',
data: $(this).serialize(),
error: err => {
[Link](err)
$('#signup-frm button[type="submit"]').removeAttr('disabled').html('Create');
},
success: function(resp) {
if (resp == 1) {
[Link] =
'<?php echo isset($_GET['redirect']) ? $_GET['redirect'] : '[Link]?page=home'
?>';
} else {
$('#signup-frm').prepend(
'<div class="alert alert-danger">Email already exist.</div>')
$('#signup-frm button[type="submit"]').removeAttr('disabled').html('Create');
}
}
})
})
</script>
<?php
include'admin/db_connect.php';
$qry = $conn->query("SELECT * FROM product_list where id = ".$_GET['id'])-
>fetch_array();
?>
<div class="container-fluid">
</div>
</div>
<style>
#uni_modal_right .modal-footer {
display: none;
}
</style>
<script>
$('#qty-minus').click(function() {
var qty = $('input[name="qty"]').val();
if (qty == 1) {
return false;
} else {
$('input[name="qty"]').val(parseInt(qty) - 1);
}
})
$('#qty-plus').click(function() {
var qty = $('input[name="qty"]').val();
$('input[name="qty"]').val(parseInt(qty) + 1);
})
$('#add_to_cart_modal').click(function() {
start_load()
$.ajax({
url: 'admin/[Link]?action=add_to_cart',
method: 'POST',
data: {
pid: '<?php echo $_GET['id'] ?>',
qty: $('[name="qty"]').val()
},
success: function(resp) {
if (resp == 1)
alert_toast("Order successfully added to cart");
$('.item_count').html(parseInt($('.item_count').html()) + parseInt($('[name="qty"]')
.val()))
$('.modal').modal('hide')
end_load()
}
})
})
</script>
<!-- Masthead-->
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end mb-4 page-title">
<h3 class="text-white">Cart List</h3>
<hr class="divider my-4" />
</div>
</div>
</div>
</header>
<section class="page-section" id="menu">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="sticky">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-8"><b>Card</b></div>
<div class="col-md-4 text-right"><b>Total</b></div>
</div>
</div>
</div>
</div>
<?php
if(isset($_SESSION['login_user_id'])){
$data = "where c.user_id = '".$_SESSION['login_user_id']."' ";
}else{
$ip = isset($_SERVER['HTTP_CLIENT_IP']) ?
$_SERVER['HTTP_CLIENT_IP'] : (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);
$data = "where c.client_ip = '".$ip."' ";
}
$total = 0;
$get = $conn->query("SELECT *,[Link] as cid FROM cart c inner join product_list p
on [Link] = c.product_id ".$data);
while($row= $get->fetch_assoc()):
$total += ($row['qty'] * $row['price']);
?>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-4" style="text-align: -webkit-center">
<a href="javascript:void(0)" class="rem_cart btn btn-sm btn-outline-
danger"
data-id="<?php echo $row['cid'] ?>"><i class="fa fa-trash"></i></a>
<img src="assets/img/<?php echo $row['img_path'] ?>" alt="">
</div>
<div class="col-md-4">
<p><b>
<large><?php echo $row['name'] ?></large>
</b></p>
<p class='truncate'> <b><small>Desc :<?php echo
$row['description'] ?></small></b></p>
<p> <b><small>Unit Price : ₹<?php echo
number_format($row['price'],2)
?></small></b> </p>
<p><small>QTY :</small></p>
<div class="input-group mb-3">
<div class="input-group-prepend">
<button class="btn btn-outline-secondary qty-minus" type="button"
data-id="<?php echo $row['cid'] ?>"><span class="fa fa-
minus"></button>
</div>
<input type="number" readonly value="<?php echo $row['qty'] ?>"
min=1
class="form-control text-center" name="qty">
<div class="input-group-prepend">
<button class="btn btn-outline-secondary qty-plus" type="button"
id=""
data-id="<?php echo $row['cid'] ?>"><span
class="fa fa-plus"></span></button>
</div>
</div>
</div>
<div class="col-md-4 text-right">
<b>
<large>₹<?php echo number_format($row['qty'] * $row['price'],2)
?></large>
</b>
</div>
</div>
</div>
</div>
<p>
<large>Total Amount</large>
</p>
<hr>
<p class="text-right"><b>₹<?php echo number_format($total,2)
?></b></p>
<hr>
<div class="text-center">
[Link] {
position: -webkit-sticky;
/* Safari */
position: sticky;
top: 4.7em;
z-index: 10;
background: white
}
.rem_cart {
position: absolute;
left: 0;
}
</style>
<script>
$('.view_prod').click(function() {
uni_modal_right('Product', 'view_prod.php?id=' + $(this).attr('data-id'))
})
$('.qty-minus').click(function() {
var qty = $(this).parent().siblings('input[name="qty"]').val();
update_qty(parseInt(qty) - 1, $(this).attr('data-id'))
if (qty == 1) {
return false;
} else {
$(this).parent().siblings('input[name="qty"]').val(parseInt(qty) - 1);
}
})
$('.qty-plus').click(function() {
var qty = $(this).parent().siblings('input[name="qty"]').val();
$(this).parent().siblings('input[name="qty"]').val(parseInt(qty) +
1); update_qty(parseInt(qty) + 1, $(this).attr('data-id'))
})
}
$('#checkout').click(function() {
if ('<?php echo isset($_SESSION['login_user_id']) ?>' == 1)
{ [Link]("[Link]?page=checkout")
} else {
uni_modal("Checkout", "[Link]?page=checkout")
}
})
</script>
Checkout Page
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end mb-4 page-title">
<h3 class="text-white">Checkout</h3>
<hr class="divider my-4" />
</div>
</div>
</div>
</header>
<div class="container">
<div class="card">
<div class="card-body">
<form action="" id="checkout-frm">
<center>
<h4>Confirm Order Details</h4>
</center>
<div class="form-group">
<label for="" class="control-label">Table No</label>
<input type="Number" name="table_no" class="form-control"
placeholder="Enter Table No" required>
</div>
<div class="form-group">
<label for="" class="control-label">First Name</label>
<input type="text" name="first_name" required="" class="form-
control" value="<?php echo $_SESSION['login_first_name'] ?>">
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="text" name="last_name" required="" class="form-control"
value="<?php echo $_SESSION['login_last_name'] ?>">
</div>
<div class="form-group">
<label for="" class="control-label">Contact</label>
<input type="text" name="mobile" required="" class="form-control"
value="<?php echo $_SESSION['login_mobile'] ?>">
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="email" name="email" required="" class="form-control"
value="<?php echo $_SESSION['login_email'] ?>">
</div>
<div class="text-center">
<button class="btn btn-block btn-outline-primary">Place Order</button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#checkout-frm').submit(function(e) {
[Link]()
start_load()
$.ajax({
url: "admin/[Link]?action=save_order",
method: 'POST',
data: $(this).serialize(),
success: function(resp) {
if (resp == 1) {
alert_toast("Order successfully Placed.")
setTimeout(function() {
[Link]('[Link]?page=home')
}, 1500)
}
}
})
})
})
</script>
Admin Login Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
</head>
<style>
body {
width: 100%;
height: calc(100%);
/*background: #007bff;*/
}
main#main {
width: 100%;
height: calc(100%);
background: white;
}
#login-right {
position: absolute;
right: 0;
width: 40%;
height: calc(100%);
background: white;
display: flex;
align-items: center;
}
#login-left {
position: absolute;
left: 0;
width: 60%;
height: calc(100%);
background: #00000061;
display: flex;
align-items: center;
}
#login-right .card {
margin: auto
}
.logo {
margin: auto;
font-size: 8rem;
background: white;
border-radius: 50% 50%;
height: 29vh;
width: 13vw;
display: flex;
align-items: center;
}
.logo img {
height: 80%;
width: 80%;
margin: auto
}
</style>
<body>
</main>
<a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>
</body>
<script>
$('#login-form').submit(function(e) {
[Link]()
$('#login-form button[type="button"]').attr('disabled', true).html('Logging
in...'); if ($(this).find('.alert-danger').length > 0)
$(this).find('.alert-danger').remove();
$.ajax({
url: '[Link]?action=login',
method: 'POST',
data: $(this).serialize(),
error: err => {
[Link](err)
$('#login-form button[type="button"]').removeAttr('disabled').html('Login');
},
success: function(resp) {
if (resp == 1) {
[Link] = '[Link]?page=home';
} else if (resp == 2)
{ [Link] =
'[Link]';
} else {
$('#login-form').prepend(
'<div class="alert alert-danger">Username or password is
incorrect.</div>') $('#login-form
button[type="button"]').removeAttr('disabled').html('Login');
}
}
})
})
</script>
</html>
Admin Header Page
<script src="assets/vendor/jquery/[Link]"></script>
<script src="assets/DataTables/[Link]"></script>
<script src="assets/vendor/bootstrap/js/[Link]"></script>
<script src="assets/vendor/[Link]/[Link]"></script>
<script src="assets/vendor/php-email-form/[Link]"></script> <script
src="assets/vendor/venobox/[Link]"></script>
<script src="assets/vendor/waypoints/[Link]"></script>
<script src="assets/vendor/counterup/[Link]"></script> <script
src="assets/vendor/[Link]/[Link]"></script>
<script src="assets/vendor/bootstrap-datepicker/js/[Link]"></script>
<script type="text/javascript" src="assets/font-awesome/js/[Link]"></script>
<script type="text/javascript" src="assets/js/[Link]" charset="utf-
8"></script>
Admin Panel Index Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<?php
session_start();
if(!isset($_SESSION['login_id']))
header('location:[Link]');
include('./[Link]');
/ include('./[Link]');
?>
</head>
<style>
body{
background: #80808045;
}
</style>
<body>
<?php include '[Link]' ?>
<?php include '[Link]' ?>
<div class="toast" id="alert_toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body text-white">
</div>
</div>
<main id="view-panel" >
<?php $page = isset($_GET['page']) ? $_GET['page'] :'home'; ?
> <?php include $page.'.php' ?>
</main>
<div id="preloader"></div>
<a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>
</div>
</div>
<div class="modal fade" id="uni_modal" role='dialog'>
$('#confirm_modal').modal('show')
}
if($bg == 'success')
$('#alert_toast').addClass('bg-success')
if($bg == 'danger')
$('#alert_toast').addClass('bg-danger')
if($bg == 'info')
$('#alert_toast').addClass('bg-info')
if($bg == 'warning')
$('#alert_toast').addClass('bg-warning')
$('#alert_toast .toast-body').html($msg)
$('#alert_toast').toast({delay:3000}).toast('show');
}
$(document).ready(function(){
$('#preloader').fadeOut('fast', function() {
$(this).remove();
})
})
</script>
</html>
Admin Class Page
<?php
session_start()
;
Class Action {
private $db;
$this->db = $conn;
}
function __destruct() {
$this->db->close();
ob_end_flush();
}
function login(){
extract($_POST);
$qry = $this->db->query("SELECT * FROM users where username = '".
$username."' and password = '".$password."' ");
if($qry->num_rows > 0){
foreach ($qry->fetch_array() as $key => $value) {
if($key != 'password' && !is_numeric($key))
$_SESSION['login_'.$key] = $value;
}
return 1;
}else{
return 3;
}
}
function login2(){
extract($_POST);
$qry = $this->db->query("SELECT * FROM user_info where email = '".$email."'
and password = '".md5($password)."' ");
if($qry->num_rows > 0){
foreach ($qry->fetch_array() as $key => $value) {
if($key != 'password' && !is_numeric($key))
$_SESSION['login_'.$key] = $value;
}
$ip = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] :(
isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);
$this->db->query("UPDATE cart set user_id = '".$_SESSION['login_user_id']."'
where client_ip ='$ip' ");
return 1;
}else{
return 3;
}
}
function logout(){
session_destroy();
foreach ($_SESSION as $key => $value) {
unset($_SESSION[$key]);
}
header("location:[Link]");
}
function logout2(){
session_destroy();
foreach ($_SESSION as $key => $value) {
unset($_SESSION[$key]);
}
header("location:../[Link]");
}
function save_user(){
extract($_POST);
$data = " name = '$name' ";
$data .= ", username = '$username' ";
$data .= ", password = '$password' ";
$data .= ", type = '$type' ";
if(empty($id)){
$save = $this->db->query("INSERT INTO users set ".
$data); }else{
$save = $this->db->query("UPDATE users set ".$data." where id = ".$id);
}
if($save){
return 1;
}
}
function signup(){
extract($_POST);
$data = " first_name = '$first_name' ";
$data .= ", last_name = '$last_name' ";
$data .= ", mobile = '$mobile' ";
$data .= ", email = '$email' ";
$data .= ", password = '".md5($password)."' ";
$chk = $this->db->query("SELECT * FROM user_info where email = '$email'
")->num_rows;
if($chk > 0){
return 2;
exit;
}
$save = $this->db->query("INSERT INTO user_info set ".
$data); if($save){
$login = $this->login2();
return 1;
}
}
function save_settings(){
extract($_POST);
$data = " name = '$name' ";
$data .= ", email = '$email' ";
$data .= ", contact = '$contact' ";
$data .= ", about_content = '".htmlentities(str_replace("'","’",$about))."' ";
if($_FILES['img']['tmp_name'] != ''){
$fname = strtotime(date('y-m-d H:i')).'_'.$_FILES['img']['name'];
$move = move_uploaded_file($_FILES['img']['tmp_name'],'../assets/img/'.
$fname);
$data .= ", cover_img = '$fname' ";
return 1;
}
}
function save_category(){
extract($_POST);
$data = " name = '$name' ";
if(empty($id)){
$save = $this->db->query("INSERT INTO category_list set ".$data);
}else{
$save = $this->db->query("UPDATE category_list set ".$data." where id=".$id);
}
if($save)
return 1;
}
function delete_category(){
extract($_POST);
$delete = $this->db->query("DELETE FROM category_list where id = ".
$id); if($delete)
return 1;
}
function save_menu(){
extract($_POST);
$data = " name = '$name' ";
$data .= ", price = '$price' ";
$data .= ", category_id = '$category_id' ";
if($_FILES['img']['tmp_name'] != ''){
$fname = strtotime(date('y-m-d H:i')).'_'.$_FILES['img']['name'];
$move = move_uploaded_file($_FILES['img']['tmp_name'],'../assets/img/'.
$fname);
$data .= ", img_path = '$fname' ";
}
if(empty($id)){
$save = $this->db->query("INSERT INTO product_list set ".
$data); }else{
$save = $this->db->query("UPDATE product_list set ".$data." where id=".$id);
}
if($save)
return 1;
}
function delete_menu(){
extract($_POST);
$delete = $this->db->query("DELETE FROM product_list where id = ".
$id); if($delete)
return 1;
}
function add_to_cart(){
extract($_POST);
$data = " product_id = $pid ";
$qty = isset($qty) ? $qty : 1 ;
$data .= ", qty = $qty ";
if(isset($_SESSION['login_user_id'])){
$data .= ", user_id = '".$_SESSION['login_user_id']."'
"; }else{
$ip = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] :
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);
$data .= ", client_ip = '".$ip."' ";
}
$save = $this->db->query("INSERT INTO cart set ".
$data); if($save)
return 1;
}
function get_cart_count(){
extract($_POST);
if(isset($_SESSION['login_user_id'])){
$where =" where user_id = '".$_SESSION['login_user_id']."' ";
}
else{
$ip = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] :
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);
$where =" where client_ip = '$ip' ";
}
$get = $this->db->query("SELECT sum(qty) as cart FROM cart ".$where);
if($get->num_rows > 0){
return $get->fetch_array()['cart'];
}else{
return '0';
}
}
function update_cart_qty(){
extract($_POST);
$data = " qty = $qty ";
$save = $this->db->query("UPDATE cart set ".$data." where id = ".$id);
if($save)
return 1;
}
function save_order(){
extract($_POST);
$data = " name = '".$first_name." ".$last_name."' ";
$data .= ", mobile = '$mobile' ";
$data .= ", email = '$email' ";
$save = $this->db->query("INSERT INTO orders set ".
$data); if($save){
$id = $this->db->insert_id;
$qry = $this->db->query("SELECT * FROM cart where
user_id =".$_SESSION['login_user_id']);
while($row= $qry->fetch_assoc()){
<style>
.custom-menu {
z-index: 1000;
position: absolute;
background-color: #ffffff;
border: 1px solid #0000001c;
border-radius: 5px;
padding: 8px;
min-width: 13vw;
}
[Link]-menu-list {
width: 100%;
display: flex;
color: #4c4b4b;
font-weight: 600;
font-size: 1em;
padding: 1px 11px;
}
[Link]-icon {
position: absolute;
font-size: 3em;
bottom: .2em;
color: #ffffff80;
}
.file-item{
cursor: pointer;
}
[Link]-menu-list:hover,.file-item:hover,.[Link]
{ background: #80808024;
}
table th,td{
/*border-left:1px solid gray;*/
}
[Link]-menu-list [Link]{
width:1em;
margin-right: 5px
}
.candidate {
margin: auto;
width: 23vw;
padding: 0 10px;
border-radius: 20px;
margin-bottom: 1em;
display: flex;
border: 3px solid #00000008;
background: #8080801a;
}
.candidate_name {
margin: 8px;
margin-left: 3.4em;
margin-right: 3em;
width: 100%;
}
.img-field {
display: flex;
height: 8vh;
width: 4.3vw;
padding: .3em;
background: #80808047;
border-radius: 50%;
position: absolute;
left: -.7em;
top: -.7em;
}
.candidate img {
height: 100%;
width: 100%;
margin: auto;
border-radius: 50%;
}
.vote-field {
position: absolute;
right: 0;
bottom: -.4em;
}
.card-body{
text-align:center;
}
</style>
<div class="containe-fluid">
<div class="row">
<div class="col-lg-12">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
</script>
Admin Navigation Bar
<style>
</style>
<nav id="sidebar" class='mx-lt-5 bg-dark' >
<div class="sidebar-list">
</nav>
<script>
$('.nav-<?php echo isset($_GET['page']) ? $_GET['page'] : '' ?
>').addClass('active') </script>
<?php include('db_connect.php');?>
<div class="container-fluid">
<div class="col-lg-12">
<div class="row">
<!-- FORM Panel -->
<div class="col-md-4">
<form action="" id="manage-menu">
<div class="card">
<div class="card-header">
Menu Form
</div>
<div class="card-body">
<input type="hidden" name="id">
<div class="form-group">
<label class="control-label">Menu Name</label>
<input type="text" class="form-control" name="name">
</div>
<div class="form-group">
<label class="control-label">Menu
Description</label> <textarea cols="30" rows="3"
class="form-control"
name="description"></textarea>
</div>
<div class="form-group">
<div class="custom-control custom-switch">
<input type="checkbox" name="status" class="custom-control-input"
id="availability"
checked>
<label class="custom-control-label"
for="availability">Available</label>
</div>
</div>
<div class="form-group">
<label class="control-label">Category </label>
<select name="category_id" id="" class="custom-select browser-
default">
<?php
$cat = $conn->query("SELECT * FROM category_list order by name
asc ");
while($row=$cat->fetch_assoc()):
?>
<option value="<?php echo $row['id'] ?>"><?php echo $row['name']
?></option>
<?php endwhile; ?>
</select>
</div>
<div class="form-group">
<label class="control-label">Price</label>
<input type="number" class="form-control text-right" name="price"
step="any">
</div>
<div class="form-group">
<label for="" class="control-label">Image</label>
<input type="file" class="form-control"
name="img"
onchange="displayImg(this,$(this))">
</div>
<div class="form-group">
<img src="<?php echo isset($image_path) ? '../assets/img/'.$cover_img :''
?>" alt=""
id="cimg">
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12">
<button class="btn btn-sm btn-primary col-sm-3 offset-md-3">
Save</button>
<button class="btn btn-sm btn-default col-sm-3" type="button"
onclick="$('#manage-menu').get(0).reset()"> Cancel</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- FORM Panel -->
<td class="text-center">
<img src="<?php echo isset($row['img_path']) ?
'../assets/img/'.$row['img_path'] :'' ?>"
alt="" id="cimg">
</td>
<td class="">
<p>Name : <b><?php echo $row['name'] ?></b></p>
<p>Description : <b class="truncate"><?php
echo $row['description'] ?></b></p>
<p>Price : <b><?php echo "$".number_format($row['price'],2)
?></b></p>
</td>
<td class="text-center">
<button class="btn btn-sm btn-primary edit_menu" type="button"
data-id="<?php echo $row['id'] ?>" data-name="<?php echo
$row['name'] ?>"
data-status="<?php echo $row['status'] ?>" data-description="<?
php echo $row['description'] ?>" data-price="<?php echo
$row['price'] ?>" data-img_path="<?php echo $row['img_path'] ?
>">Edit</button>
<button class="btn btn-sm btn-danger delete_menu" type="button"
data-id="<?php echo $row['id'] ?>">Delete</button>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
<!-- Table Panel -->
</div>
</div>
</div>
<style>
img#cimg,
.cimg {
max-height: 10vh;
max-width: 6vw;
}
td {
vertical-align: middle !important;
}
td p {
margin: unset !important;
}
.custom-switch,
.custom-control-input,
.custom-control-label {
cursor: pointer;
}
[Link] {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
font-size: small;
color: #000000cf;
font-style: italic;
}
</style>
<script>
function displayImg(input, _this) {
if ([Link] && [Link][0]) {
var reader = new FileReader();
[Link] = function(e) {
$('#cimg').attr('src', [Link]);
}
[Link]([Link][0]);
}
}
$('#manage-menu').submit(function(e) {
[Link]()
start_load()
$.ajax(
url: '[Link]?action=save_menu',
data: new FormData($(this)[0]),
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST',
success: function(resp) {
if (resp == 1) {
alert_toast("Data successfully added", 'success')
setTimeout(function() {
[Link]()
}, 1500)
} else if (resp == 2) {
alert_toast("Data successfully updated", 'success')
setTimeout(function() {
[Link]()
}, 1500)
}
}
})
})
$('.edit_menu').click(function() {
start_load()
var cat = $('#manage-menu')
[Link](0).reset()
[Link]("[name='id']").val($(this).attr('data-id'))
[Link]("[name='description']").val($(this).attr('data-description'))
[Link]("[name='name']").val($(this).attr('data-name'))
[Link]("[name='price']").val($(this).attr('data-price'))
if ($(this).attr('data-status') == 1)
$('#availability').prop('checked', true)
else
$('#availability').prop('checked', false)
function delete_menu($id) {
start_load()
$.ajax({
url: '[Link]?action=delete_menu',
method: 'POST',
data: {
id: $id
},
success: function(resp) {
if (resp == 1) {
alert_toast("Data successfully deleted", 'success')
setTimeout(function() {
[Link]()
}, 1500)
}
}
})
}
</script>
Admin Panel Top Bar
<style>
.logo {
margin: auto;
font-size: 20px;
background: white;
padding: 5px 11px;
border-radius: 50% 50%;
color: #000000b3;
}
</style>
</nav>
<div class="container-fluid">
<div class="card">
<div class="card-body">
<table class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Address</th>
<th>Email</th>
<th>Mobile</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
include 'db_connect.php';
$qry = $conn->query("SELECT * FROM orders
"); while($row=$qry->fetch_assoc()): ?>
<tr>
<td><?php echo $i++ ?></td>
<td><?php echo $row['name'] ?></td>
<td><?php echo $row['address'] ?></td>
<td><?php echo $row['email'] ?></td>
<td><?php echo $row['mobile'] ?></td>
<?php if($row['status'] == 1): ?>
<td class="text-center"><span class="badge badge-
success">Confirmed</span></td>
<?php else: ?>
<td class="text-center"><span class="badge badge-
secondary">For Verification</span></td>
<?php endif; ?>
<td>
<button class="btn btn-sm btn-primary view_order" data-id="<?php echo
$row['id'] ?>" >View Order</button>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
<script>
$('.view_order').click(function(){
uni_modal('Order','view_order.php?id='+$(this).attr('data-id'))
})
</script>
Admin Panel View Order Page
<div class="container-fluid">
</tfoot>
</table>
<div class="text-center">
<button class="btn btn-primary" id="confirm" type="button"
onclick="confirm_order()">Confirm</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
<style>
#uni_modal .modal-footer{
display: none
}
</style>
<script>
function confirm_order(){
start_load()
$.ajax({
url:'[Link]?action=confirm_order',
method:'POST',
data:{id:'<?php echo $_GET['id'] ?>'},
success:function(resp){
if(resp == 1){
alert_toast("Order confirmed.")
setTimeout(function(){
[Link]()
},1500)
}
}
})
}
</script>
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end mb-4 page-title">
<h3 class="text-white">Checkout</h3>
<hr class="divider my-4" />
</div>
</div>
</div>
</header>
<section class="page-section mb-2" id="">
<div class="container">
<div class="card">
<div class="card-body">
<form action="" id="checkout">
<h4>Confirm Delivery Information</h4>
<div class="form-group">
<label for="" class="control-label">Firstname</label>
<input type="text" name="first_name" required="" class="form-control"
value="<?php echo $_SESSION['login_first_name'] ?>">
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="text" name="last_name" required="" class="form-control"
value="<?php echo $_SESSION['login_last_name'] ?
>"> </div>
<div class="form-group">
<label for="" class="control-label">Contact</label>
<input type="text" name="mobile" required="" class="form-control"
value="<?php echo $_SESSION['login_mobile'] ?>">
</div>
<div class="form-group">
<label for="" class="control-label">Address</label>
<textarea cols="30" rows="3" name="address" required="" class="form-
control"><?php echo $_SESSION['login_address'] ?></textarea>
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="email" name="email" required="" class="form-
control" value="<?php echo $_SESSION['login_email'] ?>">
</div>
<div class="text-center">
<button class="btn btn-block btn-outline-primary">Confirm</button>
</div>
</form>
</div>
</div>
</div>
</section>
<script>
$(document).ready(function(){
$('#checkout').submit(function(e){
[Link]()
star_load()
$.ajax({
url:"[Link]?action=save_order",
method:'POST',
data:$(this).serialize();
success:function(resp){
if(resp==1){
alert_toast("Order successfully Placed.")
setTimout(function(){
[Link]('[Link]?page=home')
})
}
}
})
})
})
</script>
Admin Panel Categories Page
<?php include('db_connect.php');?>
<div class="container-fluid">
<div class="col-lg-12">
<div class="row">
<!-- FORM Panel -->
<div class="col-md-4">
<form action="" id="manage-category">
<div class="card">
<div class="card-header">
Category Form
</div>
<div class="card-body">
<input type="hidden" name="id">
<div class="form-group">
<label class="control-label">Category</label>
<input type="text" class="form-control" name="name">
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12">
<button class="btn btn-sm btn-primary col-sm-3 offset-md-3">
Save</button>
<button class="btn btn-sm btn-default col-sm-3"
type="button" onclick="$('#manage-category').get(0).reset()"> Cancel</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- FORM Panel -->
</div>
<style>
td{
vertical-align: middle !important;
}
</style>
<script>
$('#manage-category').submit(function(e){
[Link]()
start_load()
$.ajax({
url:'[Link]?action=save_category',
data: new FormData($(this)[0]),
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST',
success:function(resp){
if(resp==1){
alert_toast("Data successfully added",'success')
setTimeout(function(){
[Link]()
},1500)
}
else if(resp==2){
alert_toast("Data successfully updated",'success')
setTimeout(function(){
[Link]()
},1500)
}
}
})
})
$('.edit_cat').click(function(){
start_load()
var cat = $('#manage-category')
[Link](0).reset()
[Link]("[name='id']").val($(this).attr('data-id'))
[Link]("[name='name']").val($(this).attr('data-name'))
end_load()
})
$('.delete_cat').click(function(){
_conf("Are you sure to delete this category?","delete_cat",[$(this).attr('data-id')])
})
function delete_cat($id){
start_load()
$.ajax({
url:'[Link]?action=delete_category',
method:'POST',
data:{id:$id},
success:function(resp){
if(resp==1){
alert_toast("Data successfully deleted",'success')
setTimeout(function(){
[Link]()
},1500)
}
}
})
}
</script>
?>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<button class="btn btn-primary float-right btn-sm" id="new_user"><i class="fa
fa-plus"></i> New user</button>
</div>
</div>
<br>
<div class="row">
<div class="card col-lg-12">
<div class="card-body">
<table class="table-striped table-bordered col-md-
12"> <thead>
<tr>
<th class="text-center">#</th>
<th class="text-center">Name</th>
<th class="text-center">Username</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<?php
include 'db_connect.php';
$users = $conn->query("SELECT * FROM users order by name
asc"); $i = 1;
while($row= $users->fetch_assoc()):
?>
<tr>
<td>
<?php echo $i++ ?>
</td>
<td>
<?php echo $row['name'] ?>
</td>
<td>
<?php echo $row['username'] ?>
</td>
<td>
<center>
<div class="btn-group">
<button type="button" class="btn btn-primary">Action</button>
<button type="button" class="btn btn-primary dropdown-toggle
dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-
expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item edit_user" href="javascript:void(0)" data-id
= '<?php echo $row['id'] ?>'>Edit</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item delete_user" href="javascript:void(0)"
data-id = '<?php echo $row['id'] ?>'>Delete</a>
</div>
</div>
</center>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$('#new_user').click(function(){
uni_modal('New User','manage_user.php')
})
$('.edit_user').click(function(){
uni_modal('Edit User','manage_user.php?id='+$(this).attr('data-id'))
})
</script>
Admin Panel Site Settings
<?php
include 'db_connect.php';
$qry = $conn->query("SELECT * from system_settings limit
1"); if($qry->num_rows > 0){
foreach($qry->fetch_array() as $k => $val){
$meta[$k] = $val;
}
}
?>
<div class="container-fluid">
<div class="card col-lg-12">
<div class="card-body">
<form action="" id="manage-settings">
<div class="form-group">
<label for="name" class="control-label"> <i class="fa-solid
fa-utensils text-light"></i>System Name </label>
<input type="text" class="form-control" id="name"
name="name" value="<?php echo isset($meta['hotel_name']) ? $meta['hotel_name'] : '' ?
>" required>
</div>
<div class="form-group">
<label for="email" class="control-label">Email</label>
<input type="email" class="form-control" id="email"
name="email" value="<?php echo isset($meta['email']) ? $meta['email'] : '' ?>"
required> </div>
<div class="form-group">
<label for="contact" class="control-label">Contact</label>
<input type="text" class="form-control" id="contact"
name="contact" value="<?php echo isset($meta['contact']) ? $meta['contact'] : '' ?
>" required>
</div>
<div class="form-group">
<label for="about" class="control-label">About
Content</label>
<textarea name="about" class="text-jqte"><?php
echo isset($meta['about_content']) ? $meta['about_content'] : '' ?></textarea>
</div>
<div class="form-group">
<label for="" class="control-label">Image</label>
<input type="file" class="form-control"
name="img"
onchange="displayImg(this,$(this))">
</div>
<div class="form-group">
<img src="<?php echo
isset($meta['cover_img']) ? '../assets/img/'.$meta['cover_img'] :'' ?>" alt=""
id="cimg">
</div>
<center>
<button class="btn btn-info btn-primary btn-block col-md-
2">Save</button>
</center>
</form>
</div>
</div>
<style>
img#cimg{
max-height: 10vh;
max-width: 6vw;
}
</style>
<script>
function displayImg(input,_this) {
if ([Link] && [Link][0]) {
var reader = new FileReader();
[Link] = function (e) {
$('#cimg').attr('src', [Link]);
}
[Link]([Link][0]);
}
}
$('.text-jqte').jqte();
$('#manage-settings').submit(function(e){
[Link]()
start_load()
$.ajax({
url:'[Link]?action=save_settings',
data: new FormData($(this)[0]),
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST',
error:err=>{
[Link](err)
},
success:function(resp){
if(resp == 1){
alert_toast('Data successfully saved.','success')
setTimeout(function(){
[Link]()
},1000)
}
}
})
})
</script>
<style>
</style>
</div>
Ajax File
<?php
ob_start();
$action = $_GET['action'];
include 'admin_class.php';
$crud = new Action();
if($action == 'login'){
$login = $crud->login();
if($login)
echo $login;
}
if($action == 'login2'){
$login = $crud->login2();
if($login)
echo $login;
}
if($action == 'logout'){
$logout = $crud->logout();
if($logout)
echo $logout;
}
if($action == 'logout2'){
$logout = $crud->logout2();
if($logout)
echo $logout;
}
if($action == 'save_user'){
$save = $crud->save_user();
if($save)
echo $save;
}
if($action == 'signup'){
$save = $crud->signup();
if($save)
echo $save;
}
if($action == "save_settings"){
$save = $crud->save_settings();
if($save)
echo $save;
}
if($action == "save_category"){
$save = $crud->save_category();
if($save)
echo $save;
}
if($action == "delete_category"){
$save = $crud->delete_category();
if($save)
echo $save;
}
if($action == "save_menu"){
$save = $crud->save_menu();
if($save)
echo $save;
}
if($action == "delete_menu"){
$save = $crud->delete_menu();
if($save)
echo $save;
}
if($action == "add_to_cart"){
$save = $crud->add_to_cart();
if($save)
echo $save;
}
if($action == "get_cart_count"){
$save = $crud->get_cart_count();
if($save)
echo $save;
}
if($action == "update_cart_qty"){
$save = $crud->update_cart_qty();
if($save)
echo $save;
}
if($action == "save_order"){
$save = $crud->save_order();
if($save)
echo $save;
}
if($action == "confirm_order"){
$save = $crud->confirm_order();
if($save)
echo $save;
}
<?php
$host = [Link] ;
$user='Mahendra241';
$pass='Mahendra@123';
$dbname ='food_db_m';
$conn = mysqli_connect($host,$user,$pass,$dbname);
if(!$conn)
{
echo " Connection Lost";
?>
Js File
/*!
* Start Bootstrap - Creative v6.0.3 ([Link]
* Copyright 2013-2020 Start Bootstrap
* Licensed under MIT ([Link]
creative/blob/master/LICENSE)
*/
(function($) {
"use strict"; // Start of use strict
/ Collapse Navbar
var navbarCollapse = function() {
if ($("#mainNav").offset().top > 100) {
$("#mainNav").addClass("navbar-scrolled");
} else {
$("#mainNav").removeClass("navbar-scrolled");
}
};
/ Collapse now if page is not at
top navbarCollapse();
/ Collapse the navbar when page is
scrolled $(window).scroll(navbarCollapse);
Authentication and Authorization: The system must have a secure login system
for customer, administration and restaurant staff to access the system. Access to
different features should be based on theuser's role and permission.
User Interface: The user interface should be designed to be easy to use and navigate. It should
allow customer to select item, add item to card, remove item and place the place order is send to
administration for confirmation with same Administration panel is designed that can be used by
restaurant management hassle free. Admin can change the site setting add new item to menu,
delete and update item in menu also create and delete food categories.
Food Menu: It is list of items visible to user from where user can select multiple food item
and add to card as customer choice. This system handle multiple order at time and store into
the database.
• HTML
HTML (Hyper Text Markup Language) is the basic building block of the web. It designed
the meaning and structure of web content. HTML tell the browser how to display the
content.
• CSS
CSS (Cascading Style Sheets) fondly referred to as CSS. Is a simple designed language
intended to simplify the process of making web pages [Link] allows applying
style to web pages. CSS saves a lot of work. It can control the layout of multiple web pages
all at once.
• Bootstrap 5
Bootstrap 5 is the newest version of Bootstrap, which is the most popular HTML, CSS, and
JavaScript framework for developing responsive, mobile-first websites.
• PHP
PHP (Hypertext Pre-Processor) is a scripting language used to develop static and dynamic
webpage and web applications. It is one of the most widely used server-side scripting
language in a web development. PHP is so popular because it’s very easy to learn code and
deploy on server hence it has been the first choice for beginnerssince decades.
• JavaScript
JavaScript is a very powerful client-side scripting language Java script is mainly used for
enhancing the interaction of a user with the web page. Java script is most used for designing
interactive webpage. Java script was developed by Brendan Eich in 1995 which appeared in
Netscape, a popular browser of the time
• My-SQL
My-SQL is an opensource relational database management system. Its name is a
combination of ”My” the name of co-founder Michael Widenius’s daughter, and “SQL” the
abbreviation of Structured query language.
( SCREENSHOTS )
Home with Menu Page
Product View Page
Create Account Page
Once your customers have been seated at their tables, they will no longer have to wait
for a server to come and take their order. All they have to do is scan the restaurant
QR code menu and order their meals.
In a recent study published on Oracle’s Food and Beverage blog, 33% of participants
stated that they would only wait 5 minutes for service before getting annoyed.
In addition, after your customers have finished dining, they no longer need to wait
for a server to bring them a check. They can pay for their meals right from the QR
code menu app.
In a nutshell, people dislike waiting and now, they don’t have to. Your restaurant
can save a lot of time and money by allowing customers to order and pay on their
own time using a QR code restaurant ordering system.
All of these are eliminated using a QR code restaurant ordering system. The QR code
menu app essentially allows your clients to communicate directly with the kitchen.
Since customers are sending their orders to the kitchen, they can personalize it to
their liking without the fear of having the waiter get the order wrong.
Another downside of hardcopy menus is that you would have to print another set
of menus every time you add or remove items. Not only does making your
restaurant sustainable save the environment, but it also cuts down on your costs.
Advantage:-
1. Reporting in Real
5. Increased Profitability
Disadvantage :-
2. Elderly people who are not technology-friendly will find hard to use it.
1. Expand the System with large Restaurant:- The system can be improved
by adding more features as restaurant size and more number of customer
increases.
In this proposed system we have a QR Code in the menu card in each table of the
restaurant. For more details about the food stuff one can just scan the QR Code for the
details. After the QR Code scanning the customer gets into our website page displaying
the menu items and their respective price. In this page one can see the entire detail about
the food stuff selected. The existing system of Hotel Management is manual. All the
daily routines are carried out manually and the records are maintained in the record
books or the registers. The introduction of our project will eliminate a good amount of
manual work.
In this proposed restaurant menu card system, displays the food stuffs available there
and their respective prices. Along with the displaying of food prices, the customer can
also view the making of the foodstuffs. Not only the prices are displayed, but also the
making of each food item is made available to the customers. In addition to these
features we have an ordering system. Using this ordering system the customer can order
their preferences without waiting for the waiters. This concept is satisfactory for both
the hotel administration and the customers.
7. 2 REFERENCES
1. [Link] 2
2. [Link]
[Link]
3. [Link]
4. [Link]
5. [Link]
with-htmlcss-and-javascript