You are on page 1of 42

MEDICAL SHOP MANAGEMENT

A PROJECT REPORT

Submitted by

YUVARAJ V
(REGISTER NO:112418621343)

of
SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY

A PROJECT REPORT
Submitted to the

FACULTY OF INFORMATION AND COMMUNICATION ENGINEERING

in partial fulfillment of the requirements


for the award of the degree
of
MASTER OF COMPUTER APPLICATIONS

ANNA UNIVERSITY

CHENNAI -600 025

MAY- 2021

i
BONAFIDE CERTIFICATE

Certified that the project report titled “MEDICAL SHOP


MANAGEMENT” is the bonafide work of Mr.YUVARAJ V (Registration
number: 112418621343 ) who carried out the research under my supervision.
Certified further that to the best of my knowledge the work reported here in does not
from part of any other project report or dissertation on the basis of which a degree or
award was conferred on an earlier occasion on this or any other candidate.

Internal Guide Head of the Department

Submitted to Project and Viva - voce Examination held on ………………………

Internal Examiner External Examiner


ACKNOWLEDGEMENT

I would like to express my sincere thanks and gratitude to our honorable

Chairman DR.K.C.VASUDEVAN M.E, PhD,

I convey my gratitude to our beloved principal, MR.P.RETHINA SABAPATHI,

M.Sc, M.Tech(Phd)for being a great source of inspiration.

My sincere thanks to Mr.B.MURALIDHARAN, MCA, M.Phil, M.Tech Associate

Professor, Head of the Department, Department of Computer Applications.

I wish to express my thanks to internal project guide Mr.T.C.SANKAR , MCA,

M.Phill,M.E Associate Professor, Department of Computer Applications.

My sincere thanks to all the teaching and non-teaching members of the Department of

Computer Application who have directly or indirectly helped us in this project

YUVARAJ V
ABSTRACT

The main objective of the Django Project on Medical Shop Management


System .In this project is records to the church member details in server. It
manages all the information about related between to church. The project is
totally built at admin end and thus only the administrator is guaranteed the
access. The purpose of the project is collected of all this data and church connect
to related with all and record all of the data to proceed to report the data to head
of the church.
TABLE OF CONTENTS

CHAPTER NO TITLE PAGE NO

ABSTRACT v

1 INTRODUCTION 1

1.1 OVERVIEW OF THE PROJECT 1

2 SYSTEM ANALYSIS 2
2.1 EXISTING SYSTEM 2
2.3 FEASIBILITY STUDY 3
2.3.1 TECHNICAL FEASIBILITY 3
2.3.2 ECONOMIC FEASIBILITY 3

2.3.3 OPERATIONAL FEASIBILITY 4

2.4 PROBLEM ANALYSIS 4


2.5 CONTEXT AND DATA 5
2.6 SYSTEM CONFIGURATION 7
2.6.1 HARDWARE REQUIREMENTS 7

2.6.2 SOFTWARE REQUIREMENTS 7

2.6.3 SOFTWARE DESCRIPTIONS 7

3 SYSTEM DESIGN 9
3.1 INPUT DESIGN 9

3.2 DATABASE DESIGN 9


3.2.1 TABLE DESIGN 11
3.5 MODULE DESCRIPTION 13

4 SYSTEM TESTING 14

4.1 UNIT TESTING 14

4.2 INTEGRATION TESTING 15

4.3 VALIDATION TESTING 15

5 CONCLUSION 16

SAMPLE SCREENSHOTS 30

6 REFERENCES 34

BOOK REFERENCES 34

WEB REFERENCES 34
CHAPTER 1

INTRODUCTION

1.1 OVERVIEW OF THE PROJECT

The Project on Medical Shop Management System is to manage the details of Sells,
Medicines, Stocks, Company, billing. It manages all the information about Sells, Medical
Shop, Inventory, Sells. The project is totally built at administrative end and thus only the
administrator is guaranteed the access. The purpose of the project is to build an application
program to reduce the manual work for managing the Sells, Medicines, Medical Shop,
Stocks. It tracks all the details about the Stocks, Company, Inventory.

The main objective of the application is to automate the existing system of manually
maintained records of the counter sales, purchases, reorder levels, Supplier and Customer
monetary positions and other related transactions made by the seller.

This application can be used by any other store to automate the process of manually
maintaining the records related to the subject of maintaining the stock and liquid flows.
The main goal of this project is that managing the medicine details, stock details and billing details
very clearly. The project is aimed to develop by PHP as Front end and SQL as Back end.
CHAPTER 2

SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

Currently, the medical works are based on the manual process, and each work is maintained in
the paper. The details of purchasing drugs, audits, sell reports maintained on the paper while anyone
can enter into the system and can make changes in these reports, so it is not a safe method to keep the
information on the paper. The pharmacist faces problem in searching the products from the self as it is
not an easy method to remember about the place of each medicine. There no Pharmacy Management
System which can alert the pharmacist about the end of the drugs.
Disadvantages:
1. Can’t able to handle stock details
2. More number of resources can be handling single medical shop
3. It’s not user friendly for the customer
4. Customer need to wait long time for getting billing report.

2.2 PROPOSED SYSTEM

The design of the medical shop management system is based on the computer which will
simplify the maintenance of the information, accessible and efficient. The Pharmacy Management
System will provide the information about the end of the drugs in the medical so that the physician
can order them drugs before the end. The pharmacist and nurses will get more accurate results at the
time sell, about the details of the use of medicines and the dosages so that the system will become
more reliable to use than the present system. The records of each work will be secure as to access the
information the user must have to provide the ID and password in the system.

Advantages:
1. Systematically provide all the details up-to-date.
2. Easily find the daily billing details
3. We can collect the all-customer details in single applicationapplication.

9
2.3 FEASIBILITY STUDY

The feasibility of the system is analyzed in this phase and business proposal is put
forth with general plan for the project and cost estimates. During the system analysis of the
project, the feasibility study of proposed system is to be carried out. For feasibility analysis,
some understanding of the major requirements for the system is essential. Three key
considerations involved in feasibility analysis are

 Technical Feasibility

 Economic Feasibility

 Operational Feasibility

2.3.1 Technical Feasibility

Technical feasibility assesses the current resources (such as hardware and


software) technology, which are required to accomplish user requirements in the software
within the allocated time and budget. For this, whether the certain current resources and
technology can be upgraded or added in the software to accomplish specified user
requirements.

The technical requirements of the application are simple and basic. Python is used
for the developers of the application and the framework is largely used by many, thus there
will be enough support for future enhancements. The framework is stable and the support
from the developers is constantly updated. The devices which have internet connectivity are
enough for the application.

2.3.2 Economic Feasibility

Economic feasibility determines whether the required software is capable of


generating financial gains for an organization. It involves the cost incurred on the software
development team, estimated cost of hardware and software, cost of performing feasibility
study, and so on.
The cost of application development is very less and the cost of implementation
is also less. It can be developed with the system with minimum requirements and can also be
operated with the system with some basic requirements that are available the existing
systems. For this, it is essential to consider expenses made on purchases and activities
required to carry out software development.

2.3.3 Operational Feasibility

Operational feasibility assesses the extent to which the required software


performs a series of steps to solve user requirements. This feasibility is dependent on
developer and involves visualizing whether the software will operate after it has been
developed and be operative.

The application is developed based on the user requirements and is developed on


the priority of the user requirements such as an integrated service and reviewing platform.

2.4 PROBLEM ANALYSIS

The orders from public are submitted through email, letter or form to the
corresponding authority. The registered orders are forwarded to corresponding authority and
report about the orders is submitted. The status of orders addressed is not recorded and
maintained properly. The maps are not implemented. So, the customer does not know live
location of the package. There is need for the software which receives the orders through
online, forwarded to respective peoples for rectification and post the status of orders.
2.5 CONTEXT AND DATA FLOWDIAGRAM

A data-flow diagram (DFD)is a way of representing a flow of a data of a process or


system. The DFD also provides information about the outputs and inputs of each entity and
process itself. A data-flow diagram is a part of structured-analysis modelling tools.

LEVEL 0:
LEVEL:1
2.6 SYSTEM CONFIGURATION

2.6.1 Hardware Requirements

Processor : P 4 700 GHz

RAM Capacity : 4GB

Hard Disk : 180GB

2.6.2 Software Requirements

Operating System : Windows 8,10

Front End : JAVA

Back End : SQL

2.6.3 Software Descriptions

Java

Java is a high-level programming language developed by Sun Microsystems. It was


originally designed for developing programs for set-top boxes and handheld devices, but
later became a popular choice for creating web applications.

The Java syntax is similar to C++, but is strictly an object-oriented programming


language. For example, most Java programs contain classes, which are used to define
objects, and methods, which are assigned to individual classes. Java is also known for
being stricter than C++, meaning variables and functions must be explicitly defined. This
means Java source code may produce errors or "exceptions" more easily than other
languages, but it also limits other types of errors that may be caused by undefined variables
or unassigned types.

Unlike Windows executables (.EXE files) or Macintosh applications (.APP files),


Java programs are not run directly by the operating system. Instead, Java programs are
interpreted by the Java Virtual Machine, or JVM, which runs on multiple platforms. This
means all Java programs are multiplatform and can run on different platforms, including
Macintosh, Windows, and Unix computers. However, the JVM must be installed for Java
applications or applets to run at all. Fortunately, the JVM is included as part of the Java
Runtime Environment (JRE),

MySQL

MySQL is the popular Open-Source Relational SQL Database Management


System. MySQL is being used for developing various web-based software applications.
The MySQL development project has made its source code available under the terms of
the General Public License. It is used to store the information.

MySQL was owned and sponsored by the single for-profit firm, the Swedish
company MySQL AB, now owned by Oracle Corporation. For proprietary use, several
paid editions are available, and offer additional functionality.
CHAPTER 3

SYSTEM DESIGN

3.1 INPUT DESIGN


Input Design is the process of converting a user-oriented description of the
input into a computer-based system. The goal of designing input is to make data entry
easier and to be free from errors. The data entry screen is designed in such a way that
all the data manipulates can be performed. Input Design is the first phase in the system
design. Input designing is to converting the user-oriented information to the computer-
oriented form. The input data items are grouped and analyzed to find out whether the
proposed system can be developed from the user input. The system is developed using
various processes screens formats.

The main objective of input design is to

 It should serve specific purpose effectively such as storing,

recording, and retrieving the information.

 It ensures proper completion with accuracy.

 It should be easy to fill and straightforward.

 It should focus on user’s attention, consistency and simplicity.

3.2 DATABASE DESIGN

The most important consideration in designing the database is how the information
will be used. The main objective of designing a database is Data Integration, Data Integrity
and Data Independence.

Data Integration

In a database, information from several files is coordinated, accessed and operated


upon as through it is in a single file. Logically, the information is centralized, physically, the
data may be located on different devices, connected through data communication facilities.
Data Integrity

Data integrity means storing all data in one place only and how each application
access it. This approach results in more consistent information, one update being sufficient
to achieve a new record status for all applications. This leads to less data redundancy, that is
data items need not be duplicated. A reduction in the direct access storage requirement.

Data Independence

Dataindependenceistheinsulationofapplicationprogramsfromchangingaspects of
physical data organization. This objective seeks to allow changes in the content and
organizationofphysicaldatawithoutreprogrammingofapplicationandallowmodifications to
application programs without reorganizing the physical data.
3.2.1 TABLE DESIGN

The table needed for each module were designed and the specification of each and
every column was given based on the records and details collected during record
specification of the system study.

TABLE NAME: ADMIN


FIELD DATA TYPE SIZE CONSTRAINT
admin id Int 10 Primary key
First name Varchar 20 Not null
Last name Varchar 20 Not null
Email Varchar 20 Not null
Phone Int 10 Not null
Password Varchar 20 Not null

TABLE NAME: MANAGER


FIELD DATA TYPE SIZE CONSTRAINT
Manager id Int 10 Primary key
First name Varchar 20 Not null
Last name Varchar 20 Not null
Phone Int 10 Not null
Username Varchar 20 Not null
Password Varchar 20 Not null

TABLE NAME: CASHIER


FIELD DATA TYPE SIZE CONSTRAINT
cashier id Int 10 Primary key
First name Varchar 20 Not null
Last name Varchar 20 Not null
Phone Int 10 Not null
Username Varchar 20 Not null
Password Varchar 20 Not null
TABLE NAME: MEDICINE
FIELD DATA TYPE SIZE CONSTRAINT
medicine id Int 10 Primary key
Medicine brand Varchar 20 Not null
Medicine name Varchar 20 Not null
Expiry date Date 10 Not null
Cost Int 5 Not null
MG Int 5 Not null

TABLE NAME: BILLING


FIELD DATA TYPE SIZE CONSTRAINT
Billing id Int 10 Primary key
Customer name Varchar 20 Not null
Mobile number Int 10 Not null
Medicine name Varchar 20 Not null
MG Varchar 20 Not null
Expiry date Date 10 Not null
Total amount Int 10 Not null
3.5 MODULE DESCRIPTION

The main module in this project are listed below

 Admin
 Manager
 Cashier
 Billing details
 Medicine details

1. Admin
This module has access to create manager, only admin can able to create manager. The
admin collects the managers details register manager entry. Once the manager has created, he gave
access to login.

2. Manager
This module manager can create the cashier account, once cashier has created, he/she can
able to login and register entry for billing details. The manager create account as well as for
pharmacist.

3. Cashier

The cashier entered into the login and promote the billing. The main work for the cashier is for
check the medicine and generate the bill and collect money.

4. Billing details

This module will show the all the billing details as a date wise, once the cashier collects the
money and generate the bill it has to be shown in billing module. Manager or cashier can check the
billing details for a date wise.

5. Medicine details
A Manager or admin registered the medicine details, it’s collected all the information about
the medicine. Displayed the medicine details in the cashier dashboard.
CHAPTER 4

SYSTEM TESTING

Testing is an integral part of any system development lifecycle.Insufficient


and untested applications may tend to crash and the result is loss of economic and
manpower investment besides user's dissatisfaction and downfall of reputation.
Software testing can be looked upon as one among many processes, an organization
performs, and that provides the lost opportunity to correct any flaws in the developed
system. Software testing includes selecting test data that have more probability of
giving errors.

The first step in system testing is to develop a plan that tests all aspects of
the system. Completeness, correctness, reliability and maintainability of the software
are to be tested for the best quality assurance that the system meets the specification
and requirements for its intended use and performance. System testing is the most
useful practical process of executing a program with the implicit intention of finding
errors that make the program fails. System testing is done in three phases.

 Unit Testing

 Integration Testing

 Validation Testing

4.1 UNIT TESTING

Unit testing focuses verification effort on the smallest unit of software the
module. Using the detailed design and the process specification testing is done to
registration by the user with in the boundary of the Login module. The login form
receives the username and password details and validates the value with the database.
If valid, the home page is displayed.
4.2 INTEGRATION TESTING

Integration Testing is the process of this activity can be considered as testing


the design and hence module interaction. The primary objective of integration testing is
to discover errors in the interfaces between the components. Login form and registration
form are integrated and tested together. If the user is newly registered, the received
details will be stored in the registration table. While logging in, the application will
check for valid user name and password in the registration table and if valid the user is
prompted for submitting complaints.

4.3 VALIDATION TESTING

Validation are independent procedures that are used together for checking
that a product, service, or system meets requirements and specifications and that it
fulfills its in purpose the actual result from the expected result for the complaint process.
Select the complaint category of the complaint by user. The input given to various forms
fields are validated effectively. Each module is tested independently. It is tested that the
complaint module fields receive the correct input for the necessary details such as
complaint category, complaint id, reference name, complaint description, email for
further process.
CHAPTER 5

5.1 CONCLUSION

It gives a lot of details about the stock sell. In short, it is a medical inventory that has
made lives easier. This software is called the Medical store management system. It
provides every small to big details like customer details, employees details, sell details, bill
details, etc.
APPENDICES

APPENDIX I

SAMPLE CODE

<?php
session_start();
$sessionId = $_SESSION['id'] ?? '';
$sessionRole = $_SESSION['role'] ?? '';
echo "$sessionId $sessionRole";
if ( !$sessionId && !$sessionRole ) {
header( "location:login.php" );
die();
}

ob_start();

include_once "config.php";
$connection = mysqli_connect( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME
); if ( !$connection ) {
echo mysqli_error( $connection );
throw new Exception( "Database cannot Connect" );
}

$id = $_REQUEST['id'] ?? 'dashboard';


$action = $_REQUEST['action'] ?? '';
?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024">

<!-- Bootstrap CSS -->


<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="assets/css/style.css">
<title>Dashboard</title>
</head>

<body>
<! Secondary Navber >
<section class="topber">
<div class="topber title">
<span class="topber__title--text">
<?php
if ( 'dashboard' == $id )
{ echo "DashBoard";
} elseif ( 'addManager' == $id )
{ echo "Add Manager";
} elseif ( 'allManager' == $id )
{ echo "Managers";
} elseif ( 'addPharmacist' == $id ) {
echo "Add Pharmacist";
} elseif ( 'allPharmacist' == $id ) {
echo "Pharmacists";
} elseif ( 'addSalesman' == $id )
{ echo "Cashier";
} elseif ( 'allSalesman' == $id )
{ echo "Cashiers";
} elseif ( 'userProfile' == $id )
{ echo "Your Profile";
} elseif ( 'editManager' == $action ) {
echo "Edit Manager";
} elseif ( 'editPharmacist' == $action ) {
echo "Edit Pharmacist";
} elseif ( 'editSalesman' == $action )
{ echo "Edit Salesman";
}elseif ( 'addmedicine' == $action )
{ echo "Add Medicine";
}
elseif ( 'billing' == $action ) {
echo "Billing";
}
?>

</span>
</div>

<div class="topber profile">


<?php
$query = "SELECT fname,lname,role,avatar FROM {$sessionRole}s WHERE id='$sessionId'";
$result = mysqli_query( $connection, $query );

if ( $data = mysqli_fetch_assoc( $result ) ) {


$fname = $data['fname'];
$lname = $data['lname'];
$role = $data['role'];
$avatar = $data['avatar'];
?>
<img src="assets/img/<?php echo "$avatar"; ?>" height="25" width="25" class="rounded-
circle" alt="profile">
<div class="dropdown">
<button class="btn dropdown-toggle" type="button" id="dropdownMenuButton"
data- toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?php
echo "$fname $lname (" . ucwords( $role ) . " )";
}
?>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="index.php">Dashboard</a>
<a class="dropdown-item" href="index.php?id=userProfile">Profile</a>
<a class="dropdown-item" href="logout.php">Log Out</a>
</div>
</div>
</div>
</section>
<! Secondary Navber >
<! Sideber >
<section id="sideber" class="sideber">
<ul class="sideber ber">
<h3 class="sideber panel"><i id="left" class="fas fa-laugh-wink"></i> Medical Shop</h3>
<li id="left" class="sideber item<?php if ( 'dashboard' == $id ) {
echo " active";
}?>">
<a href="index.php?id=dashboard"><i id="left" class="fas fa-tachometer-alt"></i>Dashboard</a>
</li>
<?php if ( 'admin' == $sessionRole ) {?>
<!-- Only For Admin -->
<li id="left" class="sideber item sideber item--modify<?php if ( 'addManager' == $id ) {
echo " active";
}?>">
<a href="index.php?id=addManager"><i id="left" class="fas fa-user-
plus"></i></i>Add Manager</a>
</li><?php }?>
<li id="left" class="sideber item<?php if ( 'allManager' == $id )
{ echo " active";
}?>">
<a href="index.php?id=allManager"><i id="left" class="fas fa-user"></i>View All Managers</a>
</li>

<?php if ( 'admin' == $sessionRole || 'manager' == $sessionRole || 'pharmacist' == $sessionRole ) {?>


<!-- For Admin, Manager, Pharmacist-->
<li id="left" class="sideber item sideber item--modify<?php if ( 'addSalesman' == $id ) {
echo " active";
}?>">
<a href="index.php?id=addSalesman"><i id="left" class="fas fa-user-plus"></i>Add Cashier</a>
</li><?php }?>
<li id="left" class="sideber item<?php if ( 'allSalesman' == $id )
{ echo " active";
}?>">
<a href="index.php?id=allSalesman"><i id="left" class="fas fa-user"></i>View All Cashier</a>

<?php if ( 'admin' == $sessionRole || 'manager' == $sessionRole || 'pharmacist' ==


$sessionRole ) {?>
<!-- For Admin, Manager, Pharmacist-->
<li id="left" class="sideber item sideber item--modify<?php if ( 'addmedicine' == $id ) {
echo " active";
}?>">
<a href="index.php?id=addmedicine"><i id="left" class="fas fa-user-
plus"></i>Add Medicine</a>
</li><?php }?>
<li id="left" class="sideber item<?php if ( 'billing' == $id )
{ echo " active";
}?>">
<a href="index.php?id=billing"><i id="left" class="fas fa-user"></i>Billing</a>
</li>
<li id="left" class="sideber__item<?php if ( 'allmedicine' == $id ) {
echo " active";
}?>">
<a href="index.php?id=allmedicine"><i id="left" class="fas fa-user"></i>View Stock Medicine</a>
</li>
</ul>

</section>
<! #Sideber - >

<! Main section ->


<section class="main">
<div class="container">

<! DashBoard >


<?php if ( 'billing' == $id ) {?>
<div class="addManager">
<div class="main form">
<div class="main__form--title text-center">Billing</div>
<form action="add.php" method="POST">
<div class="form-row">
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="fname" placeholder="Customer name" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="fname" placeholder="Medicine name" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="lname" placeholder="Brand Name" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-envelope"></i>
<input type="email" name="email" placeholder="Expiery Date" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-phone-alt"></i>
<input type="number" name="phone" placeholder="MG Power" required>
</label>
</div>

<div class="col col-12">


<label class="input">
<i id="left" class="fas fa-envelope"></i>
<input type="email" name="email" placeholder="Quantity" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-phone-alt"></i>
<input type="number" name="phone" placeholder="Cost" required>
</label>
</div>
<input type="hidden" name="action" value="addManager">
<div class="col col-12">
<input type="submit" value="Submit">
</div>
</div>
</form>
</div>

</div>
<?php }?>
<?php if ( 'dashboard' == $id ) {?>
<div class="dashboard p-5">
<div class="total">
<div class="row">
<div class="col-3">
<div class="total box text-center">
<h1>2453</h1>
<h2>Total Sell</h2>
</div>
</div>
<div class="col-3">
<div class="total box text-center">
<h1>
<?php
$query = "SELECT COUNT(*) totalManager FROM managers;";
$result = mysqli_query( $connection, $query );
$totalManager = mysqli_fetch_assoc( $result );
echo $totalManager['totalManager'];
?>
</h1>
<h2>Manager</h2>
</div>
</div>
<div class="col-3">
<div class="total box text-center">
<h1>
<?php
$query = "SELECT COUNT(*) totalPharmacist FROM pharmacists;";
$result = mysqli_query( $connection, $query );
$totalPharmacist = mysqli_fetch_assoc( $result );
echo $totalPharmacist['totalPharmacist'];
?>

</h1>
<h2>Pharmacist</h2>
</div>
</div>
<div class="col-3">
<div class="total box text-center">
<h1><?php
$query = "SELECT COUNT(*) totalSalesman FROM salesmans;";
$result = mysqli_query( $connection, $query );
$totalSalesman = mysqli_fetch_assoc( $result );
echo $totalSalesman['totalSalesman'];
?></h1>
<h2>Salesman</h2>
</div>
</div>
</div>
</div>
</div>
<?php }?>
<! DashBoard >

<! Manager >


<div class="manager">
<?php if ( 'allManager' == $id ) {?>
<div class="allManager">
<div class="main table">
<table class="table">
<thead>
<tr>
<th scope="col">Avater</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<?php if ( 'admin' == $sessionRole ) {?>
<!-- Only For Admin -->
<th scope="col">Edit</th>
<th scope="col">Delete</th>
<?php }?>
</tr>
</thead>
<tbody>

<?php
$getManagers = "SELECT * FROM managers";
$result = mysqli_query( $connection, $getManagers );

while ( $manager = mysqli_fetch_assoc( $result ) ) {?>

<tr>
<td>
<center><img class="rounded-circle" width="40"
height="40" src="assets/img/<?php echo $manager['avatar']; ?>" alt=""></center>
</td>
<td><?php printf( "%s %s", $manager['fname'], $manager['lname'] );?></td>
<td><?php printf( "%s", $manager['email'] );?></td>
<td><?php printf( "%s", $manager['phone'] );?></td>
<?php if ( 'admin' == $sessionRole ) {?>
<!-- Only For Admin -->
<td><?php printf( "<a href='index.php?action=editManager&id=
%s'><i class='fas fa-edit'></i></a>", $manager['id'] )?></td>
<td><?php printf( "<a class='delete' href='index.php?action=deleteManager&id=
%s'><i class='fas fa-trash'></i></a>", $manager['id'] )?></td>
<?php }?>
</tr>

<?php }?>

</tbody>
</table>

</div>
</div>
<?php }?>

<?php if ( 'addManager' == $id ) {?>


<div class="addManager">
<div class="main form">
<div class="main__form--title text-center">Add New Manager</div>
<form action="add.php" method="POST">
<div class="form-row">
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="fname" placeholder="First name" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="lname" placeholder="Last Name" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-envelope"></i>
<input type="email" name="email" placeholder="Email" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-phone-alt"></i>
<input type="number" name="phone" placeholder="Phone" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-key"></i>
<input id="pwdinput" type="password" name="password" placeholder="Password"
required>
<i id="pwd" class="fas fa-eye right"></i>
</label>
</div>
<input type="hidden" name="action" value="addManager">
<div class="col col-12">
<input type="submit" value="Submit">
</div>
</div>
</form>
</div>

</div>
<?php }?>

<?php if ( 'editManager' == $action ) {


$managerId = $_REQUEST['id'];
$selectManagers = "SELECT * FROM managers WHERE id='{$managerId}'";
$result = mysqli_query( $connection, $selectManagers );

$manager = mysqli_fetch_assoc( $result );?>


<div class="addManager">
<div class="main form">
<div class="main__form--title text-center">Update Manager</div>
<form action="add.php" method="POST">
<div class="form-row">
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="fname" placeholder="First name" value="<?php echo
$manager['fname']; ?>" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-user-circle"></i>
<input type="text" name="lname" placeholder="Last Name" value="<?php echo
$manager['lname']; ?>" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-envelope"></i>
<input type="email" name="email" placeholder="Email" value="<?php echo
$manager['email']; ?>" required>
</label>
</div>
<div class="col col-12">
<label class="input">
<i id="left" class="fas fa-phone-alt"></i>
<input type="number" name="phone" placeholder="Phone" value="<?php echo
$manager['phone']; ?>" required>
</label>
</div>
<input type="hidden" name="action" value="updateManager">
<input type="hidden" name="id" value="<?php echo $managerId; ?>">
<div class="col col-12">
<input type="submit" value="Update">
</div>
</div>
</form>
</div>
</div>
<?php }?>

<?php if ( 'deleteManager' == $action ) {


$managerId = $_REQUEST['id'];
$deleteManager = "DELETE FROM managers WHERE id ='{$managerId}'";
$result = mysqli_query( $connection, $deleteManager );
header( "location:index.php?id=allManager" );
}?>
</div>
<! Medicine >
<! >
<div class="manager">
<?php if ( 'allmedicine' == $id ) {?>
<div class="allManager">
<div class="main table">
<table class="table">
<thead>
<tr>
<th scope="col">Medicine Name</th>
<th scope="col">Brand Name</th>
<th scope="col">Expiery Date</th>
<th scope="col">MG
POWER</th>
<th

scope="col">STOCK</th>

</tr>
</thead>
<tbody>

<?php
$getManagers = "SELECT * FROM managers";
$result = mysqli_query( $connection, $getManagers );

while ( $manager = mysqli_fetch_assoc( $result ) ) {?>

<tr>
<td>
<center><img class="rounded-circle" width="40"
height="40" src="assets/img/<?php echo $manager['avatar']; ?>" alt=""></center>
</td>
<td><?php printf( "%s %s", $manager['fname'], $manager['lname'] );?></td>
<td><?php printf( "%s", $manager['email'] );?></td>
<td><?php printf( "%s", $manager['phone'] );?></td>

</tr>

<?php }?>

</tbody>
</table>

</div>
</div>
<?php }?>

<?php if ( 'addmedicine' == $id ) {?>


<div class="addManager">
<div class="main form">
<div class="main form--title text-center">Add Medicine</div>

APPENDIX II

SAMPLE SCREENSHOTS
REFERENCES

BOOK REFERENCES

1. Jeff Forcier, Paul Bissex, Wesley J. Chun, (2018) “Python Web development with
Django (Developer’s Library)”, WesleyProfessional.
2. Roger S. Pressman, (2017) “Software Engineering”, Tata McGraw-Hill –Europe.

WEB REFERENCES

1. https://www.javaprogramming.net

2. https://www.w3schools.com

3. https://www.tutorialspoint.com

You might also like