Professional Documents
Culture Documents
Organic Fertilizer Portal
Organic Fertilizer Portal
Online Organic Fertilizer Portal is the web application that will help the farmers to
perform the best farming and leading to achieve success and increase in their standard of living.
An Authorized-agent would serve as a way for the farmers to sell their fertilizer product in the
market. To facilitate remote area farmers to buy Organic fertilizer, there is a need to build an
online agriculture fertilizer store. Through the Internet, customers and business owners can
communicate with each other, share a different type of information and resources. In this project,
we will build a user-friendly website in order to buy and sell organic agriculture fertilizer online.
The main purpose to build this store is to facilitate farmers to buy pesticides, and fertilizers from
1.INTRODUCTION
1.1 Introduction
Online Organic Fertilizer Portal is fast gaining ground as an accepted and used business
paradigm. More and more business houses are implementing web sites providing functionality
for performing commercial transactions over the web. It is reasonable to say that the process of
shopping on the web is becoming commonplace. The objective of this project is to develop a
general purpose e-commerce store where any product (such as books, CDs, computers, mobile
phones, electronic items, and home appliances) can be bought from the comfort of home through
the Internet. However, for implementation purposes, this paper will deal with an online book
store. An online store is a virtual store on the Internet where customers can browse the catalog
and select products of interest. The selected items may be collected in a shopping cart. At
checkout time, the items in the shopping cart will be presented as an order. At that time, more
information will be needed to complete the transaction. Usually, the customer will be asked to
fill or select a billing address, a shipping address, a shipping option, and payment information
such as credit card number. An e- mail notification is sent to the customer as soon as the order is
placed. Natural composting is recommended for the production of organic fertilizer due to low
expenses and higher economic return though production was higher in the IMO applied
composting. Further research on other composting methods in long-run production to lower the
expenses is also advised. Garbage and other waste materials have been seen to any places.
Garbage and other waste materials have been seen to any places. Waste materials are
classified as biodegradable and non-biodegrade. To address the problem in wastes disposal,
waste segregation is implemented including the 3R’s government program which are reduce,
reuse and recycle. Non-biodegrade wastes have been reused and recycled to reduce its volume.
On the other hand, composting is one of the measures conducted to reduce the volume of
biodegrade wastes and recycled it into fertilizers as soil conditioner and improved soil fertility
to produce healthy and productive plants. Composting is a process where there is an
accelerated bio-oxidation of different organic matters that pass through a thermophilic stage
and microorganisms liberate heat, carbon dioxide and water . Heterogeneous mixtures of
these organic matters are transformed into a homogeneous and stabilized product of humus,
called organic fertilizer. Natural composting is a process of composting whereby wastes are
piled up and let natural decomposition takes place. This is usually done in the compost pit,
thus other called this method pit composting. During this process, both thermophilic and
mesophilic microorganisms transform the organic materials into a stabilized and sanitized
humus, where thermophilic microorganisms sanitized the organic materials and mesophilic
microorganisms degrade the materials in slower pace, . The process in natural composting is
too long since most of the biodegradable materials are not cut into smaller pieces for easy
decomposition. There are different methods employed to hasten decomposition of composting
materials. Indigenous Microorganisms (IMO) from rice fermentation technique is widely used
and easily adopted by farmers since rice as culture media for microbes are placed under the
bushes or bamboo trees and no need to do laboratory inoculation for microorganisms .
Carbohydrate from rice is the main carbon source for the multiplication of these
microorganisms. The microorganisms found in IMO believed to hasten decomposition and
improved the nutrient content of the decomposed materials once it is applied. IMO is a beneficial
soil microorganisms of filamentous fungi, yeasts and bacteria that could
Online Organic Fertilizer Portal is fast gaining ground as an accepted and used business
paradigm. More and more business houses are implementing web sites providing functionality
for performing commercial transactions over the web. It is reasonable to say that the process of
Fertilizer shopping on the web is becoming common place.‘Customer is our god’ mainly this
website is based on this formula. After chosen items he bought into Pay pal process like VISA
or MASTER credit cards or any Debit cards are accepted in this website. Customer is happily
shopping at his rest place.Once customer entered with his own username and password, at that
time automatically one shopping cart will be created, once user select an item it will add to cart.
In case user thinks the selected item is not useful for me, then deleted that item from shopping
cart.Customer selected some items, but in his credit or debit cart haven’t that much balance, then
he was logout from the website, the selected items are stored at cart with specific users with his
allotted carts, after some days he bought those items then automatically deleted from the cart.
1.3 Organization Profile
Our vision is to help all businesses irrespective of scale and size establish an online
presence and use the power of the Internet and achieve growth. Empowered businesses lead to
employment and growth opportunities thereby creating a world where all individuals have a
chance to succeed and showcase their relent and abilities. Further, even if a company wants to
enhance their offerings and achieve the fullest potential of their existing setup, we are here to
help them zoom to the next level!
2. SYSTEM ANALYSIS
Existing system is a manual one in which users are maintaining books to store the information
like product details, purchases, sales details and accounts for every month. It is very difficult to
maintain historical data.
Disadvantages:
Technical Feasibility
Operation Feasibility
Economical Feasibility
3. SYSTEM SPECIFICATION
3.1 Hardware Requirment
4.SOFTWARE DESCRIPTION
4.1 Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. It is the
direct successor to Windows 8.1, which was released nearly two years earlier. It was released to
manufacturing on July 15, 2015, and later to retail on July 29, 2015. Windows 10 was made
available for download via MSDN and TechNet, as a free upgrade for retail copies of Windows 8
and Windows 8.1 users via the Windows Store, and to Windows 7 users via Windows Update.
Windows 10 receives new builds on an on going basis, which are available at no additional cost
to users, in addition to additional test builds of Windows 10, which are available to Windows
Insiders. Devices in enterprise environments can receive these updates at a slower pace, or use
long-term support milestones that only receive critical updates, such as security patches, over
their ten-year lifespan of extended support. Windows 10 received generally positive reviews
upon its original release. Critics praised Microsoft's decision to provide the desktop-oriented
interface in line with previous versions of Windows, contrasting the tablet-oriented approach of
Windows 8, although Windows 10's touch-oriented user interface mode was criticized for
containing regressions upon the touch-oriented interface of its predecessor. Critics also praised
the improvements to Windows 10's bundled software over Windows 8.1, Xbox Live integration,
as well as the functionality and capabilities of the Cortana personal assistant and the replacement
of Internet Explorer with Microsoft Edge. However, media outlets have been critical of the
changes to operating system behaviors, including mandatory update installation, privacy
concerns over data collection performed by the OS for Microsoft and its partners, and adware-
like tactics used to promote the operating system on its release. Microsoft initially aimed to have
Windows 10 installed on over one billion devices within three years of its release that goal was
ultimately reached almost five years after release on March 16, 2020. By January 2018,
Windows 10 surpassed Windows 7 as the most popular version of Windows worldwide As of
April 2022, Windows 10 is estimated to have a 75% share of Windows PCs (has been declining
since its Jan. 2022 peak of 82%, because of introduction of its successor Windows 11, which is
now 2nd most popular Windows edition in many countries), or 57% of all PCs (the rest being
other Windows editions and other operating systems such as macOS and Linux), and 23% of all
devices (including mobile, tablet and console) are running Windows 10. On June 24, 2021,
Microsoft announced Windows 10's successor, Windows 11, which was released on October 5,
2021
Windows 10 is the final version of Windows which supports 32-bit processors (IA-32 and
ARMv7-based) and devices with BIOS firmware. Its successor, Windows 11, requires a device
that uses UEFI firmware and a 64-bit processor in any supported architecture (x86-64 and
ARMv8), though certain workarounds exist that can be used to install it on devices with legacy
BIOS firmware.
4.2 Apache
Apache server is one of the most popular Web service applications. Apache is a powerful,
flexible, HTTP/1.1 compliant web server. It is highly configurable and extensible with third-
party modules. Users can further customize Apache by writing modules using the Apache
module. Apache implements the following features:
Database Management (DBM) databases for authentication that allows the user to set up
password-protected pages with large numbers of authorized users, without bogging down the
server.
Customized responses to errors and problems which allows you to set up files, or even CGI
scripts, which are returned by the server in response to errors and problems
Unlimited flexible URL rewriting and aliasing meaning Apache has no fixed limit on the
numbers of Aliases and Redirects which may be declared in the config files. In addition, a
powerful rewriting engine can be used to solve most URL manipulation problems.
Virtual Hosts which are often referred to as multi-homed servers. This allows the server to
distinguish between requests made to different IP addresses or names (mapped to the same
machine). Apache also offers dynamically configurable mass-virtual hosting.
Apache can be configured to generate reliable piped logs, such as an error log. In addition, on
most UNIX architectures, Apache can send log files to a pipe, allowing for log rotation, hit
filtering, real-time splitting of multiple vhosts into separate logs, and asynchronous DNS
(Domain Naming Service) resolving on the fly.
4.3 PHP
PHP is a server-side and general-purpose scripting language that is especially suited for web
development.PHP originally stood for Personal Home Page. However, now, it stands for
Hypertext Preprocessor. It’s a recursive acronym because the first word itself is also an acronym.
PHP was created by Rasmus Lerdorf in 1994. It’s currently maintained by the PHP Development
Team. PHP is a server-side language When you open a website on your web browser, for The
web browser sends an HTTP request to a web server where phptutorial.net locates. The web
server receives the request and responds with an HTML document.In this example, the web
browser is a client while the web server is the server. The client requests for a page, and the
server serves the request.PHP runs on the web server, processes the request, and returns the
HTML document.PHP is a general-purpose language When it comes to the purpose of the
programming languages, there are two main types: domain-specific and general-purpose
languages.The domain-specific languages are used within specific application domains. For
example, SQL is a domain-specific language. It’s used mainly for querying data from relational
databases. And SQL cannot be used for other purposes.On the other hand, PHP is a general-
purpose language because PHP can develop various applications.PHP is a cross-platform
language PHP can run on all major operating systems, including Linux, Windows, and macOS.
You can use PHP with all leading web servers such as Nginx, OpenBSD, and Apache. Some
cloud environments also support PHP like Microsoft Azure and Amazon AWS.PHP is quite
flexible. It’s not just limited to processing HTML. PHP has built-in support for generating PDF,
GIF, JPEG, and PNG images.One notable feature of PHP is that it supports many databases,
including MySQL, PostgreSQL, MS SQL, db2, Oracle Database, and MongoDB.
Server-side scripting – PHP is well-suited for developing dynamic websites and web
applications.
Command-line scripting – like Python and Perl, you can run PHP script from the
command line to perform administrative tasks like sending emails and generating PDF
files.
Since PHP is designed for the web in the first place, it brings many advantages to web
development:
PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
PHP can handle forms, i.e. gather data from files, save data to a file, through email you
can send data, return data to the user.
You add, delete, modify elements within your database through PHP.
Access cookies variables and set cookies.
Using PHP, you can restrict users to access some pages of your website.
It can encrypt data.
Characteristics of PHP
Simplicity
Efficiency
Security
Flexibility
Familiarity
As PHP can do anything related to server-side programming which contains the backend of any
web page, it holds a lot of unique features within it. The main purpose of PHP design is web
development.
Simple, Familiar and ease of use: Its popularly known for its simplicity, familiarity and easy to
learn the language as the syntax is similar to that of ‘C’ or Pascal language. So the language is
very logical and well organized general-purpose programming language. Even people with a
normal programming background can easily understand and capture the use of language. PHP is
very advantageous for new users as its a very reliable, fluent, organized, clean, demandable and
efficient.The main strength of PHP is the availability of rich pre-defined functions. The core
distribution helps the developers implement dynamic websites very easily with secured data.
PHP applications are very easy to optimize.Loosely typed language: PHP encourages the use of
variables without declaring its data types. So this is taken care at the execution time depending
on the value assigned to the variable. Even the variable name can be changed dynamically.
Flexibility:
PHP is known for its flexibility and embedded nature as it can be well integrated with HTML,
XML, Javascript and many more. PHP can run on multiple operating systems like Windows,
Unix, Mac OS, Linux, etc. The PHP scripts can easily run on any device like laptops, mobiles,
tablets, and computer. It is very comfortably integrated with various Databases. Desktop
applications are created using advanced PHP features. The executable PHP can also be run on
command-line as well as directly on the machine. Heavyweight applications can be created
without a server or browser.It also acts as an excellent interface with relational databases.
Open Source
All PHP frameworks are open sources, No payment is required for the users and its completely
free. User can just download PHP and start using for their applications or projects. Even in
companies, the total cost is reduced for software development providing more Reliability and
flexibility. It supports a popular range of databases like MySQL, SQLite, Oracle, Sybase,
Informix, and PostgreSQL. PHP provides libraries to access these databases to interact with web
servers. Developers are free to post errors, inspect codes and can contribute to code as well as
bug fixing. Many frameworks like Codeignitor, Zend Framework, CakePHP make use of PHP.
Even many popular content management systems like WordPress, Joomla and Drupal use PHP
as prime language. Because of the above reasons many web hosting companies and Internet
Service providers prefers PHP. Cross-platform compatibility: PHP is multi-platform and known
for its portability as it can run on any operating System and windows environments. The most
common are XAMPP (Windows, Apache Server, MySQL, Perl, and PHP) and LAMP (Linux,
Apache, MySQL, PHP). As PHP is platform-independent, it’s very easy to integrate with various
databases and other technologies without re-implementation. It effectively saves a lot of energy,
time and money. Error reporting and exceptions: PHP supports much errors reporting constants
to generate errors and relevant warnings at run time. For example E_ERROR, E_WARNING,
E_PARSE, E_STRICT. PHP5 supports exception handling which is used to throw errors which
can be caught at any time.
Active community support: PHP is very rich with many diverse online community developers to
help beginners for web-based applications. These worldwide volunteers contribute many features
as well as new versions for PHP libraries. Even they contribute a translation in different
languages to help out programmers. There is a bundle of third-party open-source libraries which
provide basic functionalities. Even the documentation given by the official site helps in
implementing new features providing access to a variety of creative imagination. Fast and
efficient performance: Users generally prefer fast loading websites. For any web development,
speed becomes an important aspect which is taken care of by PHP.
PHP scripts are faster than other scripting languages like ASP.NET, PERL, and JSP. The
memory manager of PHP 7 is very optimized and fast as compared to older versions of PHP.
Even connecting to the database and loading of required data from tables, are faster than other
programming languages. It provides a built-in module for easy and efficient database
management system. The high speed of PHP is advantageous for users for its server
administration and mail functionality. Also, it supports session management and removing of
unwanted memory allocation.
Maintenance
When dealing with big projects, maintenance of code is also an important aspect of the web
development process. There are many PHP frameworks for example MVC (Model View
Controller) which makes development and maintenance of code easier. Files belonging to the
different module are maintained separately. Third-party application support and security: Many
PHP’s predefined functions support data encryption options keeping it more secure. Even the
users can use third-party applications to secure data.Real time access monitoring: PHP also
provides a summary of user’s recent logging accesses. Memory and CPU usage information:
PHP can provide memory usage information from functions like memory_get_usage() or
memory_get_peak_usage(), which can help the developers optimize their code. In the similar
way, the CPU power consumed by any script can be retrieved for further optimization.
Regular expression:
PHP provides regular expression functions with parsing and pattern matching methods.
PDO Class: PHP Data Objects are created by PDO class which gives a good abstraction layer for
database drivers. The PDO Classes are enriched with functions which are database independent.
It means the same functions are used for similar actions for different databases without re-
development as long as it supports PDO. In this way, the application becomes more portable
saving lot of time and effort. Use of PDO helps the application from SQL injection attacks.
Additional Features:
The feature list is endless. The other features of PHP are manipulation of images using GD
library, make remote connections using cURL, handling file system, managing user sessions,
track sessions, Use of SimpleXML Class which reads and write XML files through objects,
support of cookies and sessions, shell command-line execution, compression of ZIP archives, use
of Ajax.
4.4 MYSQL
The Structured Query Language (SQL) is the language of databases. SQL was, is, and will
stay for the foreseeable future the database language for relational database servers such as IBM
DB2, Microsoft SQL Server, MySQL, Oracle, Progress, Sybase Adaptive Server, and dozens of
others. SQL supports a small but very powerful set of statements for manipulating, managing,
and protecting data stored in a database. This power has resulted in its tremendous popularity.
Almost every database server supports SQL or a dialect of the language. Currently, SQL
products are available for every kind of computer, from a small handheld computer to a large
server, and for every operating system, including Microsoft Windows, Mac and many UNIX
variations. Structured Query Language (SQL) is a relational database language which allows you
to create, delete, access and manipulate databases. The following is a list of the main operations
that can be formulated with SQL:
Structured Query Language (SQL) is the de-facto standard programming language for
creating, updating and retrieving information that is stored in relational database management
system. A relational database is a database divided into logical units called tables, where tables
are related to one another within the database. A relational database allows large complex data to
be broken down into logical, smaller, more manageable units. Tables are related to each other
through a common key (data value) in a relational database. SQL is a formal programming
language. Speed was he developer’s main focus when SQL was being developed.
MySQL is a fast easy to use RDMS. MySQL is easier to install and use than its commercial
competitors and the fact that MySQL is open source is strongly in its favor. MySQL is available
via the General Public License (GPU). MySQL consists of a MySQL server, several utility
programs that assist the administration of the MySQL databases. MySQL’s main advantages
include the following:
4.5 HTML
Hypertext Markup Language (HTML) is the standard markup language for creating web
pages and web applications. With Cascading Style Sheets (CSS) and JavaScript, it forms a triad
of cornerstone technologies for the World Wide Web.
Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and
other objects such as interactive forms may be embedded into the rendered page. HTML
provides a means to create structured documents by denoting structural semantics for text such as
headings, paragraphs, lists, links, quotes and other items.
4.6 Bootstrap
4.9 Css
5.1 MODULES:-
Admin
User
MODULES DESCRIPTION:
Admin Modules
This module provides administrator-related functionalities. The administrator manages the entire
application.
Dashboard: In this section, admin can briefly view the total orders, total new orders , total
packed orders , total dispatched orders , total in transit orders, total out for delivery orders, total
delivered, total cancelled and total registered users.
Search Order: In this section, admin can search particular order with the help of the order
number.
Reports: In this section admin can view order details and sales reports according to dates.
Registered Users: In this section, the admin can view registered users.
Admin can also update his profile, change the password and recover the password.
User Module
1.Shop: In this section, users can view which products is available on the website
2.My Accounts: In this section, users can his/her password, view and update his/her profile and
log out from accounts.
3.My orders: In this section, users can view order history after login.
4.Cart: In this section, the user can add the products which he/she want to order.
5.Wishlist: In this section, the user can add products to the Wishlist.
6.The user has also a facility to download his/her invoice and cancel orders if he/she wants to
cancel.
5.2 DFD
name Varchar(50)
Email Varchar(50)
ContactNo Varchar(50)
Password Bigint(11)
regDate Timestamp
updationDate timestamp
CategoryName Varchar(50)
Description Vachar(120)
CreationDate TIMESTAMP
UpdationDate Timestamp
createdBy Int(11)
AdminName Varchar(50)
Username Varchar(150)
Mobilenumber Varchar(50)
Email Varchar(50)
Password Varchar(50)
AdminRegDate Varchar(50)
Categoryid Int(11)
subcategoryName Varchar(50)
CreationDate Timestamp
updationDate Varchar(250)
subcategory Int(11)
Productname Varchar(50)
Productprice Decimal(10,2)
Productpricebeforedisco Decimal(10,2)
unt
Description Varchar(50)
Image1 Varchar(50)
Image2 Varchar(50)
Image3 Varchar(50)
Shippingcharge Decimal(10,2)
productAvailability Varchar(50)
postingDate Date
updationDate Timestamp
addedBy Int(11)
orderNumber Bigint(11)
Userid Int(11)
Productid Int(11)
Quantity Int(11)
orderDate Date
Orderstatus Varchar(56)
5.5.7 Table Name: ordertrackhistory
orderNumber Bigint(11)
userid Int(11)
Productid Int(11)
Quantity Int(11)
Orderdate Date
orderstatus Varchar(50)
Uderid Int(11)
billingAddress Varchar(50)
billingState Varchar(50)
billingCountry Varchar(50)
shippingAddress Varchar(50)
Shippingcity Varchar(50)
Shippingstate Varchar(50)
Shippingpincode Varcahr(50)
Shippingcountry Varchar(50)
Postingdate Varchar(50)
CHAPTER-6
6.CODING DESIGN
6.1 Index
<?php
session_start();
//error_reporting(0);
include("includes/config.php");
if(isset($_POST['submit']))
{
$username=$_POST['username'];
$password=md5($_POST['inputPassword']);
$ret=mysqli_query($con,"SELECT id FROM tbladmin WHERE username='$username' and
password='$password'");
$num=mysqli_fetch_array($ret);
if($num>0)
{
$_SESSION['alogin']=$_POST['username'];
$_SESSION['aid']=$num['id'];
header("location:dashboard.php");
}else{
echo "<script>alert('Invalid username or password');</script>";
//header("location:index.php");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Shopping Portal | Admin Login</title>
<link href="css/styles.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js"
crossorigin="anonymous"></script>
</head>
<body class="bg-primary">
<div id="layoutAuthentication">
<div id="layoutAuthentication_content">
<main>
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header"><h3 class="text-center font-weight-light my-
4">Shopping Portal | Admin Login</h3></div>
<div class="card-body">
<form method="post">
<div class="form-floating mb-3">
<input class="form-control" id="username" name="username"
type="text" placeholder="Username" required />
<label for="username">Username</label>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputPassword"
name="inputPassword" type="password" placeholder="Password" required />
<label for="inputPassword">Password</label>
</div>
<?php session_start();
include_once('includes/config.php');
if(strlen( $_SESSION["aid"])==0)
{
header('location:logout.php');
} else {
//Dashboard COunt
$ret=mysqli_query($con,"select count(id) as totalorders,
count(if((orderStatus='' || orderStatus is null),0,null)) as neworders,
count(if(orderStatus='Packed', 0,null)) as packedorders,
count(if(orderStatus='Dispatched', 0,null)) as dispatchedorders,
count(if(orderStatus='In Transit', 0,null)) as intransitorders,
count(if(orderStatus='Out For Delivery', 0,null)) as outfdorders,
count(if(orderStatus='Delivered', 0,null)) as deliveredorders,
count(if(orderStatus='Cancelled', 0,null)) as cancelledorders
from orders;");
$results=mysqli_fetch_array($ret);
$torders=$results['totalorders'];
$norders=$results['neworders'];
$porders=$results['packedorders'];
$dtorders=$results['dispatchedorders'];
$intorders=$results['intransitorders'];
$otforders=$results['outfdorders'];
$deliveredorders=$results['deliveredorders'];
$cancelledorders=$results['cancelledorders'];
//COde for Registered users
$ret1=mysqli_query($con,"select count(id) as totalusers from users;");
$results1=mysqli_fetch_array($ret1);
$tregusers=$results1['totalusers'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Shooping Portal | Admin Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css"
rel="stylesheet" />
<link href="css/styles.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js"
crossorigin="anonymous"></script>
</head>
<body class="sb-nav-fixed">
<?php include_once('includes/header.php');?>
<div id="layoutSidenav">
<?php include_once('includes/sidebar.php');?>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid px-4">
<h1 class="mt-4">Dashboard</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item active">Dashboard</li>
</ol>
<div class="row">
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-primary text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Total Order</div>
<div class="text-lg fw-bold"><?php echo $torders; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="all-orders.php">View
Details</a>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-danger text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">New Orders</div>
<div class="text-lg fw-bold"><?php echo $norders; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="new-order.php">View
Details</a>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-warning text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Packed Orders</div>
<div class="text-lg fw-bold"><?php echo $porders; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="packed-orders.php">View
Tasks</a>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-secondary text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Dispatched Orders</div>
<div class="text-lg fw-bold"><?php echo $dtorders; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="dispatched-
orders.php">View Requests</a>
</div>
</div>
</div>
</div>
<!-------------------------------------->
<div class="row">
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-warning text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">In Transit Orders</div>
<div class="text-lg fw-bold"><?php echo $intorders; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="intransit-orders.php">View
Details</a>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-primary text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Out for Delivery Orders</div>
<div class="text-lg fw-bold"><?php echo $otforders; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="outfordelivery-
orders.php">View Details</a>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-success text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Delivered Orders</div>
<div class="text-lg fw-bold"><?php echo $deliveredorders;
?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="delivered-orders.php">View
Details</a>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-black text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Registered Users</div>
<div class="text-lg fw-bold"><?php echo $tregusers; ?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="registered-users.php">View
Requests</a>
</div>
</div>
</div>
</div>
<!-------------->
<div class="row">
<div class="col-lg-6 col-xl-3 mb-4">
<div class="card bg-danger text-white h-100">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center">
<div class="me-3">
<div class="text-white-75 small">Cancelled Orders</div>
<div class="text-lg fw-bold"><?php echo $cancelledorders;
?></div>
</div>
</div>
</div>
<div class="card-footer d-flex align-items-center justify-content-between
small">
<a class="text-white stretched-link" href="cancelled-orders.php">View
Details</a>
Add Product
<?php session_start();
include_once('includes/config.php');
if(strlen( $_SESSION["aid"])==0)
{
header('location:logout.php');
} else {
move_uploaded_file($_FILES["productimage1"]["tmp_name"],"productimages/".
$imgnewfile1);
move_uploaded_file($_FILES["productimage2"]["tmp_name"],"productimages/".
$imgnewfile2);
move_uploaded_file($_FILES["productimage3"]["tmp_name"],"productimages/".
$imgnewfile3);
$sql=mysqli_query($con,"insert into
products(category,subCategory,productName,productCompany,productPrice,productDescription,
shippingCharge,productAvailability,productImage1,productImage2,productImage3,productPrice
BeforeDiscount,addedBy)
values('$category','$subcat','$productname','$productcompany','$productprice','$productdescripti
on','$productscharge','$productavailability','$imgnewfile1','$imgnewfile2','$imgnewfile3','$produ
ctpricebd','$addedby')");
echo "<script>alert('Product Added added successfully');</script>";
echo "<script>window.location.href='manage-subcategories.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Shopping Portal | Add Products</title>
<link href="css/styles.css" rel="stylesheet" />
<script src="js/all.min.js" crossorigin="anonymous"></script>
<script src="js/jquery-3.5.1.min.js"></script>
<script>
function getSubcat(val) {
$.ajax({
type: "POST",
url: "get_subcat.php",
data:'cat_id='+val,
success: function(data){
$("#subcategory").html(data);
}
});
}
</script>
</head>
<body>
<?php include_once('includes/header.php');?>
<div id="layoutSidenav">
<?php include_once('includes/sidebar.php');?>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid px-4">
<h1 class="mt-4">Add Product</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li>
<li class="breadcrumb-item active">Add Product</li>
</ol>
<div class="card mb-4">
<div class="card-body">
<form method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-2">Category Name</div>
<div class="col-4">
<select name="category" id="category" class="form-control"
onChange="getSubcat(this.value);" required>
<option value="">Select Category</option>
<?php $query=mysqli_query($con,"select * from category");
while($row=mysqli_fetch_array($query))
{?>
<div class="row">
<div class="col-2"><button type="submit" name="submit" class="btn
btn-primary">Submit</button></div>
</div>
</form>
</div>
</div>
</div>
User Login
<?php session_start();
error_reporting(0);
include_once('includes/config.php');
// Code for User login
if(isset($_POST['login']))
{
$email=$_POST['emailid'];
$password=md5($_POST['inputuserpwd']);
$query=mysqli_query($con,"SELECT id,name FROM users WHERE email='$email' and
password='$password'");
$num=mysqli_fetch_array($query);
//If Login Suceesfull
if($num>0)
{
$_SESSION['login']=$_POST['email'];
$_SESSION['id']=$num['id'];
$_SESSION['username']=$num['name'];
echo "<script type='text/javascript'> document.location ='index.php'; </script>";
}
//If Login Failed
else{
echo "<script>alert('Invalid login details');</script>";
echo "<script type='text/javascript'> document.location ='login.php'; </script>";
exit();
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Shopping | User Sign up</title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Bootstrap icons-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css"
rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
<script src="js/jquery.min.js"></script>
<!-- <link href="css/bootstrap.min.css" rel="stylesheet" /> -->
</head>
<style type="text/css">
input { border:solid 1px #000;
</style>
<body>
<?php include_once('includes/header.php');?>
<!-- Header-->
<header class="bg-dark py-5">
<div class="container px-4 px-lg-5 my-5">
<!-- Section-->
<section class="py-5">
<div class="container px-4 px-lg-5 mt-5">
<div class="row gx-4 gx-lg-5 row-cols-2 row-cols-md-3 row-cols-xl-4 justify-content-
center">
<?php
$total_records_per_page = 12;
$offset = ($page_no-1) * $total_records_per_page;
$previous_page = $page_no - 1;
$next_page = $page_no + 1;
$adjacents = "2";
$query=mysqli_query($con,"select products.id as
pid,products.productImage1,products.productName,products.productPriceBeforeDiscount,produ
cts.productPrice from products order by pid desc LIMIT $offset, $total_records_per_page ");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<nav aria-label="Pagination">
<hr class="my-0">
<ul class="pagination justify-content-center my-4">
<?php
if ($total_no_of_pages <= 10){
for ($counter = 1; $counter <= $total_no_of_pages; $counter++){
if ($counter == $page_no) {
echo "<li class='page-link active'><a>$counter</a></li>";
}else{
echo "<li><a href='?page_no=$counter' class='page-link'>$counter</a></li>";
}
}
}
elseif($total_no_of_pages > 10){
if($page_no <= 4) {
for ($counter = 1; $counter < 8; $counter++){
if ($counter == $page_no) {
echo "<li class='active'><a>$counter</a></li>";
}else{
echo "<li><a href='?page_no=$counter'> $counter</a></li>";
}
}
echo "<li><a>...</a></li>";
echo "<li><a href='?page_no=$second_last'>$second_last</a></li>";
echo "<li><a href='?page_no=$total_no_of_pages'>$total_no_of_pages</a></li>";
}
else {
echo "<li><a href='?page_no=1' class='page-link'>1</a></li>";
echo "<li><a href='?page_no=2' class='page-link'>2</a></li>";
echo "<li><a>...</a></li>";
</div>
</header>
<!-- Section-->
<section class="py-5">
<div class="container px-4 mt-5">
<table class="table">
<thead>
<tr>
<th colspan="4"><h4>My Cart</h4></th>
</tr>
</thead>
<tr>
<thead>
<th>Product</th>
<th>Product Name</th>
<th>Product Price</th>
<th>Quantity</th>
<th>Total Amount</th>
<th>Action</th>
</thead>
</tr>
<tbody>
<?php
$uid=$_SESSION['id'];
$ret=mysqli_query($con,"select products.productName as pname,products.productName as
proid,products.productImage1 as pimage,products.productPrice as pprice,cart.productId as
pid,cart.id as cartid,products.productPriceBeforeDiscount,cart.productQty from cart join
products on products.id=cart.productId where cart.userId='$uid'");
$num=mysqli_num_rows($ret);
if($num>0)
{
while ($row=mysqli_fetch_array($ret)) {
?>
<tr>
<td class="col-md-2"><img src="admin/productimages/<?php echo
htmlentities($row['pimage']);?>" alt="<?php echo htmlentities($row['pname']);?>" width="100"
height="100"></td>
<td>
<a href="product-details.php?pid=<?php echo htmlentities($pd=$row['pid']);?
>"><?php echo htmlentities($row['pname']);?></a>
</td>
<td>
<span class="text-decoration-line-through">Rs. <?php echo
htmlentities($row['productPriceBeforeDiscount']);?></span>
<span>Rs. <?php echo htmlentities($row['pprice']);?></span>
</td>
<td><?php echo htmlentities($row['productQty']);?></td>
<td><?php echo htmlentities($totalamount=$row['productQty']*$row['pprice']);?
></td>
<td>
<a href="my-cart.php?del=<?php echo htmlentities($row['cartid']);?>"
onClick="return confirm('Are you sure you want to delete?')" class="btn-upper btn btn-
danger">Delete</a>
</td>
</tr>
<?php $grantotal+=$totalamount;
} ?>
<tr>
<th colspan="4">Grand Total</th>
<th colspan="2"><?php echo $grantotal;?></th>
</tr>
<?php } else{
echo "<script type='text/javascript'> document.location ='my-cart.php'; </script>"; } ?>
</tbody>
</table>
<h5>Already Listed Addresses</h5>
<?php
$uid=$_SESSION['id'];
$query=mysqli_query($con,"select * from addresses where userId='$uid'");
$count=mysqli_num_rows($query);
if($count==0):
echo "<font color='red'>No addresses Found.</font>";
else:
?>
<form method="post">
<input type="hidden" name="grandtotal" value="<?php echo $grantotal; ?>">
<div class="row">
<div class="col-6">
<table class="table">
<thead>
<tr>
<th colspan="4"><h5>Billing Address</h5></th>
</tr>
</thead>
<tr>
<thead>
<th>#</th>
<th width="250">Adresss</th>
<th>City</th>
<th>State</th>
<th>Pincode</th>
<th>Country</th>
</thead>
</tr>
</table>
</div>
<div class="col-6">
<table class="table">
<thead>
<tr>
<th colspan="4"><h5>Shipping Address</h5></th>
</tr>
</thead>
<tr>
<thead>
<th width="250">Adresss</th>
<th>City</th>
<th>State</th>
<th>Pincode</th>
<th>Country</th>
</thead>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Fecthing Values-->
<?php while ($result=mysqli_fetch_array($query)) { ?>
<div class="row">
<div class="col-6">
<table class="table">
<tbody>
<tr>
<td><input type="radio" name="selectedaddress" value="<?php echo $result['id'];?
>" required></td>
<td width="250"><?php echo $result['billingAddress'];?></td>
<td><?php echo $result['biilingCity'];?></td>
<td><?php echo $result['billingState'];?></td>
<td><?php echo $result['billingPincode'];?></td>
<td><?php echo $result['billingCountry'];?></td>
</tr>
</tbody>
</table>
</div>
<div class="col-6">
<table class="table">
<tbody>
<tr>
<td width="250"><?php echo $result['shippingAddress'];?></td>
<td><?php echo $result['shippingCity'];?></td>
<td><?php echo $result['shippingState'];?></td>
<td><?php echo $result['shippingPincode'];?></td>
<td><?php echo $result['shippingCountry'];?></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php } endif;?>
<div align="right">
<button class="btn-upper btn btn-primary" type="submit" name="proceedpayment">Procced
for Payment</button>
</div>
</form>
<hr />
<form method="post" name="address">
<div class="row">
<!--Billing Addresss --->
<div class="col-6">
<div class="row">
<div class="col-9" align="center"><h5>New Billing Address</h5><br /></div>
<hr />
</div>
<div class="row">
<div class="col-3">Address</div>
<div class="col-6"><input type="text" name="baddress" id="baddress" class="form-
control" required ></div>
</div>
<div class="row mt-3">
<div class="col-3">City</div>
<div class="col-6"><input type="text" name="bcity" id="bcity" class="form-control"
required>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-5"> </div>
<div class="col-6"><input type="submit" name="submit" id="submit" class="btn btn-
primary" value="Add" required></div>
</div>
</div>
</form>
</div>
</div>
</section>
<!-- Footer-->
<?php include_once('includes/footer.php'); ?>
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="js/scripts.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
if($(this).prop("checked") == true){
$('#saddress').val($('#baddress').val() );
$('#scity').val($('#bcity').val());
$('#sstate').val($('#bstate').val());
$('#spincode').val( $('#bpincode').val());
$('#scountry').val($('#bcountry').val() );
}
});
});
</script>
</body>
CHAPTER-7
7. SOFTWARE DESCRIPTION
7.1 SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub-assemblies
, assemblies and/or a finished product It is the process of exercising software with the intent of
ensuring that the software system meets its requirements and user expectations and does not fail
in an unacceptable manner. There are various types of test. Each test type addresses a specific
testing requirement.
TYPES OF TESTS
UNIT TESTING
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected results.
INTEGRATION TESTING
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
SYSTEM TESTING
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.
ACCEPTANCE TESTING
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.
CHAPTER -8
8. SYSTEM IMPLEMENTATION
IMPLEMENTATION PLAN:
Implementation is the state in the system where the theoretical design is turned
into a working system. The most crucial stage in achieving a new successful system and in
giving confidence on the new system for the users that will work efficiently and effectively. The
system can be implemented only after thorough testing is done and if found to work according to
the specification.
It involves careful planning, investigation of the current system and its constraints
on implementation, design of methods to achieve the changeover, an evaluation of changeover
methods apart from planning. Two major tasks of preparing the implementation are education,
training of the users and testing the systems. System analysis and design efforts will be more for
complex systems beings implemented. Based on policies of individuals’ organization an
implementation coordinating committee has been appointed.
IMPLEMENTATION PROCESS:
The implementation process begins with preparing a plain for the implementation
system. According to this plan, the other activities are to be carried out. In this plan, discussion
has been made regarding the equipment, resources and how to test the activities. Thus a clear
plan is preparing for the activities.
EQUIPMENT ACQUISITION:
One of the most important development activities is the code of programming.
The system According to the above plan, the necessary equipment has to be acquired to
implement the new system.
USER MANUALS:
Once planning has been completed the major effort of the computer department is
to ensure that the user department consists of education and trained staff, as the system becomes
more complex. The success of a system depends upon how they are operated and used. Thus the
quality of training, the personnel is connected to the success of the system.
For this purpose system and user manuals are prepared. In system manuals,
details about the forms and blocks triggers which were used to develop them were specified. In
user manuals data flow diagrams, charts and screen formats are given. Also error messages
associated were explained in details. The users were shown the success and they were taught
how to operate the system. Live demonstration and visuals aids were used to teach them.
CHAPTER-9
Home Page
Admin Login
Dashboard
Add Category
’
Manage Category
Add Product
Manage Product
All Orders
Order Details
User Login
User Index
Product View
Cart View
Checkout
Payment
Order Track
9.2 Conclusion
It is concluded that how internet based e-commerce will transform agribusiness is
still indeterminate. Supply chains may become more efficient. Stronger connection
between producers and consumers may result in more differentiated products that meet consumer
needs. E-commerce offers an alternative venue of promoting and marketing agricultural products
that has a benefit of reaching extensive geographical populations and providing detailed
product information at a relatively low cost. Markets may become more transparent. As the
Internet transcends geography the globalization of the sector may become a reality.
Transformation is about change and change creates winners and losers. The winners will be the
fast innovators best serving consumer’s needs.The losers are likely to be those unwilling to
catch this powerful technological tool and adopt the trend. As Charles Darwin says, “It’s not
the strongest of the species that survives, nor the most intelligent; it is the one most adaptable
to change”.
CHAPTER-10
10.FUTURE ENHANCEMENT
This application avoids the manual work and the problems concern with it. It is an easy
way to obtain the information regarding the various products information that are present in the
Agri Super markets.
Well I and my team members have worked hard in order to present an improved website better
than the existing one’s regarding the information about the various activities. Still ,we found out
that the project can be done in a better way. Primarily, when we request information about a
particular product it just shows the company, product id, product name and no. of quantities
available. So, after getting the information we can get access to the product company website
just by a click on the product name .
CHAPTER-11
11. BIBLIOGRAPHY
For PHP
https://www.w3schools.com/php/default.asp
https://www.sitepoint.com/php/
https://www.php.net/
For MySQL
https://www.mysql.com/
http://www.mysqltutorial.org
For XAMPP
https://www.apachefriends.org/download.html
https://www.tutorialspoint.com/software_engineering