Professional Documents
Culture Documents
Final Manuscript
Final Manuscript
A Capstone Project
Presented to the Faculty of the Collage of the Teacher Education Department of West
Prime Horizon Institute, Inc.
Pagadian City
In Partial Fulfillment
of the Requirements for the Degree of
Bachelor of Technical – Vocational Teacher Education
Major in Computer Hardware Servicing
Academic Year 2023-2024
By.
Panawan ,Sharlyn B.
Delacerna, Christian M.
Mamangcao, Ranya M.
Bantac, Regine S.
Hermoso, Rico N.
Vente, Jenefe B.
June 2024
APPROVAL SHEET
In partial fulfilment of the requirements for the degree of Bachelor of Technical Vocational
Teacher Education major in Computer Hardware Servicing, this capstone project entitled
"BASIC T-SHIRT DEPOT’S AUTOMATED SYSTEM" is prepared by Panawan, Sharlyn,
Vente, Jenefe B., Bantac, Regine S, Mamangcao, Ranya M., Hermoso, Rico N., and Dela
Cerna, Christian M. is hereby recommended for an oral examination.
Waien G. Watamama
___________________________________________________________________________
Panelist Panelist
Panelist Panelist
Chairman
___________________________________________________________________________
Approved in Partial Fulfillment of the requirements for the degree of Bachelor of Technical
Vocational Teacher Education major in Computer Hardware Servicing Capstone Project 1.
CHRISTIAN L. SEBIAL
First and foremost, praises and thanks to God, the almighty, for his showers of blessings
throughout the research work to complete the research successfully.
The researcher would like to extend heartfelt gratitude to the people listed below, who are one
way or another have contributed efforts and support to make this way endeavor a reality.
To Mr. Waien G. Watamama, the adviser of this research for his unlimited effort and support
for the researchers.
To Mr. Christian Sebial, the Acting School President, for his unwavering support and
encouragement to press on to finish this study.
To Mr. Eric Generale, the 3rd year college adviser for showing unending support t to the
researchers.
To Ms. Vaneza Marry J. Simbajon, the grammarian, for showing the knowledge and guiding
their thoughts for the study.
To Mr. Jennoel J. Linao, the statistician, for guiding the researcher to be properly equipped,
enhanced, and prepared in organizing their study.
The faculty and staff of West Prime Horizon Institute, Inc. for continuously believing in what
they could achieve.
To the beloved family of the researchers, for their undying support, motivation understanding,
and inspiration to move forward whatever it takes.
The researchers have acknowledged that without the above mentioned, their quest academic
greatness and progress of knowledge in the realm of academics would be futile.
DEDICATION
This work is dedicated to the following parents who showed their unending love and moral
support:
Mr/Mrs. Panawan
Mr/Mrs. Bantac
Mr/Mrs. Hermoso
Mr/Mrs. Vente
Mr/Mrs. Mamangcao
Likewise, to their brothers and sisters, relatives, friends, faculty and staff of West Prime
Horizon Institute Inc. for their unconditional support, help, and advice.
Above all, to the Almighty who always guides and provides their needs even in difficult
times.
ABSTRACT
This Capstone Project aimed to develop a comprehensive automated system for Basic
T-shirt Depot, addressing both functional and non-functional requirements to enhance
operational efficiency. The system provided real-time inventory tracking, generated
low stock alerts, and integrated with POS systems for immediate updates. It recorded
sales transactions, managed discounts, and produced customer receipts, alongside
handling purchase orders and supplier performance tracking. Customer credit
accounts were meticulously managed, recording transactions, updating balances, and
tracking payments. Detailed reports on sales and inventory were generated, ensuring
insightful business analytics. The system enforced user roles and permissions to
maintain security and accountability, processing transactions swiftly within 5 seconds
and ensuring 99.9% uptime. The POS module captured sale details, applied discounts,
and updated inventory in real-time, while the Inventory Management module
monitored stock, generated alerts, and tracked purchase orders. The Credit
Management module handled credit accounts and payments. The project's scope
included automating tasks such as payment recording, inventory management, and
report generation, offering full access to owners and managers, with specific
permissions for cashiers and other staff. However, it excluded debit/credit card
transactions and mobile stock management. The system was designed to streamline
operations and provide a robust framework for managing sales, inventory, and credit
effectively.
CHAPTER 1
Introduction
Used Software
The proposed automated system provides many facilities such as product
management, customer management, stock management, supplier management, purchase
management, reorder management, and report generation. The system was developed
using PHP (PHP hypertext Processor) which is a popular open-source scripting language
primarily used for web development. It is a server-side scripting language, which means
that it is executed on the server and generates dynamic web pages that are then sent to the
client's web browser. MySQL was used as the database tool for designing the database.
The software is built on a standard WAMP (Windows, Apache, MySQL, and PHP).
General Objectives
The general objective of the project is to design and develop an automated system
for Basic T-shirt Depot with POS, Inventory and Credit Management modules.
Specific Objectives
The project aims to develop a system that can help the Basic T-Shirt Depot manage
sales and inventory. Specifically, the system.
1. Allows Basic T-shirt Depot to transact easily with their customers using the payment
module and e-wallet feature.
2. Monitors the sales and inventory of the items with the use of an inventory module
owner/manager prints reports through the system’s printing module.
3. Helps the owner/ manager print reports through the system’s printing module.
4. Can update the new product information or update stocks.
5. Can ensure a continuous supply of materials and stock so that production does not
suffer at the time of customer.
This capstone project, however, does not cover debit/credit card transactions
and online stock management through the use of smartphones and other devices.
Definition of terms
Customers: refers to a person or a client who buys items in the Basic T-Shirt Depot.
Manager: A person responsible for controlling and administering all parts of the
establishment.
Stock: the goods or merchandise kept on the premises of a business or warehouse and
available for sale or distribution.
Billing: is a designed to handle time and billing tracking as well as invoicing the
customers for services and products. It can also track the hours worked by employees as
well as expenses associated with projects and clients.
This chapter presents the proponents’ collected data and information that formed
part of the research literature which are very useful in the development of this study.
According to Collins (2024), a automated system is a system that utilizes
computers and software to perform various tasks and processes. It involves the use of
computer technology to automate and streamline operations, making them more efficient
and accurate. Computerized systems can be found in various domains, such as business,
healthcare, education, transportation, and many others. They can range from simple
applications like word processors and spreadsheets to complex systems like enterprise
resource planning (ERP) software or computer-aided design (CAD) tools. These systems
typically involve hardware components, software programs, databases, and networks to
enable data processing, storage, retrieval, and communication. They play a crucial role in
modern society, enhancing productivity, decision-making, and overall functionality in
numerous fields.
In today’s business environment, even small and medium scale businesses have come
to rely on computerized inventory management system. Certainly, there are many of
smaller retail outlets, manufacturers and other businesses that continue to rely on manual
means of sales and inventory tracking. The recent development of powerful computer
programs capable of addressing a wide variety of record-keeping needs, including sales
and inventory management in one integrated system have also contributed to the growing
popularity (Chukwu, 2018).
Requirement Analysis
This chapter contains the methodologies being used and the general research
design process of the study. It also shows how the research outcome at the end will be
obtained in line with meeting the objective of the study. In addition, this chapter seeks to
meet the researcher's research strategy and objectives, as well as to show how the
research was carried out during the study time. The proponents require a thorough
investigation of the primary aspects.
Regarding their current system, the proponents interviewed the manager. Through
this, the proponents obtained the necessary information and was able to identify the
problem needed to be addressed. The proponents learned that the establishment required a
system to help them keep track of sales and inventory.
The PHP Hypertext Processor, which provides users with easy access to relational
functionality, was used by the developers to develop the automated system. It is the
simplest and fastest desktop management system available, and the combination of easy-
to-use and powerful tools is described in sufficient detail to enable system design.
Functional Requirement
Technical Background
Programming Environment
The programming environment for the capstone project involves using PHP as
the server-side scripting language, MySQL as the database management system,
XAMPP as the local development server, and Notepad as the text editor for coding.
PHP will be used to handle the backend logic, processing user inputs, and interacting
with the MySQL database to store and retrieve data efficiently. MySQL will serve as
the robust and scalable database solution, ensuring data integrity and quick access to
records. XAMPP, an all-in-one development environment, will simplify the setup
process by providing Apache server, PHP, and MySQL in a single package,
facilitating local testing and development. Notepad, though basic, will be the primary
tool for writing and editing the PHP code, making it easy to create, modify, and
maintain the project's scripts and configurations. This environment provides a
cohesive and efficient setup for developing a comprehensive POS, Inventory, and
Credit Management system.
Hardware Specification
Item Specification
Processor 11th Gen Intel® Core™ i3-111504@
3.00GHz 3.00 GHz
Memory 4.00 GB DDR4
Hard Disk Drive PCIe-8 SSD 500GB
Keyboard and Mouse Standard PS/2 Keyboard
HID-compliant mouse
Software Specification
1. POS Module
*Handles sales transactions, including cash and digital payments.
*Captures details of each sale, such as date, time, items sold, quantities, and total amount.
*Generates and prints receipts to customers.
*Records customer information and purchase history and applies discounts.
*Updates inventory levels in real-time as sales are made.
*Provides an intuitive interface for cashiers and sales associates, including product
lookup
1. Depot Owner - The system will help improve their business efficiency and allow them
to cope with technological trends in managing stores. The system will allow them to
easily and efficiently track and monitor the sales and inventory transactions, and the
status of items (running out of stocks).
2. Manager - The manager will benefit from real-time access to sales data, inventory
levels, and credit information, enabling more informed decision-making. The system will
reduce administrative burden, improve accuracy in financial reporting, and enhance
overall operational efficiency. With automated alerts and detailed analytics, the manager
can focus on strategic planning and business growth.
3. Cashier - For the cashier, the system streamlines the transaction process, making it
faster and more accurate. Automated receipt generation reduces errors and speeds up
customer service. The user-friendly interface simplifies training and daily operations,
allowing cashiers to manage transactions efficiently and with minimal manual input.
4. Supplier - Suppliers will experience improved communication and order accuracy. The
inventory management module ensures timely reordering of stock, reducing the risk of
stock outs or overstocking. Suppliers can also benefit from detailed reports on inventory
movement, helping them plan production and deliveries more effectively.
5. Customers - Customers will enjoy quicker checkouts and more accurate billing, leading
to a better shopping experience. The credit management module ensures that customers
who utilize store credit have their accounts managed efficiently, providing transparency
and ease in tracking their credit usage and repayments.
7. Future Researchers - Future researchers will benefit from the documentation and
insights provided by this project. They can build on the project's foundation to explore
further improvements, innovations, and applications in business automation. The project
serves as a case study for integrating various modules to enhance business operations,
offering a practical reference for academic and professional research.
CHAPTER IV
DEVELOPMENT, TESTING AND IMPLEMENTATION
This chapter covers the implementation strategy, system development life cycle,
and the proponent’s development and testing methodologies. To validate and support the
study, the proponents used a variety of analytical methodologies and data collection
strategies in this capstone project. The advocates were able to pinpoint the issues that
employees and company owners were having with the methods used for data collecting
under the current system. The analytical methods included brainstorming, observations,
and interviews. The collected data was analyzed and served as the basis for the design and
development of the system.
The System Development Life Cycle (SDLC) with a Waterfall model was
employed by the proponents in system development. This methodology uses the
following steps to carry out the entire software development process in a sequential
fashion: requirement analysis, system design, implementation, and maintenance.
Figure 1. System Development Life Cycle
Development
I. Planning
The proponents performed an interview to gain information on how the manager
owner kept the records. The advocates intended to create an automated system for Basic
T- shirt Depot to safeguard the data and make it easier for the cashier and salesman going
forward. Proponents’ findings about the client reveal significant inefficiencies in their
current business operations due to manual processes. The issuance of receipts is done
manually, which is time-consuming and prone to errors, leading to potential inaccuracies
in sales records. Stock checking is also conducted manually, requiring substantial time
and effort, and increasing the likelihood of inventory discrepancies. Additionally, the
client's business operates on a cash-only basis, limiting payment options for customers
and potentially reducing sales opportunities. These manual methods hinder operational
efficiency, data accuracy, and customer convenience, highlighting the need for an
automated system to streamline these processes.
After conducting interviews and gathering data, the proponents evaluated the
information, studies relevant literature, carried out experiments, and looked at the manual
record keeping practices of the existing premises. Consequently, an explicitly addressed
stance on software designed engaged, with its proponents using PHP and Visual Studio to
produce an approachable design. The proponents analyzed the data gathered by simply
first identifying the main problem inside the Basic- T-shirt Depot Pagadian based on the
information that the manager stated to the proponents and also based on what the
proponents observed inside. The result of analysis became the basis of the proponents in
designing the graphical user interface (GUI) and identifying the functions and modules to
be included.
During development, the system’s source code was coded by the proponents using
PHP programming language. For software development, the source coding system was
identified and the relationship between the data was examined. The advocates test, debug,
and inspect the program after it has been developed.
IV. Testing
V. Implementation
The advocates planned to test the implementation. The test was created with a
mechanism in place for responses to be approved or accepted under real world operating
circumstances, where a program that is currently in use will be utilized for in the moment
activities within the workplace.
VI. Maintenance
Lastly, the advocates sent out a user manual covering different types of computer
upkeep required to maintain a system or other features. To be checked for malfunctioning
or outdated external hardware, such as pin pads or customer facing displays, as well as
internal parts, such as memory cards. These gadgets might malfunction and introduce
errors into the system, which could make the whole thing unusable until the
malfunctioning part is fixed or replac
CHAPTER V
The comprehensive data analysis and program design interface for the developed system's
efficient operation are covered in this chapter. The study's proponents attempted to
analyze the information received through questionnaires, observations, interviews, and
reviews of previous publications. Along with its functions, this part also covers the flow
of requirements and processes.
Use case diagrams actually describe the usage of the system from the viewpoint of
users(actors). Use case can be also viewed an functionality that is accomplished through the
interaction between system actors.
Database
Figure 6. Admin’s Flowchart
Conclusion
Recommendation
Based on the scope and limitations outlined, the recommendation for the
automated system developed for Basic T-shirt Depot is to continue expanding its
functionalities while addressing the identified gaps. Firstly, to enhance customer
convenience and payment options, integrating debit/credit card transactions into the
system should be prioritized. This expansion will cater to a wider range of payment
preferences and further streamline the checkout process, ultimately improving customer
satisfaction and facilitating smoother transactions.
Furthermore, to maximize the system's utility and user-friendliness, ongoing
training and support for staff members should be emphasized. Investing in comprehensive
training programs will ensure that employees are proficient in utilizing all features of the
automated system, thereby minimizing errors and maximizing productivity. Additionally,
regular updates and maintenance should be prioritized to address any potential issues or
software bugs, ensuring the system's reliability and longevity. By continuously refining
and expanding the capabilities of the automated system in line with evolving business
needs and technological advancements, Basic T-shirt Depot can remain at the forefront of
innovation in the retail industry, delivering exceptional service and driving sustainable
growth.
APPENDIX A
Pagadian City
Dear Ma'am,
We, the students of Bachelor of Technical -Vocational Teacher Education major in Computer
Hardware Servicing of West Prime Horizon Institute Inc. Would like to ask permission to conduct
an interview in Basic T- shirt Depot for the fulfillment of our capstone Project 1 Entitled Basic T-
shirt Depot’s Automated System.
Conducting our study at your premises is crucial for gathering accurate and detailed data directly
from the operational environment. This will enable us to understand the specific challenges and
needs of your business, ensuring that our proposed automated system is tailored to improve
efficiency, accuracy, and customer satisfaction. By observing and analyzing your current
processes in real-time, we can design a solution that effectively addresses the manual tasks of
receipt issuance, stock checking, and cash transactions, ultimately enhancing overall productivity.
Thank you.
The proponents:
Adviser Owner
WEST PRIME HORIZON INSTITUTE, INC.
San Francisco Dist,Pagadian City
SURVEY QUESTIONS FOR BASIC T-SHIRT DEPOT PAGADIAN
CRISTY DICDICAN
Stock In - Charge
APPENDIX C
PHOTO DOCUMENTATION
This photo of the proponent taken during the conduction of the proponent’s interview at
Basic T shirt Depot Pagadian.
This photo took at Basic t -shirt Depot Pagadian city, this is the manager of this store.
Our proponents conduct follow up interview for addition in our system.
The proponents conduct interview at Basic T-shirt Depot Pagadian located at Rizal
Avenue Pagadian City.
The proponents gathered to have brainstorming and to analyze the information they got
after the interview.
Checking documents and system to our Adviser, for more revise and grammar editing of
our document.
APPENDIX D
GRAPHICAL USER INTERFACE
http://localhost/ahira/
A login page serves as the entry point for users to access a system, application, or website
that requires authentication typically username and password.
Picture 2. Home Page
A homepage serves as the main entry point for a website, providing users with an overview
and access to its key features and manage system performance and operations.
Picture 6. Stock in
Recording the quantities of items received, stored, and distributed, as well as monitoring
stock levels to ensure optimal inventory control.
Picture 7.Customer List
List details such as customer names, contact information, addresses, credit status, account
status, picture, balance and any relevant notes or preferences.
Details about each product, such as its name, description, price, availability, and any
relevant attributes or variations.
Picture 13. Add new category /Category list
Users to create distinct categories that help organize information effectively and improve
navigation for users.
Display a hierarchical list of categories under which items, products, or content are
organized.
logout, is to terminate a user's current session and end their access to a system, application, or
website
APPENDIX E
USER MANUAL GUIDE
The rest of his manual will guide you through all the forms which may be available to you
and how to use them.
Admin
http://localhost/ahira/admin/application.php
Logging In
Employee/ Owner
Enter your username in the ‘Username’ field.
Enter your password in the ‘Password ‘ field.
Click the ‘Log in’ button
Logging In for the First Time
When logging in, you need to fill up the ‘ Applications’ to create a branch account.
The branch page dashboard screen of a system typically displays essential information about
a specific branch, including performance metrics like sales and revenue, inventory status,
staffing details, customer insights, sales and marketing data, operational efficiency metrics,
alerts, trends, and analysis. It provides an at-a-glance overview to help branch managers and
stakeholders monitor and manage branch operations effectively.
Branch list
To log out, click ‘Giu Matthew’ at the right side corner immediately Log -out.
http://localhost/ahira/
Log- in page
1.Purchase: This is the initial step where a customer selects the products they want to buy
and communicates their intent to purchase them. This could happen through various channels
such as in-store, online shopping platforms, or via a sales representative.
2.Stock in: After the purchase is made, the next step involves ensuring that the purchased
products are available in the inventory. If the products are not already in stock, this step
involves acquiring or restocking them to fulfill the customer's order.
3.Payment: Once the products are ready to be delivered or picked up, the customer proceeds
to make the payment for their purchase. This could involve various payment methods such as
cash, credit/debit card, electronic fund transfer, or mobile payment services.
4.Credit: In some cases, customers may opt for credit-based payment methods, where they
are allowed to purchase products on credit and pay for them later within a specified period.
This step involves managing and processing credit transactions, including verifying credit
limits, terms, and agreements.
6. Products: Finally, once the payment is successfully processed, the purchased products are
handed over to the customer or dispatched for delivery, completing the transaction process.
This step ensures that the customer receives the products they paid for in a timely manner and
in good condition.
How to ‘purchase’
Select a
Click ‘Back’.
If you’re done in your transaction click the log -out button in the right side.
Recovering Forgotten Passwords
1. Open ‘XAMMP’ click ‘Start: Apache’, click ‘Start: MySQL’, and click ‘Start:FileZilla’.
‘localhost/phpMyAdmin/’.
4. Click system’s database or click ‘New’ to import a new database.
5. Click ‘Inventory Schema’ and locate the encrypted password and the decrypt
Hidayati, Irma & Sudarmiatin, Sudarmiatin & Hermawan, Agus. (2023). Analysis of Point of
Sale System Implementation in Coffee Shop. Jurnal Pendidikan dan Kewirausahaan.
11. 932-947. 10.47668/pkwu.v11i3.881.
https://dealhub.io/glossary/billing/#:~:text=Billing%20is%20the%20process%20of,payment
%20within%20a%20specific%20timeframe.
ttps://www.iqsdirectory.com/articles/automation-equipment/automation-system.html#:~:text=An
%20automation%20system%20is%20an,%2C%20electrical%2C%20and%20electronic%20systems.
https://1drv.ms/b/c/e5dc46a1d8ee9e02/EYt_ujhRscRDsp-IP78kKrQBfbBG5thDBp6J1ZDV8o3CUQ
APPENDIX G
SOURCE CODE
LOGIN.PHP
<?php session_start();
?>
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#cssload-pgloading {}
#cssload-pgloading:after {
content: "";
z-index: -1;
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
}
#cssload-pgloading .cssload-loadingwrap
{position:absolute;top:45%;bottom:45%;left:25%;right:25%;}
#cssload-pgloading .cssload-bokeh {
font-size: 163px;
width: 2em;
height: 2em;
position: relative;
margin: 0 auto;
list-style: none;
padding:0;
border-radius: 50%;
-o-border-radius: 50%;
-ms-border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
}
#cssload-pgloading .cssload-bokeh li {
position: absolute;
width: .3em;
height: .3em;
border-radius: 50%;
-o-border-radius: 50%;
-ms-border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
}
@keyframes cssload-rota {
from { }
to { transform: rotate(360deg); }
}
@-o-keyframes cssload-rota {
from { }
to { -o-transform: rotate(360deg); }
}
@-ms-keyframes cssload-rota {
from { }
to { -ms-transform: rotate(360deg); }
}
@-webkit-keyframes cssload-rota {
from { }
to { -webkit-transform: rotate(360deg); }
}
@-moz-keyframes cssload-rota {
from { }
to { -moz-transform: rotate(360deg); }
}
@keyframes cssload-opa {
0% { }
12.0% { opacity: 0.80; }
19.5% { opacity: 0.88; }
37.2% { opacity: 0.64; }
40.5% { opacity: 0.52; }
52.7% { opacity: 0.69; }
60.2% { opacity: 0.60; }
66.6% { opacity: 0.52; }
70.0% { opacity: 0.63; }
79.9% { opacity: 0.60; }
84.2% { opacity: 0.75; }
91.0% { opacity: 0.87; }
}
@-o-keyframes cssload-opa {
0% { }
12.0% { opacity: 0.80; }
19.5% { opacity: 0.88; }
37.2% { opacity: 0.64; }
40.5% { opacity: 0.52; }
52.7% { opacity: 0.69; }
60.2% { opacity: 0.60; }
66.6% { opacity: 0.52; }
70.0% { opacity: 0.63; }
79.9% { opacity: 0.60; }
84.2% { opacity: 0.75; }
91.0% { opacity: 0.87; }
}
@-ms-keyframes cssload-opa {
0% { }
12.0% { opacity: 0.80; }
19.5% { opacity: 0.88; }
37.2% { opacity: 0.64; }
40.5% { opacity: 0.52; }
52.7% { opacity: 0.69; }
60.2% { opacity: 0.60; }
66.6% { opacity: 0.52; }
70.0% { opacity: 0.63; }
79.9% { opacity: 0.60; }
84.2% { opacity: 0.75; }
91.0% { opacity: 0.87; }
}
@-webkit-keyframes cssload-opa {
0% { }
12.0% { opacity: 0.80; }
19.5% { opacity: 0.88; }
37.2% { opacity: 0.64; }
40.5% { opacity: 0.52; }
52.7% { opacity: 0.69; }
60.2% { opacity: 0.60; }
66.6% { opacity: 0.52; }
70.0% { opacity: 0.63; }
79.9% { opacity: 0.60; }
84.2% { opacity: 0.75; }
91.0% { opacity: 0.87; }
}
@-moz-keyframes cssload-opa {
0% { }
12.0% { opacity: 0.80; }
19.5% { opacity: 0.88; }
37.2% { opacity: 0.64; }
40.5% { opacity: 0.52; }
52.7% { opacity: 0.69; }
60.2% { opacity: 0.60; }
66.6% { opacity: 0.52; }
70.0% { opacity: 0.63; }
79.9% { opacity: 0.60; }
84.2% { opacity: 0.75; }
91.0% { opacity: 0.87; }
}
</style>
</head>
<body>
<div id="cssload-pgloading">
<div class="cssload-loadingwrap">
<ul class="cssload-bokeh">
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
</body>
</html>
<?php
include('dist/includes/dbcon.php');
if(isset($_POST['login']))
{
$user_unsafe=$_POST['username'];
$pass_unsafe=$_POST['password'];
$branch=$_POST['branch'];
$user = mysqli_real_escape_string($con,$user_unsafe);
$pass1 = mysqli_real_escape_string($con,$pass_unsafe);
$pass=md5($pass1);
$salt="a1Bz20ydqelm8m1wql";
$pass=$salt.$pass;
date_default_timezone_set('Asia/Manila');
$id=$row['user_id'];
$_SESSION['branch']=$row['branch_id'];
$_SESSION['skin']=$row['skin'];
if ($counter == 0)
{
echo "<script type='text/javascript'>alert('Invalid Username or Password!');
document.location='index.php'</script>";
}
elseif ($counter > 0)
{
$_SESSION['id']=$id;
$_SESSION['name']=$name;
$remarks="has logged in the system at ";
mysqli_query($con,"INSERT INTO history_log(user_id,action,date)
VALUES('$id','$remarks','$date')")or die(mysqli_error($con));
$query1=mysqli_query($con,"select * from payment natural join customer where
branch_id='$branch' and status<>'paid'")or die(mysqli_error($con));
while($row1=mysqli_fetch_array($query1)){
$pid=$row1['payment_id'];
$balance=$row1['balance'];
$payment_for = date("Y-m-d",strtotime($row1['payment_for']));
$date = date("Y-m-d");
$due1 = date("Y-m-d",strtotime($payment_for. " +1 months"));
$due2 = date("Y-m-d",strtotime($due1. " +5 days"));
if ($date>$due2)
{
$interest=$balance*(0.03);
mysqli_query($con,"UPDATE payment SET
interest='$interest',remaining=remaining+'$interest' where payment_id='$pid'") or
die(mysqli_error($con));
}
else
{
$interest='0';
echo "<script
type='text/javascript'>document.location='pages/home.php'</script>";
}
}
?>
INDEX.PHP
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Login - <?php include('dist/includes/title.php');?></title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- ADD THE CLASS layout-top-nav TO REMOVE THE SIDEBAR. -->
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<b>Sales and Inventory with Credit Management System</b>
<style>
</style>
</head>
<!-- ADD THE CLASS layout-top-nav TO REMOVE THE SIDEBAR. -->
<body>
<div class="wrapper">
<?php
include('../dist/includes/dbcon.php');
?>
<!-- Full Width Column -->
<div class="content-wrapper">
<div class="container">
<!-- Content Header (Page header) -->
?>
<div class="box-body">
<!-- Date range -->
<form method="post" action="creditor_add.php" enctype="multipart/form-data"
class="form-horizontal">
<div class="row">
<div class="col-md-4">
<label for="date">Last Name</label>
<div class="input-group col-md-12">
<div class="input-group col-sm-12">
<?php echo $row['cust_last'];?>
</div><!-- /.input group -->
</div><!-- /.form group -->
</div>
<div class="col-md-4">
<label for="date">First Name</label>
<div class="input-group col-md-12">
<?php echo $row['cust_first'];?>
</div><!-- /.input group -->
</div>
<div class="col-md-4">
<label for="date">Middle Initial</label>
<div class="input-group col-md-12">
<?php echo $row['cust_mi'];?>
</div><!-- /.input group -->
</div><!-- /.form group -->
</div><!--row-->
<div class="row">
<div class="col-md-4">
<label for="date">Birthday</label>
<div class="input-group col-md-12">
<?php echo date("M d, Y",strtotime($row['bday']));?>
</div><!-- /.input group -->
</div>
<div class="col-md-4">
<label for="date">Nick Name</label>
<div class="input-group col-md-12">
<?php echo $row['nickname'];?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<label for="date">Present Home Address</label>
<div class="input-group col-md-12">
<?php echo $row['cust_address'];?>
</div><!-- /.input group -->
</div>
<div class="col-md-4">
<label for="date">Tel # and Cellphone #</label>
<div class="input-group col-md-12">
<?php echo $row['cust_contact'];?>
</div><!-- /.input group -->
</div>
</div><!--row-->
<div class="row">
<div class="col-md-6">
<label for="date">House Status</label>
<div class="input-group col-md-6">
<?php echo $row['house_status'];?>
<?php echo $row['years'];?>
</div>
</div>
<div class="col-md-12">
<label for="date">If renting</label>
<div class="input-group col-md-12">
<?php echo $row['rent'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Name of Employer or Business</label>
<div class="input-group col-md-12">
<?php echo $row['emp_name'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Employer/Business Contact #</label>
<div class="input-group col-md-12">
<?php echo $row['emp_no'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Employer or Business Address</label>
<div class="input-group col-md-12">
<?php echo $row['emp_address'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Years Employed or in Business</label>
<div class="input-group col-md-12">
<?php echo $row['emp_year'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Occupation</label>
<div class="input-group col-md-12">
<?php echo $row['occupation'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Monthly Salary/ Net Business Income</label>
<div class="input-group col-md-12">
<?php echo $row['salary'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Spouse Name</label>
<div class="input-group col-md-12">
<?php echo $row['spouse'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Cellphone Number</label>
<div class="input-group col-md-12">
<?php echo $row['spouse_no'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Spouse Employer or Business</label>
<div class="input-group col-md-12">
<?php echo $row['spouse_emp'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Spouse Employer or Business Address & Telephone
Number</label>
<div class="input-group col-md-12">
<?php echo $row['spouse_details'];?>
</div>
</div>
<div class="col-md-12">
<label for="date">Spouse Monthly Income</label>
<div class="input-group col-md-12">
<?php echo $row['spouse_income'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Name of Co-Maker (If required)</label>
<div class="input-group col-md-12">
<?php echo $row['comaker'];?>
</div>
</div>
<div class="col-md-6">
<label for="date">Present Home Address & Telephone # of Co-Maker</label>
<div class="input-group col-md-12">
<?php echo $row['comaker_details'];?>
</div>
</div>
</div><!--row-->
</form>
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
<script>
$(function () {
//Initialize Select2 Elements
$(".select2").select2();
//Datemask dd/mm/yyyy
$("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"});
//Datemask2 mm/dd/yyyy
$("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
//Money Euro
$("[data-mask]").inputmask();
//Colorpicker
$(".my-colorpicker1").colorpicker();
//color picker with addon
$(".my-colorpicker2").colorpicker();
//Timepicker
$(".timepicker").timepicker({
showInputs: false
});
});
</script>
</body>
</html>
__________________________________________________________________________________
___
User Update. PHP
<?php session_start();
if(empty($_SESSION['id'])):
header('Location:../index.php');
endif;
include('../dist/includes/dbcon.php');
$id = $_POST['id'];
$name =$_POST['name'];
$username =$_POST['username'];
$status = $_POST['status'];
?>
User Add.PHP
<?php
include('../dist/includes/dbcon.php');
$name = $_POST['name'];
$username = $_POST['username'];
$password = $_POST['password'];
$pass=md5($password);
$salt="a1Bz20ydqelm8m1wql";
$pass=$salt.$pass;
mysqli_query($con,"INSERT INTO
user(name,username,password,status)
VALUES('$name','$username','$pass','active')")or
die(mysqli_error($con));
?>
User.PHP
</tr>
</thead>
<tbody>
<?php
include 'dbcon.php';
$id=$row['user_id'];
?>
<tr>
<td><?php echo
$row['name'];?></td>
<td><?php echo
$row['branch_name'];?></td>
<td><?php echo
$row['username'];?></td>
<td>****</td>
<td><?php echo
$row['status'];?></td>
<td>
<a
href="#update<?php echo $id;?>" class="btn btn-success btn-xs" data-toggle = "modal" data-
target="#update<?php echo $id;?>"><i class = "fa fa-pencil"></i> Edit</a>
</td>
</tr>
<?php include
'update_user_modal.php';?>
<?php }?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel2">Edit User Details</h4>
</div>
<div class="modal-body">
<form method = "POST" action = "update_user.php">
<input type="hidden" name="user_id"
value="<?php echo $id;?>">
<label>Full name</label>
<input type="text" name
= "name" class="form-control" value = "<?php echo $row['name'];?>">
<br/>
<label>Username</label>
<input type="text" name
= "username" class="form-control" value = "<?php echo $row['username'];?>">
<br/>
<label>Password</label>
<input type="password"
name = "password" class="form-control" placeholder="Enter to Change Password">
<br/>
<label>Status</label>
<select name = "status" class =
"form-control">
<option value =
"active">Active</option>
<option value =
"inactive">Inactive</option>
</select>
<br/>
<label>Branch Name</label>
<select name =
"branch_id" class = "form-control">
<option value =
"<?php echo $row['branch_id'];?>"><?php echo $row['branch_name'];?></option>
<option></option>
<?php
include
'dbcon.php';
$id3=$row1['branch_id'];
?>
<option value =
"<?php echo $row1['branch_id'];?>"><?php echo $row1['branch_name'];?></option>
<?php } ?>
</select>
<br/>
<button type="button" class="btn btn-
default" data-dismiss="modal">Close</button>
<button name = "update" class="btn
btn-primary">Save changes</button>
</form>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
if (isset($_POST['update']))
{
$id = $_POST['user_id'];
$name = $_POST['name'];
$username = $_POST['username'];
$password = $_POST['password'];
$status = $_POST['status'];
$branch_id = $_POST['branch_id'];
if($password=="")
{
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel2">Edit Branch Details</h4>
</div>
<div class="modal-body">
<form method = "POST" action = "update_branch.php">
<input type="hidden" name="branch_id"
value="<?php echo $id;?>">
<label>Name</label>
<input type="text" name
= "branch_name" class="form-control" value = "<?php echo $row1['branch_name'];?>">
<br/>
<label>Address</label>
<input type="text" name
= "branch_address" class="form-control" value = "<?php echo $row1['branch_address'];?>">
<br/>
<label>Contact #</label>
<input type="text" name
= "branch_contact" class="form-control" value = "<?php echo $row1['branch_contact'];?>">
<br/>
<label>Skin</label>
<select name = "skin"
class = "form-control">
<option value =
"<?php echo $row1['skin'];?>"><?php echo $row1['skin'];?></option>
<option>red</option>
<option>purple</option>
<option>black</option>
<option>blue</option>
<option>green</option>
<option>yellow</option>
</select>
<br/>
<button type="button" class="btn btn-
default" data-dismiss="modal">Close</button>
<button name = "update" class="btn
btn-primary">Save changes</button>
</form>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
update branch.PHP
<?php
include('dbcon.php');
if (isset($_POST['update']))
{
$id = $_POST['branch_id'];
$branch_name = $_POST['branch_name'];
$branch_address = $_POST['branch_address'];
$branch_contact = $_POST['branch_contact'];
$skin = $_POST['skin'];
top nav.PHP
<div class="top_nav">
<div class="nav_menu">
<nav>
<div class="nav toggle">
<a id="menu_toggle"><i class="fa fa-bars"></i></a>
</div>
Side bar2.PHP
<div class="sidebar-footer hidden-small">
<a data-toggle="tooltip" data-placement="top" title="Settings">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="FullScreen">
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" title="Lock">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
</a>
<a data-toggle="tooltip" data-placement="top" href = "logout.php" title="Logout">
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
</a>
</div>
Sidebar.PHP
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
<div class="menu_section">
<h3>Menu</h3>
<ul class="nav side-menu">
<li><a href = "application.php"><i class="fa fa-file"></i> Applications<span class="fa
fa-chevron-right"></span></a>
<li><a href = "reports.php"><i class="fa fa-file"></i> Reports
per branch<span class="fa fa-chevron-right"></span></a>
<li><a><i class="fa fa-building"></i>Inventory per branch
<span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<?php
include 'dbcon.php';
$query1=mysqli_query($con,"select * from
branch ORDER BY branch_name")or die(mysqli_error($con));
while ($row=mysqli_fetch_array($query1)){
$id=$row['branch_id'];?>
<li><a href="inventory.php?id=<?php echo $row['branch_id'];?>"><?php echo
$row ['branch_name'];?></a></li>
<?php }?>
</ul>
</li>
<li><a href = "overall.php"><i class="fa fa-file"></i> Overall
Reports<span class="fa fa-chevron-right"></span></a></li>
<li><a href = "branch.php"><i class="fa fa-building"></i> Branch <span class="fa
fa-chevron-right"></span></a>
<!--- <ul class="nav child_menu">
<li><a href="branch.php">Branch</a></li>
<li><a href="index2.html">User</a></li>
<li><a href="index3.html">Dashboard3</a></li>
</ul>--->
</li>
<li><a href = "user.php"><i class="fa fa-users"></i> User <span class="fa fa-
chevron-right"></span></a></li>
<li><a href = "history.php"><i class="fa fa-history"></i> History Log <span
class="fa fa-chevron-right"></span></a></li>
<!-- <li><a href = "product.php"><i class="fa fa-shopping-cart"></i> Products<span
class="fa fa-chevron-right"></span></a></li> -->
<!-- <li><a><i class="fa fa-desktop"></i> UI Elements <span class="fa fa-chevron-
down"></span></a>
<ul class="nav child_menu">
<li><a href="general_elements.html">General Elements</a></li>
<li><a href="media_gallery.html">Media Gallery</a></li>
<li><a href="typography.html">Typography</a></li>
<li><a href="icons.html">Icons</a></li>
<li><a href="glyphicons.html">Glyphicons</a></li>
<li><a href="widgets.html">Widgets</a></li>
<li><a href="invoice.html">Invoice</a></li>
<li><a href="inbox.html">Inbox</a></li>
<li><a href="calendar.html">Calendar</a></li>
</ul>
</li>--->
<!---<li><a><i class="fa fa-table"></i> Tables <span class="fa
fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li><a href="tables.html">Tables</a></li>
<li><a href="tables_dynamic.html">Table Dynamic</a></li>
</ul>
</li>--->
<!---<li><a><i class="fa fa-bar-chart-o"></i> Data Presentation <span class="fa fa-
chevron-down"></span></a>
<ul class="nav child_menu">
<li><a href="chartjs.html">Chart JS</a></li>
<li><a href="chartjs2.html">Chart JS2</a></li>
<li><a href="morisjs.html">Moris JS</a></li>
<li><a href="echarts.html">ECharts</a></li>
<li><a href="other_charts.html">Other Charts</a></li>
</ul>
</li>---->
<!--- <li><a><i class="fa fa-clone"></i>Layouts <span class="fa fa-chevron-
down"></span></a>
<ul class="nav child_menu">
<li><a href="fixed_sidebar.html">Fixed Sidebar</a></li>
<li><a href="fixed_footer.html">Fixed Footer</a></li>
</ul>
</li>--->
</ul>
</div>
<!--- <div class="menu_section">
<h3>Live On</h3>
<ul class="nav side-menu">
<li><a><i class="fa fa-bug"></i> Additional Pages <span class="fa fa-chevron-
down"></span></a>
<ul class="nav child_menu">
<li><a href="e_commerce.html">E-commerce</a></li>
<li><a href="projects.html">Projects</a></li>
<li><a href="project_detail.html">Project Detail</a></li>
<li><a href="contacts.html">Contacts</a></li>
<li><a href="profile.html">Profile</a></li>
</ul>
</li>
<li><a><i class="fa fa-windows"></i> Extras <span class="fa
fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li><a href="page_403.html">403 Error</a></li>
<li><a href="page_404.html">404 Error</a></li>
<li><a href="page_500.html">500 Error</a></li>
<li><a href="plain_page.html">Plain Page</a></li>
<li><a href="login.html">Login Page</a></li>
<li><a href="pricing_tables.html">Pricing Tables</a></li>
</ul>
</li>
<li><a><i class="fa fa-sitemap"></i> Multilevel Menu <span class="fa fa-chevron-
down"></span></a>
<ul class="nav child_menu">
<li><a href="#level1_1">Level One</a>
<li><a>Level One<span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li class="sub_menu"><a href="level2.html">Level Two</a>
</li>
<li><a href="#level2_1">Level Two</a>
</li>
<li><a href="#level2_2">Level Two</a>
</li>
</ul>
</li>
<li><a href="#level1_2">Level One</a>
</li>
</ul>
</li>
<li><a href="javascript:void(0)"><i class="fa fa-laptop"></i> Landing Page <span
class="label label-success pull-right">Coming Soon</span></a></li>
</ul>
</div>--->
</div>
Session.PHP
<?php include ('dbcon.php');
session_start();
//Check whether the session variable SESS_MEMBER_ID is present or not
if (!isset($_SESSION['id']) || (trim($_SESSION['id']) == '')) { ?>
<script>
window.location = "index.php";
</script>
<?php
}
$session_id=$_SESSION['id'];
?>
Script.PHP
<!-- jQuery -->
<script src="vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="vendors/nprogress/nprogress.js"></script>
<!-- Chart.js -->
<script src="vendors/Chart.js/dist/Chart.min.js"></script>
<!-- gauge.js -->
<script src="vendors/gauge.js/dist/gauge.min.js"></script>
<!-- bootstrap-progressbar -->
<script src="vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
<!-- iCheck -->
<script src="vendors/iCheck/icheck.min.js"></script>
<!-- Skycons -->
<script src="vendors/skycons/skycons.js"></script>
<!-- Flot -->
<script src="vendors/Flot/jquery.flot.js"></script>
<script src="vendors/Flot/jquery.flot.pie.js"></script>
<script src="vendors/Flot/jquery.flot.time.js"></script>
<script src="vendors/Flot/jquery.flot.stack.js"></script>
<script src="vendors/Flot/jquery.flot.resize.js"></script>
<!-- Flot plugins -->
<script src="vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
<script src="vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
<script src="vendors/flot.curvedlines/curvedLines.js"></script>
<!-- DateJS -->
<script src="vendors/DateJS/build/date.js"></script>
<!-- JQVMap -->
<script src="vendors/jqvmap/dist/jquery.vmap.js"></script>
<script src="vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
<script src="vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
<!-- bootstrap-daterangepicker -->
<script src="vendors/moment/min/moment.min.js"></script>
<script src="vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
var data2 = [
[gd(2012, 1, 1), 82],
[gd(2012, 1, 2), 23],
[gd(2012, 1, 3), 66],
[gd(2012, 1, 4), 9],
[gd(2012, 1, 5), 119],
[gd(2012, 1, 6), 6],
[gd(2012, 1, 7), 9]
];
$("#canvas_dahs").length && $.plot($("#canvas_dahs"), [
data1, data2
], {
series: {
lines: {
show: false,
fill: true
},
splines: {
show: true,
tension: 0.4,
lineWidth: 1,
fill: 0.4
},
points: {
radius: 0,
show: true
},
shadowSize: 2
},
grid: {
verticalLines: true,
hoverable: true,
clickable: true,
tickColor: "#d5d5d5",
borderWidth: 1,
color: '#fff'
},
colors: ["rgba(38, 185, 154, 0.38)", "rgba(3, 88, 106, 0.38)"],
xaxis: {
tickColor: "rgba(51, 51, 51, 0.06)",
mode: "time",
tickSize: [1, "day"],
//tickLength: 10,
axisLabel: "Date",
axisLabelUseCanvas: true,
axisLabelFontSizePixels: 12,
axisLabelFontFamily: 'Verdana, Arial',
axisLabelPadding: 10
},
yaxis: {
ticks: 8,
tickColor: "rgba(51, 51, 51, 0.06)",
},
tooltip: false
});
new Chart(document.getElementById("canvas1"), {
type: 'doughnut',
tooltipFillColor: "rgba(51, 51, 51, 0.55)",
data: {
labels: [
"Symbian",
"Blackberry",
"Other",
"Android",
"IOS"
],
datasets: [{
data: [15, 20, 30, 10, 30],
backgroundColor: [
"#BDC3C7",
"#9B59B6",
"#E74C3C",
"#26B99A",
"#3498DB"
],
hoverBackgroundColor: [
"#CFD4D8",
"#B370CF",
"#E95E4F",
"#36CAAB",
"#49A9EA"
]
}]
},
options: options
});
});
</script>
<!-- /Doughnut Chart -->
var optionSet1 = {
startDate: moment().subtract(29, 'days'),
endDate: moment(),
minDate: '01/01/2012',
maxDate: '12/31/2015',
dateLimit: {
days: 60
},
showDropdowns: true,
showWeekNumbers: true,
timePicker: false,
timePickerIncrement: 1,
timePicker12Hour: true,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1,
'month').endOf('month')]
},
opens: 'left',
buttonClasses: ['btn btn-default'],
applyClass: 'btn-small btn-primary',
cancelClass: 'btn-small',
format: 'MM/DD/YYYY',
separator: ' to ',
locale: {
applyLabel: 'Submit',
cancelLabel: 'Clear',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August',
'September', 'October', 'November', 'December'],
firstDay: 1
}
};
$('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + '
- ' + moment().format('MMMM D, YYYY'));
$('#reportrange').daterangepicker(optionSet1, cb);
$('#reportrange').on('show.daterangepicker', function() {
console.log("show event fired");
});
$('#reportrange').on('hide.daterangepicker', function() {
console.log("hide event fired");
});
$('#reportrange').on('apply.daterangepicker', function(ev, picker) {
console.log("apply event fired, start/end dates are " + picker.startDate.format('MMMM
D, YYYY') + " to " + picker.endDate.format('MMMM D, YYYY'));
});
$('#reportrange').on('cancel.daterangepicker', function(ev, picker) {
console.log("cancel event fired");
});
$('#options1').click(function() {
$('#reportrange').data('daterangepicker').setOptions(optionSet1, cb);
});
$('#options2').click(function() {
$('#reportrange').data('daterangepicker').setOptions(optionSet2, cb);
});
$('#destroy').click(function() {
$('#reportrange').data('daterangepicker').remove();
});
});
</script>
<!-- /bootstrap-daterangepicker -->
gauge.maxValue = 6000;
gauge.animationSpeed = 32;
gauge.set(3200);
gauge.setTextField(document.getElementById("gauge-text"));
</script>
Reports.PHP
<?php
include 'dbcon.php';
$query1=mysqli_query($con,"select * from
branch ORDER BY branch_name")or die(mysqli_error($con));
while ($row=mysqli_fetch_array($query1)){
$id=$row['branch_id'];?>
<a href = "page_reports.php?id=<?php echo
$row['branch_id'];?>">
<div class = "col-md-6 col-6-12 col-6">
</div>
</a>
<?php } ?>
</div>
</div>
</div>
<!-- /page content -->
Product.PHP
$branch_id = $_GET['id'];
?>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<?php include 'main_sidebar.php';?>
?>
<h5><b><?php echo $row['branch_name'];?></b> </h5>
<h6>Address: <?php echo $row['branch_address'];?></h6>
<h6>Contact #: <?php echo $row['branch_contact'];?></h6>
<h5><b>Product Inventory as of today, <?php echo date("M d,
Y h:i a");?></b></h5>
<tr>
<th>Product Name</th>
<th>Qty Left</th>
<th>Price</th>
<th>Total</th>
<th>Reorder</th>
</tr>
</thead>
<tbody>
<?php
$branch=$_GET['id'];
while($row=mysqli_fetch_array($query)){
$total=$row['prod_price']*$row['prod_qty'];
$grand+=$total;
?>
<tr>
<td><?php echo $row['prod_name'];?></td>
<td><?php echo $row['prod_qty'];?></td>
</tr>
<?php }?>
</tbody>
<tfoot>
<tr>
<th colspan="3">Total</th>
<th colspan="2">P<?php echo
number_format($grand,2);?></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
Page reports.PHP
<?php include 'header.php';
$branch_id = $_GET['id'];
?>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<?php include 'main_sidebar.php';?>
$branch=$_GET['id'];
$query=mysqli_query($con,"select * from branch where
branch_id='$branch'")or die(mysqli_error());
$row=mysqli_fetch_array($query);
?>
<h5><b><?php echo $row['branch_name'];?></b> </h5>
<h6>Address: <?php echo $row['branch_address'];?></h6>
<h6>Contact #: <?php echo $row['branch_contact'];?></h6>
<h5><b>Product Inventory as of today, <?php echo date("M d,
Y h:i a");?></b></h5>
<a class = "btn btn-success btn-print" href = "" onclick =
"window.print()"><i class ="glyphicon glyphicon-print"></i> Print</a>
<a class = "btn btn-primary btn-print" href = "reports.php"><i
class ="glyphicon glyphicon-arrow-left"></i> Back to Homepage</a>
$row=mysqli_fetch_array($query);
?>
<div class="count">
<?php echo
$row['total_payment'];?>
</div>
<span class="count_bottom"><i
class="green"></i>For the month of <?php echo date("F",strtotime($month));?>, <?php echo
$year1;?></span>
</div>
<div class="col-md-3 col-sm-3 col-
xs-3 tile_stats_count">
<span class="count_top"><i
class="fa fa-money"></i> Total Receivables</span>
<?php
$date = date("M. d, Y");
$branch_id = $_GET['id'];
$query =
mysqli_query($con,"select SUM(balance) as total_balance from customer where branch_id
='$branch_id' ") or die(mysqli_error($con));
$row1=mysqli_fetch_array($query);
?>
<div class="count green"><?php
echo $row1['total_balance'];?></div>
<span class="count_bottom"><i
class="green">Total Receivables as of</i> <?php echo $date;?></span>
</div>
<div class="col-md-3 col-sm-3 col-
xs-3 tile_stats_count">
<span class="count_top"><i
class="fa fa-user"></i> Active Customers</span>
<?php
$query =
mysqli_query($con,"select COUNT(*) as total_no_customer from customer where branch_id
='$branch_id' AND balance !='0' ") or die(mysqli_error($con));
$row2=mysqli_fetch_array($query);
?>
<div class="count"><?php echo
$row2['total_no_customer'];?></div>
<span class="count_bottom"><i
class="red">as of today</i></span>
</div>
<div class="col-lg-3 col-md-3 col-
sm-3 col-xs-3 tile_stats_count">
<span class="count_top"><i
class="fa fa-user"></i> Number products re-order</span>
<?php
$query =
mysqli_query($con,"select COUNT(*) as total_no_reorder from product where branch_id
='$branch_id' AND prod_qty <=reorder ") or die(mysqli_error($con));
$row3=mysqli_fetch_array($query);
?>
<div class="count"><?php echo
$row3['total_no_reorder'];?></div>
<span class="count_bottom"><i
class="green">as of today</i></span>
</div>
<div class="col-md-12 col-sm-12 col-xs-
12">
<div
class="x_panel">
<div
class="x_title">
<h2>Total
Monthly Sales <small></small></h2>
<ul
class="nav navbar-right panel_toolbox">
<li><a
class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li
class="dropdown">
<a
href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-
expanded="false"><i class="fa fa-wrench"></i></a>
<ul
class="dropdown-menu" role="menu">
</li>
<li><a href="#">Settings 2</a>
</li>
</ul>
</li>
<li><a
class="close-link"><i class="fa fa-close"></i></a>
</li>
</ul>
<div
class="clearfix"></div>
</div>
<div
class="x_content">
<div
id="graph"></div>
<tr>
<th>MONTH</th>
<th
class="text-right">SALES</th>
</tr>
<tbody>
<?php
$_SESSION['branch']=$_GET['id'];
$year=date("Y");
$query=mysqli_query($con,"select *,SUM(payment) as
payment,DATE_FORMAT(payment_date,'%b') as month from payment where
YEAR(payment_date)='$year' and branch_id='$branch' group by MONTH(payment_date)")or
die(mysqli_error($con));
$total=0;
while($row=mysqli_fetch_array($query)){
$total=$total+$row['payment'];
?>
<tr>
<th><?php echo$row['month'];?></th>
<td class="text-right"><b><?php echo
number_format($row['payment'],2);?></b></td>
</tr>
<?php }?>
<tr>
<th><h2>TOTAL</h2></th>
<th class="text-right"><h2><b><?php echo
number_format($total,2);?></b></h2></td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<script type="text/javascript">
$(document).ready(function() {
var options = {
chart: {
renderTo: 'graph',
type: 'column',
marginRight: 20,
marginBottom: 25
},
title: {
text: '',
x: -20 //center
},
subtitle: {
text: '',
x: -10
},
xAxis: {
categories: []
},
yAxis: {
title: {
text: 'Total Monthly Sales'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+ Highcharts.numberFormat(this.y,
0)
this.x +': '+ this.y
;
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: 0,
y: 100,
borderWidth: 0
},
series: []
}
$.getJSON("data.php", function(json) {
options.xAxis.categories = json[0]['name'];
options.series[0] = json[1];
//options.series[1] = json[2];
Overall.PHP
}
</style>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<?php include 'main_sidebar.php';?>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<select class="form-control select2"
name="month" tabindex="1" autofocus required>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
</div>
<!-- /.input group -->
</div>
<div class="form-group col-md-5">
<label></label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<select class="form-control select2"
name="year" tabindex="1" required>
<option>2017</option>
<option>2018</option>
<option>2019</option>
</select>
</div>
<!-- /.input group -->
</div>
<!-- /.form group --><br>
<button type="submit" class="btn btn-primary"
name="display">Display</button>
</form>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
<div class="row">
<div id="graph"></div>
<tr>
<th>MONTH</th>
<th>BRANCH</th>
<th
class="text-right">SALES</th>
</tr>
<tbody>
<?php
if (isset($_POST['display'])){
$year=$_POST['year'];
$month=$_POST['month'];
$_SESSION['year']=$year;
$_SESSION['month']=$month;
$query=mysqli_query($con,"select *,SUM(payment) as
payment,DATE_FORMAT(payment_date,'%b') as month from payment natural join branch
where YEAR(payment_date)='$year' and
MONTH(payment_date)='$month' group by branch_id,MONTH(payment_date) order by
MONTH(payment_date)")or die(mysqli_error($con));
$total=0;
?>
<tr>
<th><?php echo $row['month']." ".$year;?></th>
<th><?php echo $row['branch_name'];?></th>
<td class="text-right"><b><?php echo
number_format($row['payment'],2);?></b></td>
</tr>
<?php }
echo "<tr>
<th><h2>TOTAL</h2></th>
<th colspan='2' class='text-right'><h2><b>$total</b></h2></td>
</tr>";
}?>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /page content -->
<script
type="text/javascript"src="vendors/jquery/dist/jquery.min.js"></script>
<script type="text/javascript"src="js/highcharts.js"></script>
<script type="text/javascript"src="js/exporting.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var options = {
chart: {
renderTo: 'graph',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
spacingBottom: 50,
},
title: {
text: '',
style: { fontFamily:
'\'Lato\', sans-serif', lineHeight: '18px', fontSize: '26px' }
},
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+
Highcharts.numberFormat(this.percentage, 2) +' %';
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#000000',
$.getJSON("datapie.php", function(json) {
options.series[0].data = json;
chart = new Highcharts.Chart(options);
});
});
</script>
Main sidebar.PHP
<div class="col-md-3 left_col">
<div class="left_col scroll-view">
<div class="navbar nav_title" style="border: 0;">
<a href="#" class="site_title"><i class="fa fa-cog"></i>
<span>Administrator</span></a>
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- /menu profile quick info -->
<br />
Logout.PHP
<?php
include 'dbcon.php';
session_start();
session_destroy();
?>
<script>
window.location = 'index.php';
</script>
Login.PHP
<?php session_start();
include('dbcon.php');
if(isset($_POST['login']))
{
$user_unsafe=$_POST['username'];
$pass_unsafe=$_POST['password'];
$user = mysqli_real_escape_string($con,$user_unsafe);
$pass1 = mysqli_real_escape_string($con,$pass_unsafe);
$pass=md5($pass1);
$salt="a1Bz20ydqelm8m1wql";
$pass=$salt.$pass;
if ($counter == 0)
{
echo "<script type='text/javascript'>alert('Invalid Username or
Password!');
document.location='index.php'</script>";
}
else
{
$_SESSION['id']=$id;
$_SESSION['branch']=0;
/* $_SESSION['name']=$first." ".$last; */
echo "<script
type='text/javascript'>document.location='reports.php'</script>";
}
}
?>
Inventory.PHP
$branch_id = $_GET['id'];
?>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<?php include 'main_sidebar.php';?>
?>
<h5><b><?php echo $row['branch_name'];?></b> </h5>
<h6>Address: <?php echo $row['branch_address'];?></h6>
<h6>Contact #: <?php echo $row['branch_contact'];?></h6>
<h5><b>Product Inventory as of today, <?php echo date("M d,
Y h:i a");?></b></h5>
<tr>
<th>Product Name</th>
<th>Qty Left</th>
<th>Price</th>
<th>Total</th>
<th>Reorder</th>
</tr>
</thead>
<tbody>
<?php
$branch=$_GET['id'];
while($row=mysqli_fetch_array($query)){
$total=$row['prod_price']*$row['prod_qty'];
$grand+=$total;
?>
<tr>
<td><?php echo $row['prod_name'];?></td>
<td><?php echo $row['prod_qty'];?></td>
</tr>
<?php }?>
</tbody>
<tfoot>
<tr>
<th colspan="3">Total</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<!-- footer content -->
<footer>
<div class="pull-right">
Sales and Inventory System <a href="#"></a>
</div>
<div class="clearfix"></div>
</footer>
<!-- /footer content -->
</div>
</div>
Index.PHP
<?php include 'header_login.php';?>
<body class="login">
<div>
<div class="login_wrapper">
<div class="animate form login_form">
<section class="login_content">
<form method = "POST" action = "login.php">
<h1>Administrator Login</h1>
<div>
<input type="text" name = "username" class="form-control"
placeholder="Username" required="true" />
</div>
<div>
<input type="password" name = "password" class="form-control"
placeholder="Password" required="true" />
</div>
<div>
<button class="btn btn-block btn-warning" name = "login"> Log in</button>
</div>
<div class="clearfix"></div>
<div class="separator">
<div class="clearfix"></div>
<br />
<div>
<h1><i class="fa fa-paw"></i> Sales and Inventory System </h1>
<p>Basic Clothing Line Company</p>
</div>
</div>
</form>
</section>
</div>
</div>
</div>
</body>
</html>
History.PHP
</tr>
</thead>
<tbody>
<?php
include 'dbcon.php';
$id=$row['log_id'];
?>
<tr>
<td><?php echo
$row['name'];?></td>
<td><?php echo
$row['action']. " ".date("F d, Y - - h:i A", strtotime($row['date'])); ?></td>
</tr>
<?php include
'update_user_modal.php';?>
<?php }?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /page content -->
Header login.PHP
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
Header.PHP
<?php include 'session.php';?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
h5,h6{
text-align:center;
}
@media print {
.btn-print {
display:none !important;
}
.main-footer {
display:none !important;
}
.box.box-primary {
border-top:none !important;
}
.nav_menu {
display:none;
}
footer{
display:none;
}
</style>
<!---dataTable--->
Dbcon.PHP
<?php
$con = mysqli_connect("localhost","root","","inventory");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>
Datatable Script.PHP
<script src="vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="vendors/nprogress/nprogress.js"></script>
<!-- iCheck -->
<script src="vendors/iCheck/icheck.min.js"></script>
<!-- Datatables -->
<script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
<script src="vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
<script src="vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
<script src="vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<script src="vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
<script src="vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
<script src="vendors/datatables.net-scroller/js/datatables.scroller.min.js"></script>
<script src="vendors/jszip/dist/jszip.min.js"></script>
<script src="vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/pdfmake/build/vfs_fonts.js"></script>
TableManageButtons = function() {
"use strict";
return {
init: function() {
handleDataTableButtons();
}
};
}();
$('#datatable').dataTable();
$('#datatable-keytable').DataTable({
keys: true
});
$('#datatable-responsive').DataTable();
$('#datatable-scroller').DataTable({
ajax: "js/datatables/json/scroller-demo.json",
deferRender: true,
scrollY: 380,
scrollCollapse: true,
scroller: true
});
$('#datatable-fixed-header').DataTable({
fixedHeader: true
});
var $datatable = $('#datatable-checkbox');
$datatable.dataTable({
'order': [[ 1, 'asc' ]],
'columnDefs': [
{ orderable: false, targets: [0] }
]
});
$datatable.on('draw.dt', function() {
$('input').iCheck({
checkboxClass: 'icheckbox_flat-green'
});
});
TableManageButtons.init();
});
</script>
Datapie.PHP
<?php
session_start();
include('dbcon.php');
$year=$_SESSION['year'];
$month=$_SESSION['month'];
$result = mysqli_query($con,"select branch_name,SUM(payment) as payment from payment
natural join branch
where YEAR(payment_date)='$year' and
MONTH(payment_date)='$month' group by branch_id,MONTH(payment_date) order by
MONTH(payment_date)");
$rows = array();
while($r = mysqli_fetch_array($result)) {
$row[0] = $r[0];
$row[1] = $r[1];
array_push($rows,$row);
}
Data.PHP
<?php
session_start();
include('dbcon.php');
$year=date("Y");
$branch=$_SESSION['branch'];
$query = mysqli_query($con,"select *,SUM(payment) as
amount,DATE_FORMAT(payment_date,'%b') as month from payment where
YEAR(payment_date)='$year' and branch_id='$branch' group by MONTH(payment_date)")
or die(mysqli_error($con));
$category = array();
//$category['name'];
$series1 = array();
$series1['name'] = 'Monthly Sales';
while($r = mysqli_fetch_array($query)) {
//$count=$r['total'];
$category['name'][] =$r['month'];
$category['data'][] =$r['month'];
$series1['data'][] = $r['amount'];
}
$result = array();
array_push($result,$category);
array_push($result,$series1);
//array_push($result,$series2);
mysqli_close($con);
?>
Dashboard.PHP
<div class="clearfix"></div>
<br />
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="dashboard_graph">
<div class="row x_title">
<div class="col-md-6">
<h3>Network Activities <small>Graph title sub-title</small></h3>
</div>
<div class="col-md-6">
<div id="reportrange" class="pull-right" style="background: #fff; cursor:
pointer; padding: 5px 10px; border: 1px solid #ccc">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
<span>December 30, 2014 - January 28, 2015</span> <b class="caret"></b>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<br />
<div class="row">
<div class="widget_summary">
<div class="w_left w_25">
<span>0.1.5.3</span>
</div>
<div class="w_center w_55">
<div class="progress">
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="60"
aria-valuemin="0" aria-valuemax="100" style="width: 45%;">
<span class="sr-only">60% Complete</span>
</div>
</div>
</div>
<div class="w_right w_20">
<span>53k</span>
</div>
<div class="clearfix"></div>
</div>
<div class="widget_summary">
<div class="w_left w_25">
<span>0.1.5.4</span>
</div>
<div class="w_center w_55">
<div class="progress">
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="60"
aria-valuemin="0" aria-valuemax="100" style="width: 25%;">
<span class="sr-only">60% Complete</span>
</div>
</div>
</div>
<div class="w_right w_20">
<span>23k</span>
</div>
<div class="clearfix"></div>
</div>
<div class="widget_summary">
<div class="w_left w_25">
<span>0.1.5.5</span>
</div>
<div class="w_center w_55">
<div class="progress">
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="60"
aria-valuemin="0" aria-valuemax="100" style="width: 5%;">
<span class="sr-only">60% Complete</span>
</div>
</div>
</div>
<div class="w_right w_20">
<span>3k</span>
</div>
<div class="clearfix"></div>
</div>
<div class="widget_summary">
<div class="w_left w_25">
<span>0.1.5.6</span>
</div>
<div class="w_center w_55">
<div class="progress">
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="60"
aria-valuemin="0" aria-valuemax="100" style="width: 2%;">
<span class="sr-only">60% Complete</span>
</div>
</div>
</div>
<div class="w_right w_20">
<span>1k</span>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<div class="sidebar-widget">
<h4>Profile Completion</h4>
<canvas width="150" height="80" id="foo" class="" style="width: 160px;
height: 100px;"></canvas>
<div class="goal-wrapper">
<span class="gauge-value pull-left">$</span>
<span id="gauge-text" class="gauge-value pull-left">3,200</span>
<span id="goal-text" class="goal-value pull-right">$5,000</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Recent Activities <small>Sessions</small></h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
aria-expanded="false"><i class="fa fa-wrench"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Settings 1</a>
</li>
<li><a href="#">Settings 2</a>
</li>
</ul>
</li>
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="dashboard-widget-content">
<div class="row">
<table class="countries_list">
<tbody>
<tr>
<td>United States</td>
<td class="fs15 fw700 text-right">33%</td>
</tr>
<tr>
<td>France</td>
<td class="fs15 fw700 text-right">27%</td>
</tr>
<tr>
<td>Germany</td>
<td class="fs15 fw700 text-right">16%</td>
</tr>
<tr>
<td>Spain</td>
<td class="fs15 fw700 text-right">11%</td>
</tr>
<tr>
<td>Britain</td>
<td class="fs15 fw700 text-right">10%</td>
</tr>
</tbody>
</table>
</div>
<div id="world-map-gdp" class="col-md-8 col-sm-12 col-xs-12"
style="height:230px;"></div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="clearfix"></div>
</div>
<!-- end of weather widget -->
</div>
</div>
</div>
</div>
<!-- /page content -->
Branch.PHP
</tr>
</thead>
<tbody>
<?php
include 'dbcon.php';
$id=$row1['branch_id'];
?>
<tr>
<td><?php echo
$row1['branch_name'];?></td>
<td><?php echo
$row1['branch_address'];?></td>
<td><?php echo
$row1['branch_contact'];?></td>
<td><?php echo
$row1['skin'];?></td>
<td>
<a
href="#update<?php echo $id;?>" class="btn btn-success btn-xs" data-toggle = "modal" data-
target="#update<?php echo $id;?>"><i class = "fa fa-pencil"></i> Edit</a>
</td>
</tr>
<?php include
'update_branch_modal.php';?>
<?php }?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
Application update.PHP
<?php session_start();
if(empty($_SESSION['id'])):
header('Location:../index.php');
endif;
include('../dist/includes/dbcon.php');
$id = $_POST['id'];
$status =$_POST['status'];
?>
Application.PHP
<div class="form-group">
<label class="control-label col-lg-3" for="name">Application Status</label>
<div class="col-lg-9">
<input type="hidden" name="id" value="<?php echo $cid;?>">
<select class="form-control" id="id" name="status">
<option>Approved</option>
<option>Disapproved</option>
<option>Pending</option>
</select>
</div>
</div>
</div><br>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-default"
data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div><!--end of modal-dialog-->
</div>
<!--end of modal-->
<?php $i++;}?>
</tbody>
<tfoot>
<tr>
<th>Customer Last Name</th>
<th>Customer First Name</th>
<th>Address</th>
<th>Contact #</th>
<th>Application Status</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<!-- /page content -->
Ahira reports.PHP
</div>
</div>
</div>
<!-- /page content -->
$id=$row1['branch_id'];
?>
<option value = "<?php echo
$row1['branch_id'];?>"><?php echo $row1['branch_name'];?></option>
<?php } ?>
</select>
<span class="fa form-control-feedback right" aria-hidden="true"></span>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
Add user.PHP
<?php
include 'dbcon.php';
$username = $_POST['username'];
$password = $_POST['password'];
$name = $_POST['name'];
$status = $_POST['status'];
$branch_id = $_POST['branch_id'];
$pass1=md5($password);
$salt="a1Bz20ydqelm8m1wql";
$pass1=$salt.$pass1;
?>
<option value =
"purple">purple</option>
<option value = "black">black</option>
<option value =
"yellow">yellow</option>
</select>
<span class="fa form-control-feedback right" aria-hidden="true"></span>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
Add branch.PHP
<?php
include 'dbcon.php';
$branch_name = $_POST['branch_name'];
$branch_address = $_POST['branch_address'];
$branch_contact = $_POST['branch_contact'];
$skin = $_POST['skin'];
mysqli_query($con,"INSERT INTO
branch(branch_name,branch_address,branch_contact,skin)
VALUES('$branch_name','$branch_address','$branch_contact','$skin')")or
die(mysqli_error($con));
echo "<script type='text/javascript'>alert('Data Successfully
Saved!');</script>";
echo "<script>window.location='branch.php'</script>";
?
APPENDIX H
CURRICULUM VITAE
Personal Information
Age: 25
Gender: Female
Status: Single
Citizenship: Filipino
Occupation: Farmer
Occupation: Farmer
Personal Information
Age: 25
Gender: Female
Status: Single
Citizenship: Filipino
Religion: Islam
Occupation: Deceased
Personal Information
Age: 22
Gender: Female
Status: Single
Citizenship: Filipino
Religion: Alliance
Occupation: Farmer
Personal Information
Age: 24
Gender: Female
Status: Single
Citizenship: Filipino
Occupation: Farmer
Personal Information
Age: 24
Gender: Male
Status: Single
Citizenship: Filipino
Occupation: Forman
Personal Information
Age: 22
Gender: Male
Status: Single
Citizenship: Filipino