1.1 Problem Statement: Laundry Management System
1.1 Problem Statement: Laundry Management System
Chapter 1
INTRODUCTION
A database management system (DBMS) refers to the technology for creating and managing
databases. DBMS is a software tool to organize (create, retrieve, update and manage) data in a
database. The main aim of a DBMS is to supply a way to store up and retrieve database
information that is both convenient and efficient. By data, we mean known facts that can be
recorded and that have embedded meaning. Normally people use software such as DBASE IV or
V, Microsoft ACCESS, or EXCEL to store data in the form of a database. Database systems are
meant to handle a large collection of information. Management of data involves both defining
structures for the storage of information and providing mechanisms that can do the manipulation
that stored information. Moreover, the database system must ensure the safety of the information
stored, despite system crashes or attempts at unauthorized access.
Presently the laundry shop utilizes a manual framework to record their client’s order information
and other information required for their business i.e today’s laundry business relies more on
manual labor, particularly for manual tagging/labeling and cataloging. Every time the customer
comes to the shop to their clothes for laundry, the staffs’ have to record their information. For
example their name, house address, mobile phone number using the traditional documenting
system. Another issue with the traditional documenting system is, it is hard to track or trace the
specific order. The application of a traditional system generates an extra workload for the
employees of the laundry shop to record, store and retrieve the customer and staff information.
Non-automated records of the customers are not sorted in proper order and it will take a longer
time for the staff to manage these records due to the mixing up of the data in the file. And also the
customers were required to wait for a longer time in front of the shop even during the peak time of
the business. This exhibits the inefficiency of the information system and it will lower the
productivity of the laundry business shop.
SQL is used to communicate with databases and it is the standard language for relational database
management systems. SQL statements are used to perform tasks such as creating, reading,
updating, and deleting relational databases and tables. Most of the RDBMS like MySQL, Oracle,
MS Access, Informix, and SQL Server use SQL as their standard database language.
HTML is the code that is used to structure the webpage and its contents. HTML is a mark-up
language that helps in creating websites that can be seen in a web browser on a desktop or mobile.
For example, content could be structured within the paragraphs, a list of the bullet points, or using
images or tables. The motive of the web browser is to pursue the HTML document files and
construct those files into perceptible web pages. The elements of the HTML document files build
up websites and it permits images and objects to be implemented and also can be used to create the
forms that can be interactive.
Cascading Style Sheet is a stylesheet language used to describe the presentation of a document
written in HTML or XML. CSS describes how the element should be rendered on the screen. CSS
is among the core languages of the open web and is standardized across web browsers according
to W3C specifications. It is used mainly to separate the document text material from document
2
Dept of CS&E, MITE, Moodbidri
Laundry Management System
styling. This upgrades the document text material accessibility, also it gives the overall control and
flexibility in the description of styling characteristics to be able to allow multiple pages to share
their characteristics among themselves and lessen the entanglement and recurrence in the
structural text material.
1.6 JQuery
JQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document
traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use
API that works across a multitude of browsers. JQuery requires much less code, has a wide range
of plugins all over the internet, and is easy to implement for web developers. It works in all
browsers, makes web pages more interactive, simple, and user-friendly.
1.7 XAMPP
XAMPP is a public opensource, cross-platform web server solution stack package developed by
Apache Friends, consisting mainly of Apache HTTP Server, MariaDB database, and interpreters for
the script written in PHP language. It is an uncomplicated, non-heavy weighted Apache distribution
that allows the software builders to build a localized web server for trial and deployment purposes.
3
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Chapter 2
Software Requirements
Hardware requirements
Software requirements
4
Dept of CS&E, MITE, Moodbidri
Laundry Management System
5
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Chapter 3
SYSTEM DESIGN
3.1 ER Diagram
An ER diagram shows the relationship among entity sets. In terms of DBMS, an entity is a table or
attribute of a table in the database, so by showing relationships among tables and their attributes,
ER diagram shows the complete logical structure of a database.
6
Dept of CS&E, MITE, Moodbidri
Laundry Management System
A schema diagram is a diagram which contains entities and the attributes that will define that
schema. A schema diagram only shows us the database design. It does not show the actual data of
the database. Schema can be a single table or it can have more than one table which is related.
.
7
Dept of CS&E, MITE, Moodbidri
Laundry Management System
8
Dept of CS&E, MITE, Moodbidri
Laundry Management System
9
Dept of CS&E, MITE, Moodbidri
Laundry Management System
10
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Chapter 4
IMPLEMENTATION
PHP: Hypertext Pre-processor (or simply PHP) is a server-side scripting language designed for
web development, and also used as a general-purpose programming language. PHP code may be
embedded into HTML code, or it can be used in combination with various web template systems,
web content management systems, and web frameworks. PHP code is usually processed by a PHP
interpreter implemented as a module in the web server or as a Common Gateway Interface (CGI)
executable. The web server combines the results of the interpreted and executed PHP code, which
may be any type of data, including images, with the generated web page. PHP code may also be
executed with a command-line interface (CLI) and can be used to implement standalone graphical
applications.
This project uses HTML as front-end tool. Hypertext Mark-up Language (HTML) is the standard
mark-up language for creating web pages and web applications. With Cascading Style Sheets
(CSS) and JavaScript, it forms a triad of cornerstone technologies for the world wide web. Web
browser receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages.HTML describes the structure of a web page semantically
and originally included cues for the appearance of the document.HTML elements are the building
blocks of HTML pages. With HTML constructs, images and other objects such as interactive
forms may be embedded into the rendered page.HTML provides a means to create structured
documents by structural semantics for text such as headings, paragraphs, lists, links, quotes and
other items.HTML elements are delineated by tags, written using angle brackets. Browsers do not
display the HTML tags, but use them to interrupt the content of the page.
<?php
$conn= new mysqli('localhost','root','','laundry_db')or die("Could not connect to
mysql".mysqli_error($con));
?>
Figure 4.1.1 Code Snippet of Connection Module
The above code snippet in Figure 4.1.1 is used for connecting purpose. This is used to connect back end and
11
Dept of CS&E, MITE, Moodbidri
Laundry Management System
front end. If the connection fails then a message occurs saying could not connect to mysql.
function login()
{
extract($_POST);
$qry = $this->db->query("SELECT * FROM users where username = '". $username . "'
and password = '" . md5($password) . "' ");
if ($qry->num_rows > 0) {
foreach ($qry->fetch_array() as $key => $value) {
if ($key != 'passwors' && !is_numeric($key))
$_SESSION['login_' . $key] = $value;
}
return 1;
} else {
return 3;
}
}
Gjh
function logout()
{
session_destroy();
foreach ($_SESSION as $key => $value) {
unset($_SESSION[$key]);
}
header("location:login.php");
}
Ghj
function save_user()
{
extract($_POST);
$data = "name='$name'";
$data .= ",username='$username'";
$data .= ",password='".md5($password)."'";
$data .= ", type = '$type' ";
if (empty($name) || empty($username) || empty($password)) {
return 0;
}
if (empty($id)) {
$qry = $this->db->query("SELECT * FROM users where $username='".$username."'");
12
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Yf
function delete_user(){
extract($_POST);
if ($id == $_SESSION['login_id']) {
return 2;
} else {
$delete = $this->db->query("DELETE FROM users where id = " .$id);
}
if ($delete)
return 1;
}
Hhj
function save_category(){
extract($_POST);
$data = " name = '$name' ";
$data .= ", price = '$price' ";
if (empty($id)) {
$save = $this->db->query("INSERT INTO laundry_categories set " . $data);
return 1;
} else {
$save = $this->db->query("UPDATE laundry_categories set " . $data . " where
13
Dept of CS&E, MITE, Moodbidri
Laundry Management System
id=" . $id);
return 2;
}
}
Cdc
function delete_category(){
extract($_POST);
$delete = $this->db->query("DELETE FROM laundry_categories where id = " .$id);
if ($delete)
return 1;
else
return 2;
}
function save_supply(){
extract($_POST);
$data = " name = '$name' ";
if (empty($id)) {
$save = $this->db->query("INSERT INTO supply_list set " . $data);
} else {
$save = $this->db->query("UPDATE supply_list set " . $data . " where id=" .
$id);
}
if ($save)
return 1;
}
D
function delete_supply(){
extract($_POST);
$delete = $this->db->query("DELETE FROM supply_list where id = " . $id);
if ($delete)
return 1;
}
Ughjg
14
Dept of CS&E, MITE, Moodbidri
Laundry Management System
function save_laundry(){
extract($_POST);
$data = " customer_name = '$customer_name' ";
if (isset($status))
$data .= ", status = '$status' ";
if (empty($id)) {
$queue = $this->db->query("SELECT `queue` FROM laundry_list where status != 3
order by id desc limit 1");
$queue = $queue->num_rows > 0 ? $queue->fetch_array()['queue'] + 1 : 1;
$data .= ", queue = '$queue' ";
$data .= ", total_amount = '$tamount' ";
$data .= ", remarks = '$remarks' ";
$save = $this->db->query("INSERT INTO laundry_list set ".$data);
if ($save) {
$id = $this->db->insert_id;
foreach ($weight as $key => $value) {
$items = " laundry_id = '$id' ";
$items .= ", laundry_category_id = '$laundry_category_id[$key]' ";
$items .= ", weight = '$weight[$key]' ";
$items .= ", unit_price = '$unit_price[$key]' ";
$items .= ", amount = '$amount[$key]' ";
$save2 = $this->db->query("INSERT INTO laundry_items set ".$items);
}
return 1;
}
} else {
// $data .= ", queue = '$queue' ";
$data .= ", total_amount = '$tamount' ";
$data .= ", remarks = '$remarks' ";
$save = $this->db->query("UPDATE laundry_list set ".$data." where id=".$id);
if ($save) {
// $this->db->query("DELETE FROM laundry_items where id not in
(".implode(',', $item_id).") ");
$this->db->query("DELETE FROM laundry_items where id in(".implode(',',
$item_id).")");
foreach ($weight as $key => $value) {
$items = " laundry_id = '$id' ";
$items .= ", laundry_category_id = '$laundry_category_id[$key]' ";
$items .= ", weight = '$weight[$key]' ";
$items .= ", unit_price = '$unit_price[$key]' ";
$items .= ", amount = '$amount[$key]' ";
if (empty($item_id[$key]))
$save2 = $this->db->query("INSERT INTO laundry_items set "
.$items);
else
$save2 = $this->db->query("UPDATE laundry_items set " .$items. "
where id=" .$item_id[$key]);
}
return 1;
15
Dept of CS&E, MITE, Moodbidri
Laundry Management System
}
}
}
Fgf
function delete_laundry(){
extract($_POST);
$delete = $this->db->query("DELETE FROM laundry_list where id = " . $id);
if ($delete)
return 1;
}
Ugh
function save_inv(){
extract($_POST);
$invqry = $this->db->query("SELECT * FROM inventory where id = '" . $id . "' ");
$avl = $invqry->fetch_assoc();
$act_qty = $avl['qty'];
$data = " supply_id = '$supply_id' ";
$act_avl = 0;
if ($stock_type == 2) {
if ($avl['available'] < $qty)
return $qty;
else
$act_avl = $avl['available'] - $qty;
}
if ($stock_type == 1) {
$act_avl = $avl['available'] + $qty;
$act_qty += $qty;
}
if ($act_avl <= 0) {
$act_avl = 0;
$stock_type = 2;
} else {
$stock_type = 1;
}
$data .= ", qty = '$act_qty' ";
$data .= ", available = '$act_avl' ";
$data .= ", stock_type = '$stock_type' ";
if (empty($id)) {
$save = $this->db->query("INSERT INTO inventory set " . $data);
} else {
$save = $this->db->query("UPDATE inventory set " . $data . " where id=" . $id);
}
if ($save)
return 1;
}
16
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Cjbdc
function delete_inv(){
extract($_POST);
$delete = $this->db->query("DELETE FROM inventory where id = " . $id);
if ($delete)
return 1;
}
s
17
Dept of CS&E, MITE, Moodbidri
Laundry Management System
})
18
Dept of CS&E, MITE, Moodbidri
Laundry Management System
res.status(406).send({
error:"Email does not match with the password or the email is
not registered"
})
}
}
})
})
19
Dept of CS&E, MITE, Moodbidri
Laundry Management System
C
ode snippet for deleting the jobs
20
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Code snippet for fetching all the jobs uploaded by the Employer
21
Dept of CS&E, MITE, Moodbidri
Laundry Management System
"email": result[0].email,
"type": "Seekers",
"companyId": result[0].companyId
}
res.cookie('user', await generateJWT(req.session.user), {
maxAge: 86400000
})
req.session.loggedIn = true
res.sendStatus(202)
} else {
res.status(406).send({
error: "Email does not match with the password or the
email is not registered"
})
}
} else {
res.status(406).send({
error: "Email does not match with the password or the
email is not registered"
})
}
}
})
})
})
}
if (password !== passwordConfirm) {
return res.status(406).send({
error: "Passwords do not match"
})
}
const hashPassword = await bcrypt.hash(password, 8)
connection.query('select * from Seekers where email = ?', [email], async
(err, result, fields) => {
if (err) {
console.log(err)
res.sendStatus(500)
} else {
if (result.length > 0) {
return res.status(406).send({
error: "Email already exists"
})
}
connection.beginTransaction((err) => {
if (err) {
console.log(err)
return res.sendStatus(500)
}
connection.query('insert into Seekers (name, email, password,
age, phone, description, pincode, gender) values (?, ?, ?, ?, ?, ?, ?, ?)',
[name, email, hashPassword, age, phone, description, pincode, gender], async
(err, result, fields) => {
if (err) {
res.sendStatus(500)
console.log(err)
return connection.rollback()
} else {
var sql = ''
workCategory.forEach((item) => {
sql += `insert into Seeker_Work_Category
(seeker_id, field) values (${result.insertId}, '${item}');`
})
connection.query(sql, async (err, result, fields) => {
if (err) {
res.sendStatus(500)
console.log(err)
return connection.rollback()
} else {
connection.commit(async (err) => {
if (err) {
res.sendStatus(500)
console.log(err)
return connection.rollback()
}
verifyEmail =
'https://jobsearching.sathvikks.com/verify/' + await generateJWT({
email,
"db": "Seekers",
"time": new Date()
})
sendWelcomeMail(email, name, verifyEmail)
24
Dept of CS&E, MITE, Moodbidri
Laundry Management System
res.sendStatus(201)
})
}
})
}
})
})
}
})
})
25
Dept of CS&E, MITE, Moodbidri
Laundry Management System
26
Dept of CS&E, MITE, Moodbidri
Laundry Management System
27
Dept of CS&E, MITE, Moodbidri
Laundry Management System
}
res.status(200).send(result)
})
})
29
Dept of CS&E, MITE, Moodbidri
Laundry Management System
30
Dept of CS&E, MITE, Moodbidri
Laundry Management System
})
})
connection.beginTransaction((err) => {
if (err) {
console.log(err)
return res.sendStatus(500)
}
connection.query('delete from JobApplications where seekerId = ? and
jobId = ?', [sid, jid], async (err, result, fields) => {
if (err) {
console.log(err)
res.sendStatus(500)
return connection.rollback()
}
if (req.params.mode === ":Accept") {
sendJobApplicationAcceptanceStatusMail(email, sname, jname,
'Accepted')
connection.query('update Seekers set companyId = ? where id =
?', [cid, sid], async (err, result, fields) => {
if (err) {
console.log(err)
res.sendStatus(500)
return connection.rollback()
}
connection.commit((err) => {
if (err) {
res.sendStatus(500)
32
Dept of CS&E, MITE, Moodbidri
Laundry Management System
console.log(err)
return connection.rollback()
}
})
})
} else if (req.params.mode === ":Reject") {
sendJobApplicationAcceptanceStatusMail(email, sname, jname,
'Rejected')
}
res.sendStatus(200)
})
})
})
res.sendStatus(202)
}
})
}
}
})
}
})
companyData.push(company)
}
res.status(200).send(companyData)
}
})
})
35
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Chapter 5
TESTING
Software testing is the process of used to identify the correctness, security, completeness and
quality of developed computer software. This includes the process of executing the program or
applications with the intent of finding errors. An individual unit, functions or procedures of
developed project is verified and validated and these units are fit for use.
5.1 Testing process
Best testing process is to test each subsystem separately, as we have done in project. Best done
during implementation. Best done after small sub-steps of the implementation rather than large
chunks. Once each lowest level unit has been tested, units are combined with related units and
retested in combination. This proceeds hierarchically bottom-up until the entire system is
tested as a whole. Typical levels of testing:
● Acceptance testing- whole system with real data (involve customer, user, etc)
Alpha testing is acceptance testing with a single client (common for bespoke systems).
System testing tests a completely integrated system to verify that it meets its requirements.
After the completion of the entire module they are combined together to test whether the entire
project is working properly.
Table 5.2 represents the test case for sign up module. It shows both successful and
unsuccessful results for the test cases.
37
Dept of CS&E, MITE, Moodbidri
Laundry Management System
Chapter 6
SNAPSHOT
Home page
Login Page
38
Dept of CS&E, MITE, Moodbidri
Laundry Management System
39
Dept of CS&E, MITE, Moodbidri
Laundry Management System
CONCLUSION
40
Dept of CS&E, MITE, Moodbidri
Laundry Management System
The introduction of an online platform thus makes it easy for the company to advertise their
company to the world, for employers to add the jobs available in their company and accept the
applications from the seekers, for seekers to find their job of interest.
41
Dept of CS&E, MITE, Moodbidri
Laundry Management System
[2] https://www.w3schools.com/
[3] https://www.geeksforgeeks.org/
[4] https://www.npmjs.com/
42
Dept of CS&E, MITE, Moodbidri