Product Expiry Alert Management System
Product Expiry Alert Management System
TERMS OF USE
1
Visit: https://sparklyn.com.ng/project-and-seminar-
materials
2
APPROVAL PAGE
has been read and approved for the award of (Degree, ND, or HND) in
………………………………… ………………………….
(Project Supervisor)
………………………………… ………………………….
(Head of Department)
3
DEDICATION
This work is dedicated to God for his enabling grace, and to all computer
4
ACKNOWLEDGEMENT
department of (Your Department) for their moral support that facilitated the
5
TABLE OF CONTENTS
PRELIMINARY PAGES
Title page
Approval page
Dedication
Acknowledgement
Table of Contents
Abstract
CHAPTER ONE
INTRODUCTION
1.1 Introduction
CHAPTER TWO
6
LITERATURE REVIEW
2.1 Introduction
CHAPTER THREE
7
3.3.1 Data Flow Diagram of the Proposed System
CHAPTER FOUR
8
4.7 Implementation Techniques
4.8.1 Installation
CHAPTER FIVE
5.1 Introduction
5.2 Summary
5.3 Conclusion
5.4 Recommendation
REFERENCES
9
ABSTRACT
The Product expiration management system notifies/alerts the store manager on products
expiring soon for prompt attention and decision. The aim of the study is to design and
implement a Product Expiry Alert Management System. In achieving this aim, the following
objectives were set out to develop the easy management of the inventory and handle the
inventory details like purchase details, manufacturer details and expiration dates of Products.
The motivation that led to the implementation of the proposed system is as a result of the
manually taking stock of products by small scale/medium scale business owners are still prone
to human errors. When consumers are exposed to expired products, they may have various
health challenges ranging from stomach upsets to food poisoning.
The methodology adopted in this study is the structure system analysis and design methodology
(SSADM) which is a technical approach for analyzing and designing an application or system
by applying object oriented programming as well as visual modeling throughout the software
development process. The programming language used is HTML, CSS, JAVASCRIPT, PHP,
SQL and JQUERY. The reason why web programming languages was used is because, it is
platform independent and it is a web based application.
The system can aid Shop owners and managers make prompt and informed decisions of
products that are about to expire. Clearance sales, Immediate Consumption of Products,
Gifting of Product etc. could be good measures that can be taken to minimize loss to the
business or prevent health hazards to consumers. The expected result is an online product
expiry system that will keep a record of product brought to the store, calculate the loss on
expired products and detect about to expire and expired products in the store.
10
CHAPTER ONE
INTRODUCTION
1.1 Introduction
Products are considered as the business resources for the organization. This includes managing
the product with appropriate way to review any time as per the requirement. Therefore, it is
important to have a web-based Product Expiration System which has the ability to generate
reports, report products expiry dates, maintain the balance of the stock, details about the
purchase and sales in the organization, which helps to minimize loses to the business or
negative health hazards to consumers. These web applications can be used by large or small
business organization for the management of their stock in the production houses. After
analyzing the other Product Expiration systems, we decided to include some of common and
key features that should be included in every Product Expiration system. The Product
Expiration System is a complete web-based application designed with HTML, CSS and PHP
technology. The main aim of the project is to develop Product Expiration System Model
software in which all the information regarding the stock of the organization will be presented.
It is an internet based application which has admin component to manage the inventory and
maintenance of the inventory system. This application is based on the management of stock of
an organization. The application contains general organization profile, sales details, Purchase
details and expiration dates presented in the organization. There is a provision of updating the
inventory also.
11
1.2 Statement of the Problems
Health hazards to consumers and huge loss to businesses have been the major challenges posed
by expired products. Manually taking stock of products by small scale/medium scale business
owners are still prone to human errors. When consumers are exposed to expired products, they
may have various health challenges ranging from stomach upsets to food poisoning (which
Apart from law suits the shop owner may face, he/she will be losing money if the products in
These challenges are the main reasons the researcher sought to develop a computerized system
that notifies shop owners and managers of impending products that are about to expire. This
system is significant in the sense that it will curb loses and prevent health hazards to
consumers.
The aim of the study is to design and implement a Product Expiry Alert Management System.
2. To handle the inventory details like purchase details, manufacturer details and expiration
dates of Products.
12
5. To detect about to expire and expired products in the store.
To develop a web Product Expiration system to assist business owners take stock and regulate
product expiring dates, solves the tedious work and activities in calculating and taking stocks
of large product for large business owners in which they end up missing expiry dates, mis-
calculating and discarding some important figures, with this Inventory system, business owners
can now take stock, check product expiration dates, calculate their products left with just a
click.
The system can aid Shop owners and managers make prompt and informed decisions of
products that are about to expire. Clearance sales, Immediate Consumption of Products, Gifting
of Product etc. could be good measures that can be taken to minimize loss to the business or
The study will focus primarily on Shoprite Mall Enugu. Product Expiration System is targeted
to the small or medium organization which doesn’t have proper records of their products, also
for those organizations that deals with products that expire, a proper system to keep track of
During the course of this study, many things militated against its completion, some of which are:
13
1. Time Constraint: The time frame given to accomplish this project was very short due to
school academic calendar and it was carried out under pressure which made the researcher
are not ready to release information needed for this project work. There were lots of
information needed from the staffs of this institution to enhance the study which took them
time to release or they did not release at all for security purposes, hence the scope was
reduced.
Inventory: A complete list of items such as property, goods in stock, or the contents of a
building/ warehouse.
Stock: The goods or merchandise kept on the premises of a shop or warehouse and available
Expiring date: Date of shelf life of a product. Might still be safe, but quality is no longer
guaranteed.
Web Application: A web application is a computer application program that utilizes web
14
CHAPTER TWO
LITERATURE REVIEW
2.1 Introduction
This chapter focuses on the review of related literature. A literature review includes the current
documents the state of the art with respect to the topic you are writing. It surveys the literature
in the topic selected. In this research work the literature review includes the concept of alert
system, concept of alert messaging, alerts and spam, product recall, alarm device, history and
development of alarm device, theoretical framework, cloud storage, and smartphone app.
software and hardware that provides a means of delivering a message to a set of recipients
(Philip, 2021). It commonly shows activity related to an account. Such systems constitute an
important aspect of modern Web applications (Philip, 2021). For example, a notification
system can send an e-mail announcing when a computer network will be down for a scheduled
maintenance. The complexity of the notification system may vary. Complicated notification
systems are used by businesses to reach critical employees. Emergency notification systems
may take advantage of modern information technologies. Governments use them to inform
15
In mobile phones and smartphones, dedicated hardware such as a notification LED is
According to Mallawaarachchi et al., (2020), alert messaging (or alert notification) is machine-
Alert messaging emerged from the study of personal information management (PIM),[citation
needed] the science of discovering how people perform certain tasks to acquire, organize,
maintain, retrieve and use information relevant to them. Alert notification is a natural evolution
of the concept of RSS which makes it possible for people to keep up with web sites in an
automated manner. Alerting makes it possible for people to keep up with the information that
Alerts are typically delivered through a notification system and the most common application
services via email or SMS. More advanced systems (for example AOL) provides users with the
choice of selecting a preferred delivery channel such as e-mail, Short Message Service (SMS),
instant messaging (IM), via voice through voice portals, desktop alerts and more. Novel
approaches provide users with the ability to schedule their own alerts (for example Google
Calendar). The most sophisticated service providers embrace all capabilities, aggregating a
multitude of reminder, notifications and alert, catering the delivery system to the specific
context of the content being delivered thus enabling users to create sophisticated scenarios
(Von, 2020).
16
2.4 Alerts and Spam
The notion of content being delivered to users has received negative connotation over the
years[citation needed] and is sometimes labeled as spamming, particularly for information that
hasn't been requested by the user. The advent of technologies such as RSS and now alert
notification are an effort directed to creating an antithesis to spam: the information being
product after the discovery of safety issues or product defects that might endanger the
The recall is an effort to limit ruination of the corporate image and limit liability for corporate
negligence, which can cause significant legal costs. It can be difficult, if not impossible, to
determine how costly can be releasing to the consumer a product that could endanger
someone's life and the economic loss resulting from unwanted publicity. Recalls are costly.
Costs include having to handle the recalled product, replacing it and possibly being held
financially responsible for the consequences of the recalled product (Williams, 2007).
A country's consumer protection laws will have specific requirements in regard to product
recalls. Such regulations may include how much of the cost the maker will have to bear,
situations in which a recall is compulsory (usually because the risk is big enough), or penalties
17
for failure to recall. The firm may also initiate a recall voluntarily, perhaps subject to the same
According to Gillings (2017), an alarm device is a mechanism that gives an audible, visual or
other kind of alarm signal to alert someone to a problem or condition that requires urgent
Early alarm devices were often bells, drums, other musical instruments, or any items which
made unusual loud noises that attracted the attention of the surrounding population. Whistles
were used by police in the 19th century. Steam whistles have been used on locomotives, ships,
and in factories as alarm devices. With the advent of electricity, a variety of other alerting
devices have been invented, such as buzzers, klaxons, sirens, horns, flashing and coloured
lights, and other all-purpose alarms. Alarm devices can be fitted to buildings as well as
vehicles. Many buildings are fitted with fire alarms, ranging from a self-contained domestic
smoke detector to a sophisticated alarm system that can operate building fire fighting systems
automatically to extinguish fires with water or inert gases. Many industries have developed
standards for alarm devices, and the colours red, blue and amber are generally recognized as
alarm device-related colours, with flashing lights often indicating urgent conditions (Gillings,
2017).
18
Several apps have been recently developed to generate reminders for the expiry date. In the app
in (Best Before Manager app, 2020), the user needs to manually enter the product name,
purchase date, expiration date, and it generates reminders several days before the expiration
date. However, this manual entry of each purchased product’s name and expiration date are
tiresome, time-consuming, and not efficient. The app in attempts to develop an easier way for
entering the product information by only scanning the barcode of the product using the
smartphone’s camera. However, the table for converting the barcode to the product name is not
available in the app, rather the table needs to be manually created by the user for all the
products he/she uses, which is an overhead (Best Before TPP app, 2020).
Samsung recently introduced the Family Hub refrigerator (Samsung Family Hub refrigerator,
2020), which has 3 cameras to take images of items inside the refrigerator and a large display
unit connected to the refrigerator. The user can manually set expiry dates of the items that are
visible by the cameras using drag-drop reminder notes. This method involves manual entry and
cannot be used in a fridge where many items are not visible by the front cameras. A concept of
QR fridge magnets to keep track of food’s expiration dates is reported in (Darell, 2013). Each
QR fridge magnet device is used to track one product’s expiry date only and the device has a
processor, display, and QR code scanner hardware. This idea involves purchasing of several
Compared with these related works, the proposed work seeks to provide the ease of entry of
data just by scanning a single QR code on the receipt. The expiry dates are made accessible to
Google Home, thus it can answer questions related to expiry dates – making a step forward for
19
The Firebase cloud storage platform is used to store the <ReceiptNumber>.csv files in the
cloud. Firebase storage is a powerful, simple, and Exabyte scale object storage solution. Files
can be uploaded, downloaded, and deleted using the Firebase software development kit (SDK)
functions from the desktop, mobile, and web platforms. The Firebase SDKs add Google
security to file uploads and downloads for Firebase apps. Firebase provides a declarative rules
language that allows controlling the read, write, and delete access so that the storage is
The app is designed for the Android platform. The first screen of the app contains a list-view
box. Each record in the list-view box shows the name of the item, days remaining to expire or
how many days ago it expired, and the actual expiry date. The app contains a settings menu
where days before notification, Days before Notification, and notification hour of the day,
Notification Hour, can be set. The user can also choose notification properties such as sound,
The user gets a receipt from the store where the smart expiry QR code is printed. The app
contains a button on the first screen for scanning the QR code. When the button is pressed, the
front camera is turned on for scanning the QR code. A QR code reader library is used in the
app. It decodes the code and outputs the message contained in the QR code in a string. The
string contains the ReceiptNumber. Then a service is started for downloading the
<ReceiptNumber>.csvfile from the Firebase cloud. After the file is downloaded, the contents of
20
Then, the product names and the expiry dates are parsed from each record in the list, and
events are added in the calendar on those expiry dates at NotificationHour using Google
calendar library. The title of the calendar events contains the product name concatenated with
the word “expiring”. The list is then appended to the existing list that is already stored on the
local phone. Then the list is sorted based on the number of remaining days to expire from the
current date. Bubble sort is used for sorting the records. Then the list-view box on the front
screen is updated with the contents of the updated list (Jones, 2004).
5yu
21
Figure 2.1: (a) Checkout operator computer with a barcode scanner and a receipt printer; (b)
Screenshot of checkout operator app; (c) printed receipt with smart expiry QR code
The QR code in the receipt is scanned by the smartphone app by the customer as shown in Fig.
2.1 (a). This action causes the expiry dates with product names to be downloaded from the
cloud to the phone. A screenshot of the smartphone app is shown in Fig. 2.1 (b) after the QR
code has been scanned. Here, each row of the list-view box shows the name of the item, days
remaining to expire or how many days ago it expired, and the actual expiry date. The app
generates notifications for the soon-expiring items by calculating the date difference between
22
23
24
Figure 2.2: (a) Screenshot of the Google calendar app showing the expiring items; (b) Google
Home can tell the expiring item names and dates when the voice command is issued.
25
CHAPTER THREE
The structured system analysis and design methodology (SSADM) was adopted for the analysis,
design and implementation of this system. Structured systems analysis and design methodology
(SSADM) is a set of standards for systems analysis and application design. It uses a formal
SSADM follows the waterfall life cycle model starting from the feasibility study to the physical
design stage of development. One of the main features of SSADM is the intensive user
involvement in the requirements analysis stage. The users are made to sign off each stage as they
are completed assuring that requirements are met. The users are provided with clear, easily
SSADM breaks up a development project into stages, modules, steps and tasks. The first and
foremost model developed in SSADM is the data model. It is a part of requirements gathering
and consists of well defined stages, steps and products. The techniques used in SSADM are
logical data modeling, data flow modeling and entity behavior modeling.
a) Logical Data Modeling: This involves the process of identifying, modeling and
documenting data as a part of system requirements gathering. The data are classified
b) Data Flow Modeling: This involves tracking the data flow in an information system. It
clearly analyzes the processes, data stores, external entities and data movement.
c) Entity Behavior Modeling: This involves identifying and documenting the events
influencing each entity and the sequence in which these events happen.
26
3.1.1 Problem Identification Using SSADM
a. Feasibility Study: This assumes that the proposed project has been identified as a result of
an exercise such as strategic planning and sets out to evaluate the various technical,
organizational, financial and business options available. The aim is to establish the whether
the direction and requirements of the project are feasible. The aim is to evaluate the
feasibility of the proposal, involving an analysis of the problem and determination of the
the data requirements of the system being designed. The result is a data model containing
entities (things about which a business needs to record information), attributes (facts about
c. Business System Option (BSO): A BSO defines the functional scope of a proposed
solution. At its most basic level it consists of textual descriptions of those requirements
satisfied by the solution. All BSOs must satisfy the minimum requirement as identified by
user representatives.
d. Requirement Certification: Requirement Certificate aims to equip the learner or end user
(client) with the advanced knowledge of project management and will enable the learner to
understand the system requirement to uphold the project management required parameters.
and technical man power for the development and running of the new system. Hence the
system is technically feasible as the requirement can be met without stress and much
27
Development Environment for web based applications, a standard PC for running this
application, a local server and an up to date web browser for testing. As a programmer, the
researcher can provide these requirements with ease and as such, this project is technically
feasible.
f. Logical Design: Technical system options are production and logical design updates and
g. Physical Design: physical database design and a set of program specifications Program
specifications are using the logical system specification and the technical system
specification.
a. Input Analysis: The input of layout of the existing system comprises user intervention
such as; filling of product request form, opening account and login into system.
b. Process Analysis: The customer is registered and being given account number, when the
customer wants to order a new product, the customer enters the product NAFDAC number
in the provided field and information related to that NAFDAC number is displayed if the
information matches the product’s information, the customer then proceed to choose the
c. Output Analysis: The output from the system designed is generated from the system
28
3.2.1 Dataflow of the Existing System
Process Analysis
Product Form Produce Result
Process Request
Opening Account Generate Report
29
3.2.3 Weakness of the Existing System
The following are the weakness of the existing system which is stated as follows:
1. System Crash: One of the biggest problems with any computerized system is the potential
for a system crash. A corrupt hard drive, power outages and other technical issues can
result in the loss of needed data. At the least, businesses are interrupted when they are
unable to access data they need. Business owners should back up data regularly to protect
2. Malicious Hacks: Hackers look for any way to get company or consumer information. An
vendors or clients. Updating firewalls and anti-virus software can mitigate this potential
issue.
consuming physical inventory audits. They may no longer seem necessary when the
computers are doing their work. However, it is important to continue to do regular audits to
identify loss such as spoilage or breakage. Audits also help business owners identify
The new system executes firstly, by prompting non user (guest) to sign up first before the user
will be able to use the authentication system. During registration, some activities are executed at
the backend which are data binding and abstraction, transfer of system user data to the system
database, and NAFDAC verification and validation process is also carried out during the
registration process. Some security checks are made during the user authentication validation, if
30
user identity or password is incorrect the system will report an error, otherwise the user will be
granted access to use the system. The Product Expiration request procedure is achieved by
clicking on the Product Expiration button and a pop up dialog box will be display for interaction
purpose. Thereafter, a tracking number, state and status of the product will be published in the
The Administrators function in the system is to enable, delete, activate product with the aid of
In the existing system of checking product expiration date, customers will have to go to the
manufacturer’s premises and queue up, in order to meet with the customer care of the bank to
verify the product actual expiration date via form submission. This process which is stressful to
the customer and the customer care, it also involves the customer spending both time and money
31
3.3.1 Data Flow Diagram of the Proposed System
Success / Failure
PRODUCT TABLE USER
Success / Failure
Sends Details
Registration Details
REGISTER
Request Date
PRODUCT TABLE PRODUCT
Guest User
REGISTER TABLE Account USE ACCOUNT
The following are the advantages of the proposed Product Expiry Management System;
32
1. Easy management of the inventory.
Product Expiration System Model software in which all the information regarding the stock of
the organization will be presented. It is an internet based application which has admin
component to manage the inventory and maintenance of the inventory system. Products are
considered as the business resources for the organization. This includes managing the product
with appropriate way to review any time as per the requirement. Therefore, it is important to
have a web-based Product Expiration System which has the ability to generate reports, report
products expiry dates, maintain the balance of the stock, details about the purchase and sales in
the organization, which helps to minimize loses to the business or negative health hazards to
consumers.
Health hazards to consumers and huge loss to businesses have been the major challenges posed
by expired products. Manually taking stock of products by small scale/medium scale business
owners are still prone to human errors. When consumers are exposed to expired products, they
may have various health challenges ranging from stomach upsets to food poisoning (which may
result to death). Apart from law suits the shop owner may face, he/she will be losing money if
33
These challenges are the main reasons the researcher sought to develop a computerized system
that notifies shop owners and managers of impending products that are about to expire. This
system is significant in the sense that it will curb loses and prevent health hazards to consumers.
The following figure 3.4 shows the various modules involved in the system and available to
users who have limited access and to the Admin who have full access to the system.
Update Record
Activate Account
END-
USER
Open Account
34
3.5 Data Requirements
The following are the data requirements of new and existing users in the system. New users are
required to create an account by providing some necessary information, while existing users can
directly request product expiration date by providing their Account Information required by the
system.
a. Email Address: The user's email address is required during registration and subsequent
b. Password: The user is required to enter a secured password or pin during registration and
c. User Name: The user is required to enter a nickname which he/she will be addressed as
d. Account Name: This field contains the account name of the system user.
e. Phone Number: This field contains the phone number of the system user.
f. Passport: This field contains the photograph or picture of the account holder or system
user.
35
3.6 High Level Model of the Proposed System
Update Record
Open Account
Validate NAFDAC No.
Login to Account
36
CHAPTER FOUR
The following are the objectives of the proposed Product Expiry Management System;
Admin
37
Client
(User)
38
4.3 Control Center / Overall Dataflow Diagram
Process
Result to screen
Disk storage Report (output)
39
4.3.1 Proposed System Operation Flowchart
Description: The diagram below entails the proposed system operation flowchart
Start
Enter NAFDAC No
Confirm No.
NO
Are answers correct? Display Error message
YES
Send Request
Save
Stop
Figure 4.4: Proposed System Operation Flowchart
40
4.1 System Specification and Design
Description: The diagram below entails the Input and Output Specification of the proposed
system.
Customer
ID:
Enter Phone Number
Password:
Enter Password
Figure 4.5:
SignInput
In Specification for Login
Register HereSystem
Request
Now!
Figure 4.6: Input Specification for Product Expiry Management System
41
Logo Product Expiry Date Logout
Check Date
The Product Expiry Management System database contains four (4) tables which are country
table, product table, register table and expiry date request table:
42
Table 4.2: Product Table Structure
The data dictionary table contains the list of field and their description used in the database table
structure designation.
43
Table 4.5: Product table structure
44
22. Pass It contains the end-user’s password / pin
To ensure a standardized object oriented program in its entire ramification, HTML, CSS,
JAVASCRIPT, PHP and MYSQL Database was used in the development of Product Expiry
Management System. These entire programs are used to ensure effective program. The motive
behind the use of the language is its compatibility with several Operating Systems. It is object
oriented and combines the feature of hypertext Preprocessor (PHP) and JavaScript platform
thereby making it to run on any Operating System. It is secured in that it does not cause harm to
user’s system and access to information is restricted. The language is simple and easy to learn.
HTML: HTML is a markup language for describing web documents (web pages).
CSS: stands for Cascading Style Sheet, it describes how HTML elements are to be displayed on
screen, paper, or in other media. CSS saves a lot of work. It can control the layout of multiple
web pages all at once and External style sheets are stored in CSS files
JAVASCRIPT: JavaScript is the programming language of HTML and the Web. Programming
makes computers do what you want them to do. JavaScript is easy to learn.
45
Hypertext Preprocessor (PHP): PHP is a server scripting language, and a powerful tool for
making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative
MYSQL: SQL is a standard language for accessing and manipulating databases. SQL stands for
Structured Query Language, SQL lets you access and manipulate databases, and SQL is an ANSI
(American National Standards Institute) standard. SQL can perform the following task;
The main purpose of program documentation is to describe the design of your program. The
documentation also provides the framework in which to place the code. As coding progresses,
the code is inserted into the framework already created by the program documentation. The
1. README file which contains a brief description of the project, installation instructions, a
short example/tutorial,
46
2. Document your code which comprises application of coding conventions, such as file
3. Version of the files along with the major edits you did in each version
The software Implementation is a process carried out to make changes on the tested programs
developed in the system. The software will be installed successfully if the hardware requirement
and the software requirement are available. The following phase contains how the software was
implemented successfully;
1) Coding: The coding system has been developed to meet the following main objectives;
2. To handle the inventory details like purchase details, manufacturer details and expiration
dates of Products.
2) File conversion: During file setup it is necessary to convert the existing master file to a new
page. This new form is the responsibility of the newly designed, which undergoes the process of
newly designed system is put in place of the old system by the organization after been tested and
documented to prove that it is working. It is a significant milestone after which the ownership of
47
the system if been officially transferred from the researcher (analyst) and the programmer to the
end user.
The under listed are various system conversion briefly described to enable the implementation
process.
a. Parallel System of Conversion: This takes place simultaneously at the same time, runs
between the old and new system until probably the new system is completely put in
b. Direct System of Conversion: This takes place automatically at a time over a short
period of time. It saves cost, manages time and enhances fast operation but finds to a
3) Changeover Procedure:
This is the process of changing from the former or previous system to the new system. In a
changeover procedure, the organization change from the existing system to new system. This can
a. Parallel Changeover: This is the process of running the two systems simultaneously and
comparing their results until the new system proves satisfactory; after which the use of
b. Direct Changeover: This is the case whereby the new system replaced the old system
immediately after development and when it must have proved successful. This procedure
c. Phased Changeover: In phased changeover method, the system usually starts with one
unit or department of the organization. The advantage is that the organization would
48
4) Commissioning: This is the process of ensuring that installed systems are functionally tested
evaluation of the system in order to give the desired or necessary improvement. It includes
monitoring the process of the other stages of system development to ensure that the development
plan and objective are being accomplished. There are three types of system maintenance which
include;
a. Corrective Maintenance: This covers maintenance, which is needed to put right coding
errors and other faults, which may be introduced into the software. It include, the routine
“debugging” of newly produced or recently amended code and emergency error correction
b. Adaptive Maintenance: This covers the changes which are made to the software to meet
c. Preventive Maintenance: This covers attempts to make the software perform more
changes to make the software more easy to use and rewrite the code to make the
maintenance that is specifically used for the new system to reduce its chances of breakages.
4.8.1 Installation
The following are the steps required for the installation of the new Product Expiry Management
System;
49
Installing Software from the CD Drive or Flash Drive
Step 2: Copy the “product-expiry-system” folder and paste in your WAMP server Path to Paste
Step 3: Turn on your Window Apache MySQL and PHP (WAMP Server 2.4)
Step 5: Type in this URL below on your address bar of your browser
localhost/phpmyadmin/
Step 6: Ensure the username is root and password is empty before clicking on Go button
Step 7: Click on Import and Browse your computer to search for product.db
Path: C: \wamp\www\product-expiry-system\db
Step 8: Click and open on productalert, then click on Go button below the import page.
127.0.0.1/product-expiry-system /
Step 2: Open your browser and type in the URL below and click enter
127.0.0.1/product-expiry-system/
The software designed needed the following hardware for an effective operation of the newly
designed system.
50
b) The random access memory (ram) should be at least 512mb.
c) Enhanced keyboard.
b) MySQL database
c) Apache webserver
Before the user can use the software, it is necessary to give a thorough training on how to use the
software. It is also important to note that the users of the software are the operators. Training
involves the tutorials, lectures or other methods used to make the users to understand how to use
and maintain the software program. The following steps would help train and guide the users on
b. Right click on the Product Expiry Management System and copy to the installed WAMP
server
e. Enter the main menu, select any of the submenus you want and continue
51
f. After performing necessary actions on the submenu, exit the program from the browser
close button.
52
CHAPTER FIVE
5.1 Introduction
It is important to ascertain that the objective of this study was on Design and Implementation of
Product Expiry Management System. In the preceding chapter, the relevant data collected for
this study were presented, critically analyzed and appropriate interpretation given. In this
chapter, certain recommendations made which in the opinion of the researcher will be of benefits
5.2 Summary
The Product expiration management system notifies/alerts the store manager on products
expiring soon for prompt attention and decision. Products are considered as the business
resources for the organization. This includes managing the product with appropriate way to
review any time as per the requirement. Therefore, it is important to have a web-based Product
Expiration System which has the ability to generate reports, report products expiry dates,
maintain the balance of the stock, details about the purchase and sales in the organization, which
The motivation that led to the implementation of the proposed system is as a result of the
manually taking stock of products by small scale/medium scale business owners are still prone to
human errors. When consumers are exposed to expired products, they may have various health
The aim of the study is to design and implement a Product Expiry Alert Management System. In
achieving this aim, the following objectives were set out to develop the easy management of the
53
inventory and handle the inventory details like purchase details, manufacturer details and
The methodology adopted in this study is the structure system analysis and design methodology
(SSADM) which is a technical approach for analyzing and designing an application or system by
applying object oriented programming as well as visual modeling throughout the software
development process. The programming language used is HTML, CSS, JAVASCRIPT, PHP,
SQL and JQUERY. The reason why web programming languages was used is because, it is
The system can aid Shop owners and managers make prompt and informed decisions of products
that are about to expire. Clearance sales, Immediate Consumption of Products, Gifting of Product
etc. could be good measures that can be taken to minimize loss to the business or prevent health
hazards to consumers. The expected result is an online product expiry system that will keep a
record of product brought to the store, calculate the loss on expired products and detect about to
5.3 Conclusion
In essence, the research work was successfully researched to meet the objectives set at the
beginning of the project work. While one cannot completely rule out one form of limitation or
the other, it was a success to a greater extent. On the whole, the research has been a worthwhile
exercise. It has afforded the researcher the opportunity to really appraise the situation on the
ground and allow one to bring out areas that might need attention for the improvement of the
research work.
54
5.4 Recommendation
Only few across the counter information were provided for in the research work, it is strongly
recommended for subsequent researcher to expand the scope of the research work.
55
REFERENCES
"30% of false burglar alarms triggered by insects". Which.co.uk. 21 March 2018. Retrieved 20
April 2021.
"Alarum definition and meaning". Collins English Dictionary. HarperCollins Publishers.
"Proton recalls 34,000 Savvy cars". Malaysia Today. March 31, 2008. Retrieved 16 May 2016.
"Tutorial: building a notification feed". Stream Framework (previously Feedly). Retrieved
2016-02-24.
"What is a False Alarm?". Fia.uk.com. Retrieved 20 April 2021.
"What Is a Notification System?". wiseGEEK. Retrieved 2016-02-24.
Android Service, 2020, [Online]. Available:
Ihttps://developer.android.com/guide/components/services.html.
Batchelor, Laura; Jennifer Rizzo (10 April 2008). "FCC approves emergency alert text-
messaging system". CNN.com. Retrieved 2 March 2011.
Best Before Manager app, 2020, [Online]. Available: https://play.google.com/store/apps/details?
id=com.bokang.myproj.bestbeforemanagerfree
Best Before TPP app, 2020, [Online]. Available: https://play.google.com/store/apps/details?
id=pl.jacek.jablonka.android.tpp
Daniel J. DeNoon (January 14, 2009). "Salmonella Prompts Peanut Butter Recall". WebMD.
Retrieved 14 May 2016.
Firebase Storage, 2020, [Online]. Available: https://firebase.google.com/docs/storage/
Gillings, Mathew; Wilding, Luke (24 September 2017). "What did an "alarum" sound like?".
Encyclopedia of Shakespeare's Language. Encyclopedia of Shakespeare’s language
project. Retrieved 13 December 2020.
Google Home, 2020, [Online]. Available: https://store.google.com/us/product/google_home?
hl=en-US
Jones, W. & Teevan, J. (Eds.) (2007). Personal Information Management. Seattle, WA:
University of Washington Press. Book info at: University of Washington Press|
Amazon ISBN 978-0-295-98737-8
Jones, W. (2008). Keeping Found Things Found: The Study and Practice of Personal
Information Management. Burlington, MA: Morgan Kaufmann Publishers. Book info
at: Morgan Kaufmann| Amazon ISBN 978-0-12-370866-3
Krolicki, Kevin (March 22, 2007). "Ford recalls Super Duty trucks after tailpipe fires".
Reuters. Retrieved 14 May 2016.
Mallawaarachchi, Vijini; Meegahapola, Lakmal; Madhushanka, Roshan; Heshan, Eranga;
Meedeniya, Dulani; Jayarathna, Sampath (2020-05-29). "Change Detection and
Notification of Web Pages: A Survey". ACM Computing Surveys. 53 (1): 1–35.
arXiv:1901.02660. doi:10.1145/3369876. ISSN 0360-0300.
Martin, Andrew; Moss, Michael (March 30, 2009). "Salmonella in Pistachios Spurs Recall".
The New York Times. Retrieved 14 May 2016.
56
APPENDIX A
“SOURCE CODE”
<?php session_start(); include("../product-expiry-alert-management-system/connect.php");
$passoi=''; ?> <!DOCTYPE html> <html lang="en"> <head> <!-- <meta http-equiv="refresh"
content="60"> --> <?php if(isset($_POST['loginnow'])){ $pass =
mysqli_real_escape_string($db,$_POST['pass']); $asql81911qa = "Select pass from login
WHERE pass='".$pass."'"; $aresult81911qa=mysqli_query($db, $asql81911qa);
while($arow81911g1qa=mysqli_fetch_array($aresult81911qa)){ $passoi =
$arow81911g1qa['pass']; $_SESSION['validate1'] = $arow81911g1qa['pass']; } if($pass ==
$passoi) { $_SESSION['validate'] = $_SESSION['validate1']; echo"<script> alert('Login
Successful'); </script> "; }else { echo" <script> alert('Login not Successful');</script> "; } }
$diayrn=''; if(isset($_GET['searchastasj'])){ $diayrn=' WHERE tdate="'.
$_GET['searchastasj'].'"'; } ?> <?php if(isset($_GET['logout'])){ if(isset($_SESSION))
{}else{session_start();} session_unset(); session_destroy(); echo"<script> alert('Logout
Successful'); window.location='../product-expiry-alert-management-system/index.php';</
script> "; } if(isset($_POST['changepass'])){ $pass = mysqli_real_escape_string($db,
$_POST['oldpass']); $pass1 = mysqli_real_escape_string($db,$_POST['newpass']);
$proceed=0; $sql81911qa = "Select COUNT(*) as topass from login WHERE pass='".
$pass."'"; $result81911qa=mysqli_query($db, $sql81911qa);
if($row81911g1qa=mysqli_fetch_array($result81911qa)){ if($row81911g1qa['topass'] > 0)
{ $proceed=1; } }else{ echo"<script> alert('Password Incorrect!'); </script> "; } if($proceed ==
1){ $sqlaa8="UPDATE login SET pass='".$pass1."' WHERE user='Choima'"; if
(mysqli_query($db,$sqlaa8)){ echo"<script> alert('Password Changed Successfully'); </script>
"; }else{ echo"<script> alert('Password Incorrect!'); </script> "; } }else{ echo"<script>
alert('Password Incorrect!'); </script> "; } } ?> <?php $pois='';
if(isset($_POST['possubmitmoney'])){ $addmoney = mysqli_real_escape_string($db,
$_POST['addmoney']); $dt = date('jS F Y '); $sqlposm = "INSERT INTO posmoney
(posamt,tdate) VALUES ('$addmoney','$dt');"; if(mysqli_query($db, $sqlposm))
{ $pois='money added'; } } if(isset($_POST['submitdept'])){ $addmoney =
mysqli_real_escape_string($db,$_POST['amount']); $description =
mysqli_real_escape_string($db,$_POST['description']); $dt = date('jS F Y '); $sqlposm =
"INSERT INTO dept (fname,amount,tdate) VALUES ('$description','$addmoney','$dt');";
if(mysqli_query($db, $sqlposm)){ $pois='Dept Recorded'; } }
if(isset($_POST['submitexpense'])){ $addmoney = mysqli_real_escape_string($db,
$_POST['amount']); $description = mysqli_real_escape_string($db,$_POST['description']); $dt
= date('jS F Y '); $sqlposm = "INSERT INTO expense (description,amount,tdate) VALUES
('$description','$addmoney','$dt');"; if(mysqli_query($db, $sqlposm)){ $pois='Expenses
Recorded'; } } if(isset($_POST['possubmit'])){ $fname = mysqli_real_escape_string($db,
$_POST['fname']); $tt = mysqli_real_escape_string($db,$_POST['tt']); $amt =
mysqli_real_escape_string($db,$_POST['amt']); $charge = mysqli_real_escape_string($db,
$_POST['charge']); $dt = date('jS F Y '); $sqlpos = "INSERT INTO pos
57
(fname,tw,amount,charge,tdate) VALUES ('$fname','$tt','$amt','$charge','$dt');";
if(mysqli_query($db, $sqlpos)){ $pois='confirmed'; }} ?> <?php
if(isset($_POST['submitadditem'])){ $stock = mysqli_real_escape_string($db,
$_POST['stock']); $price = mysqli_real_escape_string($db,$_POST['price']); $category =
mysqli_real_escape_string($db,$_POST['category']); $description =
mysqli_real_escape_string($db,$_POST['description']); $datte= date('jS F Y '); $isoa=0;
$ssql81911qa = "Select COUNT(*) as tisof from inventory WHERE description='".
$description."'"; $sresult81911qa=mysqli_query($db, $ssql81911qa);
while($srow81911g1qa=mysqli_fetch_array($sresult81911qa)){ if($srow81911g1qa['tisof'] >
0){$isoa = 1; }} if($isoa == 0){
$target="../product-expiry-alert-management-system/image/".basename($_FILES['image']
['name']); $image= $_FILES['image']['name']; if(move_uploaded_file($_FILES['image']
['tmp_name'],$target)){ $max_rand=rand(1223311,2112212); $date = date("Y-m-d H-i-s");
$imageFileType = pathinfo($target,PATHINFO_EXTENSION); $img = $max_rand.'portal'.
$date.'.'.$imageFileType; rename('../product-expiry-alert-management-system/image/'.
$image,'../product-expiry-alert-management-system/image/'.$img); $sqlreg = "INSERT INTO
inventory (description,image,stock,price,category,tdate) VALUES
('$description','$img','$stock','$price','$category','$datte');"; if(mysqli_query($db, $sqlreg))
{ echo" <script> alert('Brumax Shop Item Added Successfully'); </script> "; }else{ echo"
<script> alert('Brumax Shop Item Not Added!'); </script>"; }}}else{ echo" <script> alert('Item
Already Added!'); </script>"; }} ?> <?php $poisc=''; if(isset($_POST['submitcharging']))
{ $itemname = mysqli_real_escape_string($db,$_POST['itemname']); $idn =
mysqli_real_escape_string($db,$_POST['idn']); $amt = mysqli_real_escape_string($db,
$_POST['amt']); $pu = mysqli_real_escape_string($db,$_POST['pu']); $datte= date('jS F Y ');
$target="../product-expiry-alert-management-system/image/".basename($_FILES['imagec']
['name']); $image= $_FILES['imagec']['name']; if(move_uploaded_file($_FILES['imagec']
['tmp_name'],$target)){ $max_rand=rand(1223311,2112212); $date = date("Y-m-d H-i-s");
$imageFileType = pathinfo($target,PATHINFO_EXTENSION); $img = $max_rand.'portal'.
$date.'.'.$imageFileType; rename('../product-expiry-alert-management-system/image/'.
$image,'../product-expiry-alert-management-system/image/'.$img); $sqlregh = "INSERT INTO
chargingrecord (nameofitem,image,idnumber,amount,paid,tdate) VALUES
('$itemname','$img','$idn','$amt','$pu','$datte');"; if(mysqli_query($db, $sqlregh)){ echo"
<script> alert('".$itemname." Record Added Successfully'); </script> ";
$poisc='confirmedc'; }else{ echo" <script> alert('".$itemname." Record Not Added!');
</script>"; }}} ?> <title>Electronic Billing System</title> <meta charset="utf-8"/> <meta
name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet"
href="../bootstrap/Material Icons.css"> <link rel="stylesheet"
href="../bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="../bootstrap/w3.css">
<meta name="robots" content="index, nofollow" /> <script
src="../bootstrap/js/jquery.min.js"></script> <meta name="viewport" content="width=device-
width, initial-scale=1"> <link rel="stylesheet" href="../lib/w3.css"> <style
type="text/css">.thumb-image{width:100%;position:relative;height:230px;object-
fit:cover;}</style> <style> #read{ color:#b82e8a; text-decoration:none; }
#read:hover{ color:#009788; } #read1{ color:white; text-decoration:none; }
#read1:hover{ border:2px solid #ffffff; } #adtitle{ padding:4px; background-color:#b82e8a;
color:#ffffff; } </style> <style> input{white-space:nowrap !important; text-overflow:ellipsis !
58
important; overflow:hidden !important; } .loader { border-radius: 50%; border-top: 20px solid
#00b348; border-bottom: 20px solid #009788; border-left: 20px solid #f3f3f3; border-right:
20px solid #b82e8a; width: 100px; height: 100px; -webkit-animation: spin 2s linear infinite; /*
Safari */ animation: spin 2s linear 2; float:left; margin:0 auto; font-size:15px; font-weight:bold;
} /* Safari */ @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -
webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); } } .pos{ color:#b82e8a;
cursor:pointer; } .pos:hover{ background-color:#67c1e4;color:white;border-
radius:5px; } .phonesystemcharger{ color:#b82e8a;
cursor:pointer; } .phonesystemcharger:hover{ background-color:#67c1e4;color:white;border-
radius:5px; } .shopitems{ color:#b82e8a; cursor:pointer; } .shopitems:hover{ background-
color:#67c1e4;color:white;border-radius:5px; } </style> <style> * { box-sizing: border-box; }
#myInput,#myInput4,#myInput2,#myInput3 { width: 100%; font-size: 16px; padding: 12px
20px 12px 40px; border: 1px solid #ddd; margin-bottom: 12px; }
#myTable,#myTable2,#myTable3,#myTable4,#myTable5 { border-collapse: collapse; width:
100%; border: 1px solid #ddd; font-size: 15px; } #myTable th, #myTable2 th , #myTable3 th ,
#myTable4 th, #myTable5 th { text-align:center; padding: 12px; } #myTable td, #myTable2
td , #myTable3 td , #myTable4 td, #myTable5 td { text-align:left; padding: 12px; } #myTable
tr, #myTable2 tr , #myTable3 tr , #myTable4 tr , #myTable5 tr { border-bottom: 1px solid
#ddd; } #myTable tr.header, #myTable tr:hover, #myTable2 tr.header, #myTable2 tr:hover,
#myTable3 tr.header, #myTable3 tr:hover, #myTable4 tr.header, #myTable4 tr:hover,
#myTable5 tr.header, #myTable5 tr:hover { background-color: #f1f1f1; } </style> </head>
<body class="w3-light-grey" style="background-color:#CACDDE !important;"> <?php
if(isset($_SESSION['validate']) && $_SESSION['validate'] == $_SESSION['validate1']){}
else{ /* pop alert */ echo"<div id='myModal3ajkk' style='position: fixed;background-
color:#faebf5;z-index: 1;left: 0;top: 0;width: 100%;height: 100%;overflow: auto;text-
align:center;vertical-align:middle;z-index:9998;'> <div
style='padding:10px;position:fixed;top:45%;left: 50%;transform:translate(-50%, -
50%);width:400px;'> <div style='background-color:#cc3399;padding:20px;padding-
top:10px;border-radius:5px;'> <h5 style='font-weight:bold;text-align:center;'>Electronic
Billing System</h5>"; echo' <form role="form" style="text-align:left;" method="post"> <div
class="form-group"> <label for="email">Staff ID:</label> <div style="background-
color:white;width:100%;" class="form-control" id="email"> <span class="glyphicon
glyphicon-user"></span> <input type="text" name="userid" placeholder="Enter Phone
Number" style="border:1px solid #ffffff;margin-top:-2px;background-color:#ffffff;"
required="required" value="Sales Representative" disabled="disabled"> </div> </div> <div
class="form-group"> <label for="pwd">Password:</label> <div style="background-
color:white;width:100%;" class="form-control" id="email"> <span class="glyphicon
glyphicon-lock"></span> <input type="password" name="pass" placeholder="Enter Password"
style="border:1px solid #ffffff;margin-top:-2px;" required="required"> </div> </div> <button
type="submit" name="loginnow" class="btn btn-default" style="width:40%;"> Sign
in</button> <button type="button" data-toggle="modal" data-target="#myModal11logchange"
class="btn btn-danger" style="width:55%;"> Change Password</button> </form>';
echo"</div></div></div></div>"; /* pop alert end */ echo' <!-- Modal --> <div class="modal
fade" id="myModal11logchange" role="dialog" style="z-index:9999;"> <div class="modal-
dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-
59
title"><b>C.S.I AUTHENTICATION SYSTEM</b></h4> </div> <div class="modal-body">
<div> <form action="../product-expiry-alert-management-system/index.php" method="POST"
enctype="multipart/form-data">'; echo' <label for="fname">Input Old Password</label>
<input type="password" id="fname" name="oldpass" placeholder="Old Password"
style="width:50%;margin-left:6px;"> <br/><br/> <label for="fname">Enter New
Password</label> <input type="password" id="fname" name="newpass" placeholder="New
Password" style="width:50%;margin-left:6px;"> <br/><br/> <div style="width:100%;text-
align:center;"> <input type="submit" name="changepass" value="Change Password"
style="width:47%;font-size:16px;color:white;font-weight:bold;background-color:skyblue;"
class="btn btn-default"> </div> </form> </div> </div> </div> </div> </div> <!--end--> '; } ?>
<div style="<?php if(empty($_SESSION['validate']) || $_SESSION['validate'] !=
$_SESSION['validate1']){echo"display:none;";} ?>"> <div
style='position:fixed;width:100%;z-index:1;background-color:#b82e8a;color:white;font-
family:Bookman Old Style, serif;padding:5px;padding-left:20px;padding-right:20px;padding-
bottom:10px;'> <table style='width:100%;background-color:#b82e8a;color:#ffffff;'> <tr> <td
style="width:10%;text-align:left;"><img
src="../product-expiry-alert-management-system/logo/infinix.png"
style="width:70px;height:50px;border:1px solid #d3d3d3;"/></td> <td
style="width:80%;vertical-align:middle;text-align:center;padding-left:5px;padding-
right:5px;"><a href="../product-expiry-alert-management-system/index.php" style="text-
decoration:none;color:white;"> <span style='font-family:Cooper #b82e8a;font-
weight:bold;font-size:30px;'>Electronic Billing System </span><br/> </td> <td
style="width:10%;text-align:right;"><img
src="../product-expiry-alert-management-system/logo/samsung.jpg"
style="width:70px;height:50px;border:1px solid #d3d3d3;"/></td> </tr> </table> </div> <br>
<div style='padding:30px;margin-top:50px;padding-top:0px;width:100%;' class='shopitemsd'>
<style> #yas td{ text-align:center;cursor:pointer;padding:5px;border-radius:5px; } #yas
td:hover{ color:#212421;background-color:#faebf5; } </style> <div
style="width:100%;padding:5px;margin-bottom:15px;background-
color:#b82e8a;color:white;border-radius:10px;"> <table style="width:100%;"> <tr id='yas'>
<td style='color:#212421;background-color:#faebf5;' onclick="window.location='?'"><span
class='glyphicon glyphicon-shopping-cart'></span> Shop Items</td> <td style='padding:0px
5px;cursor:pointer;text-align:center;' data-toggle="modal" data-target="#shopitemadd"
style="cursor:pointer;"><span class='glyphicon glyphicon-plus'></span> Add Shop Item</td>
<td style='padding:0px 5px;cursor:pointer;text-align:center;' class='minfoi'><span
class='glyphicon glyphicon-search'></span> Item Categories</td> <td style='padding:0px
5px;text-align:center;cursor:pointer;' data-toggle="modal" data-target="#abts"><span
class='glyphicon glyphicon-globe'></span> About Us</td> <td style='padding:0px 5px;text-
align:center;cursor:pointer;' data-toggle="modal" data-target="#contas"><span
class='glyphicon glyphicon-phone'></span> Contact Us</td> <td style='padding:0px 5px;text-
align:center;cursor:pointer;' data-toggle="modal" data-target="#salesrepor"><span
class='glyphicon glyphicon-phone'></span> Sales Report</td> <td style='padding:0px
5px;text-align:center;cursor:pointer;' data-toggle="modal" data-target="#grec"
style="cursor:pointer;cursor:pointer;" onclick="window.location='?
shsyd2821h21h3ik8sd8sydsd6sd7sjjshsyd2821h21h3ik8sd8sydsd6sd7sjj&logout=confirmed&s
hsyd2821h21h3ikshsyd2821h21h3ik8sd8sydsd6sd7sjj8sd8sydsd6sd7sjj'"><span
60
class='glyphicon glyphicon-log-out'></span> Logout Account</td> </tr> </table> </div> <div
style="width:100%;font-size:17px;font-weight:bold;"> <em>...Products and Services
Available for Sale @ wholesale price.</em> </div> <div style='background-
color:#faebf5;font-family:Bookman Old Style, serif;width:100%;padding:30px;padding-
top:10px;padding-right:0px;text-align:left;color:#b82e8a;border-radius:10px;'> <h4
style="font-family:Bookman Old Style, serif;font-
size:20px;padding:4px;"><b>ELECTRONIC · BILLING · SYSTEM ·
<button style='padding:4px;font-weight:bold;margin-top:0px;' class="btn
minfoi">CATEGORIES <span class='glyphicon glyphicon-menu-down'
id='swtta'></span></button> · <div type="button" class='btn'
style='padding:4px;margin-top:0px;width:40%;margin-top:-5px;'><form action="../product-
expiry-alert-management-system/index.php" method="post"> <table style='width:100%'>
<tr><td style='width:80%;padding-right:10px;'> <input type="search" name="brumaxshop"
style="padding:4px;width:100%;border:1px solid #d3d3d3;border-radius:2px;"
placeholder="Search for Item" list='querying' /></td><td style='width:20%;'> <input
type="submit" name="brumaxshopsubmit" style="border:1px solid
#d3d3d3;width:100%;border-radius:2px;background-color:#b82e8a;color:#ffffff;padding:4px;"
value="Search" /> <?php echo"<datalist id='querying'>"; $sql345 = "Select description from
inventory"; $result345=mysqli_query($db, $sql345);
while($row345=mysqli_fetch_array($result345)){ echo'<option value="'.
$row345['description'].'">'; } echo"</datalist>"; ?> </td> </tr> </table>
</form></div></b></h4> <script> $('.minfoi').click(function(){ $('#myBtnContainer').toggle();
$('#swtta').toggleClass('glyphicon-menu-down').toggleClass('glyphicon-menu-up');}); </script>
<style> .filterDiv { display: none; } .show { display: block; } .container { width:100%;text-
align:center; } /* Style the buttons */ .btn { border: none; outline: none; padding: 12px 16px;
background-color: #b82e8a; cursor: pointer; margin-top:10px; margin-right:5px; color:white; }
.btn:hover { background-color: #ddd; margin-top:10px; } .btn.active { background-color: #666;
color: white; margin-top:10px; } div.img { margin: 5px; border: 1px solid #ccc; border-
radius:4px; float: left; width: 18%; } div.img:hover { border: 1px solid #777; } div.img img
{ width: 100%; height: 100px; object-fit:contain; } div.desc { text-align: left; color:#b82e8a;
font-size:13px; } </style> <div class="text-center"> <div id="myBtnContainer"
style="display:none;"> <button class="btn active" onclick="filterSelection('all')"
Style="margin-right:0px;"> Show all</button> <?php $sql = "Select * from category ORDER
BY category"; $resultr=mysqli_query($db, $sql); while($rowh=mysqli_fetch_array($resultr))
{ echo'<button class="btn" onclick="filterSelection(\''.$rowh['category'].'\')">'.
$rowh['category'].'</button>'; } ?> </div> <div class="container-fluid text-center"
Style='margin-top:10px;'> <?php $brumaxshop=''; if(isset($_POST['brumaxshop']))
{ $brumaxshop=' WHERE description LIKE "%'.$_POST['brumaxshop'].'%"'; }
echo"<table><tr><td>"; $sql81911 = "Select * from inventory ".$brumaxshop." GROUP BY
description ORDER BY id DESC"; $result81911=mysqli_query($db, $sql81911);
while($row819111=mysqli_fetch_array($result81911)){ echo'<div class="filterDiv '.
$row819111['category'].'"> <div class="img">'; echo'<a data-toggle="popover'.
$row819111['id'].'" data-trigger="hover" data-content="'.$row819111['description'].'"
target="_self" style="text-decoration:none;cursor:pointer;"> <img src="../product-expiry-alert-
management-system/image/'.$row819111['image'].'" alt="Fjords" width="300" height="200">
<div style="float:right;padding:5px;text-align:justify;cursor:pointer;color:#b82e8a;font-
61
size:15px;margin-top:5px;color:green;"><b>₦<span class="cashm'.
$row819111['id'].'">'.$row819111['price'].'</span></b></div><div style="clear:right;"></div>
<div class="desc"><input disabled="disabled" autocomplete="off" type="text"
name="messagee" id="sear1chat" class="sear1chatr" style="outline:none;border:2px solid
#faebf5;background-color:#faebf5;width:100%;font-size:15px;color:#b82e8a;" value="'.
$row819111['description'].'"> <br/> <div style="padding:5px;"><b>Stock </b> · <span
style="color:green;" class="iw'.$row819111['id'].'ou">'; echo $row819111['stock'] -
$row819111['stockshown']; echo'</span> <br/> <table><tr><td style="padding-
right:2px;"><button class="btn btn-default" data-toggle="modal" data-
target="#myModal3purchase'.$row819111['id'].'" style="width:100%;margin-
top:3px;padding:4px;font-size:13px;background-color:#ffffff;color:#212421;">Open</
button></td><td style="padding-left:2px;"><button class="btn btn-warning" data-
toggle="modal" data-target="#cartpurchase'.$row819111['id'].'"
style="width:100%;background-color:#b82e8a;margin-top:3px;padding:4px;font-
size:13px;color:white;">Add <span class="glyphicon
glyphicon-shopping-cart"></span></button></td></tr></table></div> </div> </a> </div> <!--
Modal --> <div class="modal fade" id="myModal3purchase'.$row819111['id'].'"
role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-
header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4
class="modal-title" style="color:#b82e8a;"><b>'.$row819111['description'].'</b></h4> </div>
<div class="modal-body" style="height:370px;"> <div style="text-align:justify;"> <table
style="width:100%"> <tr><td style="width:40%;"> <div class="img" style="width:100%">';
echo'<a data-toggle="popover'.$row819111['id'].'" data-trigger="hover" data-content="'.
$row819111['description'].'" target="_self" style="text-decoration:none;cursor:pointer;"> <img
src="../product-expiry-alert-management-system/image/'.$row819111['image'].'" alt="Fjords"
style="width:100%;height:200px;object-fit:contain;"> <div style="float:right;padding:5px;text-
align:justify;cursor:pointer;color:#b82e8a;font-size:14px;margin-
top:5px;color:green;"><b><span style="color:#b82e8a;">Price:</span> ₦<span
class="cashm'.$row819111['id'].'">'.$row819111['price'].'</span></b></div><div
style="clear:right;"></div> <div class="desc"><input disabled="disabled" autocomplete="off"
type="text" name="messagee" id="sear1chat" class="sear1chatr"
style="outline:none;border:2px solid #ffffff;background-color:white;width:100%;font-
size:15px;color:#b82e8a;" value="'.$row819111['description'].'"> <br/> <div
style="padding:5px;font-size:14px;"><b>Stock Sold </b> · <span style="color:green;"
class="iw'.$row819111['id'].'ousold">'; echo $row819111['stockshown']; echo'</span>
<br/><b>Total Stock </b> · <span style="color:green;" class="isw'.
$row819111['id'].'ou">'.$row819111['stock'].'</span></div> </div> </a> </div> </td> <td
style="width:40%;padding-left:10px;"> <div style="background-
color:#b82e8a;color:#ffffff;border:4px solid #d3d3d3;width:220px;text-
align:center;padding:5px;border-radius:5px;float:right;"> <div type="text" id="i'.
$row819111['id'].'t1to10" name="t1to10n" required="required"
style="padding:10px;height:50px;background-color:white;width:201px;font-
size:24px;border:1px solid #d3d3d3;color:#b82e8a;text-align:left;font-weight:bold;font-
family:GungsuhChe;">0</div> <button type="button" style="border-radius:4px;font-
size:13px;margin-top:10px;background-color:green;border:0px;color:white;" id="i'.
$row819111['id'].'cal1add"> Add to Stock </button> <button type="button" style="border-
62
radius:4px;font-size:13px;margin-top:10px;background-color:#f1f1f1;border:0px;color:black;"
id="cashmbtn'.$row819111['id'].'"> New Price</button> <br/> <button type="button"
class="btn active" style="margin-top:10px;" id="i'.$row819111['id'].'cal1"> 1</button>
<button type="button" class="btn active" style="margin-top:10px;" id="i'.
$row819111['id'].'cal2"> 2</button> <button type="button" class="btn active" style="margin-
top:10px;" id="i'.$row819111['id'].'cal3"> 3</button> <button type="button" class="btn
active" style="margin-top:6px;padding-bottom:13px;padding-top:13px;font-size:9px;" id="i'.
$row819111['id'].'delt"> <span class="glyphicon
glyphicon-arrow-left"></span></button><br/> <button type="button" class="btn active"
style="margin-top:10px;" id="i'.$row819111['id'].'cal4"> 4</button> <button type="button"
class="btn active" style="margin-top:10px;" id="i'.$row819111['id'].'cal5"> 5</button>
<button type="button" class="btn active" style="margin-top:10px;" id="i'.
$row819111['id'].'cal6"> 6</button> <button type="button" class="btn active" style="margin-
top:-8px;padding-bottom:10px;padding-top:10px;" id="i'.$row819111['id'].'cal0">
0</button><br/> <button type="button" class="btn active" style="margin-top:10px;" id="i'.
$row819111['id'].'cal7"> 7</button> <button type="button" class="btn active" style="margin-
top:10px;" id="i'.$row819111['id'].'cal8"> 8</button> <button type="button" class="btn
active" style="margin-top:10px;" id="i'.$row819111['id'].'cal9"> 9</button> <button
type="button" name="senter" class="btn active" style="margin-top:-5px;height:60px;font-
size:12px;padding-left:8px;padding-right:8px;" id="i'.$row819111['id'].'send">Sold</button>
<script> $("#i'.$row819111['id'].'cal1").click(function(){ if($("#i'.
$row819111['id'].'t1to10").html() == "0"){$("#i'.$row819111['id'].'t1to10").html("");} var x1 =
$("#i'.$row819111['id'].'t1to10").html()+"1"; $("#i'.$row819111['id'].'t1to10").html(x1); }); $
("#i'.$row819111['id'].'cal2").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() ==
"0"){$("#i'.$row819111['id'].'t1to10").html("");} var x2 = $("#i'.
$row819111['id'].'t1to10").html()+"2"; $("#i'.$row819111['id'].'t1to10").html(x2); }); $("#i'.
$row819111['id'].'cal3").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x3 = $("#i'.$row819111['id'].'t1to10").html()
+"3"; $("#i'.$row819111['id'].'t1to10").html(x3); }); $("#i'.
$row819111['id'].'cal4").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x4 = $("#i'.$row819111['id'].'t1to10").html()
+"4"; $("#i'.$row819111['id'].'t1to10").html(x4); }); $("#i'.
$row819111['id'].'cal5").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x5 = $("#i'.$row819111['id'].'t1to10").html()
+"5"; $("#i'.$row819111['id'].'t1to10").html(x5); }); $("#i'.
$row819111['id'].'cal6").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x6 = $("#i'.$row819111['id'].'t1to10").html()
+"6"; $("#i'.$row819111['id'].'t1to10").html(x6); }); $("#i'.
$row819111['id'].'cal7").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x7 = $("#i'.$row819111['id'].'t1to10").html()
+"7"; $("#i'.$row819111['id'].'t1to10").html(x7); }); $("#i'.
$row819111['id'].'cal8").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x8 = $("#i'.$row819111['id'].'t1to10").html()
+"8"; $("#i'.$row819111['id'].'t1to10").html(x8); }); $("#i'.
$row819111['id'].'cal9").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x9 = $("#i'.$row819111['id'].'t1to10").html()
63
+"9"; $("#i'.$row819111['id'].'t1to10").html(x9); }); $("#i'.
$row819111['id'].'cal0").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var x0 = $("#i'.$row819111['id'].'t1to10").html()
+"0"; $("#i'.$row819111['id'].'t1to10").html(x0); }); $("#i'.
$row819111['id'].'delt").click(function(){ if($("#i'.$row819111['id'].'t1to10").html() == "0"){$
("#i'.$row819111['id'].'t1to10").html("");} var xdv = $("#i'.$row819111['id'].'t1to10").html();
var xd = xdv.substring(0,xdv.length - 1); $("#i'.$row819111['id'].'t1to10").html(xd); }); $
("#cashmbtn'.$row819111['id'].'").click(function(){ var oldpric = $("#i'.
$row819111['id'].'t1to10").html(); if(oldpric == "0"){ alert("Item Price cannot be zero(0)"); }
else{ var phone = "'.$row819111['id'].'"; var newamt = $("#i'.$row819111['id'].'t1to10").html();
var r = prompt("Please Provide an Admin Password!"); if (r == "'.
$_SESSION['validate1'].'yes") { $.ajax({ type: "POST", url: "../product-expiry-alert-
management-system/updateprice.php", data: "newamt="+newamt+"&phone="+phone, success:
function(response) { $("#i'.$row819111['id'].'t1to10").html("0"); alert(response); $(".cashm'.
$row819111['id'].'").html(oldpric); } }); } else{ alert("Incorrect Admin Password!"); } } }); $
("#i'.$row819111['id'].'send").click(function(){ var stock = $(".iw'.
$row819111['id'].'ousold").html(); var availablestock = $(".iw'.$row819111['id'].'ou").html();
var phone = "'.$row819111['id'].'"; var sstock = $("#i'.$row819111['id'].'t1to10").html(); var
sstockr = $(".isw'.$row819111['id'].'ou").html(); var sssop = Number(stock) + Number(sstock);
if(Number(sstock) > Number(availablestock)){ alert("Out of Stock, this item is remaining
"+stock); }else{ $.ajax({ type: "POST", url:
"../product-expiry-alert-management-system/delete.php", data:
"stock="+stock+"&phone="+phone+"&sstock="+sstock+"&sssop="+sssop, success:
function(response) { $(".iw'.$row819111['id'].'ou").html(""); alert(response); $("#i'.
$row819111['id'].'t1to10").html("0"); $(".iw'.$row819111['id'].'ou").html(Number(sstockr) -
Number(sssop)); $(".iw'.$row819111['id'].'ousold").html(sssop); } }); } }); $("#i'.
$row819111['id'].'cal1add").click(function(){ var stock = $(".iw'.$row819111['id'].'ou").html();
var stockd = $(".iw'.$row819111['id'].'ousold").html(); var phone = "'.$row819111['id'].'"; var
sstock = $("#i'.$row819111['id'].'t1to10").html(); var sstockr = $(".isw'.
$row819111['id'].'ou").html(); var sssop = Number(stock) + Number(sstock); var r =
prompt("Please Provide an Admin Password!"); if (r == "'.$_SESSION['validate1'].'yes")
{ if(Number(sstock) < 0){ alert("Invaild stock value received
("+stock+")"); }else{ $.ajax({ type: "POST", url: "../product-expiry-alert-management-
system/update.php", data: "stock="+stock+"&phone="+phone+"&sstock="+sstock, success:
function(response) { $(".iw'.$row819111['id'].'ou").html(""); alert(response); $("#i'.
$row819111['id'].'t1to10").html("0"); $(".isw'.$row819111['id'].'ou").html(Number(sstockr) +
Number(sstock)); $(".iw'.$row819111['id'].'ou").html((Number(sstockr) + Number(sstock)) -
Number(stockd)); } }); } }else{ alert("Incorrect Admin password, update unsuccessful!"); } });
</script> </div> </td> </tr> </table> </div> </div> </div> </div> </div> <!--end--> <!--
Modal --> <div class="modal fade" id="cartpurchase'.$row819111['id'].'" role="dialog"> <div
class="modal-dialog" style="width:220px;background-color:#b82e8a;"> <div class="modal-
content"> <div class="modal-body" style="background-color:#CACDDE;padding:0px;"> <div
style="text-align:justify;"> <div style="background-color:#b82e8a;color:#ffffff;border:4px
solid #d3d3d3;width:220px;text-align:center;padding:5px;border-radius:5px;font-
weight:bold;"> <p><button type="button" class="close" data-dismiss="modal"
style="background-color:#CACDDE !important;">×</button> Input Number of
64
Item</p> <div id="icart'.$row819111['id'].'t1to10"
style="padding:10px;height:50px;background-color:white;width:201px;font-
size:24px;border:1px solid #d3d3d3;color:#b82e8a;text-align:left;font-weight:bold;font-
family:GungsuhChe;">0</div> <div style="font-weight:bold;font-size:13.5px;margin-
top:4px;"><em>Electronic Billing System</em></div> <button type="button" class="btn
active" style="margin-top:10px;" id="icart'.$row819111['id'].'cal1"> 1</button> <button
type="button" class="btn active" style="margin-top:10px;" id="icart'.$row819111['id'].'cal2">
2</button> <button type="button" class="btn active" style="margin-top:10px;" id="icart'.
$row819111['id'].'cal3"> 3</button> <button type="button" class="btn active" style="margin-
top:6px;padding-bottom:13px;padding-top:13px;font-size:9px;" id="icart'.
$row819111['id'].'delt"> <span class="glyphicon
glyphicon-arrow-left"></span></button><br/> <button type="button" class="btn active"
style="margin-top:10px;" id="icart'.$row819111['id'].'cal4"> 4</button> <button
type="button" class="btn active" style="margin-top:10px;" id="icart'.$row819111['id'].'cal5">
5</button> <button type="button" class="btn active" style="margin-top:10px;" id="icart'.
$row819111['id'].'cal6"> 6</button> <button type="button" class="btn active" style="margin-
top:-8px;padding-bottom:10px;padding-top:10px;" id="icart'.$row819111['id'].'cal0">
0</button><br/> <button type="button" class="btn active" style="margin-top:10px;" id="icart'.
$row819111['id'].'cal7"> 7</button> <button type="button" class="btn active" style="margin-
top:10px;" id="icart'.$row819111['id'].'cal8"> 8</button> <button type="button" class="btn
active" style="margin-top:10px;" id="icart'.$row819111['id'].'cal9"> 9</button> <button
type="button" name="senter" class="btn active" style="margin-top:-5px;height:60px;font-
size:10.5px;padding-left:8px;padding-right:8px;"
id="icart'.$row819111['id'].'send">Enter</button> <script> $("#icart'.
$row819111['id'].'cal1").click(function(){ if($("#icart'.$row819111['id'].'t1to10").html() ==
"0"){$("#icart'.$row819111['id'].'t1to10").html("");} var x1 = $("#icart'.
$row819111['id'].'t1to10").html()+"1"; $("#icart'.$row819111['id'].'t1to10").html(x1); }); $
("#icart'.$row819111['id'].'cal2").click(function(){ if($("#icart'.
$row819111['id'].'t1to10").html() == "0"){$("#icart'.$row819111['id'].'t1to10").html("");} var
x2 = $("#icart'.$row819111['id'].'t1to10").html()+"2"; $("#icart'.
$row819111['id'].'t1to10").html(x2); }); $("#icart'.$row819111['id'].'cal3").click(function()
{ if($("#icart'.$row819111['id'].'t1to10").html() == "0"){$("#icart'.
$row819111['id'].'t1to10").html("");} var x3 = $("#icart'.$row819111['id'].'t1to10").html()+"3";
$("#icart'.$row819111['id'].'t1to10").html(x3); }); $("#icart'.
$row819111['id'].'cal4").click(function(){ if($("#icart'.$row819111['id'].'t1to10").html() ==
"0"){$("#icart'.$row819111['id'].'t1to10").html("");} var x4 = $("#icart'.
$row819111['id'].'t1to10").html()+"4"; $("#icart'.$row819111['id'].'t1to10").html(x4); }); $
("#icart'.$row819111['id'].'cal5").click(function(){ if($("#icart'.
$row819111['id'].'t1to10").html() == "0"){$("#icart'.$row819111['id'].'t1to10").html("");} var
x5 = $("#icart'.$row819111['id'].'t1to10").html()+"5"; $("#icart'.
$row819111['id'].'t1to10").html(x5); }); $("#icart'.$row819111['id'].'cal6").click(function()
{ if($("#icart'.$row819111['id'].'t1to10").html() == "0"){$("#icart'.
$row819111['id'].'t1to10").html("");} var x6 = $("#icart'.$row819111['id'].'t1to10").html()+"6";
$("#icart'.$row819111['id'].'t1to10").html(x6); }); $("#icart'.
$row819111['id'].'cal7").click(function(){ if($("#icart'.$row819111['id'].'t1to10").html() ==
"0"){$("#icart'.$row819111['id'].'t1to10").html("");} var x7 = $("#icart'.
65
$row819111['id'].'t1to10").html()+"7"; $("#icart'.$row819111['id'].'t1to10").html(x7); }); $
("#icart'.$row819111['id'].'cal8").click(function(){ if($("#icart'.
$row819111['id'].'t1to10").html() == "0"){$("#icart'.$row819111['id'].'t1to10").html("");} var
x8 = $("#icart'.$row819111['id'].'t1to10").html()+"8"; $("#icart'.
$row819111['id'].'t1to10").html(x8); }); $("#icart'.$row819111['id'].'cal9").click(function()
{ if($("#icart'.$row819111['id'].'t1to10").html() == "0"){$("#icart'.
$row819111['id'].'t1to10").html("");} var x9 = $("#icart'.$row819111['id'].'t1to10").html()+"9";
$("#icart'.$row819111['id'].'t1to10").html(x9); }); $("#icart'.
$row819111['id'].'cal0").click(function(){ if($("#icart'.$row819111['id'].'t1to10").html() ==
"0"){$("#icart'.$row819111['id'].'t1to10").html("");} var x0 = $("#icart'.
$row819111['id'].'t1to10").html()+"0"; $("#icart'.$row819111['id'].'t1to10").html(x0); }); $
("#icart'.$row819111['id'].'delt").click(function(){ if($("#icart'.
$row819111['id'].'t1to10").html() == "0"){$("#icart'.$row819111['id'].'t1to10").html("");} var
xdv = $("#icart'.$row819111['id'].'t1to10").html(); var xd = xdv.substring(0,xdv.length - 1); $
("#icart'.$row819111['id'].'t1to10").html(xd); }); $("#cashmbtn'.
$row819111['id'].'").click(function(){ var oldpric = $("#icart'.$row819111['id'].'t1to10").html();
if(oldpric == "0"){ alert("Item Price cannot be zero(0)"); } else{ var phone = "'.
$row819111['id'].'"; var newamt = $("#icart'.$row819111['id'].'t1to10").html(); var r =
prompt("Please Provide an Admin Password!"); if (r == "'.$_SESSION['validate1'].'yes")
{ $.ajax({ type: "POST", url: "../product-expiry-alert-management-system/updateprice.php",
data: "newamt="+newamt+"&phone="+phone, success: function(response) { $("#icart'.
$row819111['id'].'t1to10").html("0"); alert(response); $(".cashm'.
$row819111['id'].'").html(oldpric); } }); } else{ alert("Incorrect Admin Password!"); } } }); $
("#icart'.$row819111['id'].'send").click(function(){ var drsa= "'.$row819111['description'].'";
var drsaamt=$("#cartamt").html(); if(drsaamt == ""){ drsaamt =0; } var drsa3= $(".cashm'.
$row819111['id'].'").html(); var drsa31=$("#icart'.$row819111['id'].'t1to10").html(); var
drsa31d = Number(drsa3.replace(",","")) * Number(drsa31); var drsa31du = Number(drsaamt)
+ Number(drsa31d); var stock = $(".iw'.$row819111['id'].'ousold").html(); var availablestock =
$(".iw'.$row819111['id'].'ou").html(); var phone = "'.$row819111['id'].'"; var sstock = $
("#icart'.$row819111['id'].'t1to10").html(); var sstockr = $(".isw'.$row819111['id'].'ou").html();
var sssop = Number(stock) + Number(sstock); if(Number(sstock) > Number(availablestock))
{ alert("Out of Stock...!"); }else{ $.ajax({ type: "POST", url: "../product-expiry-alert-
management-system/delete.php", data:
"stock="+stock+"&phone="+phone+"&sstock="+sstock+"&sssop="+sssop, success:
function(response) { $(".iw'.$row819111['id'].'ou").html(""); alert(response); $("#icart'.
$row819111['id'].'t1to10").html("0"); $(".iw'.$row819111['id'].'ou").html(Number(sstockr) -
Number(sssop)); $(".iw'.$row819111['id'].'ousold").html(sssop); $
("#addcart").append("<li>"+drsa+"<br/>"+drsa3+" x "+drsa31+" = ₦"+drsa31d+"<hr
style=\"padding:0px;margin:0px;\"/></li>"); $("#cartamt").html(drsa31du); $("#cartpurchase'.
$row819111['id'].'").modal("hide"); } }); } }); </script> </div> </div> </div> </div> </div>
</div> <!--end--> <script> $(document).ready(function(){ $("[data-toggle=\'popover'.
$row819111['id'].'\']").popover(); }); </script> </div> '; } echo'</td> <td
style="width:250px;vertical-align:top;color:#212421;"> <div style="border:1px solid
#d3d3d3;padding:5px;border-radius:5px;background-color:#ffffff;"> <h5 style="font-
weight:bold;font-size:15px;color:#b82e8a;">Electronic Billing System</h5> <h5 style="font-
weight:bold;font-size:15px;"><em>'.date('h:i:sa d-m-Y').'</em></h5> <div style="text-
66
align:justify;"> <ol style="margin-left:-20px;font-size:13px;" class="clearcart" id="addcart">
</ol> </div> <h4 style="font-weight:bold;">Total = ₦<span class="clearcart"
id="cartamt">0</span></h4> <h7 style="font-weight:bold;color:#b82e8a;"><em>Thanks for
your patronage!!!</em></h7> <table> <tr> <td><button class="btn btn-default"
onclick="window.print();"><span class="glyphicon glyphicon-shopping-cart"></span> Print
Receipt</button></td> <td><button class="btn btn-default" onclick="$
(\'.clearcart\').html(\'\');">Clear</button></td> </tr> </table> </div> </td> </tr> </table> '; ?>
</div> </div> <script> filterSelection("all") function filterSelection(c) { var x, i; x =
document.getElementsByClassName("filterDiv"); if (c == "all") c = ""; for (i = 0; i < x.length;
i++) { w3RemoveClass(x[i], "show"); if (x[i].className.indexOf(c) > -1) w3AddClass(x[i],
"show"); } } function w3AddClass(element, name) { var i, arr1, arr2; arr1 =
element.className.split(" "); arr2 = name.split(" "); for (i = 0; i < arr2.length; i++) { if
(arr1.indexOf(arr2[i]) == -1) {element.className += " " + arr2[i];} } } function
w3RemoveClass(element, name) { var i, arr1, arr2; arr1 = element.className.split(" "); arr2 =
name.split(" "); for (i = 0; i < arr2.length; i++) { while (arr1.indexOf(arr2[i]) > -1)
{ arr1.splice(arr1.indexOf(arr2[i]), 1); } } element.className = arr1.join(" "); } var
btnContainer = document.getElementById("myBtnContainer"); var btns =
btnContainer.getElementsByClassName("btn"); for (var i = 0; i < btns.length; i++)
{ btns[i].addEventListener("click", function(){ var current =
document.getElementsByClassName("active"); current[0].className =
current[0].className.replace(" active", ""); this.className += " active"; }); } </script> <div
style="clear:both"></div> <div style='margin-top:5px;padding:4px;padding-top:4px;padding-
bottom:10px;width:100%;color:#b82e8a;border-radius:3px;text-align:justify;'> </div> </div>
</div> <footer class="container fluid text-center" style='background-
color:#b82e8a;width:100%;padding:30px;color:white;text-align:center;padding:30px;'>
<h5><b>C.S.I COMMUNICATION LTD. POWERED BY SPARKLYN SERVICES
(08030511988)</b></h5> <p>All Rights Reserved <?php echo date("Y"); ?></p> </footer>
</div> </div> <!-- Modal --> <div id="shopitemadd" class="modal fade" role="dialog"> <div
class="modal-dialog modal-lg"> <!-- Modal content--> <div class="modal-content"> <div
class="modal-header"> <button type="button" class="close" data-
dismiss="modal">×</button> <h4 class="modal-title" style="font-weight:bold;">Add
Shop Items</h4> </div> <div class="modal-body" style="text-align:left;"> <form role="form"
action="../product-expiry-alert-management-system/index.php" method="post"
enctype="multipart/form-data"> <table style='width:100%;'> <tr><td
style='width:50%;vertical-align:top;'> <input type="file" class="fileUpload2"
required="required" id="file2" name="image" style="display:none;" /> <div
style='width:100%;'> <label id="upfile2" for="fname" style="cursor:pointer;margin-
top:10px;background-color:#b82e8a;color:#ffffff;padding:4px;padding:2px;font-
size:14px;">Add Photo</label> <div id="image-holder"
style="width:100%;height:auto;border:1px solid #b82e8a;"><div> </div> </td> <td
style='width:50%;padding-left:10px;'> <div class="form-group"> <label for="email">Item
Description:</label> <textarea type="text" required="required" class="form-control"
name="description" style="height:100px;width:100%;"></textarea> </div> <div class="form-
group"> <label for="email">Item Category:</label> <select class="form-control"
required="required" name="category"> <option value="" disabled selected>-- Select Item --
</option> <?php $sql = "Select * from category ORDER BY category";
67
$resultr=mysqli_query($db, $sql); while($rowh=mysqli_fetch_array($resultr)){ echo'<option
value="'.$rowh['category'].'">'.$rowh['category'].'</option>'; } ?> <option
value="Phone">Phone</option> </select> </div> <div class="form-group"> <label
for="email">Number of Stock:</label> <input type="number" required="required"
class="form-control" name="stock"> </div> <div class="form-group"> <label
for="email">Amount (₦):</label> <input type="number" required="required"
class="form-control" name="price"> </div> <div class="modal-footer" style="text-
align:center;border-top:0px;width:100%;"> <button type="submit" name="submitadditem"
class="btn btn-default" style="width:50%;">Submit</button> </div> </td> </tr> </table>
</div> </form> </div> </div> </div> <!-- Modal --> <div id="abts" class="modal fade"
role="dialog"> <div class="modal-dialog modal-lg"> <!-- Modal content--> <div
class="modal-content"> <div class="modal-header"> <button type="button" class="close"
data-dismiss="modal">×</button> <h4 class="modal-title" style="font-
weight:bold;">About Us</h4> </div> <div class="modal-body" style="text-align:left;">
<p>Our campus shop is located on The Street and stocks a range of food, household, healthcare
and miscellaneous goods. We have fresh, frozen and cupboard items, international cuisine, to
go food and meal deals and an in house bakery. We strive to make our service as
environmentally friendly as possible.</p> </div> </div> </div> </div> <!-- Modal End--> <!--
Modal --> <div id="contas" class="modal fade" role="dialog"> <div class="modal-dialog
modal-lg"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button> <h4
class="modal-title" style="font-weight:bold;">Contact Us</h4> </div> <div class="modal-
body" style="text-align:left;"> <p><strong>Customer Care Representative</strong></p>
<p><em>+2349069654865</em></p> </div> </div> </div> </div> <!-- Modal End--> <!--
Modal --> <div id="salesrepor" class="modal fade" role="dialog"> <div class="modal-dialog
modal-lg"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button> <h4
class="modal-title" style="font-weight:bold;width:100%;text-align:center;">SALES REPORT
GENERATION</h4> </div> <div class="modal-body" style="text-align:left;"> <table
class="table table-bordered"> <thead> <tr> <th>S/N</th> <th>Item</th> <th>Amount</th>
<th>Item Sold</th> <th>Stock</th> <th>Transaction Date</th> </tr> </thead> <tbody> <?php
$sayy=1; $sql81911qa = "Select * from inventoryrecord ORDER BY id DESC";
$result81911qa=mysqli_query($db, $sql81911qa);
while($row81911g1qa=mysqli_fetch_array($result81911qa)){ $wsql81911qa = "Select * from
inventory where id='".$row81911g1qa['stockid']."'"; $wresult81911qa=mysqli_query($db,
$wsql81911qa); $wrow81911g1qa=mysqli_fetch_array($wresult81911qa); $sa=0; $sa=
intval($wrow81911g1qa['stock']) - intval($row81911g1qa['numberofstock']); echo"<tr> <td>".
$sayy."</td> <td>".$wrow81911g1qa['description']."</td> <td>".
$row81911g1qa['amount']."</td> <td>".$row81911g1qa['numberofstock']."</td> <td>".
$sa."</td> <td>".$row81911g1qa['tdate']."</td> </tr>"; $sayy++; } ?> </tbody> </table> <div
style="text-align:right;width:100%;"> <button class="btn btn-default"
onclick="window.print();"><span class="glyphicon glyphicon-shopping-cart"></span> Print
Receipt</button> </div> </div> </div> </div> </div> <!-- Modal End--> <script> $
(document).ready(function(){ $(".shopitems").click(function () { $
(".phonesystemchargerd").hide(); $(".posd").hide(); $(".shopitemsd").show(); $
(".shopitems").css({"background-color":"#67c1e4","color":"white","border-radius":"5px;"}); $
68
(".pos").css({"background-color":"#ffffff","color":"#b82e8a","border-radius":"0px;"}); $
(".phonesystemcharger").css({"background-color":"#ffffff","color":"#b82e8a","border-
radius":"0px;"}); }); $(".shopitemsh").click(function () { $(".phonesystemchargerd").hide(); $
(".posd").hide(); $(".shopitemsd").show(); $(".shopitems").css({"background-
color":"#67c1e4","color":"white","border-radius":"5px;"}); $(".pos").css({"background-
color":"#ffffff","color":"#b82e8a","border-radius":"0px;"}); $
(".phonesystemcharger").css({"background-color":"#ffffff","color":"#b82e8a","border-
radius":"0px;"}); }); }); </script> <script> $(document).ready(function(){ $
("#upfile1").click(function () { $("#file1").trigger('click'); }); $("#upfile2").click(function () { $
("#file2").trigger('click'); }); }); </script> <?php if(isset($_GET['searchastasj']))
{ echo"<script> $(document).ready(function(){ $('#grec').modal(); }); </script> "; } ?>
<script> $(document).ready(function() { $(".fileUpload").on('change', function() { var
countFiles = $(this)[0].files.length; var imgPath = $(this)[0].value; var extn =
imgPath.substring(imgPath.lastIndexOf('.') + 1).toLowerCase(); var image_holder = $
("#image-holderc"); image_holder.empty(); if (extn == "gif" || extn == "png" || extn == "jpg" ||
extn == "jpeg") { if (typeof(FileReader) != "undefined") { for (var i = 0; i < countFiles; i++)
{ var reader = new FileReader(); reader.onload = function(e) { $("<img />", { "src":
e.target.result, "class": "thumb-image" }).appendTo(image_holder); } image_holder.show(); $
("#upfile1").html("Change Photo"); reader.readAsDataURL($(this)[0].files[i]); } } else
{ alert("This browser does not support FileReader."); $("#upfile1").html("Add Photo"); } } else
if (extn == "3gp" || extn == "mp4" || extn == "mp3" || extn == "wav") { alert("File selected, has
no preview!"); document.getElementById("wrapper").style.display="none";
document.getElementById("upfile1").innerHTML="Your File is Ready for Upload"; } else
{ alert("Pls select only images"); } }); }); </script> <script> $(document).ready(function() { $
(".fileUpload2").on('change', function() { var countFiles = $(this)[0].files.length; var imgPath =
$(this)[0].value; var extn = imgPath.substring(imgPath.lastIndexOf('.') + 1).toLowerCase(); var
image_holder = $("#image-holder"); image_holder.empty(); if (extn == "gif" || extn == "png" ||
extn == "jpg" || extn == "jpeg") { if (typeof(FileReader) != "undefined") { for (var i = 0; i <
countFiles; i++) { var reader = new FileReader(); reader.onload = function(e) { $("<img />",
{ "src": e.target.result, "class": "thumb-image" }).appendTo(image_holder); }
image_holder.show(); $("#upfile2").html("Change Photo"); reader.readAsDataURL($(this)
[0].files[i]); } } else { alert("This browser does not support FileReader."); $
("#upfile2").html("Add Photo"); } } else if (extn == "3gp" || extn == "mp4" || extn == "mp3" ||
extn == "wav") { alert("File selected, has no preview!");
document.getElementById("wrapper").style.display="none";
document.getElementById("upfile2").innerHTML="Your File is Ready for Upload"; } else
{ alert("Pls select only images"); } }); }); </script> <script type="text/javascript"> /* Reload
Disable Start*/ $(document).on("keydown", function (e) { if (e.key == "F5" || e.key == "F11" ||
(e.ctrlKey == true && (e.key == 'r' || e.key == 'R')) || e.keyCode == 116 || e.keyCode == 82)
{ if(e.ctrlKey == true){ e.preventDefault(); } } }); document.addEventListener('contextmenu',
event => event.preventDefault()); /* window.onbeforeunload = function() { return "Leave this
page ?"; } */ /* Reload Disable End*/ </script> <script> $(document).ready(function(){ $
(".navbar a, div .book").on('click', function(event) { event.preventDefault(); var hash =
this.hash; $('html, body').animate({ scrollTop: $(hash).offset().top }, 900, function()
{ window.location.hash = hash; }); }); $(window).scroll(function() { $
(".slideanim").each(function(){ var pos = $(this).offset().top; var winTop = $
69
(window).scrollTop(); if (pos < winTop + 600) { $(this).addClass("slide"); } }); }); }) </script>
<script src="../bootstrap/js/bootstrap.min.js"></script> </body> </html>
APPENDIX B
“OBJECT PROGRAM”
70