Professional Documents
Culture Documents
The E-auction, one of the popular e-commerce activities, allows bidders to directly
bid the products over the Internet. As for sealed bid, the extra transaction cost is required for the
intermediaries because the third-party is the important role between the buyers and the sellers
help to trade both during the auction. Because of the popularity of the Internet, the integration
services have gradually changed people daily life, such as e-commerce activities on transactions,
transportation and so on. In addition, it never guarantees whether the third-party is trust. To
resolve the problems, the blockchain technology with low transaction cost is used to develop the
smart contract of public bid and sealed bid. The smart contract, proposed in 1990 and
implements via Ethereum platform, can ensure the bill secure, private, non-reputability and
inalterability owing to all the transactions are recorded in the same but decentralized ledgers. The
smart contract is composed of the address of Auctioneer, the start auction time, deadline, the
address of current winner, the current highest price. In the experiments, the accounts are created
through Ethereum wallet. In miner stage, the MinerGate is used in miner stage for obtaining
money to pay the transaction fee. At recorder stage, the nodes of blockchain are synchronized to
generate smart contract.
CHAPTER-1
1.INTRODUCTION
1.1 Introduction
Before each auction, the auction date, venue and auction items are announced by the
media. Those wishing to participate in the auction should arrive at the venue on that day in time.
This common method most of the time prevents the craving for bidding process. Another painful
thing to do with the old system is to investigate each bidding process and make it out of cash.
Therefore the system should keep records of both buyers and sellers until the settlement is
resolved.
This process is weird and time-consuming. now E-auction is the popular issue since
its convenience and efficiency. E-auction integrates the network technique into the bidding
system in order to reduce the cost of transactions. The main roles during E-auction include
bidders, auctioneers, and the third-party as shown. Most of the third party is the centralized
intermediary to provide a platform to help bidders and auctioneers posting products, checking the
highest bidding price and committing the winner, such as eBay and yahoo bidding system.
However, E-auction has two main problems. First, a centralized intermediary is
required in bidding system to help communication between bidders and auctioneers. In recent
years, E-auction is the popular issue since its convenience and efficiency. E-auction integrates
the network technique into the bidding system in order to reduce the cost of transactions.
The main roles during E-auction include bidders, auctioneers, and the third-party as
shown. Most of the third party is the centralized intermediary to provide a platform to help
bidders and auctioneers posting products, checking the highest bidding price and committing the
winner, such as eBay and yahoo bidding system. However, E-auction has two main problems.
First, a centralized intermediary is required in bidding system to help communication between
bidders and auctioneers. The smart contract is composed of the address of Auctioneer, the start
auction time, deadline, the address of current winner, the current highest price. In the
experiments, the accounts are created through Ethereum wallet.
In miner stage, the Miner Gate is used in miner stage for obtaining money to pay the
transaction fee. At recorder stage, the nodes of blockchain are synchronized to generate smart
contract. This auction website works online. The bidder and seller can participate in auction from
anywhere at any time through online auction .Those who wish to take part in bidding or sell
products at the site have to register at the site as customer. Only authenticated customers can take
part in selling or in bidding. Customer can see the profile of the bidding history of items which
are still open. Similarly the seller can see the progress of bidding .This will store bidders record
and bidding record. Auction winners and losers get an Email notification whether they won or
lost the bid.
The bidder is as a winner if he bids the highest price for such the product. During public
bid, bidders can bid several times; thus, public bid is also called multi-bidding auction. Sealed
bid is that bidders encrypts the bill and only send the bill once. If the time is due, the auctioneer
compares all of the bills. The bidder who bids for the highest price is the winner of the sealed
bid. Due to bidders only can bid once, it is also called single-bidding auction. In the seal bid, all
bidders’ prices are sealed until the bid opening deadline is compared to the prices of all bidders.
There is a common shortcoming in electronic seal ticket auctions. Before the deadline for
opening bids, the bidder cannot ensure that the bid price has been leaked by a third party (the
principal bidder), resulting in malicious bidders may collaborate with the bid winner to obtain
the best bid price.
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
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.
What can PHP do
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
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:
It’s very fast: MySQL’s developers’ main goal was speed; consequently the software was
designed from the beginning with speed in mind.
CHAPTER-5
5. MODULE DESCRIPTION
5.1 MODULES:-
CUSTOMER MODULE: In the customer module customer can view his own bidding details,
Purchase report, auction winning report, etc.
PRODUCT LIST MODULE: This collects information like product name, product detail,
product image, Start bid, Sale price, Bidding start date and end date.
CHAT MODULE: If the customer has any queries regarding product they can directly contact
with sellers. 24×7 online chat features available. If the seller is offline then the message stores
under seller message box.
REPORT MODULE: This module is for administrator to check sales report, product report,
auction report, payment report, etc.
5.2 DFD
5.3 SYSTEM FLOW DIAGRAM
5.4 ER DIAGRAM
5.5 DATABASE DESIGN
5.5.1 Table Name: Bids
Fields Data types
(Constraints)
id Int(Primary,autoincrement)
User_id Int
Product_id Int
BidAmount Float
Status tinyint
datecreated timestamp
Name Varchar(50)
CreationDate Timestamp
Name Varchar(150)
Description Varchar(150)
RegularPrice Varchar(50)
Bid_end-Datetime Datetime
Img_fname Varchar(150)
Datecreated timestamp
name Varchar(50)
email Varchar(150)
contact Varchar(50)
Cover_img Varchar(250)
About Varchar(400)
Content Varchar(1000)
name Varchar(50)
Username Varchar(50)
Password Varchar(50)
Email Varchar(50)
Contact Varchar(50)
Address Varchar(150)
Type Varchar(50)
Datecreated timestamp
CHAPTER-6
6.CODING DESIGN
6.1 Admin Index
<!DOCTYPE html>
<html lang="en">
</head>
<style>
body{
background: #80808045;
}
.modal-dialog.large {
width: 80% !important;
max-width: unset;
}
.modal-dialog.mid-large {
width: 50% !important;
max-width: unset;
}
#viewer_modal .btn-close {
position: absolute;
z-index: 999999;
/*right: -4.5em;*/
background: unset;
color: white;
border: unset;
font-size: 27px;
top: 0;
}
#viewer_modal .modal-dialog {
width: 80%;
max-width: unset;
height: calc(90%);
max-height: unset;
}
#viewer_modal .modal-content {
background: black;
border: unset;
height: calc(100%);
display: flex;
align-items: center;
justify-content: center;
}
#viewer_modal img,#viewer_modal video{
max-height: calc(100%);
max-width: calc(100%);
}
</style>
<body>
<?php include 'topbar.php' ?>
<?php include 'navbar.php' ?>
<div class="toast" id="alert_toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body text-white">
</div>
</div>
</main>
<div id="preloader"></div>
<a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>
}
window.uni_modal = function($title = '' , $url='',$size=""){
start_load()
$.ajax({
url:$url,
error:err=>{
console.log()
alert("An error occured")
},
success:function(resp){
if(resp){
$('#uni_modal .modal-title').html($title)
$('#uni_modal .modal-body').html(resp)
if($size != ''){
$('#uni_modal .modal-dialog').addClass($size)
}else{
$('#uni_modal .modal-dialog').removeAttr("class").addClass("modal-dialog modal-
md")
}
$('#uni_modal').modal({
show:true,
backdrop:'static',
keyboard:false,
focus:true
})
end_load()
}
}
})
}
window._conf = function($msg='',$func='',$params = []){
$('#confirm_modal #confirm').attr('onclick',$func+"("+$params.join(',')+")")
$('#confirm_modal .modal-body').html($msg)
$('#confirm_modal').modal('show')
}
window.alert_toast= function($msg = 'TEST',$bg = 'success'){
$('#alert_toast').removeClass('bg-success')
$('#alert_toast').removeClass('bg-danger')
$('#alert_toast').removeClass('bg-info')
$('#alert_toast').removeClass('bg-warning')
if($bg == 'success')
$('#alert_toast').addClass('bg-success')
if($bg == 'danger')
$('#alert_toast').addClass('bg-danger')
if($bg == 'info')
$('#alert_toast').addClass('bg-info')
if($bg == 'warning')
$('#alert_toast').addClass('bg-warning')
$('#alert_toast .toast-body').html($msg)
$('#alert_toast').toast({delay:3000}).toast('show');
}
$(document).ready(function(){
$('#preloader').fadeOut('fast', function() {
$(this).remove();
})
})
$('.datetimepicker').datetimepicker({
format:'Y/m/d H:i',
startDate: '+3d'
})
$('.select2').select2({
placeholder:"Please select here",
width: "100%"
})
</script>
</html>
Admin Login
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
include('./db_connect.php');
ob_start();
if(!isset($_SESSION['system'])){
$system = $conn->query("SELECT * FROM system_settings limit 1")->fetch_array();
foreach($system as $k => $v){
$_SESSION['system'][$k] = $v;
}
}
ob_end_flush();
?>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
?>
</head>
<style>
body{
width: 100%;
height: calc(100%);
/*background: #007bff;*/
}
main#main{
width:100%;
height: calc(100%);
background:white;
}
#login-right{
position: absolute;
right:0;
width:40%;
height: calc(100%);
background:white;
display: flex;
align-items: center;
}
#login-left{
position: absolute;
left:0;
width:60%;
height: calc(100%);
background:#59b6ec61;
display: flex;
align-items: center;
background: url(assets/uploads/<?php echo $_SESSION['system']['cover_img'] ?
>);
background-repeat: no-repeat;
background-size: cover;
}
#login-right .card{
margin: auto;
z-index: 1
}
.logo {
margin: auto;
font-size: 8rem;
background: white;
padding: .5em 0.7em;
border-radius: 50% 50%;
color: #000000b3;
z-index: 10;
}
div#login-right::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: calc(100%);
height: calc(100%);
background: #000000e0;
}
</style>
<body>
<div id="login-right">
<div class="card col-md-8">
<div class="card-body">
</main>
</body>
<script>
$('#login-form').submit(function(e){
e.preventDefault()
$('#login-form button[type="button"]').attr('disabled',true).html('Logging in...');
if($(this).find('.alert-danger').length > 0 )
$(this).find('.alert-danger').remove();
$.ajax({
url:'ajax.php?action=login',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
$('#login-form button[type="button"]').removeAttr('disabled').html('Login');
},
success:function(resp){
if(resp == 1){
location.href ='index.php?page=home';
}else{
$('#login-form').prepend('<div class="alert alert-
danger">Username or password is incorrect.</div>')
$('#login-form
button[type="button"]').removeAttr('disabled').html('Login');
}
}
})
})
</script>
</html>
Add Categories
<?php include('db_connect.php');?>
<div class="container-fluid">
<div class="col-lg-12">
<div class="row">
<!-- FORM Panel -->
<div class="col-md-4">
<form action="" id="manage-category">
<div class="card">
<div class="card-header">
Category Form
</div>
<div class="card-body">
<input type="hidden" name="id">
<div class="form-group">
<label class="control-label">Name</label>
<input type="text" class="form-control" name="name">
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12">
<button class="btn btn-sm btn-primary col-sm-3 offset-md-3"> Save</button>
<button class="btn btn-sm btn-default col-sm-3" type="button" onclick="$('#manage-
category').get(0).reset()"> Cancel</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- FORM Panel -->
</div>
<style>
td{
vertical-align: middle !important;
}
</style>
<script>
$('#manage-category').submit(function(e){
e.preventDefault()
start_load()
$.ajax({
url:'ajax.php?action=save_category',
data: new FormData($(this)[0]),
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST',
success:function(resp){
if(resp==1){
alert_toast("Data successfully added",'success')
setTimeout(function(){
location.reload()
},1500)
}
else if(resp==2){
alert_toast("Data successfully updated",'success')
setTimeout(function(){
location.reload()
},1500)
}
}
})
})
$('.edit_category').click(function(){
start_load()
var cat = $('#manage-category')
cat.get(0).reset()
cat.find("[name='id']").val($(this).attr('data-id'))
cat.find("[name='name']").val($(this).attr('data-name'))
cat.find("[name='description']").val($(this).attr('data-description'))
end_load()
})
$('.delete_category').click(function(){
_conf("Are you sure to delete this category?","delete_category",[$(this).attr('data-
id')])
})
function delete_category($id){
start_load()
$.ajax({
url:'ajax.php?action=delete_category',
method:'POST',
data:{id:$id},
success:function(resp){
if(resp==1){
alert_toast("Data successfully deleted",'success')
setTimeout(function(){
location.reload()
},1500)
}
}
})
}
$('table').dataTable()
</script>
Add Products
<?php include('db_connect.php');?>
<div class="container-fluid">
<div class="col-lg-12">
<div class="row mb-4 mt-4">
<div class="col-md-12">
</div>
</div>
<div class="row">
<!-- FORM Panel -->
</div>
<style>
td{
vertical-align: middle !important;
}
td p{
margin: unset
}
table td img{
max-width:100px;
max-height: :150px;
}
img{
max-width:100px;
max-height: :150px;
}
</style>
<script>
$(document).ready(function(){
$('table').dataTable()
})
$('.view_product').click(function(){
uni_modal("product Details","view_product.php?id="+$(this).attr('data-id'),'mid-
large')
})
$('.edit_product').click(function(){
location.href ="index.php?page=manage_product&id="+$(this).attr('data-id')
})
$('.delete_product').click(function(){
_conf("Are you sure to delete this product?","delete_product",[$(this).attr('data-
id')])
})
function delete_product($id){
start_load()
$.ajax({
url:'ajax.php?action=delete_product',
method:'POST',
data:{id:$id},
success:function(resp){
if(resp==1){
alert_toast("Data successfully deleted",'success')
setTimeout(function(){
location.reload()
},1500)
}
}
})
}
</script>
User Login
<?php session_start() ?>
<div class="container-fluid">
<form action="" id="login-frm">
<div class="form-group">
<label for="" class="control-label">Username</label>
<input type="text" name="username" required="" class="form-control">
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" name="password" required="" class="form-control">
<small><a href="javascript:void(0)" id="new_account">Create New
Account</a></small>
</div>
<button class="button btn btn-primary btn-sm">Login</button>
<button class="button btn btn-secondary btn-sm" type="button" data-
dismiss="modal">Cancel</button>
</form>
</div>
<style>
#uni_modal .modal-footer{
display:none;
}
</style>
<script>
$('#new_account').click(function(){
uni_modal("Create an Account",'signup.php?redirect=index.php?page=checkout')
})
$('#login-frm').submit(function(e){
e.preventDefault()
start_load()
if($(this).find('.alert-danger').length > 0 )
$(this).find('.alert-danger').remove();
$.ajax({
url:'admin/ajax.php?action=login2',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
end_load()
},
success:function(resp){
if(resp == 1){
location.href ='<?php echo isset($_GET['redirect']) ?
$_GET['redirect'] : 'index.php?page=home' ?>';
}else{
$('#login-frm').prepend('<div class="alert alert-danger">Email or
password is incorrect.</div>')
end_load()
}
}
})
})
</script>
User Index
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
include('admin/db_connect.php');
ob_start();
$query = $conn->query("SELECT * FROM system_settings limit 1")->fetch_array();
foreach ($query as $key => $value) {
if(!is_numeric($key))
$_SESSION['system'][$key] = $value;
}
ob_end_flush();
include('header.php');
?>
<style>
#main-field{
margin-top: 5rem!important;
}
</style>
<body id="page-top">
<!-- Navigation-->
<div class="toast" id="alert_toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body text-white">
</div>
</div>
<nav class="navbar navbar-expand-lg navbar-light fixed-top py-3" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="./"><?php echo $_SESSION['system']['name'] ?
></a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-
label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto my-2 my-lg-0">
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="index.php?
page=home">Home</a></li>
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="index.php?
page=about">About</a></li>
<?php if(isset($_SESSION['login_id'])): ?>
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="admin/ajax.php?
action=logout2"><?php echo "Welcome ".$_SESSION['login_name'] ?> <i class="fa
fa-power-off"></i></a></li>
<?php else: ?>
<li class="nav-item"><a class="nav-link js-scroll-trigger" href="javascript:void(0)"
id="login_now">Login</a></li>
<?php endif; ?>
</ul>
</div>
</div>
</nav>
<main id="main-field">
<?php
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
include $page.'.php';
?>
</main>
<div class="modal fade" id="confirm_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirmation</h5>
</div>
<div class="modal-body">
<div id="delete_content"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id='confirm' onclick="">Continue</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="uni_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id='submit' onclick="$('#uni_modal
form').submit()">Save</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="uni_modal_right" role='dialog'>
<div class="modal-dialog modal-full-height modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span class="fa fa-arrow-right"></span>
</button>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
<div class="modal fade" id="viewer_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<button type="button" class="btn-close" data-dismiss="modal"><span class="fa
fa-times"></span></button>
<img src="" alt="">
</div>
</div>
</div>
<div id="preloader"></div>
<footer class=" py-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8 text-center">
<h2 class="mt-0 text-white">Contact us</h2>
<hr class="divider my-4" />
</div>
</div>
<div class="row">
<div class="col-lg-4 ml-auto text-center mb-5 mb-lg-0">
<i class="fas fa-phone fa-3x mb-3 text-muted"></i>
<div class="text-white"><?php echo $_SESSION['system']['contact'] ?></div>
</div>
<div class="col-lg-4 mr-auto text-center">
<i class="fas fa-envelope fa-3x mb-3 text-muted"></i>
<!-- Make sure to change the email address in BOTH the anchor text and the link target
below!-->
<a class="d-block" href="mailto:<?php echo $_SESSION['system']['email'] ?>"><?php echo
$_SESSION['system']['email'] ?></a>
</div>
</div>
</div>
<br>
<div class="container"><div class="small text-center text-muted">Copyright © 2020 - <?php echo
$_SESSION['system']['name'] ?> | <a href="https://www.sourcecodester.com/"
target="_blank">Sourcecodester</a></div></div>
</footer>
</html>
View Product
<?php include 'admin/db_connect.php' ?>
<?php
session_start();
if(isset($_GET['id'])){
$qry = $conn->query("SELECT * FROM products where id= ".$_GET['id']);
foreach($qry->fetch_array() as $k => $val){
$$k=$val;
}
$cat_qry = $conn->query("SELECT * FROM categories where id = $category_id");
$category = $cat_qry->num_rows > 0 ? $cat_qry->fetch_array()['name'] : '' ;
}
?>
<style type="text/css">
#bid-frm{
display: none
}
</style>
<div class="container-fluid">
<img src="admin/assets/uploads/<?php echo $img_fname ?>" class="d-flex w-100" alt="">
<p>Name: <large><b><?php echo $name ?></b></large></p>
<p>Category: <b><?php echo $category ?></b></p>
<p>Starting Amount: <b><?php echo number_format($start_bid,2) ?></b></p>
<p>Until: <b><?php echo date("m d,Y h:i A",strtotime($bid_end_datetime)) ?></b></p>
<p>Highest Bid: <b id="hbid"><?php echo number_format($start_bid,2) ?></b></p>
<p>Description:</p>
<p class=""><small><i><?php echo $description ?></i></small></p>
<div class="col-md-12">
<button class="btn btn-primary btn-block btn-sm" type="button" id="bid">Bid</button>
</div>
<div id="bid-frm">
<div class="col-md-12">
<form id="manage-bid">
<input type="hidden" name="product_id" value="<?php echo $id ?>">
<div class="form-group">
<label for="" class="control-label">Bid Amount</label>
<input type="number" class="form-control text-right"
name="bid_amount" >
</div>
<div class="row justify-content-between">
<button class="btn col-sm-5 btn-primary btn-block btn-sm mr-
2">Submit</button>
<button class="btn col-sm-5 btn-secondary mt-0 btn-block btn-
sm" type="button" id="cancel_bid">Cancel</button>
</div>
</form>
</div>
</div>
</div>
<script>
$('#imagesCarousel img,#banner img').click(function(){
viewer_modal($(this).attr('src'))
})
$('#participate').click(function(){
_conf("Are you sure to commit that you will participate to this event?","participate",[<?php echo
$id ?>],'mid-large')
})
var _updateBid = setInterval(function(){
$.ajax({
url:'admin/ajax.php?action=get_latest_bid',
method:'POST',
data:{product_id:'<?php echo $id ?>'},
success:function(resp){
if(resp && resp > 0){
$('#hbid').text(parseFloat(resp).toLocaleString('en-US',
{style:'decimal',maximumFractionDigits:2,minimumFractionDigits:2}))
}
}
})
},1000)
$('#manage-bid').submit(function(e){
e.preventDefault()
start_load()
var latest = $('#hbid').text()
latest = latest.replace(/,/g,'')
if(parseFloat(latest) > $('[name="bid_amount"]').val()){
alert_toast("Bid amount must be greater than the current Highest Bid.",'danger')
end_load()
return false;
}
$.ajax({
url:'admin/ajax.php?action=save_bid',
method:'POST',
data:$(this).serialize(),
success:function(resp){
if(resp==1){
alert_toast("Bid successfully submited",'success')
end_load()
}else if(resp==2){
alert_toast("The current highest bid is yours.",'danger')
end_load()
}
}
})
})
$('#bid').click(function(){
if('<?php echo isset($_SESSION['login_id']) ? 1 : '' ?>' != 1){
$('.modal').modal('hide')
uni_modal("LOGIN",'login.php')
return false;
}
$(this).hide()
$('#bid-frm').show()
})
$('#cancel_bid').click(function(){
$('#bid').show()
$('#bid-frm').hide()
})
</script>
User Register
<?php session_start() ?>
<div class="container-fluid">
<form action="" id="signup-frm">
<div class="form-group">
<label for="" class="control-label">Name</label>
<input type="text" name="name" required="" class="form-control">
</div>
<div class="form-group">
<label for="" class="control-label">Contact</label>
<input type="text" name="contact" required="" class="form-control">
</div>
<div class="form-group">
<label for="" class="control-label">Address</label>
<textarea cols="30" rows="3" name="address" required="" class="form-
control"></textarea>
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="email" name="email" required="" class="form-control">
</div>
<div class="form-group">
<label for="" class="control-label">Username</label>
<input type="text" name="username" required="" class="form-control">
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" name="password" required="" class="form-
control">
</div>
<button class="button btn btn-primary btn-sm">Create</button>
<button class="button btn btn-secondary btn-sm" type="button" data-
dismiss="modal">Cancel</button>
</form>
</div>
<style>
#uni_modal .modal-footer{
display:none;
}
</style>
<script>
$('#signup-frm').submit(function(e){
e.preventDefault()
start_load()
if($(this).find('.alert-danger').length > 0 )
$(this).find('.alert-danger').remove();
$.ajax({
url:'admin/ajax.php?action=signup',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
$('#signup-frm button[type="submit"]').removeAttr('disabled').html('Create');
},
success:function(resp){
if(resp == 1){
location.reload();
}else{
$('#signup-frm').prepend('<div class="alert alert-
danger">Email already exist.</div>')
end_load()
}
}
})
})
</script>
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
Admin Login
Dashboard
Add Categories
’ Add Products
Manage Products
Bidding Details
User
System Setting
User Login
User Register
Home Page
Bidding
9.2 Conclusion
So, from above all elaboration here in short we would say online auction system will give
new approaches and dimensions to the auction system .It will encourage both buyers and sellers
to participate in auction process. Removes geographical boundaries, location constraints and
time constraints. It is a transparent process with no mutual work. Finally, online auction has
become other easy solution to the expectation of online buyers since it excludes the need of
physical presence of a bidder at the auction place and the product can be obtained at the
affordable price. Buyers can buy the product at there own affordable price.
CHAPTER-10
10.FUTURE ENHANCEMENT
The future enhancement to the system can be made as technology improves or changes.
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