Online Billing System
Online Billing System
Online Billing System
A minor Project
Submitted in partial fulfilment of the requirements for the
Award of degree of Bachelor of Computer Applications
2016– 2018
Submitted By Guided By
SEEMA RANI MAHESH CHAUBEY
1
2
BHARATI VIDYAPEETH DEEMED UNIVERSITY, PUNE
(Establish u/s 3 of UGC Act, 1956) (Re-accredited with ‘A’ Grade by NAAC
SCHOOL OF DISTANCE EDUCATION
Constituent unit: BVIMR, NEW DELHI
Certificate of Originality
This is to certify that the Project Report Titled “Canteen Management System”
submitted to Bharti Vidyapeeth University Pune, School of Distance Education
Pune, and Acadmic Study Center New Delhi in partial fulfilment of the
requirement for the award of the BCA is an original work carried out by
SEEMA RANI under the guidance of Mr. Mahesh Chaubey to the best of
project guide’s knowledge and belief the matter embodied in this project is a
genuine work done by the student and has been submitted neither to this
University nor to any other University for the fulfilment the requirement of the
course of study.
A-4 paschim vihar, Rohtak Road, Attached to paschim vihar (East) Metro station, New Delhi- 10063
Tel: 25285808, 25284396, 25278446, (Extn: 204,210,272) 9250547203, 9250547204
E-mail: [email protected] website : www.bvusde.com
3
BHARATI VIDYAPEETH DEEMED UNIVERSITY, PUNE
(Establish u/s 3 of UGC Act, 1956) (Re-accredited with ‘A’ Grade by NAAC
SCHOOL OF DISTANCE EDUCATION
Constituent unit: BVIMR, NEW DELHI
Certificate
This is to certify that the Project Report Titled “Canteen Management System” is
an academic work done by Seema Rani submitted in the partial fulfilment of the
requirement for the award of the BCA from Bharati Vidyapeeth Deemed University
School of Distance Education Pune, Academic Study Center New Delhi. It has
completed under the guidance of Mr. Mahesh Chaubey (Faculty Guid). The
authenticity of the project work will be examined by the viva examiner which includes
data verification, checking duplicity of information etc. And it may be rejected due to
non-fulfilment of quality standards set by the Institute.
A-4 paschim vihar, Rohtak Road, Attached to paschim vihar (East) Metro station, New Delhi-10063
Tel: 25285808, 25284396, 25278446, (Extn: 204,210,272) 9250547203, 9250547204
E-mail: [email protected] website : www.bvusde.com
4
Student undertaking
This is certified that “Miss. Seema Rani” had completed the Project application on
www.webtechnologies.com under the guidance of “ Mr. Mahesh Chaubey” in the
partial Fulfilment of the requirement for the award of degree of bachelor of computer
Application of BVU, SDE, Academic Study Centre BVIMR New Delhi. This is an
original piece of work & I have neither copied and nor submitted it earlier elsewhere.
Seema Rani
Course : BCA
Date:-
5
Acknowledgement
I deem it a time bound privilege and function to dedicate this page of mine to a
number of helping hand their cooperation & guidance that enabled me to dedicate time
and effort in framing my analysis into a conceivable system.
My most sincere thanks to the following persons who have given their valuable time in
helping me go about my project.
I would like to thank Mr. Mahesh Chaubey sir, for his guidance and encouragement
and the staff of BVIMR. About all I wish to thank my parents for their constant and
whole heated support through the project
I would like to thank Mr. Amarjit R. Deshmukh, the director of BVU SDE for his
constant support.
Seema Rani:-
6
PREFACE
This document is meant for describing all the features and procedures that were
followed. While developing the website .This document specially mentions the details
of the project how it was developed, the primary requirement, as well as various
features and functionalities of the project and the procedures followed archived these
objectives.
7
CONTENT
CHAPTER 1 INTRODUCTION
5.1 Conclusion
5.2 Limitation of System
5.3 Future Scope for Modification
5.4.1 H/W Requirement
5.4.2 S/W Requirement
5.5 References/ Bibliography
8
CHAPTER 1
INTRODUCTION
The application is reduced as much as possible to avoid errors while entering the
data. It also provides error message while entering invalid data. No formal
knowledge is needed for the user to use this system. Thus by this all it proves it is
user-friendly. Canteen Management System , as described above, can lead to error
free, secure, reliable and fast management system. It can assist the user to
concentrate on their other activities rather to concentrate on the record keeping.
Thus it will help Canteen in better utilization of resources.
9
1.2 Present state of arts
The present menu status of canteen is not satisfactory. It has very limited menus
hardly 5 to 6 varieties. The customer’s generally regular visitors like students and
staffs have no selective option for food items. They are forced to have same food
offered by the canteen whether they like or not. Moreover the food items remain same
throughout the month and no changes are made even once a week. The quality of food
items here is miserable, spicy and oily foods are prominent which doesn’t contain
sufficient amount of nutrients for healthy diet. On a few occasion the canteen is found
to be serving even stale food.
Present menu table:-
a. North Indian
b. Desert
c. Snack
d. Drink
The Canteen Management System is to automate the existing manual system by the
help of computerized equipments and full-fledged computer software, fulfilling their
requirements, so that their valuable data/information can be stored for a longer period
with easy accessing and manipulation of the same. The required software and
hardware are easily available and easy to work with.
Canteen Management System, as described above, can lead to error free, secure,
reliable and fast management system. It can assist the user to concentrate on their
other activities rather to concentrate on the record keeping. Thus it will help
organization in better utilization of resources. The organization can maintain
computerized records without redundant entries. That means that one need not be
distracted by information that is not relevant, while being able to reach the
information.
The aim is to automate its existing manual system by the help of computerized
equipments and full-fledged computer software, fulfilling their requirements, so that
10
their valuable data/information can be stored for a longer period with easy accessing
and manipulation of the same. Basically the project describes how to manage for good
performance and better services for the clients.
Canteen Management System also manage the Bill Payment details online for
Meal Type details, Canteen Staff details Canteen.
It tracks all the information of Employee, Bill Payment, Meal Type etc.
Manage the information of Employee
Shows the information and description of the Canteen, Employee Meal
To increase efficiency of managing the Canteen, Employee
It deals with monitoring the information and transactions of Meal Type.
Manage the information of Company Canteen
Editing, adding and updating of Records is improved which results in proper
resource management of Company Canteen data.
Manage the information of Meal Type
Integration of all records of Canteen Staff.
User friendly
Very easy to access
Flexibility
Provide interface for user
11
CHAPTER 2
SYSTEM ANALYSIS
After doing the project Canteen Management System, study and analyzing all the
existing or required functionalities of the system, the next task is to do the feasibility
study for the project. All projects are feasible - given unlimited resources and infinite
time.
Feasibility study includes consideration of all the possible ways to provide a solution
to the given problem. The proposed solution should satisfy all the user requirements
and should be flexible enough so that future changes can be easily done based on the
future upcoming requirements.
A. Economical Feasibility
This is a very important aspect to be considered while developing a project. We
decided the technology based on minimum possible cost factor.
All hardware and software cost has to be borne by the organization.
Overall we have estimated that the benefits the organization is going to receive
from the proposed system will surely overcome the initial costs and the later on
running cost for system.
B. Technical Feasibility
This included the study of function, performance and constraints that may
affect the ability to achieve an acceptable system. For this feasibility study, we studied
12
complete functionality to be provided in the system, as described in the System
Requirement Specification (SRS), and checked if everything was possible using
different type of frontend and backend platforms.
C. Operational Feasibility
No doubt the proposed system is fully GUI based that is very user friendly and
all inputs to be taken all self-explanatory even to a layman. Besides, a proper training
has been conducted to let know the essence of the system to the users so that they feel
comfortable with new system. As far our study is concerned the clients are
comfortable and happy as the system has cut down their loads and doing.
The old manual system was suffering from a series of drawbacks. Since whole
of the system was to be maintained with hands the process of keeping, maintaining
and retrieving the information was very tedious and lengthy. The records were never
used to be in a systematic order. There used to be lots of difficulties in associating any
particular transaction with a particular context. If any information was to be found it
was required to go through the different registers, documents there would never exist
anything like report generation. There would always be unnecessary consumption of
time while entering records and retrieving records. One more problem was that it was
very difficult to find errors while entering the records. Once the records were entered
it was very difficult to update these records.
Documents and reports that must be provided by the new system: there can also
be few reports, which can help management in decision-making and cost
controlling, but since these reports do not get required attention, such kind of
reports and information were also identified and given required attention.
13
Details of the information needed for each document and report.
The required frequency and distribution for each document.
Probable sources of information for each document and report.
With the implementation of computerized system, the task of keeping records in
an organized manner will be solved. The greatest of all is the retrieval of
information, which will be at the click of the mouse. So the proposed system
helps in saving the time in different operations and making information flow
easy giving valuable reports.
There are many platforms-- general-purpose platforms and ones tailored to specific
kinds of projects-- that allow you to build much more sophisticated project sites than
would be possible if you were building from scratch. When choosing a platform for
your project website, the major factors to consider include functionality, familiarity,
community, support, and cost.
A. FUNCTIONALITY
What do you want your project site to do? Are you developing an exhibit or collection
of material, which needs to be displayed in a sequential order? Are you developing a
directory, that you want to be browse able and searchable based on metadata you've
entered (like "author", "publication date", "media used", etc.)? Do you want to use
your site to transcribe content, or add annotations? Will users be able to create their
own accounts, and will having an account provide them with additional access or
unlock new tools on the site? What format(s) does your content take (text, audio,
video, still images, downloadable files, etc)? Will your content be stored on the site
itself, or is it coming from another hosting provider, like YouTube, a library website,
or an institutional repository? How do you want to display your content-- in an image
gallery, a timeline, a map, a list, or some other way?
B. FAMILIARITY
Platforms that started out having very different user interfaces are increasingly
converging around certain design approaches and choices. All commonly-used
platforms have (or can have, with the help of a module or plug-in) a text authoring
interface with WYSIWYG capabilities ("what you see is what you get" -- e.g. buttons
14
you can click on to do things like make the font bold, or add a link, rather than making
the user write HTML). Designs, or themes, that you can download and use for sites
running any platform are increasingly adopting adaptive or responsive design
techniques, which render the site differently depending on whether it's being viewed
on a high-resolution laptop, a tablet, or a phone. This convergence makes it easier to
make choices about the platform for your site without overly concerning yourself with
what platforms are already being used by other popular sites in your field: chances are,
you can make your site behave like other sites, even if it's running on a different
platform.
C. COMMUNITY
"Community" here refers to the group of people who are using the platform. Do other
scholars in your field, or in related fields, use the platform that you are considering? A
platform that's widely used by scholars may be a better choice than a platform whose
major user base is small business owners, but if all the example sites you can find
come from the sciences, where their data is considerably different than yours, you may
want to make sure the platform meets your needs. Choosing a platform that's already
being used by a community of humanities scholars may make it easier for you to ask
questions, and get tips and advice on how to deal with problems that arise, without
having to translate your questions into language more easily understandable for
technologists without a humanities background or scholars in another discipline.
D. SUPPORT
Who can help you develop a site using this platform, and what skills are required to do
so? Most universities provide faculty with free access to some sort of web publishing
platform, and offer training workshops and/or one-on-one consultation. Many
universities also have a web development group with professional staff who may be
available to consult or directly help you build your project site, at lower-than-market
rates, but they may place restrictions on what platforms you can choose.
E. COST
The cost of a project website takes many forms-- hosting, configuration, ongoing
maintenance, and the cost of developing new modules, if needed. Sometimes these
costs are bundled together, for instance, if you're using proprietary software that's
developed, hosted and maintained by a company. In most cases, though, you'll have to
estimate these costs, which can vary wildly: inexpensive commercial hosting can cost
15
around $100/year whereas deluxe packages where you have dedicated server resources
can cost $100/month; undergraduates available through a research apprenticeship
program may work for course credit, while professional web developers can charge
$100+/hour
16
CHAPTER 3
SYSTEM DESIGN
In this phase, a logical system is built which fulfils the given requirements. Design
phase of software development deals with transforming the clients’ requirements into
a logically working system. Normally, design is performed in the following in the
following two steps:
The general tasks involved in the design process are the following:
17
4. Specify details of programs to achieve desired functionality.
5. Design the form of inputs, and outputs of the system.
6. Perform documentation of the design.
7. System reviews.
User Interface Design is concerned with the dialogue between a user and the
computer. It is concerned with everything from starting the system or logging into the
system to the eventually presentation of desired inputs and outputs. The overall flow
The following steps are various guidelines for User Interface Design:
instructions and messages always appear in the same general display area.
5. Default values for fields and answers to be entered by the user should be
specified.
7. The system user should never get an operating system message or fatal error.
18
3.2 Database Design
Project Category
RDBMSs have become a predominant choice for the storage of information in new
databases used for financial records, manufacturing and logistical information,
personnel data, and much more since the 1980s. Relational databases have often
replaced legacy hierarchical databases and network databases because they are easier
to understand and use. However, relational databases have been challenged by object
databases, which were introduced in an attempt to address the object-relational
impedance mismatch in relational database, and XML databases.
19
FILE DESIGN
File Design is the design of the database and it contains information about the files
used in the system. In database design tables constructed, fields in the tables their data
types and in the other part it tells about the extensions of the file used in the
development.
Fields-
Admin-Id Varchar
Password Varchar
Nm Varchar
Email-Id Varchar
Phone Varchar
Comment Varchar
P-code Varchar
P-name Varchar
Cost Int
Photo-upload Varchar
User-nm Varchar
password Varchar
20
3.3 Report Design (DFD/ERD)
There has been continuous effort to develop tools, which can ease the process of
software development. But, with the evolving trend of different programming
paradigms today’s software developers are really challenged to deal with the changing
technology. Among other issues, software re-engineering is being regarded as an
important process in the software development industry. One of the major tasks here is
to understand software systems that are already developed and to transform them to a
different software environment. Generally, this requires a lot of manual effort in going
through a program that might have been developed by another programmer. This
project makes a novel attempt to address the issued of program analysis and
generation of diagrams, which can depict the structure of a program in a better way.
Today, UML is being considered as an industrial standard for software engineering
design process. It essential provides several diagramming tools that can express
different aspects/ characteristics of program such as
Use cases:
This USE Case Diagram is a graphic depiction of the interaction among the elements
of Canteen Management System. It represents the methodology used in system
analysis to identify, clarify and organize system requirements of canteen management
system. The main actors of Canteen management System in this Use Case diagram
are: Super Admin, System User Employee Who perform the different types of use
cases such as Manage Canteen, Manage Sales, Products and more.
21
DFD (Data Flow Diagram)
It's easy to understand the flow of data through systems with the right data flow
diagram software. This guide provides everything you need to know about data flow
diagrams, including definitions, history, and symbols and notations. You'll learn the
different levels of a DFD, the difference between a logical and a physical DFD and
tips for making a DFD.
0 level DFD
This is the Zero Level DFD of Canteen Management System, Where we have
elaborated the high level process of Canteen. It's a basic overview of the whole
Canteen Management System or process being analyzed or modelled. It's designed to
be an at-a-glance view of Canteen Employee, Canteen Record and Sales showing the
system as a single high-level process, with its relationship to external entities of Food
Item and Category. It should be easily understand by a wide audience, including Food
Category and Canteen Employee in Zero Level DFD of Canteen Management System.
22
1st Level DFD
First Level DFD of Canteen management System shows how the system is divided
into sub-system each of which deals with one or more of the data flows to or from an
external agent, and which together provides all of the functionality of the Canteen
Management System as a whole. It also identifies internal data stores of sales, Canteen
Record, Canteen Employee, Customer, and Category that must be present in order for
the Canteen system to do its job, and shows the flow of data between the various parts
of Food Category, Canteen Record, Sales, and Canteen Employee of the system. DFD
level 1 provides a more detailed breakout of pieces of the 1st level DFD.
23
ER-DIAGRAM
E-R Model is a popular high level conceptual data model. This model and its
variations are frequently used for the conceptual design of database application and
many database design tools employ its concept.
This ER Diagram represents the model of Canteen Management System Entity. The
entity-relationship diagram of Canteen management System shows all the visual
instrument of database tables and the relations between sales, Orders, Canteen Food,
etc. It’s used structure data and to define the relationships between structure data
groups of Canteen Management System functionalities. The admin entities of the
Canteen Management system are Canteen, Sales, Products, Orders, Items and Food.
24
ER-DIAGRAM
25
3.4 Screen Design/Screen Shots
Figure 3.1
Figure 3.2
26
Figure 3.3
Figure 3.4
27
Figure 3.5
Figure 3.6
28
Figure 3.7
Figure 3.8
29
Figure 3.9
Figure 3.10
30
Figure 3.11
Figure 3.12
31
3.5 Coding Part
Index.php
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1" />
<meta name="viewport" content="width=device-width" />
<title>Bhardwaj Caffiteria</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/jqueryslidemenu.css" type="text/css" media="screen"
/>
<!-- supersized -->
<link rel="stylesheet" href="css/supersized.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/supersized.shutter.css" type="text/css"
media="screen" />
<!-- supersized -->
<link rel="stylesheet" href="css/carouFredSel.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/quicksand.css" />
<link rel="stylesheet" type="text/css" href="js/fancybox/jquery.fancybox-1.3.4.css"
media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jqueryslidemenu.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
<!-- supersized -->
<script type="text/javascript" src="js/supersized.3.2.7.js"></script>
<script type="text/javascript" src="js/supersized.shutter.js"></script>
<!-- supersized -->
<!-- fancybox -->
32
<script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="js/fancybox/jquery.mousewheel-
3.0.4.pack.js"></script>
<!-- fancybox -->
<!-- quicksand -->
<script type="text/javascript" src="js/portfolio_sortable.js"></script>
<script type="text/javascript" src="js/quicksand.js"></script>
<!-- quicksand -->
<script type="text/javascript" src="js/jquery.carouFredSel-6.0.6.js"></script>
<script type="text/javascript" src="js/contact.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<!--[if
lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-
mediaqueries.js"></script>
<![endif]-->
<link
href="http://fonts.googleapis.com/css?family=Oswald:400,300,600,700,300italic,400it
alic,600italic,700italic" rel="stylesheet" type="text/css">
</head>
<body>
<div id="page_wrapper">
<div id="dvLoading"></div>
<div id="bgOverlay"><a href="#" class="page_close"><img
src="images/close_button.png" alt="img" /></a></div>
<!--leftSide start -->
<div id="leftSide">
<div id="logo">
<h1>
<a href="index.php">
<img src="images/logo.png" alt="logo" />
33
</a>
</h1>
</div>
<ul>
<li style="border-bottom: 1px solid rgba(127, 127, 127, 0.3);
position: relative;"><a href="store/generatetrans.php" style="color: #211C1B; display:
block; font-family: 'Oswald',Arial; font-weight: 600; padding: 10px 25px; text-
decoration: none; text-transform: uppercase; font-size:15px;">Take Orders</a></li>
</ul>
<nav id="sidebarmenu">
<ul id="sidebarmenu1" class="menu">
<li><a href="#adminlogin">Admin Panel</a></li>
<li><a href="#page_gallery">Available Menu</a></li>
<h4 style=" font-family: Times New Roman; color:solid black;"> <a
href="blogs.html" >Blogs</a></h4>
</ul>
</nav>
</div>
<!--leftside end -->
<!--Content Start-->
<div class="contWrapper">
<article id="content">
<ul id="ulcontent">
<!--Menu Start-->
<li id="page_gallery">
<div class="title-wrapper">
<h2>Available Menu</h2>
</div>
<div>
<ul class="splitter" id="filter">
<li>
<ul>
<li class="segment-1 selected-1"><a href="#" data-value="all">All</a></li>
34
<li class="segment-0"><a href="#" data-value="non_veg">North
Indian</a></li>
<li class="segment-2"><a href="#" data-value="veg">Desert</a></li>
<li class="segment-3"><a href="#" data-value="drinks">Snack</a></li>
<li class="segment-4"><a href="#" data-
value="tshirt">Drinks</a></li>
</ul>
</li>
</ul>
</div>
<div class="image_grid">
<ul id="list" class="portfolio_list">
35
<span class="roll"></span>
<img src="images/choc.jpg" alt="img" class="img_bor" />
</li>
<li data-id="id-1" class="non_veg">
<span class="roll"></span>
<img src="images/burger.jpg" alt="img" class="img_bor" />
</li>
<li data-id="id-2" class="non_veg">
<span class="roll"></span>
<img src="images/noodles.jpg" alt="img" class="img_bor" />
</li>
<li data-id="id-3" class="non_veg">
<span class="roll"></span>
<img src="images/coke.jpg" alt="img" class="img_bor" />
</li>
<li data-id="id-4" class="veg">
<span class="roll"></span>
<img src="images/coffee.jpg" alt="img" class="img_bor" />
</li>
</ul>
</div>
</li>
<!--Menu End-->
<!--adminlogin Start-->
<li id="adminlogin">
<div class="title-wrapper">
<h2>Admin Login Form</h2>
</div>
<div class="contact_form">
<form method="post" action="login.php" name="contact-form" id="contact-
form">
<div id="main">
<div class="one_third">
36
<label>Username:</label>
<p><input type="text" name="user" id="name" size="30" /></p>
</div>
<div class="one_third">
<label>Password:</label>
<p><input type="password" name="password" id="email" size="30" /></p>
</div>
<div class="one_third_last">
<label> </label>
<input class="contact_button button" type="submit" name="submit"
id="submit" value="Login" />
</div>
</div>
</form>
</div>
</li>
<!--adminlogin End-->
</ul>
</article>
</div>
<!--Content End-->
</div>
<!--Page wrapper End-->
</body>
</html>
37
Login.php
<?php
//Start session
session_start();
//Connect to mysql server
require "store/connect.php";
//Function to sanitize values received from the form. Prevents SQL injection
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
//Sanitize the POST values
$login = clean($_POST['user']);
$password = clean($_POST['password']);
//Create query
$qry="SELECT * FROM user WHERE username='$login' AND
password='$password'";
$result=mysql_query($qry);
//while($row = mysql_fetch_array($result))
// {
// $level=$row['position'];
// }
//Check whether the query was successful or not
if($result) {
if(mysql_num_rows($result) > 0) {
//Login Successful
session_regenerate_id();
$member = mysql_fetch_assoc($result);
$_SESSION['SESS_MEMBER_ID'] = $member['user_id'];
$_SESSION['SESS_FIRST_NAME'] = $member['position'];
session_write_close();
38
//if ($level="admin"){
header("location: admin/index.php");
exit();
}else {
//Login failed
header("location: index.php");
exit();
}
}else {
die("Query failed");
}
?>
Messegesend.php
<?php
include('store/connect.php');
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
mysql_query("INSERT INTO message (name, email, subject, message)
VALUES ('$name','$email','$subject','$message')");
header("location: sending.php");
?>
Sendemail.php
<?php
include('store/connect.php');
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
mysql_query("INSERT INTO message (name, email, subject, message)
VALUES ('$name','$email','$subject','$message')");
header("location: sending.php");
?>
39
Sending.php
Auth.php
<?php
//Start session
session_start();
//Check whether the session variable SESS_MEMBER_ID is present or
not
if(!isset($_SESSION['SESS_MEMBER_ID']) ||
(trim($_SESSION['SESS_MEMBER_ID']) == '')) {
header("location: admin_index.php");
exit();
}
?>
40
ADMIN PANEL
Index.php
<?php
require_once('../auth.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard | Modern Admin</title>
<link rel="stylesheet" type="text/css" href="css/960.css" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/text.css" />
<link rel="stylesheet" type="text/css" href="css/blue.css" />
<link type="text/css" href="css/smoothness/ui.css" rel="stylesheet" />
<link rel="stylesheet" href="febe/style.css" type="text/css" media="screen"
charset="utf-8">
<script src="argiepolicarpio.js" type="text/javascript" charset="utf-8"></script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
</head>
<body>
41
<!-- WRAPPER START -->
<div class="container_16" id="wrapper">
<!-- HIDDEN COLOR CHANGER -->
<div style="position:relative;">
<!--LOGO-->
<div class="grid_8" id="logo">Admin Panel</div>
<div class="grid_8">
<!-- USER TOOLS START -->
<div id="user_tools"><span><a href="../index.php">Logout</a></span></div>
</div>
<!-- USER TOOLS END -->
<div class="grid_16" id="header">
<!-- MENU START -->
<div id="menu">
<ul class="group" id="menu_group_main">
<li class="item first" id="one"><a href="index.php" class="main
current"><span class="outer"><span class="inner
dashboard">Dashboard</span></span></a></li>
<li class="item middle" id="four"><a href="emp.php"
class="main"><span class="outer"><span class="inner
media_library">Employees</span></span></a></li>
<li class="item last" id="eight"><a href="products.php"
class="main"><span class="outer"><span class="inner
settings">Products</span></span></a></li>
</ul>
</div>
<!-- MENU END -->
</div>
<!-- CONTENT START -->
<div class="grid_16" id="content">
<!-- TITLE START -->
<div class="grid_9">
<h1 class="dashboard">Dashboard</h1>
</div>
42
<div class="clear">
</div>
<!-- TITLE END -->
<!-- #PORTLETS START -->
<div id="portlets">
<!-- SECOND SORTABLE COLUMN END -->
<div class="clear"></div>
<!--THIS IS A WIDE PORTLET-->
<div class="portlet">
<div class="portlet-header fixed"><img
src="images/icons/user.gif" width="16" height="16" alt="Latest Registered Users" />
<label for="filter">Search</label> <input type="text"
name="filter" value="" id="filter" />
Legend: <img src="cancel.png">Pending
<img src="active.png">Delivered
</div>
<div class="portlet-content nopadding">
<form action="" method="post">
<table cellpadding="1" cellspacing="1" id="resultTable">
<thead>
<tr>
<th style="border-left: 1px solid #C1DAD7"> Order Number </th>
<th> Date </th>
<th> Time </th>
<th> Type </th>
<th> Items Count </th>
<th> Payment Method</th>
<th> Action </th>
</tr>
</thead>
<tbody>
<?php
include('../store/connect.php');
$result = mysql_query("SELECT * FROM reservation ORDER BY date ASC");
43
while($row = mysql_fetch_array($result))
{
'<tr>';// echo '<tr class="record"
id="'.$row['order_id'].'">';
echo '<td style="border-left: 1px solid
#C1DAD7;">'.$row['date'].'</td>';
echo '<td><div align="left">'.$row['time'].'</div></td>';
echo '<td><div
align="left">'.$row['payment'].'</div></td>';
echo '<td><div
align="left">'.$row['delivery_type'].'</div></td>';
echo '<td><div
align="left">'.$row['payment'].'</div></td>';
echo '<td><div align="center"><a
rel="facebox" href="vieworders.php?id='.$row['confirmation'].'" title="Click To View
Orders">View Orders</a> | <a rel="facebox"
href="viewreport.php?id='.$row['confirmation'].'" title="Click To View
Orders">Print</a> | <a rel="facebox"
href="editstatus.php?id='.$row['reservation_id'].'">edit</a> | <a href="#"
id="'.$row['reservation_id'].'" class="delbutton" title="Click To
Delete">delete</a></div></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</form>
</div>
</div>
<!-- END #PORTLETS -->
</div>
<div class="clear"> </div>
<!-- END CONTENT-->
</div>
44
<div class="clear"> </div>
</div>
</div>
<!-- WRAPPER END -->
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deleteres.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</body>
</html>
45
Massege.php
<?php
require_once('../auth.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard | Modern Admin</title>
<link rel="stylesheet" type="text/css" href="css/960.css" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/text.css" />
<link rel="stylesheet" type="text/css" href="css/blue.css" />
<link type="text/css" href="css/smoothness/ui.css" rel="stylesheet" />
<link rel="stylesheet" href="febe/style.css" type="text/css" media="screen"
charset="utf-8">
<script src="argiepolicarpio.js" type="text/javascript" charset="utf-8"></script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
</head>
<body>
<!-- WRAPPER START -->
46
<div class="container_16" id="wrapper">
<!-- HIDDEN COLOR CHANGER -->
<div style="position:relative;">
<!--LOGO-->
<div class="grid_8" id="logo">Admin Panel</div>
<div class="grid_8">
<!-- USER TOOLS START -->
<div id="user_tools"><span><a href="../index.php">Logout</a></span></div>
</div>
<!-- USER TOOLS END -->
<div class="grid_16" id="header">
<!-- MENU START -->
<div id="menu">
<ul class="group" id="menu_group_main">
<li class="item first" id="one"><a href="index.php"
class="main"><span class="outer"><span class="inner
dashboard">Dashboard</span></span></a></li>
<li class="item middle" id="four"><a href="message.php" class="main
current"><span class="outer"><span class="inner
media_library">Employees</span></span></a></li>
<li class="item last" id="eight"><a href="products.php"
class="main"><span class="outer"><span class="inner
settings">Products</span></span></a></li>
</ul>
</div>
<!-- MENU END -->
</div>
<!-- CONTENT START -->
<div class="grid_16" id="content">
<!-- TITLE START -->
<div class="grid_9">
<h1 class="dashboard">Employees</h1>
</div>
<div class="clear">
47
</div>
<!-- TITLE END -->
<!-- #PORTLETS START -->
<div id="portlets">
<!-- SECOND SORTABLE COLUMN END -->
<div class="clear"></div>
<!--THIS IS A WIDE PORTLET-->
<div class="portlet">
<div class="portlet-header fixed"><img
src="images/icons/user.gif" width="16" height="16" alt="Latest Registered Users" />
<label for="filter">Search</label> <input type="text"
name="filter" value="" id="filter" />
</div>
<div class="portlet-content nopadding">
<form action="" method="post">
<table cellpadding="1" cellspacing="1" id="resultTable">
<thead>
<tr>
<th style="border-left: 1px solid
#C1DAD7" width="15%"> Name </th>
<th width="15%"> Phone No. </th>
<th width="30%"> Address </th>
<th width="20%"> Payment </th>
<th width="10%"> Post </th>
<th width="10%"> Working Since </th>
</tr>
</thead>
<tbody>
<?php
include('../store/connect.php');
$result = mysql_query("SELECT * FROM message");
while($row = mysql_fetch_array($result))
{
echo '<tr class="record">';
48
echo '<td style="border-left: 1px solid
#C1DAD7;">'.$row['name'].'</td>';
echo '<td><div
align="left">'.$row['email'].'</div></td>';
echo '<td><div
align="left">'.$row['subject'].'</div></td>';
echo '<td><div
align="left">'.$row['message'].'</div></td>';
echo '<td><div align="center"><a
href="#" id="'.$row['message_id'].'" class="delbutton" title="Click To
Delete">delete</a></div></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</form>
</div>
</div>
<!-- END #PORTLETS -->
</div>
<div class="clear"> </div>
<!-- END CONTENT-->
</div>
<div class="clear"> </div>
</div>
</div>
<!-- WRAPPER END -->
<!-- FOOTER START -->
<div class="container_16" id="footer">
Website Administration by <a href="../index.htm">WebGurus</a></div>
<!-- FOOTER END -->
<script src="js/jquery.js"></script>
<script type="text/javascript">
49
$(function() {
$(".delbutton").click(function(){
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deletemessage.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</body>
</html>
Products.php
<?php
require_once('../auth.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
50
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard | Modern Admin</title>
<link rel="stylesheet" type="text/css" href="css/960.css" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/text.css" />
<link rel="stylesheet" type="text/css" href="css/blue.css" />
<link type="text/css" href="css/smoothness/ui.css" rel="stylesheet" />
<link rel="stylesheet" href="febe/style.css" type="text/css" media="screen"
charset="utf-8">
<script src="argiepolicarpio.js" type="text/javascript" charset="utf-8"></script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
</head>
<body>
<!-- WRAPPER START -->
<div class="container_16" id="wrapper">
<!-- HIDDEN COLOR CHANGER -->
<div style="position:relative;">
<!--LOGO-->
<div class="grid_8" id="logo">Admin Panel</div>
<div class="grid_8">
<!-- USER TOOLS START -->
<div id="user_tools"><span><a href="../index.php">Logout</a></span></div>
51
</div>
<!-- USER TOOLS END -->
<div class="grid_16" id="header">
<!-- MENU START -->
<div id="menu">
<ul class="group" id="menu_group_main">
<li class="item first" id="one"><a href="index.php"
class="main"><span class="outer"><span class="inner
dashboard">Dashboard</span></span></a></li>
<li class="item middle" id="four"><a href="message.php"
class="main"><span class="outer"><span class="inner
media_library">Employees</span></span></a></li>
<li class="item last" id="eight"><a href="rooms.php" class="main
current"><span class="outer"><span class="inner
settings">Products</span></span></a></li>
</ul>
</div>
<!-- MENU END -->
</div>
<!-- CONTENT START -->
<div class="grid_16" id="content">
<!-- TITLE START -->
<div class="grid_9">
<h1 class="dashboard">Products</h1>
</div>
<div class="clear">
</div>
<!-- TITLE END -->
<!-- #PORTLETS START -->
<div id="portlets">
<!-- SECOND SORTABLE COLUMN END -->
<div class="clear"></div>
<!--THIS IS A WIDE PORTLET-->
<div class="portlet">
52
<div class="portlet-header fixed"><img
src="images/icons/user.gif" width="16" height="16" alt="Latest Registered Users" />
<label for="filter">Search</label> <input type="text"
name="filter" value="" id="filter" />
<a rel="facebox" href="addproduct.php">Add Product</a>
</div>
<div class="portlet-content nopadding">
<form action="" method="post">
<table cellpadding="1" cellspacing="1" id="resultTable">
<thead>
<tr>
<th style="border-left:
1px solid #C1DAD7"> Type </th>
<th> Rate </th>
<th> Desciption </th>
<th> Image </th>
<th> Action </th>
</tr>
</thead>
<tbody>
<?php
include('../store/connect.php');
$result = mysql_query("SELECT
* FROM internet_shop");
while($row =
mysql_fetch_array($result))
{
echo '<tr
class="record">';
echo '<td
style="border-left: 1px solid #C1DAD7;">'.$row['name'].'</td>';
echo '<td><div
align="left">'.$row['price'].'</div></td>';
53
echo '<td><div
align="left">'.$row['description'].'</div></td>';
echo '<td><a
rel="facebox" href="editproductimage.php?id='.$row['id'].'"><img
src="../store/img/products/'.$row['img'].'" width="80" height="50"></a></td>';
echo '<td><div
align="center"><a rel="facebox"
href="editproductetails.php?id='.$row['id'].'">edit</a> | <a href="#" id="'.$row['id'].'"
class="delbutton" title="Click To Delete">delete</a></div></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</form>
</div>
</div>
<!-- END #PORTLETS -->
</div>
<div class="clear"> </div>
<!-- END CONTENT-->
</div>
<div class="clear"> </div>
</div>
</div>
<!-- WRAPPER END -->
<!-- FOOTER START -->
<div class="container_16" id="footer">
Website Administration by <a href="../index.htm">BhardwajITsp.com</a></div>
<!-- FOOTER END -->
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
54
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deleteproduct.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</body>
</html>
ViewOrders.php
<link rel="stylesheet" href="febe/style.css" type="text/css" media="screen"
charset="utf-8">
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
55
closeImage : 'src/closelabel.png'
})
})
</script>
Order Date: <?php
include('../store/connect.php');
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM reservation WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
{
echo $row['date'];
}
?>
<table cellpadding="1" cellspacing="1" id="resultTable">
<thead>
<tr>
<th style="border-left: 1px solid #C1DAD7"> Name </th>
<th> Quantity </th>
<th> Note </th>
</tr>
</thead>
<tbody>
<?php
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM orders WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
{
echo '<tr class="record">';
echo '<td style="border-left: 1px solid
#C1DAD7;">'.$row['product'].'</td>';
echo '<td>'.$row['qty'].' | <a rel="facebox"
href="design.php?id='.$row['id'].'">View Design</a></td>';
56
echo '<td>'.$row['note'].'</td>';
echo '</tr>';
}
?>
<?php
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM reservation WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
{
echo '<tr class="record">';
echo '<td style="border-left: 1px solid
#C1DAD7;">Total Payable</td>';
echo '<td>'.$row['payable'].'</td>';
echo '</tr>';
}
?>
</tbody>
</table>
ViewReport.php
<script language="javascript">
function Clickheretoprint()
{
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,widtd=900, height=400, left=100, top=25";
var content_vlue = document.getElementById("print_content").innerHTML;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title>List of Passer</title>');
docprint.document.write('</head><body onLoad="self.print()" style="widtd: 900px;
font-size:16px; font-family:arial;">');
docprint.document.write(content_vlue);
docprint.document.write('</body></html>');
docprint.document.close();
57
docprint.focus();
}
</script>
<a href="javascript:Clickheretoprint()">Print</a>
<div id="print_content">
<?php
include('../store/connect.php');
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM reservation WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
{
echo 'Date: '.$row['date'].' '.$row['time'].'<br>';
echo 'Name: '.$row['firstname'].'
'.$row['lastname'].'<br>';
echo 'Address: '.$row['address'].' '.$row['city'].'
'.$row['country'].'<br>';
echo 'Email: '.$row['email'].'<br>';
echo 'Contact number: '.$row['contact'].'<br>';
echo 'Confirmation: '.$row['confirmation'].'<br>';
echo 'Payment Method: '.$row['payment'].'<br>';
echo 'Delivery Type: '.$row['delivery_type'].'<br>';
}
?>
<table cellpadding="5" cellspacing="0" id="resultTable" border="1">
<tr>
<td> Name </td>
<td> Quantity </td>
</tr>
<?php
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM orders WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
58
{
echo '<tr class="record">';
echo '<td>'.$row['product'].'</td>';
echo '<td>'.$row['qty'].'</td>';
echo '</tr>';
}
?>
<?php
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM reservation WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
{
echo '<tr class="record">';
echo '<td>Total Payable</td>';
echo '<td>'.$row['payable'].'</td>';
echo '</tr>';
}
?>
</table>
</div>
Addexec.php
<?php
include('../store/connect.php');
if (!isset($_FILES['image']['tmp_name'])) {
echo "";
}else{
$file=$_FILES['image']['tmp_name'];
$image= addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name= addslashes($_FILES['image']['name']);
$image_size= getimagesize($_FILES['image']['tmp_name']);
if ($image_size==FALSE) {
echo "That's not an image!";
}else{
59
move_uploaded_file($_FILES["image"]["tmp_name"],"../store/img/products/"
. $_FILES["image"]["name"]);
$location=$_FILES["image"]["name"];
$type=$_POST['type'];
$rate=$_POST['rate'];
$desc=$_POST['desc'];
$update=mysql_query("INSERT INTO internet_shop (name,
price, description, img)
VALUES
('$type','$rate','$desc','$location')");
header("location: products.php");
exit();
}
}
?>
AddProduct.php
<script type="text/javascript">
function validateForm()
{
var a=document.forms["addroom"]["type"].value;
if (a==null || a=="")
{
alert("Pls. Enter the room type");
return false;
}
var b=document.forms["addroom"]["rate"].value;
if (b==null || b=="")
{
alert("Pls. Enter the room rate");
return false;
}
var d=document.forms["addroom"]["desc"].value;
60
if (d==null || d=="")
{
alert("Pls Enter the room description");
return false;
}
var e=document.forms["addroom"]["image"].value;
if (e==null || e=="")
{
alert("Pls. browse an image");
return false;
}
/*if (c.which!=8 && c.which!=0 && (c.which<48 || c.which>57))
{
alert("The input U enter in Quantity field is not valid, only numbers are accepted (ex.
1, 2, 3, 4. ..... )");
return false;
}
if (b.which!=8 && b.which!=0 && (b.which<48 || b.which>57))
{
alert("The input U enter in Quantity field is not valid, only numbers are accepted (ex.
1, 2, 3, 4. ..... )");
return false;
}*/
}
</script>
<style type="text/css">
<!--
.ed{
border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
margin-bottom: 4px;
61
}
#button1{
text-align:center;
font-family:Arial, Helvetica, sans-serif;
border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
background-color:#00CCFF;
height: 34px;
}
-->
</style>
<!--sa input that accept number only-->
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
//-->
</SCRIPT>
<form action="addexec.php" method="post" enctype="multipart/form-data"
name="addroom" onsubmit="return validateForm()">
Name<br />
<input name="type" type="text" class="ed" /><br />
Rate<br />
<input name="rate" type="text" id="rate" class="ed" onkeypress="return
isNumberKey(event)" /><br />
Description<br />
<input name="desc" type="text" class="ed" /><br />
62
Room Image: <br /><input type="file" name="image" class="ed"><br />
<input type="submit" name="Submit" value="save" id="button1" />
</form>
Deletemassege.php
<?php
// This is a sample code in case you wish to check the username from a mysql db table
include('../store/connect.php');
if($_GET['id'])
{
$id=$_GET['id'];
$sql = "delete from message where message_id='$id'";
mysql_query( $sql);
}
?>
Deleteproduct.php
<?php
// This is a sample code in case you wish to check the username from a mysql db table
include('../store/connect.php');
if($_GET['id'])
{
$id=$_GET['id'];
$sql = "delete from internet_shop where id='$id'";
mysql_query( $sql);
}
?>
Deleters.php
<?php
// This is a sample code in case you wish to check the username from a mysql db table
include('../store/connect.php');
if($_GET['id'])
{
$id=$_GET['id'];
$sql = "delete from reservation where reservation_id='$id'";
mysql_query( $sql);
}
?>
63
Design.php
<?php
include('../store/connect.php');
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM orders WHERE id='$id'");
while($row = mysql_fetch_array($result))
{
echo '<img src="../store/'.$row['design'].'"><br>';
echo '<a href="../store/'.$row['design'].'">download</a>';
}
?>
Editpicexec.php
<?php
include('../store/connect.php');
if (!isset($_FILES['image']['tmp_name'])) {
echo "";
}else{
$file=$_FILES['image']['tmp_name'];
$image= addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name= addslashes($_FILES['image']['name']);
$image_size= getimagesize($_FILES['image']['tmp_name']);
if ($image_size==FALSE) {
echo "That's not an image!";
}else{
move_uploaded_file($_FILES["image"]["tmp_name"],"../store/img/products/"
. $_FILES["image"]["name"]);
$location=$_FILES["image"]["name"];
$roomid=$_POST['roomid'];
if(!$update=mysql_query("UPDATE internet_shop SET img =
'$location' WHERE id='$roomid'")) {
echo mysql_error();
}
else{
64
header("location: products.php");
exit();
}
}
}
?>
Editproductetails.php
<style type="text/css">
<!--
.ed{
border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
margin-bottom: 4px;
}
#button1{
text-align:center;
font-family:Arial, Helvetica, sans-serif;
border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
background-color:#00CCFF;
height: 34px;
}
-->
</style>
<?php
include('../store/connect.php');
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM internet_shop where id='$id'");
while($row = mysql_fetch_array($result))
65
{
$type=$row['name'];
$rate=$row['price'];
$description=$row['description'];
}
?>
<form action="execeditproduct.php" method="post">
<input type="hidden" name="roomid" value="<?php echo $id=$_GET['id']
?>">
Name:<br><input type="text" name="type" value="<?php echo $type ?>"
class="ed"><br>
Rate:<br><input type="text" name="rate" value="<?php echo $rate ?>"
class="ed"><br>
Description:<br><textarea name="description" class="ed"><?php echo
$description ?></textarea><br>
<input type="submit" value="Edit" id="button1">
</form>
Editproductimage.php
<?php
include('../store/connect.php');
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM internet_shop where id='$id'");
while($row = mysql_fetch_array($result))
{
$image=$row['img'];
}
?>
<img src="../store/img/products/<?php echo $image ?>">
<form action="editpicexec.php" method="post" enctype="multipart/form-data">
<br>
<input type="hidden" name="roomid" value="<?php echo $id=$_GET['id'];
?>">
Select Image
66
<br>
<input type="file" name="image"><br>
<input type="submit" value="Upload">
</form>
Editstatus.php
<style type="text/css">
<!--
.ed{
border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
margin-bottom: 4px;
}
#button1{
text-align:center;
font-family:Arial, Helvetica, sans-serif;
border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
background-color:#00CCFF;
height: 34px;
}
-->
</style>
<form action="execeditstatus.php" method="post">
<input type="hidden" name="roomid" value="<?php echo $id=$_GET['id']
?>">
Status:<br>
<select name="status" class="ed">
<option>Pending</option>
<option>Delivered</option>
67
</select>
<br>
<input type="submit" value="Edit" id="button1">
</form>
Emp.php
<?php
require_once('../auth.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard | Modern Admin</title>
<link rel="stylesheet" type="text/css" href="css/960.css" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/text.css" />
<link rel="stylesheet" type="text/css" href="css/blue.css" />
<link type="text/css" href="css/smoothness/ui.css" rel="stylesheet" />
<link rel="stylesheet" href="febe/style.css" type="text/css" media="screen"
charset="utf-8">
<script src="argiepolicarpio.js" type="text/javascript" charset="utf-8"></script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
68
})
</script>
</head>
<body>
<!-- WRAPPER START -->
<div class="container_16" id="wrapper">
<!-- HIDDEN COLOR CHANGER -->
<div style="position:relative;">
<!--LOGO-->
<div class="grid_8" id="logo">Admin Panel</div>
<div class="grid_8">
<!-- USER TOOLS START -->
<div id="user_tools"><span><a href="../index.php">Logout</a></span></div>
</div>
<!-- USER TOOLS END -->
<div class="grid_16" id="header">
<!-- MENU START -->
<div id="menu">
<ul class="group" id="menu_group_main">
<li class="item first" id="one"><a href="index.php"
class="main"><span class="outer"><span class="inner
dashboard">Dashboard</span></span></a></li>
<li class="item middle" id="four"><a href="message.php" class="main
current"><span class="outer"><span class="inner
media_library">Employees</span></span></a></li>
<li class="item last" id="eight"><a href="products.php"
class="main"><span class="outer"><span class="inner
settings">Products</span></span></a></li>
</ul>
</div>
<!-- MENU END -->
</div>
<!-- CONTENT START -->
<div class="grid_16" id="content">
69
<!-- TITLE START -->
<div class="grid_9">
<h1 class="dashboard">Employees</h1>
</div>
<div class="clear">
</div>
<!-- TITLE END -->
<!-- #PORTLETS START -->
<div id="portlets">
<!-- SECOND SORTABLE COLUMN END -->
<div class="clear"></div>
<!--THIS IS A WIDE PORTLET-->
<div class="portlet">
<div class="portlet-header fixed"><img
src="images/icons/user.gif" width="16" height="16" alt="Latest Registered Users" />
<label for="filter">Search</label> <input type="text"
name="filter" value="" id="filter" />
</div>
<div class="portlet-content nopadding">
<form action="" method="post">
<table cellpadding="1" cellspacing="1" id="resultTable">
<thead>
<tr>
<th style="border-left: 1px solid #C1DAD7"
width="15%"> Name </th>
<th width="15%"> Phone No. </th>
<th width="30%"> Address </th>
<th width="20%"> Payment </th>
<th width="10%"> Post </th>
<th width="10%"> Working Since </th>
</tr>
</thead>
<tbody>
<?php
70
include('../store/connect.php');
$result = mysql_query("SELECT * FROM message");
while($row = mysql_fetch_array($result))
{
echo '<tr class="record">';
echo '<td style="border-left: 1px solid
#C1DAD7;">'.$row['name'].'</td>';
echo '<td><div align="left">'.$row['email'].'</div></td>';
echo '<td><div align="left">'.$row['subject'].'</div></td>';
echo '<td><div align="left">'.$row['message'].'</div></td>';
echo '<td><div align="center"><a href="#" id="'.$row['message_id'].'"
class="delbutton" title="Click To Delete">delete</a></div></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</form>
</div>
</div>
<!-- END #PORTLETS -->
</div>
<div class="clear"> </div>
<!-- END CONTENT-->
</div>
<div class="clear"> </div>
</div>
</div>
<!-- WRAPPER END -->
<!-- FOOTER START -->
<div class="container_16" id="footer">
Website Administration by <a href="../index.htm">BhardwajITsp.com</a></div>
<!-- FOOTER END -->
<script src="js/jquery.js"></script>
71
<script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deletemessage.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</body>
</html>
Execreditproduct.php
<?php
include('../store/connect.php');
$roomid = $_POST['roomid'];
$type=$_POST['type'];
$rate=$_POST['rate'];
72
$description=$_POST['description'];
mysql_query("UPDATE internet_shop SET name='$type', price='$rate',
description='$description' WHERE id='$roomid'");
header("location: products.php");
?>
Execeditstatus.php
<?php
include('../store/connect.php');
$roomid = $_POST['roomid'];
$status=$_POST['status'];
mysql_query("UPDATE reservation SET status='$status' WHERE
reservation_id='$roomid'");
header("location: index.php");
?>
73
STORE PANEL
Index.php
<?php
require_once('../auth.php');
?>
<?php
$transnum=$_SESSION['SESS_MEMBER_ID'];
?>
<html>
<head>
<link rel="stylesheet" href="main.css" type="text/css" media="screen" charset="utf-
8">
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
<style>
table {
border-collapse: collapse;
border-spacing: 0;
}
</style>
<script language="javascript" type="text/javascript">
// Roshan's Ajax dropdown code with php
// This notice must stay intact for legal use
74
// Copyright reserved to Roshan Bhattarai - [email protected]
// If you have any problem contact me at http://roshanbh.com.np
function getXMLHTTP() { //fuction to return the xml http object
var xmlhttp=false;
try{
xmlhttp=new XMLHttpRequest();
}
catch(e) {
try{
xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e1){
xmlhttp=false;
}
}
}
return xmlhttp;
}
function getState(countryId) {
var strURL="findState.php?country="+countryId;
var req = getXMLHTTP();
if (req) {
req.onreadystatechange = function() {
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
document.getElementById('statediv').innerHTML=req.responseText;
} else {
75
alert("There was a problem while using
XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
function getCity(countryId,stateId) {
var strURL="findCity.php?country="+countryId+"&state="+stateId;
var req = getXMLHTTP();
if (req) {
req.onreadystatechange = function() {
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
document.getElementById('citydiv').innerHTML=req.responseText;
} else {
alert("There was a problem while using
XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
</script>
<style>
76
a{
color:#fff;
text-decoration:none;
}
a.tooltip {outline:none; }
a.tooltip strong {line-height:30px;}
a.tooltip:hover {text-decoration:none;}
a.tooltip span {
z-index:10;display:none; padding:14px 20px;
margin-top:-30px; margin-left:28px;
width:240px; line-height:16px;
}
a.tooltip:hover span{
display:inline; position:absolute; color:#111;
border:1px solid #DCA; background:#fffAF0;}
.callout {z-index:20;position:absolute;top:30px;border:0;left:-12px;}
/*CSS3 extras*/
a.tooltip span
{
border-radius:4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-moz-box-shadow: 5px 5px 8px #CCC;
-webkit-box-shadow: 5px 5px 8px #CCC;
box-shadow: 5px 5px 8px #CCC;
}
</style>
<script type="text/javascript">
function validateForm()
{
var x=document.forms["form1"]["total"].value;
if (x==null || x=="")
{
77
alert("Take Your Order first");
return false;
}
var con = confirm("Are You Sure? you want to order this product?");
if (con ==false)
{
return false;
}
}
</script>
</head>
<body>
<div id="wrapper">
<div id="note">
<h1 style="margin-top: 0px; margin-bottom: 5px;">Select items</h1>
</div>
<div id="content">
<div id="productlist">
<?php
require "connect.php";
$result = mysql_query("SELECT * FROM internet_shop");
while($row=mysql_fetch_assoc($result))
{
echo '<a rel="facebox"
href="orderpage.php?id='.$row['id'].'&trnasnum='.$transnum.'"><img
src="img/products/'.$row['img'].'" alt="'.htmlspecialchars($row['name']).'"
width="109" height="109" class="pngfix" /></a>';
}
?>
</div>
<div id="orderlist">
<table width="100%" border="1" cellpadding="2"
cellspacing="2">
<tr>
78
<td></td>
<td width="25"><div
align="center"><strong>Qty</strong></div></td>
<td width="150"><div
align="left"><strong>Name</strong></div></td>
<td width="25"><div
align="center"><strong>Total</strong></div></td>
</tr>
<?php
$result3 = mysql_query("SELECT * FROM orders
WHERE confirmation='$transnum'");
while($row3 = mysql_fetch_array($result3))
{
echo '<tr>';
echo '<td><a
href="deleteorder.php?id='.$row3['id'].'" id="'.$row3['id'].'" class="delbutton"
title="Click To Delete"><img src="img/delete.png"></a></td>';
echo '<td><div
align="center">'.$row3['qty'].'</div></td>';
echo '<td>'.$row3['product'].'</td>';
echo '<td><div
align="center">'.$row3['total'].'</div></td>';
echo '</tr>';
}
?>
<tr>
<td colspan="3"><div align="right"><span
style="color:#B80000; font-size:13px; font-weight:bold; font-family:Arial, Helvetica,
sans-serif;">Grand Total: </span></div></td>
<td><div align="center">
<?php
$result5 = mysql_query("SELECT sum(total) FROM
orders WHERE confirmation='$transnum'");
while($row5 = mysql_fetch_array($result5))
79
{
echo $row5['sum(total)'];
$sfdddsdsd=$row5['sum(total)'];
}
?>
</div>
</td>
</tr>
</table>
<form method="post" action="#" name="form1"
onsubmit="return validateForm()">
<input type="hidden" name="transnumber" value="<?php echo
$transnum ?>" />
<input type="hidden" name="total" value="<?php echo
$sfdddsdsd ?>" />
<input type="hidden" name="totalqty" value="
<?php
$result5 = mysql_query("SELECT sum(qty) FROM
orders WHERE confirmation='$transnum'");
while($row5 = mysql_fetch_array($result5))
{
echo $row5['sum(qty)'];
}
?>
" />
<input type="submit" value="Print Receipt">
</form>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</body>
</html>
80
Initiateorder.php
move_uploaded_file($_FILES["image"]["tmp_name"],"./design" .
$_FILES["image"]["name"]);
$location="./design".$_FILES["image"]["name"];
$transnum=$_POST['transnum'];
$qty=$_POST['select2'];
$name=$_POST['pname'];
$note=$_POST['note'];
$total=$_POST['txtDisplay'];
mysql_query("INSERT INTO orders (product, qty,
confirmation, total, design, note) VALUES('$name', '$qty', '$transnum', '$total',
'$location', '$note')");
?>
Orderpage.php
<?php
include('connect.php');
$id=$_GET['id'];
$result2 = mysql_query("SELECT * FROM internet_shop WHERE id='$id'");
while($row2 = mysql_fetch_array($result2))
{
$price=$row2['price'];
$name=$row2['name'];
echo '<img src="img/products/'.$row2['img'].'" alt="Wall-E" title="Wall-E"
/><br>';
81
echo '<span style="color:#B80000; font-size:16px; font-weight:bold; font-
family:Arial, Helvetica, sans-serif;">'.$row2['name'].'</span><br>';
//echo '<span style="font-size:11px; font-family:Arial, Helvetica, sans-serif;
text-align:left; line-height:17px;color:#000000;">'.$row2['description'].'</span>';
}
?>
<script type="text/javascript" language="Javascript">
var sum=0;
price = document.frmOne.select1.value;
document.frmOne.txtDisplay.value = price;
function OnChange(value){
price = document.frmOne.select1.value;
quantity = document.frmOne.select2.value;
sum = price * quantity;
document.frmOne.txtDisplay.value = sum;
}
</script>
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which :
event.keyCode
if (charCode > 31 && (charCode < 48 || charCode >
57))
return false;
return true;
}
//-->
</SCRIPT>
<form NAME = "frmOne" action="initiateorder.php" method="post"
enctype="multipart/form-data">
<input type="hidden" name="transnum" value="<?php echo
$_GET['trnasnum'] ?>" />
82
<INPUT TYPE = "Text" name = "select1" size = "35" value ="<?php echo
$price ?>" style="display:none;">
<INPUT TYPE = "Text" name = "pname" size = "35" value ="<?php echo
$name ?>" style="display:none;">
<br>
<span style="font-size:11px; font-family:Arial, Helvetica, sans-serif; text-align:left;
line-height:17px;color:#000000;">Quantity : </span>
<input type="text" name="select2" onkeyup="OnChange(this.value)"
onKeyPress="return isNumberKey(event)" style="width:60px;" />
<span style="color:#B80000; font-size:16px; font-weight:bold; font-
family:Arial, Helvetica, sans-serif;">=</span>
<INPUT TYPE = "Text" name = "txtDisplay" size = "35" value =""
style="border:#999999 solid 1px; background-color:#FFF; width:100px;
height:20px;" readonly><br>
<span style="font-size:10px; font-family:Arial, Helvetica, sans-serif; text-align:left;
line-height:17px;color:#000000;">
<br />
<?php
if($name=='T-shirt')
{
?>
*format for tshirt(size, color, qty)<br />
tshirt available size(small, medium, large, xl, xxl)<br />
tshirt color(blue, red, black, white, green)<br />
<?php
}
?>
<?php
if($name=='PVC Bag Tag')
{
?>
*format for PVC Bag Tag(size)<br />
PVC Bag Tag available size(wallet size, a4 size, a5 size)<br />
<?php
83
}
?>
<?php
if($name=='Button Pins')
{
?>
*format for Button Pins(size)<br />
Button Pins available size(small, Big)<br />
<?php
}
?>
<?php
if(($name=='Keychain') || ($name=='keychain'))
{
?>
*format for Keychain(Shapes)<br />
Keychain available shapes(Butterfly, heart, circle, square, tshirt)<br
/>
<?php
}
?>
<?php
if(($name=='Magic Mug') || ($name=='Mug') || ($name=='Thumbler'))
{
?> *format for thumbler, mugs ang magic mugs(put none)
<?php
}
?>
<br />
</span>
<input type="submit" value="Add" style="padding:10px; border-radius:15px;
background-color:green; border:none; color:#ffffff; font-weight:bold; border: 1px
solid #000000"/>
</form>
84
Personalinfo.php
<style>
body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-
serif;
font-size:12px;
}
p, h1, form, button{border:0; margin:0; padding:0;}
.spacer{clear:both; height:1px;}
/* ----------- My Form ----------- */
.myform{
margin:0 auto;
width:400px;
padding:14px;
}
/* ----------- stylized ----------- */
#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}
#stylized h1 {
font-size:14px;
font-weight:bold;
margin-bottom:8px;
}
#stylized p{
font-size:11px;
color:#666666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
}
#stylized label{
display:block;
85
font-weight:bold;
text-align:right;
width:140px;
float:left;
}
#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:140px;
}
#stylized input{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:200px;
margin:2px 0 20px 10px;
}
#stylized select{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:200px;
margin:2px 0 20px 10px;
}
#stylized button{
clear:both;
margin-left:150px;
width:125px;
height:31px;
86
background:#666666 url(img/button.png) no-repeat;
text-align:center;
line-height:31px;
color:#FFFFFF;
font-size:11px;
font-weight:bold;
}
</style>
<script type="text/javascript">
function validateForm()
{
var x=document.forms["form1"]["fname"].value;
if (x==null || x=="")
{
alert("Enter Firstname");
return false;
}
var y=document.forms["form1"]["lname"].value;
if (y==null || y=="")
{
alert("Enter Lastname");
return false;
}
var z=document.forms["form1"]["cnum"].value;
if (z==null || z=="")
{
alert("Enter Contact Number");
return false;
}
var a=document.forms["form1"]["email"].value;
if (a==null || a=="")
{
alert("Enter Email Address");
return false;
87
}
var b=document.forms["form1"]["paddress"].value;
if (b==null || b=="")
{
alert("Enter Address");
return false;
}
var c=document.forms["form1"]["city"].value;
if (c==null || c=="")
{
alert("Enter City");
return false;
}
var d=document.forms["form1"]["daddress"].value;
if (d==null || d=="")
{
alert("Enter Delivery Address");
return false;
}
var con = confirm("Are You Sure? you want to proceed?");
if (con ==false)
{
return false;
}
}
</script>
<link rel="stylesheet" type="text/css" href="tcal.css" />
<script type="text/javascript" src="tcal.js"></script>
<div id="stylized" class="myform">
<form method="post" action="saveform.php" name="form1" onsubmit="return
validateForm()">
<input type="hidden" name="transnum" id="name" value="<?php echo
$_POST['transnumber'] ?>" />
88
<?php
$rrrrr=$_POST['country'];
if($rrrrr==1){
$asas=$_POST['total'];
}
if($rrrrr==2){
$asas=$_POST['total'];
}
if($rrrrr==3){
$asas=$_POST['total']+500;
}
?>
<input type="text" name="ototal" id="name" value="<?php echo $asas ?>"
style="display:none;" />
<input type="hidden" name="sdsd" id="name" value="<?php
$rrrrr=$_POST['country'];
if($rrrrr==1){
echo 'Cash On delivery';
}
if($rrrrr==2){
echo 'Shipping Inside Batangas';
}
if($rrrrr==3){
echo 'Shipping Outside Batangas';
}
?>" />
<input type="hidden" name="pmethod" id="name" value="<?php echo
$_POST['state'] ?>" />
<?php
$qtytotal=$_POST['totalqty'];
$wqwqwq=$_POST['country'];
if(($qtytotal>1000) && ($wqwqwq==2)){
$NewDate=Date('y:m:d', strtotime("+2 days"));
}
89
else if(($qtytotal<1000) && ($wqwqwq==2)){
$NewDate=Date('y:m:d', strtotime("+1 days"));
}
else if(($qtytotal>1000) && ($wqwqwq==3)){
$NewDate=Date('y:m:d', strtotime("+4 days"));
}
else if(($qtytotal<1000) && ($wqwqwq==3)){
$NewDate=Date('y:m:d', strtotime("+3 days"));
}
echo '<input type="hidden" name="date" id="name" value="'.$NewDate.'" />';
?>
<h1>Personal Information form</h1>
<p>Note: This note inform/s you when you can receive your order<br>
Inside Batangas: 1000 above- 2 days | 1000 below- 1 day<br>
Outside Batangas: 1000 above- 4 days | 1000 below- 3 days<br>
</p>
<label>First Name
<span class="small">Add your first name</span>
</label>
<input type="text" name="fname" id="name" />
<label>Last Name
<span class="small">Add your last name</span>
</label>
<input type="text" name="lname" id="name" />
<label>Contact No.
<span class="small">Add your Contact number</span>
</label>
<input type="text" name="cnum" id="name" />
<label>Email
<span class="small">Add a valid address</span>
</label>
<input type="text" name="email" id="email" />
<label>Address
<span class="small">permanent address</span>
90
</label>
<input type="text" name="paddress" id="name" />
<label>City
<span class="small">permanent address</span>
</label>
<input type="text" name="city" id="name" />
<label>Delivery Addres
<span class="small">Delivery Address</span>
</label>
<input type="text" name="daddress" id="name" />
<input type="submit" value="Confirm" style="margin-left: 150px;">
<div class="spacer"></div>
</form>
</div>
Print.php
<script language="javascript">
function Clickheretoprint()
{
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,widtd=900, height=400, left=100, top=25";
var content_vlue = document.getElementById("print_content").innerHTML;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title>List of Passer</title>');
docprint.document.write('</head><body onLoad="self.print()" style="widtd: 900px;
font-size:16px; font-family:arial;">');
docprint.document.write(content_vlue);
docprint.document.write('</body></html>');
docprint.document.close();
docprint.focus();
}
</script>
<style>
91
#print_content{
width:434px;
margin:0 auto;
}
</style>
<a href="javascript:Clickheretoprint()">Print</a>
<div id="print_content">
<img src="../images/logo.png" width="100" height="100"
style="float:left;"><strong>Genesis Trading Online Ordering
System</strong><br>Balete Batangas City<br>Email Us:
[email protected]<br>Contact: <a href="#">(1800)777-111</a> and
call on <a href="#">(+6343)3005704</a>
<br><br><br><br>
<?php
include('connect.php');
$id=$_GET['id'];
$result = mysql_query("SELECT * FROM reservation WHERE
confirmation='$id'");
while($row = mysql_fetch_array($result))
{
echo 'Date: '.$row['date'].'<br>';
echo 'Name: '.$row['firstname'].'
'.$row['lastname'].'<br>';
echo 'Address: '.$row['address'].' '.$row['city'].'
'.$row['country'].'<br>';
echo 'Email: '.$row['email'].'<br>';
echo 'Contact number: '.$row['contact'].'<br>';
echo 'Confirmation: '.$row['confirmation'].'<br>';
echo 'Payment Method: '.$row['payment'].'<br>';
echo 'Delivery Type: '.$row['delivery_type'].'<br>';
echo 'note: if the Delivery Type is Outside Batangas It
has an 500 delivery charge ';
?>
<table cellpadding="5" cellspacing="0" id="resultTable" border="1" width="100%">
92
<tr>
<td> <strong>Name</strong> </td>
<td> <strong>Quantity</strong> </td>
</tr>
<?php
$id=$_GET['id'];
$results = mysql_query("SELECT * FROM orders WHERE
confirmation='$id'");
while($rows = mysql_fetch_array($results))
{
echo '<tr class="record">';
echo '<td>'.$rows['product'].'</td>';
echo '<td>'.$rows['qty'].'</td>';
echo '</tr>';
}
?>
<?php
$id=$_GET['id'];
$resulta = mysql_query("SELECT * FROM reservation WHERE
confirmation='$id'");
while($rowa = mysql_fetch_array($resulta))
{
echo '<tr class="record">';
echo '<td><strong>Total Payable</strong></td>';
echo '<td>'.$rowa['payable'].'</td>';
echo '</tr>';
}
?>
<?php
}
?>
</table>
</div>
<a href="../index.php">Back</a>
93
Saveform.php
<?php
require "connect.php";
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$email=$_POST['email'];
$cnum=$_POST['cnum'];
$transnum=$_POST['transnum'];
$paddress=$_POST['paddress'];
$daddress=$_POST['daddress'];
$ddddddd=$_POST['date'];
$city=$_POST['city'];
$status='Pending';
$total=$_POST['ototal'];
$dmethod=$_POST['sdsd'];
$pmethod=$_POST['pmethod'];
if($pmethod=='BDO'){
$accountnum='2617 2008 1809 2224';
}
else if($pmethod=='Metro Bank'){
$accountnum='1722 0629 1418 2308';
}
else if($pmethod=='Smart Padala'){
$accountnum='1211 5623 1973 2189';
}
else if($pmethod=='Cash On Delivery'){
$accountnum='Cash On Delivery';
}
mysql_query("INSERT INTO reservation (firstname, lastname, city, address, email,
contact, confirmation, status, payable, delivery, date, payment, delivery_type)
VALUES
('$fname','$lname','$city','$paddress','$email','$cnum','$transnum','$status','$total','$dad
dress','$ddddddd','$pmethod','$dmethod')");
header("location: print.php?id=$transnum");
94
echo $total;
$mail_To = $email;
$mail_Subject = "Order notification From Genesis Print stuff";
$mail_Body = "First Name: $fname\n".
"Last Name: $lname\n".
"Email: $email \n".
"City: $city \n".
"Country: $country \n".
"Contact Number: $cnum\n".
"Payable amount: $total\n ".
"Delivery Method: $dmethod\n".
"Payment Method: $pmethod\n ".
"$pmethod Account: $accountnum\n ".
"Confirmation Number: $transnum\n ";
mail($mail_To, $mail_Subject, $mail_Body);
?>
Connect.php
<?php
/* Database config */
$db_host = 'localhost';
$db_user = 'root';
$db_pass = '';
$db_database = 'shoopingcart';
/* End config */
$link = mysql_connect($db_host,$db_user,$db_pass) or die('Unable to establish a DB
connection');
mysql_select_db($db_database,$link);
mysql_query("SET names UTF8");
?>
95
Delete order.php
<?php
include('connect.php');
if($_GET['id'])
{
$id=$_GET['id'];
$sql = "DELETE from orders WHERE id='$id'";
header("location: index.php");
mysql_query( $sql);
}
?>
Findstate.php
<?php $country=$_GET['country'];
require "connect.php";
$query="SELECT * FROM paymentm WHERE dmethodid='$country'";
$result=mysql_query($query);
?>
<select name="state">
<?php while($row=mysql_fetch_array($result)) { ?>
<option value="<?php echo $row['methodname']?>"><?php echo
$row['methodname']?></option>
<?php } ?>
</select>
Generatetrans.php
<?php
session_start();
function createRandomPassword() {
$chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;
while ($i <= 3) {
96
$num = rand() % 33;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
$letter = createRandomPassword();
function numberletter() {
$chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
srand((double)microtime()*1000000);
$i = 0;
$passii = '' ;
while ($i <= 2) {
$num = rand() % 33;
$tmp = substr($chars, $num, 1);
$passii = $passii . $tmp;
$i++;
}
return $passii;
}
$ccnumbers = numberletter();
$confirmation = $letter.'-'.$ccnumbers;
session_regenerate_id();
$_SESSION['SESS_MEMBER_ID'] = $confirmation;
session_write_close();
header("location: index.php");
?>
97
SQL DATABASE
-- phpMyAdmin SQL Dump
-- version 3.4.11.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 21, 2013 at 12:32 AM
-- Server version: 5.1.68
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
-- Database: `argie_reservation`
-- Table structure for table `internet_shop`
98
-- Table structure for table `message`
CREATE TABLE IF NOT EXISTS `message` (
`message_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`email` varchar(100) NOT NULL,
`subject` varchar(100) NOT NULL,
`message` varchar(500) NOT NULL,
PRIMARY KEY (`message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=54 ;
99
(21, 'PVC Bag Tag', 6, 'FGX-W0Y', '72', 'design/537484_234955419971298_1129768462_n.jpg', 'wallet
size');
100
(6, '4432xc', 'ccx', 'cvb', 'asdsxc', '', '[email protected]', 567654, 860, 'Pending', 'KSD-
BYN', 'zxxcvb', '13:02:23', '', 'BDO', 'Shipping Outside Batangas'),
(7, 'ange', 'velasco', 'cavite city', 'balete', '', '[email protected]', 2147483647, 9500,
'Pending', 'OQF-6YC', 'balete', '13:02:23', '', 'Metro Bank', 'Shipping Outside Batangas'),
(8, 'argie', 'policarpio', 'Bacolod City', '12th street', '', '[email protected]', 2147483647,
18000, 'Pending', 'WYQW-5OZ', '12th street bacolod city', '13:02:21', '', 'Metro Bank', 'Shipping Inside
Batangas'),
(9, 'helry', 'bautista', 'manila', 'Balete', '', '[email protected]', 2147483647, 575,
'Pending', 'MM-MDE', 'Balete', '13:02:23', '', 'Metro Bank', 'Shipping Outside Batangas'),
(10, 'febe', 'tabar', 'Bacolod', '12th street', '', '[email protected]', 2147483647, 21950,
'Pending', 'IUJ-B44', '12th st. bacolod', '13:02:23', '', 'BDO', 'Shipping Outside Batangas'),
(11, 'ee', 'j', 'batangas city', 'bs', '', '[email protected]', 908966534, 100, 'Pending', 'GLM-
VO3', 'balete reloc', '13:02:21', '', 'BDO', 'Shipping Inside Batangas'),
(12, 's', 's', 's', 's', '', '[email protected]', 0, 150150, 'Pending', 'OLV-M5C', 's', '13:02:22', '',
'BDO', 'Shipping Inside Batangas'),
(13, 'sasas', 'asas', 'ererer', 'rererer', '', '[email protected]', 0, 525, 'Pending', 'AS-TED',
'ererer', '13:02:23', '', 'Metro Bank', 'Shipping Outside Batangas'),
(14, 'erere', 'rer', 'dsdsd', 'sdsdsd', '', '[email protected]', 0, 150, 'Pending', 'MCK-UJG',
'sdsdsd', '13:02:21', '', 'BDO', 'Shipping Inside Batangas'),
(15, 'hanna', 'ventura', 'quezon city', 'candelaria', '', '[email protected]', 2147483647,
572, 'Pending', 'FGX-W0Y', 'candelaria ,Quezon City', '13:02:24', '', 'Metro Bank', 'Shipping Outside
Batangas');
101
CHAPTER 4
102
4.1 Testing Process & Methodology
Testing Process
The Testing process can be shown as:
Figure 4.1
Methodology
Testing is vital for the success of any software. no system design is ever perfect.
Testing is also carried in two phases. First phase is during the software engineering
that is during the module creation. Second phase is after the completion of software.
This is system testing which verifies that the whole set of programs hanged together.
103
4.2 Unit Testing
Unit testing is a level of software testing where individual units/ components of a
software are tested. The purpose is to validate that each unit of the software performs
as designed. A unit is the smallest testable part of any software. It usually has one or a
few inputs and usually a single output. In procedural programming, a unit may be an
individual program, function, procedure, etc. In object-oriented programming, the
smallest unit is a method, which may belong to a base/ super class, abstract class or
derived/ child class. (Some treat a module of an application as a unit. This is to be
discouraged as there will probably be many individual units within that module.) Unit
testing frameworks, drivers, stubs, and mock/ fake objects are used to assist in unit
testing.
As a rule, system testing takes, as its input, all of the "integrated" software components
that have passed integration testing and also the software system itself integrated with
any applicable hardware system(s). The purpose of integration testing is to detect any
inconsistencies between the software units that are integrated together
(called assemblages) or between any of the assemblages and the hardware. System
testing is a more limited type of testing; it seeks to detect defects both within the
"inter-assemblages" and also within the system as a whole.
104
4.5 Alpha/Beta Testing
Alpha Testing:
Acceptance testing is also sometimes called alpha testing. Be spoke systems are
developed for a single customer. The alpha testing proceeds until the system developer
and the customer agree that the provided system is an acceptable implementation of
the system requirements.
Beta Testing:
On the other hand, when a system isto be marked as a software product, another
process called beta testing is often conducted. During beta testing, a system is
delivered among a number of potential users who agree to use it. The customers then
report problems to the developers. This provides the product for real use and detects
errors which may not have been anticipated by the system developers.
105
CHAPTER 5
5.1 Conclusion
5.2 Limitation of the system
5.3 Future scope of modification
5.4 .1 H/W requirements
5.4.2 S/W requirements
5.5 References/ Bibliography
5.1 Conclusion
Our project is only a humble venture to satisfy the needs to manage their project work.
Several user friendly coding have also adopted. This package shall prove to be a
powerful package in satisfying all the requirements of the school. The objective of
software planning is to provide a frame work that enables the manger to make
reasonable estimates made within a limited time frame at the beginning of the software
project and should be updated regularly as the project progresses.
A description of the background and context of the project and its relation to
work already done in the area.
We describe the requirement Specifications of the system and the actions that
can be done on these things.
We understand the problem domain and produce a model of the system, which
describes operations that can be performed on the system.
106
We included features and operations in detail, including screen layouts.
Although I have put my best efforts to make the software flexible, easy to operate
but limitations cannot be ruled out even by me. Though the software presents a
broad range of options to its users some intricate options could not be covered into
it; partly because of logistic and partly due to lack of sophistication. Paucity of time
was also major constraint, thus it was not possible to make the software foolproof
and dynamic. Lack of time also compelled me to ignore some part such as storing
old result of the candidate etc.
Considerable efforts have made the software easy to operate even for the
people not related to the field of computers but it is acknowledged that a layman
may find it a bit problematic at the first instance. The user is provided help at each
step for his convenience in working with the software.
Excel export has not been developed for Canteen, Employee due to some
criticality.
The transactions are executed in off-line mode, hence on-line data for Employee
Meal, Meal Type capture and modification is not possible.
Off-line reports of Canteen, Canteen Staff, and Employee Meal cannot be
generated due to batch mode execution.
107
5.3 Future scope of modification
In a nutshell, it can be summarized that the future scope of the project circles
around maintaining information regarding:
The above mentioned points are the enhancements which can be done to increase
the applicability and usage of this project. Here we can maintain the records of
Company Canteen and Employee. Also, as it can be seen that now-a-days the players
are versatile, i.e. so there is a scope for introducing a method to maintain the Canteen
Management System. Enhancements can be done to maintain all the Company
Canteen, Employee, Employee Meal, Meal Type, and Canteen Staff.
We have left all the options open so that if there is any other future requirement in the
system by the user for the enhancement of the system then it is possible to implement
them. In the last we would like to thanks all the persons involved in the development
of the system directly or indirectly. We hope that the project will serve its purpose for
which it is develop there by underlining success of process.
108
5.4.1 S/W requirements
110
5.5 References/ Bibliography
https://www.w3schools.com/css/
https://www.w3schools.com/html
https://www.w3schools.com/php/default.asp
https://www.w3schools.com/sql/default.asp
111