Mini Project B-CSM401 Report on E-COMMERCE WEBSITE Submitted in partial fulfillment of the requirements Of the degree of Bachelor in Computer Engineering By Name Class Roll No. Shabbir Rampurawala SE 29 Mohsin Sayyed SE 34 Amit Kamble SE 13 Under the guidance of, Prof. (Nilesh Bhelkar) DEPARTMENT OF COMPUTER ENGINEERING Indala College of Engineering Bapsai, Kalyan – 421103. University of Mumbai (AY 2020-21) CERTIFICATE This is to certify that the Mini Project B-CSM401 entitled “ ECOMMERCE WEBSITE “ is a Bonafede work of “Shabbir Rampurawala, Mohsin Sayyed ,Amit Kamble” submitted to the University of Mumbai in partial fulfillment of the requirement for the award of the degree of “Bachelor of Engineering” in “Computer Engineering” . (Prof. Nilesh Bhelkar) Guide (Prof . Nilesh Bhelkar ) (Dr.Atul D.Narkhede Head of Department Principal ii ) Mini Project Approval This Mini Project B-CSM401 entitled “E-COMMERCE WEBSITE” by “Shabbir Rampurawala, Mohsin Sayyed ,Amit Kamble” is approved for the degree of Bachelor of Engineering in Computer Engineering. Examiners 1……………………………………… (Internal Examiner Name & Sign) 2………………………………………… (External Examiner name & Sign) Date: Place: iii Declaration We declare that this written submission represents our ideas in our own words and where others' ideas or words have been included, we have adequately cited and referenced the original sources. We also declare that we have adhered to all principles of academic honesty and integrity and have not misrepresented or fabricated or falsified any idea/data/fact/source in our submission. We understand that any violation of the above will be cause for disciplinary action by the Institute and can also evoke penal action from the sources which have thus not been properly cited or from whom proper permission has not been taken when needed. Name of student Shabbir Rampurawala Date: Place: iv Acknowledgment We express our deep gratitude to guide, Mr. Nilesh Bhelkar for him guidance and support to successfully complete the project. We are also grateful to respected Prof. Nilesh Bhelkar, HOD (Computer Engineering Dept.) and to Dr.Atul D.Narkhede, Principal, Indala College of Engineering for their constant support, motivation and encouragement during theproject work. We are also thankful to all the other faculty & staff members of our department for their kind cooperation and help. Lastly, we would like to express our deep admiration towards our classmates and our indebtedness to our parents for providing us with moral support and encouragement. v Contents Abstract 1 2 3 4 vii Introduction 1.1 Introduction 1.2 Motivation 1 Literature Survey 2 2.1 Survey of Existing System 2.2 Limitation existing system 2.3 Problem Statement & Objectives 2.4 Scope Proposed System 4 3.1 Architecture/ Framework 3.2 Algorithm and Process Design 3.3 Details of Hardware & Software Implementation 4.1 4.2 7 Program code Output 5 Conclusion and Future work 36 6 References 37 v List of Figures Figure number Figure name Chapter name Page number Figure.1 Shopping Portal Lifecycle 3.1 Architecture/ Framework 4 Figure.2 Class Diagram 3.2 Algorithm and Process Design 5 vi Abstract In today’s fast changing business environment and this pandemic, it’s extremely important to be able to respond to client’s needs in the most effective and timely manner. Due to the lockdown since all in person shopping has been restricted, but the demand is still high. The customers wish to see the businesses online and have instant access to the products and services. These requirements can be covered through e-commerce websites. The immediate benefits of these sites in terms of cost saving, efficiency and enhanced profitability are cleat at every stage in the supply chain. Rmart is an ecommerce website that sells groceries and health supplements through means of data and funds transfer over the internet. Through Rmart the users can order all their required rations from the comfort of their houses. vii Chapter 1 Introduction 1.1 Introduction: Rmart is an online product store where the customer can buy produce. During this lockdown since there are restrictions and all the markets are closed and consumers are getting more health conscious. Rmart allows the consumers to buy from their home. This platform has all the daily requirements of groceries, ranging from fresh vegetables to health supplements. On Rmart, a customer can make an account to sign into the website, browse the catalog and can add his preferred items in his personalized shopping cart. The customer can individually order the products or can buy his entire cart, where he can specify the quantities of respective products. The packages can be delivered to the same address or can be specified to be shipped at another address. 1.2 Motivation : The motivation for designing this shopping-cart application came because I love online shopping rather than spending lot of time at physical markets. Further, using the available stores to sell the products, there is also the possibility of designing one’s own customized shopping-cart application from scratch because custom-designed platforms are expensive. Moreover, I value recent learning about the Java and JavaScript programming languages as well as seeing how powerful and dynamic they are when it comes to web designing and applications. Apart from helping computer science students understand the concepts of web-application designing, it would be very easy to incorporate the idea of using programming techniques from the available visuals to understand how a piece of code appears on a user interface. The languages used to build this application are JavaScript, HTML, and Java because I found them to be extremely useful while working on the technologies at my workplace, Thomson Reuters 1 Chapter 2 Literature Survey 2.1 Survey of Existing System: The history of ecommerce shopping carts began immediately after the World Wide Web, or WWW, became a major medium to communicate information around the world. Ecommerce shopping-cart applications allow consumers to buy goods or services directly over the internet using a web browser. This online shopping evokes the business-to-consumer (B2C) process where a consumer buys directly from the business. The process where a business buys from another business is called a business-to-business (B2B) process. The best examples of shopping cart applications using B2B process are eBay and Amazon, both of which were launched in 1995. At present, most users of these online shopping-cart applications are people who have higher levels of education, have exposure to technological advancements, and are in a better income group. Such users develop a positive attitude towards these convenient shopping techniques. Java programs are compiled into platform-independent byte codes. Because of the robustness of Java, it is a very safe language, as they provide exception handling and a layer method to communicate with the database, which prevents the system from crashing easily. Another very important factor from the development point of view is that the Java language is object oriented, where everything is treated as an object and where class methods are implemented instead of functions or procedures, which makes it very simple to understand the code. 2.2 Limitation existing system: • Time Consuming • Shipping Rates • Refunds/Returns Disputes • Lack of options • Cash Back offers not present 2 2.3 Problem Statement & Objectives: Many customers go for purchasing offline so as to examine the product and hold the possession of the product just after the payment for the product. In this contemporary world customers loyalty depends upon the consistent ability to deliver quality, value and satisfaction. Offline shopping has a sense of immediacy. You get to posses the item you’ve purchased the very moment. If we can search and make a list of items that we would like to try while shopping, before actually going out. This way we can be more confident in our purchase and not missing out something. 2.4 Scope: • The current system can be extended to allow the users to create accounts and save products in to wish list. • The user could subscribe for price alerts which would enable them to receive messages when price for products fall below a particular level. • The current system is confined only to the shopping cart process. It can be extended to have a easy to use check out process. • Users can have multiple shipping and billing information saved. During checkout they can use the drag and drop feature to select shipping and billing information. 3 Chapter 3 Proposed System 3.1 Architecture/ Framework: Shopping Portal Lifecycle: Request reply Operation/data processing Online Shopping Portal Database Authentication Login / Index Products / Cart / Shopping (Approved/Reject (Acknowledgement) Payment / Submission (Acknowledgement) Payment / Checkout 4 3.2 Algorithm and Process Design: Class Diagram 5 3.3 Details of Hardware & Software: At Developer Side During system development, i have to design both static and dynamic website interfaces, create website functions and a database system, edit photos and pictures, so its has a set of software and hardware requirements. • Hardware Used Intel Dual Core Processor • Software Used XAMPP SERVER • 160 GB Hard Disk Drive. • MYSQL Database • 4 GB RAM. • NOTEPAD • O.S. – Windows 10 • Visual Studio Code At System Users Side The following is the requirements for the system users including members and administrators. Hardware Requirements • Intel Pentium 4 Processor • 20 GB Hard Disk Drive. • 256MB RAM. • O.S. – Windows XP Software Requirements • Browser (IE 7.0 or Above, Mozilla Firefox, Google Chrome • Browser Must be JavaScript Enabled 6 Chapter 4 Implementation 4.1 program code: <?php session_start(); error_reporting(0); include('includes/config.php'); if(isset($_GET['action']) && $_GET['action']=="add"){ $id=intval($_GET['id']); if(isset($_SESSION['cart'][$id])){ $_SESSION['cart'][$id]['quantity']++; }else{ $sql_p="SELECT * FROM products WHERE id={$id}"; $query_p=mysqli_query($con,$sql_p); if(mysqli_num_rows($query_p)!=0){ $row_p=mysqli_fetch_array($query_p); $_SESSION['cart'][$row_p['id']]=array("quantity" => 1, "price" => $row_p['productPrice']); }else{ $message="Product ID is invalid"; } } echo "<script>alert('Product has been added to the cart')</script>"; echo "<script type='text/javascript'> document.location ='my-cart.php'; </script>"; } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Meta --> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, userscalable=no"> <meta name="description" content=""> <meta name="author" content=""> <meta name="keywords" content="MediaCenter, Template, eCommerce"> <meta name="robots" content="all"> <title>Shopkart Home Page</title> <!-- Bootstrap Core CSS --> <link rel="stylesheet" href="assets/css/bootstrap.min.css"> 7 <!-- Customizable CSS --> <link rel="stylesheet" href="assets/css/main.css"> <link rel="stylesheet" href="assets/css/blue.css"> <link rel="stylesheet" href="assets/css/owl.carousel.css"> <link rel="stylesheet" href="assets/css/owl.transitions.css"> <!--<link rel="stylesheet" href="assets/css/owl.theme.css">--> <link href="assets/css/lightbox.css" rel="stylesheet"> <link rel="stylesheet" href="assets/css/animate.min.css"> <link rel="stylesheet" href="assets/css/rateit.css"> <link rel="stylesheet" href="assets/css/bootstrap-select.min.css"> <!-- Demo Purpose Only. Should be removed in production --> <link rel="stylesheet" href="assets/css/config.css"> <link href="assets/css/green.css" rel="alternate stylesheet" title="Green color"> <link href="assets/css/blue.css" rel="alternate stylesheet" title="Blue color"> <link href="assets/css/red.css" rel="alternate stylesheet" title="Red color"> <link href="assets/css/orange.css" rel="alternate stylesheet" title="Orange color"> <link href="assets/css/dark-green.css" rel="alternate stylesheet" title="Darkgreen color"> <link rel="stylesheet" href="assets/css/font-awesome.min.css"> <link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700' rel='stylesheet' type='text/css'> <!-- Favicon --> <link rel="shortcut icon" href="assets/images/favicon.ico"> </head> <body class="cnt-home"> <!-- ============================================== HEADER ============================================== --> <header class="header-style-1"> <?php include('includes/top-header.php');?> <?php include('includes/main-header.php');?> <?php include('includes/menu-bar.php');?> </header> <!-- ============================================== HEADER : END ============================================== --> <div class="body-content outer-top-xs" id="top-banner-and-menu"> <div class="container"> <div class="furniture-container homepage-container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-3 sidebar"> <!-- ================================== TOP NAVIGATION ================================== --> <?php include('includes/side-menu.php');?> <!-- ================================== TOP NAVIGATION : END ================================== --> </div><!-- /.sidemenu-holder --> <div class="col-xs-12 col-sm-12 col-md-9 homebanner-holder"> <!-- ========================================== SECTION – HERO ========================================= --> 8 <div id="hero" class="homepage-slider3"> <div id="owl-main" class="owl-carousel owl-inner-nav owl-ui-sm"> <div class="full-width-slider"> <div class="item" style="background-image: url(assets/images/sliders/slider1.jpg);"> <!-- /.container-fluid --> </div><!-- /.item --> </div><!-- /.full-width-slider --> <div class="full-width-slider"> <div class="item full-width-slider" style="background-image: url(assets/images/sliders/slider2.jpg);"> </div><!-- /.item --> </div><!-- /.full-width-slider --> </div><!-- /.owl-carousel --> </div> <!-- ========================================= SECTION – HERO : END ========================================= --> <!-============================================== INFO BOXES ============================================== --> <div class="info-boxes wow fadeInUp"> <div class="info-boxes-inner"> <div class="row"> <div class="col-md-6 col-sm-4 col-lg-4"> <div class="info-box"> <div class="row"> <div class="col-xs-2"> <i class="icon fa fa-dollar"></i> </div> <div class="col-xs-10"> <h4 class="info-box-heading green">money back</h4> </div> </div> <h6 class="text">30 Day Money Back Guarantee.</h6> </div> </div><!-- .col --> <div class="hidden-md col-sm-4 col-lg-4"> <div class="info-box"> <div class="row"> <div class="col-xs-2"> <i class="icon fa fa-truck"></i> </div> <div class="col-xs-10"> <h4 class="info-box-heading orange">free shipping</h4> </div> </div> <h6 class="text">free ship-on oder over Rs. 500.00</h6> </div> </div><!-- .col --> <div class="col-md-6 col-sm-4 col-lg-4"> 9 <div class="info-box"> <div class="row"> <div class="col-xs-2"> <i class="icon fa fa-gift"></i> </div> <div class="col-xs-10"> <h4 class="info-box-heading red">Special Sale</h4> </div> </div> <h6 class="text">All items-sale up to 20% off </h6> </div> </div><!-- .col --> </div><!-- /.row --> </div><!-- /.info-boxes-inner --> </div><!-- /.info-boxes --> <!-- ============================================== INFO BOXES : END ============================================== --> </div><!-- /.homebanner-holder --> </div><!-- /.row --> <!-- ============================================== SCROLL TABS ============================================== --> <div id="product-tabs-slider" class="scroll-tabs inner-bottom-vs wow fadeInUp"> <div class="more-info-tab clearfix"> <h3 class="new-product-title pull-left">Featured Products</h3> <ul class="nav nav-tabs nav-tab-line pull-right" id="new-products1"> <li class="active"><a href="#all" datatoggle="tab">All</a></li> <li><a href="#books" data-toggle="tab">Books</a></li> <li><a href="#furniture" datatoggle="tab">Furniture</a></li> </ul><!-- /.nav-tabs --> </div> <div class="tab-content outer-top-xs"> <div class="tab-pane in active" id="all"> <div class="product-slider"> <div class="owl-carousel home-owl-carousel custom-carousel owl-theme" data-item="4"> <?php $ret=mysqli_query($con,"select * from products"); while ($row=mysqli_fetch_array($ret)) { # code... ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <div class="product-image"> 10 <div class="image"> <a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"> <img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" dataecho="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" width="180" height="300" alt=""></a> </div><!-- /.image --> </div><!-- /.product-image --> <div class="product-info text-left"> <h3 class="name"><a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?></a></h3> <div class="rating rateit-small"></div> <div class="description"></div> <div class="product-price"> <span class="price"> Rs.<?php echo htmlentities($row['productPrice']);?> </span> <span class="price-before-discount">Rs.<?php echo htmlentities($row['productPriceBeforeDiscount']);?> </span> </div><!-- /.product-price --> </div><!-- /.product-info --> <?php if($row['productAvailability']=='In Stock'){?> <div class="action"><a href="index.php?page=product&action=add&id=<?php echo $row['id']; ?>" class="lnk btn btnprimary">Add to Cart</a></div> <?php } else {?> <div class="action" style="color:red">Out of Stock</div> <?php } ?> </div><!-- /.product --> </div><!-- /.products --> </div><!-- /.item --> <?php } ?> </div><!-- /.home-owl-carousel --> </div><!-- /.product-slider --> </div> <div class="tab-pane" id="books"> <div class="product-slider"> <div class="owl-carousel home-owl-carousel custom-carousel owl-theme"> <?php $ret=mysqli_query($con,"select * from products where category=3"); while ($row=mysqli_fetch_array($ret)) 11 { # code... ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <div class="product-image"> <div class="image"> <a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"> <img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" dataecho="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" width="180" height="300" alt=""></a> </div><!-- /.image --> </div><!-- /.product-image --> <div class="product-info text-left"> <h3 class="name"><a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?></a></h3> <div class="rating rateit-small"></div> <div class="description"></div> <div class="product-price"> <span class="price"> Rs. <?php echo htmlentities($row['productPrice']);?> </span> <span class="price-before-discount">Rs.<?php echo htmlentities($row['productPriceBeforeDiscount']);?></span> </div><!-- /.product-price --> </div><!-- /.product-info --> <?php if($row['productAvailability']=='In Stock'){?> <div class="action"><a href="index.php?page=product&action=add&id=<?php echo $row['id']; ?>" class="lnk btn btnprimary">Add to Cart</a></div> <?php } else {?> <div class="action" style="color:red">Out of Stock</div> <?php } ?> </div><!-- /.product --> </div><!-- /.products --> </div><!-- /.item --> <?php } ?> </div><!-- /.home-owl-carousel --> 12 </div><!-- /.product-slider --> </div> <div class="tab-pane" id="furniture"> <div class="product-slider"> <div class="owl-carousel home-owl-carousel custom-carousel owl-theme"> <?php $ret=mysqli_query($con,"select * from products where category=5"); while ($row=mysqli_fetch_array($ret)) { ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <div class="product-image"> <div class="image"> <a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"> <img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" dataecho="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" width="180" height="300" alt=""></a> </div> </div> <div class="product-info text-left"> <h3 class="name"><a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?></a></h3> <div class="rating rateit-small"></div> <div class="description"></div> <div class="product-price"> <span class="price"> Rs.<?php echo htmlentities($row['productPrice']);?> </span> <span class="price-before-discount">Rs.<?php echo htmlentities($row['productPriceBeforeDiscount']);?></span> </div> </div> <?php if($row['productAvailability']=='In Stock'){?> <div class="action"><a href="index.php?page=product&action=add&id=<?php echo $row['id']; ?>" class="lnk btn btnprimary">Add to Cart</a></div> 13 <?php } else {?> <div class="action" style="color:red">Out of Stock</div> <?php } ?> </div> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <!-- ============================================== TABS ============================================== --> <div class="sections prod-slider-small outer-top-small"> <div class="row"> <div class="col-md-6"> <section class="section"> <h3 class="section-title">Smart Phones</h3> <div class="owl-carousel homepage-owl-carousel custom-carousel outertop-xs owl-theme" data-item="2"> <?php $ret=mysqli_query($con,"select * from products where category=4 and subCategory=4"); while ($row=mysqli_fetch_array($ret)) { ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <div class="product-image"> <div class="image"> <a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" dataecho="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" width="180" height="300"></a> </div><!-- /.image --> </div><!-- /.product-image --> <div class="product-info text-left"> <h3 class="name"><a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?></a></h3> <div class="rating rateit-small"></div> <div class="description"></div> <div class="product-price"> 14 <span class="price"> Rs. <?php echo htmlentities($row['productPrice']);?> </span> <span class="price-before-discount">Rs.<?php echo htmlentities($row['productPriceBeforeDiscount']);?></span> </div> </div> <?php if($row['productAvailability']=='In Stock'){?> <div class="action"><a href="index.php?page=product&action=add&id=<?php echo $row['id']; ?>" class="lnk btn btnprimary">Add to Cart</a></div> <?php } else {?> <div class="action" style="color:red">Out of Stock</div> <?php } ?> </div> </div> </div> <?php }?> </div> </section> </div> <div class="col-md-6"> <section class="section"> <h3 class="section-title">Laptops</h3> <div class="owl-carousel homepage-owl-carousel custom-carousel outer-top-xs owl-theme" data-item="2"> <?php $ret=mysqli_query($con,"select * from products where category=4 and subCategory=6"); while ($row=mysqli_fetch_array($ret)) { ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <div class="product-image"> <div class="image"> <a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" dataecho="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" width="300" height="300"></a> </div><!-- /.image --> </div><!-- /.product-image --> <div class="product-info text-left"> <h3 class="name"><a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?></a></h3> 15 <div class="rating rateit-small"></div> <div class="description"></div> <div class="product-price"> <span class="price"> Rs .<?php echo htmlentities($row['productPrice']);?> </span> <span class="price-before-discount">Rs.<?php echo htmlentities($row['productPriceBeforeDiscount']);?></span> </div> </div> <?php if($row['productAvailability']=='In Stock'){?> <div class="action"><a href="index.php?page=product&action=add&id=<?php echo $row['id']; ?>" class="lnk btn btnprimary">Add to Cart</a></div> <?php } else {?> <div class="action" style="color:red">Out of Stock</div> <?php } ?> </div> </div> </div> <?php }?> </div> </section> </div> </div> </div> <!-- ============================================== TABS : END ============================================== --> <section class="section featured-product inner-xs wow fadeInUp"> <h3 class="section-title">Fashion</h3> <div class="owl-carousel best-seller custom-carousel owl-theme outer-top-xs"> <?php $ret=mysqli_query($con,"select * from products where category=6"); while ($row=mysqli_fetch_array($ret)) { # code... ?> <div class="item"> <div class="products"> 16 <div class="product"> <div class="product-micro"> <div class="row product-microrow"> <div class="col col-xs-6"> <div class="product-image"> <div class="image"> <a href="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" data-lightbox="image-1" data-title="<?php echo htmlentities($row['productName']);?>"> <img data-echo="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" width="170" height="174" alt=""> <div class="zoom-overlay"></div> </a> </div><!-/.image --> </div><!-/.product-image --> </div><!-- /.col --> <div class="col col-xs-6"> <div class="product-info"> <h3 class="name"><a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?></a></h3> <div class="rating rateit-small"></div> <div class="product-price"> <span class="price"> Rs. <?php echo htmlentities($row['productPrice']);?> </span> </div><!-/.product-price --> <?php if($row['productAvailability']=='In Stock'){?> <div class="action"><a href="index.php?page=product&action=add&id=<?php echo $row['id']; ?>" class="lnk btn btnprimary">Add to Cart</a></div> <?php } else {?> <div class="action" style="color:red">Out of Stock</div> <?php } ?> </div> </div><!-- /.col --> </div><!-- /.product-micro-row --> </div><!-- /.product-micro --> 17 </div> </div> </div><?php } ?> </div> </section> <?php include('includes/brands-slider.php');?> </div> </div> <?php include('includes/footer.php');?> <script src="assets/js/jquery-1.11.1.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/bootstrap-hover-dropdown.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> <script src="assets/js/echo.min.js"></script> <script src="assets/js/jquery.easing-1.3.min.js"></script> <script src="assets/js/bootstrap-slider.min.js"></script> <script src="assets/js/jquery.rateit.min.js"></script> <script type="text/javascript" src="assets/js/lightbox.min.js"></script> <script src="assets/js/bootstrap-select.min.js"></script> <script src="assets/js/wow.min.js"></script> <script src="assets/js/scripts.js"></script> <!-- For demo purposes – can be removed on production --> <script src="switchstylesheet/switchstylesheet.js"></script> <script> $(document).ready(function(){ $(".changecolor").switchstylesheet( { seperator:"color"} ); $('.show-theme-options').click(function(){ $(this).parent().toggleClass('open'); return false; }); }); $(window).bind("load", function() { $('.show-theme-options').delay(2000).trigger('click'); }); </script> <!-- For demo purposes – can be removed on production : End --> </body> </html> <?php session_start(); error_reporting(0); include('includes/config.php'); 18 // Code user Registration if(isset($_POST['submit'])) { $name=$_POST['fullname']; $email=$_POST['emailid']; $contactno=$_POST['contactno']; $password=md5($_POST['password']); $query=mysqli_query($con,"insert into users(name,email,contactno,password) values('$name','$email','$contactno','$password')"); if($query) { echo "<script>alert('You are successfully register');</script>"; } else{ echo "<script>alert('Not register something went worng');</script>"; } } // Code for User login if(isset($_POST['login'])) { $email=$_POST['email']; $password=md5($_POST['password']); $query=mysqli_query($con,"SELECT * FROM users WHERE email='$email' and password='$password'"); $num=mysqli_fetch_array($query); if($num>0) { $extra="my-cart.php"; $_SESSION['login']=$_POST['email']; $_SESSION['id']=$num['id']; $_SESSION['username']=$num['name']; $uip=$_SERVER['REMOTE_ADDR']; $status=1; $log=mysqli_query($con,"insert into userlog(userEmail,userip,status) values('".$_SESSION['login']."','$uip','$status')"); $host=$_SERVER['HTTP_HOST']; $uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\'); header("location:http://$host$uri/$extra"); exit(); } else { $extra="login.php"; $email=$_POST['email']; $uip=$_SERVER['REMOTE_ADDR']; $status=0; $log=mysqli_query($con,"insert into userlog(userEmail,userip,status) values('$email','$uip','$status')"); $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']),'/\\'); header("location:http://$host$uri/$extra"); $_SESSION['errmsg']="Invalid email id or Password"; 19 exit(); } } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Meta --> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="description" content=""> <meta name="author" content=""> <meta name="keywords" content="MediaCenter, Template, eCommerce"> <meta name="robots" content="all"> <title>Shopping Portal | Signi-in | Signup</title> <!-- Bootstrap Core CSS --> <link rel="stylesheet" href="assets/css/bootstrap.min.css"> <!-- Customizable CSS --> <link rel="stylesheet" href="assets/css/main.css"> <link rel="stylesheet" href="assets/css/blue.css"> <link rel="stylesheet" href="assets/css/owl.carousel.css"> <link rel="stylesheet" href="assets/css/owl.transitions.css"> <!--<link rel="stylesheet" href="assets/css/owl.theme.css">--> <link href="assets/css/lightbox.css" rel="stylesheet"> <link rel="stylesheet" href="assets/css/animate.min.css"> <link rel="stylesheet" href="assets/css/rateit.css"> <link rel="stylesheet" href="assets/css/bootstrap-select.min.css"> <!-- Demo Purpose Only. Should be removed in production --> <link rel="stylesheet" href="assets/css/config.css"> <link href="assets/css/green.css" rel="alternate stylesheet" title="Green color"> <link href="assets/css/blue.css" rel="alternate stylesheet" title="Blue color"> <link href="assets/css/red.css" rel="alternate stylesheet" title="Red color"> <link href="assets/css/orange.css" rel="alternate stylesheet" title="Orange color"> <link href="assets/css/dark-green.css" rel="alternate stylesheet" title="Darkgreen color"> <!-- Demo Purpose Only. Should be removed in production : END --> <!-- Icons/Glyphs --> <link rel="stylesheet" href="assets/css/font-awesome.min.css"> 20 <!-- Fonts --> <link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700' rel='stylesheet' type='text/css'> <!-- Favicon --> <link rel="shortcut icon" href="assets/images/favicon.ico"> <script type="text/javascript"> function valid() { if(document.register.password.value!= document.register.confirmpassword.value) { alert("Password and Confirm Password Field do not match !!"); document.register.confirmpassword.focus(); return false; } return true; } </script> <script> function userAvailability() { $("#loaderIcon").show(); jQuery.ajax({ url: "check_availability.php", data:'email='+$("#email").val(), type: "POST", success:function(data){ $("#user-availability-status1").html(data); $("#loaderIcon").hide(); }, error:function (){} }); } </script> </head> <body class="cnt-home"> <!-- ============================================== HEADER ============================================== --> <header class="header-style-1"> <!-- ============================================== TOP MENU ============================================== --> <?php include('includes/top-header.php');?> <!-- ============================================== TOP MENU : END ============================================== --> <?php include('includes/main-header.php');?> <!-- ============================================== NAVBAR 21 ============================================== --> <?php include('includes/menu-bar.php');?> <!-- ============================================== NAVBAR : END ============================================== --> </header> <!-- ============================================== HEADER : END ============================================== --> <div class="breadcrumb"> <div class="container"> <div class="breadcrumb-inner"> <ul class="list-inline list-unstyled"> <li><a href="home.html">Home</a></li> <li class='active'>Authentication</li> </ul> </div><!-- /.breadcrumb-inner --> </div><!-- /.container --> </div><!-- /.breadcrumb --> <div class="body-content outer-top-bd"> <div class="container"> <div class="sign-in-page inner-bottom-sm"> <div class="row"> <!-- Sign-in --> <div class="col-md-6 col-sm-6 sign-in"> <h4 class="">sign in</h4> <p class="">Hello, Welcome to your account.</p> <form class="register-form outer-top-xs" method="post"> <span style="color:red;" > <?php echo htmlentities($_SESSION['errmsg']); ?> <?php echo htmlentities($_SESSION['errmsg']=""); ?> </span> <div class="form-group"> <label class="info-title" for="exampleInputEmail1">Email Address <span>*</span></label> <input type="email" name="email" class="form-control unicase-formcontrol text-input" id="exampleInputEmail1" > </div> <div class="form-group"> <label class="info-title" for="exampleInputPassword1">Password <span>*</span></label> <input type="password" name="password" class="form-control unicaseform-control text-input" id="exampleInputPassword1" > </div> <div class="radio outer-xs"> <a href="forgot-password.php" class="forgot-password pullright">Forgot your Password?</a> </div> 22 <button type="submit" class="btn-upper btn btn-primary checkout-pagebutton" name="login">Login</button> </form> </div> <!-- Sign-in --> <!-- create a new account --> <div class="col-md-6 col-sm-6 create-new-account"> <h4 class="checkout-subtitle">create a new account</h4> <p class="text title-tag-line">Create your own Shopping account.</p> <form class="register-form outer-top-xs" role="form" method="post" name="register" onSubmit="return valid();"> <div class="form-group"> <label class="info-title" for="fullname">Full Name <span>*</span></label> <input type="text" class="form-control unicase-form-control text-input" id="fullname" name="fullname" required="required"> </div> <div class="form-group"> <label class="info-title" for="exampleInputEmail2">Email Address <span>*</span></label> <input type="email" class="form-control unicase-form-control text-input" id="email" onBlur="userAvailability()" name="emailid" required > <span id="user-availability-status1" style="font-size:12px;"></span> </div> <div class="form-group"> <label class="info-title" for="contactno">Contact No. <span>*</span></label> <input type="text" class="form-control unicase-form-control text-input" id="contactno" name="contactno" maxlength="10" required > </div> <div class="form-group"> <label class="info-title" for="password">Password. <span>*</span></label> <input type="password" class="form-control unicase-form-control textinput" id="password" name="password" required > </div> <div class="form-group"> <label class="info-title" for="confirmpassword">Confirm Password. <span>*</span></label> <input type="password" class="form-control unicase-form-control textinput" id="confirmpassword" name="confirmpassword" required > </div> <button type="submit" name="submit" class="btn-upper btn btn-primary checkout-page-button" id="submit">Sign Up</button> </form> <span class="checkout-subtitle outer-top-xs">Sign Up Today And You'll Be Able To : </span> 23 <div class="checkbox"> <label class="checkbox"> Speed your way through the checkout. </label> <label class="checkbox"> Track your orders easily. </label> <label class="checkbox"> Keep a record of all your purchases. </label> </div> </div> <!-- create a new account --> </div><!-- /.row --> </div> <?php include('includes/brands-slider.php');?> </div> </div> <?php include('includes/footer.php');?> <script src="assets/js/jquery-1.11.1.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/bootstrap-hover-dropdown.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> <script src="assets/js/echo.min.js"></script> <script src="assets/js/jquery.easing-1.3.min.js"></script> <script src="assets/js/bootstrap-slider.min.js"></script> <script src="assets/js/jquery.rateit.min.js"></script> <script type="text/javascript" src="assets/js/lightbox.min.js"></script> <script src="assets/js/bootstrap-select.min.js"></script> <script src="assets/js/wow.min.js"></script> <script src="assets/js/scripts.js"></script> <!-- For demo purposes – can be removed on production --> <script src="switchstylesheet/switchstylesheet.js"></script> <script> $(document).ready(function(){ $(".changecolor").switchstylesheet( { seperator:"color"} ); $('.show-theme-options').click(function(){ $(this).parent().toggleClass('open'); return false; }); }); $(window).bind("load", function() { $('.show-theme-options').delay(2000).trigger('click'); }); </script> <!-- For demo purposes – can be removed on production : End --> 24 </body> </html> <?php session_start(); include("includes/config.php"); $_SESSION['login']==""; date_default_timezone_set('Asia/Kolkata'); $ldate=date( 'd-m-Y h:i:s A', time () ); mysqli_query($con,"UPDATE userlog SET logout = '$ldate' WHERE userEmail = '".$_SESSION['login']."' ORDER BY id DESC LIMIT 1"); session_unset(); $_SESSION['errmsg']="You have successfully logout"; ?> <script language="javascript"> document.location="index.php"; </script> <?php session_start(); error_reporting(0); include('includes/config.php'); if(strlen($_SESSION['login'])==0) { header('location:login.php'); } else{ if(isset($_POST['update'])) { $name=$_POST['name']; $contactno=$_POST['contactno']; $query=mysqli_query($con,"update users set name='$name',contactno='$contactno' where id='".$_SESSION['id']."'"); if($query) { echo "<script>alert('Your info has been updated');</script>"; } } date_default_timezone_set('Asia/Kolkata');// change according timezone $currentTime = date( 'd-m-Y h:i:s A', time () ); if(isset($_POST['submit'])) { $sql=mysqli_query($con,"SELECT password FROM users where password='".md5($_POST['cpass'])."' && id='".$_SESSION['id']."'"); $num=mysqli_fetch_array($sql); if($num>0) 25 { $con=mysqli_query($con,"update students set password='".md5($_POST['newpass'])."', updationDate='$currentTime' where id='".$_SESSION['id']."'"); echo "<script>alert('Password Changed Successfully !!');</script>"; } else { echo "<script>alert('Current Password not match !!');</script>"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Meta --> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="description" content=""> <meta name="author" content=""> <meta name="keywords" content="MediaCenter, Template, eCommerce"> <meta name="robots" content="all"> <title>My Account</title> <!-- Bootstrap Core CSS --> <link rel="stylesheet" href="assets/css/bootstrap.min.css"> <!-- Customizable CSS --> <link rel="stylesheet" href="assets/css/main.css"> <link rel="stylesheet" href="assets/css/blue.css"> <link rel="stylesheet" href="assets/css/owl.carousel.css"> <link rel="stylesheet" href="assets/css/owl.transitions.css"> <!--<link rel="stylesheet" href="assets/css/owl.theme.css">--> <link href="assets/css/lightbox.css" rel="stylesheet"> <link rel="stylesheet" href="assets/css/animate.min.css"> <link rel="stylesheet" href="assets/css/rateit.css"> <link rel="stylesheet" href="assets/css/bootstrap-select.min.css"> <!-- Demo Purpose Only. Should be removed in production --> <link rel="stylesheet" href="assets/css/config.css"> <link href="assets/css/green.css" rel="alternate stylesheet" title="Green color"> <link href="assets/css/blue.css" rel="alternate stylesheet" title="Blue color"> <link href="assets/css/red.css" rel="alternate stylesheet" title="Red color"> <link href="assets/css/orange.css" rel="alternate stylesheet" title="Orange color"> <link href="assets/css/dark-green.css" rel="alternate stylesheet" title="Darkgreen color"> <link rel="stylesheet" href="assets/css/font-awesome.min.css"> 26 <link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700' rel='stylesheet' type='text/css'> <link rel="shortcut icon" href="assets/images/favicon.ico"> <script type="text/javascript"> function valid() { if(document.chngpwd.cpass.value=="") { alert("Current Password Filed is Empty !!"); document.chngpwd.cpass.focus(); return false; } else if(document.chngpwd.newpass.value=="") { alert("New Password Filed is Empty !!"); document.chngpwd.newpass.focus(); return false; } else if(document.chngpwd.cnfpass.value=="") { alert("Confirm Password Filed is Empty !!"); document.chngpwd.cnfpass.focus(); return false; } else if(document.chngpwd.newpass.value!= document.chngpwd.cnfpass.value) { alert("Password and Confirm Password Field do not match !!"); document.chngpwd.cnfpass.focus(); return false; } return true; } </script> </head> <body class="cnt-home"> <header class="header-style-1"> <!-- ============================================== TOP MENU ============================================== --> <?php include('includes/top-header.php');?> <!-- ============================================== TOP MENU : END ============================================== --> <?php include('includes/main-header.php');?> <!-- ============================================== NAVBAR ============================================== --> <?php include('includes/menu-bar.php');?> <!-- ============================================== NAVBAR : END ============================================== --> </header> <!-- ============================================== HEADER : END ============================================== --> 27 <div class="breadcrumb"> <div class="container"> <div class="breadcrumb-inner"> <ul class="list-inline list-unstyled"> <li><a href="#">Home</a></li> <li class='active'>Checkout</li> </ul> </div><!-- /.breadcrumb-inner --> </div><!-- /.container --> </div><!-- /.breadcrumb --> <div class="body-content outer-top-bd"> <div class="container"> <div class="checkout-box inner-bottom-sm"> <div class="row"> <div class="col-md-8"> <div class="panel-group checkout-steps" id="accordion"> <!-- checkout-step-01 --> <div class="panel panel-default checkout-step-01"> <!-- panel-heading --> <div class="panel-heading"> <h4 class="unicase-checkout-title"> <a data-toggle="collapse" class="" data-parent="#accordion" href="#collapseOne"> <span>1</span>My Profile </a> </h4> </div> <!-- panel-heading --> <div id="collapseOne" class="panel-collapse collapse in"> <!-- panel-body --> <div class="panel-body"> <div class="row"> <h4>Personal info</h4> <div class="col-md-12 col-sm-12 already-registered-login"> <?php $query=mysqli_query($con,"select * from users where id='".$_SESSION['id']."'"); while($row=mysqli_fetch_array($query)) { ?> <form class="register-form" role="form" method="post"> <div class="form-group"> <label class="info-title" for="name">Name<span>*</span></label> <input type="text" class="form-control unicaseform-control text-input" value="<?php echo $row['name'];?>" id="name" name="name" 28 required="required"> </div> <div class="form-group"> <label class="info-title" for="exampleInputEmail1">Email Address <span>*</span></label> <input type="email" class="form-control unicase-form-control textinput" id="exampleInputEmail1" value="<?php echo $row['email'];?>" readonly> </div> <div class="form-group"> <label class="info-title" for="Contact No.">Contact No. <span>*</span></label> <input type="text" class="form-control unicaseform-control text-input" id="contactno" name="contactno" required="required" value="<?php echo $row['contactno'];?>" maxlength="10"> </div> <button type="submit" name="update" class="btnupper btn btn-primary checkout-page-button">Update</button> </form> <?php } ?> </div> <!-- already-registered-login --> </div> </div> <!-- panel-body --> </div><!-- row --> </div> <!-- checkout-step-01 --> <!-- checkout-step-02 --> <div class="panel panel-default checkout-step02"> <div class="panel-heading"> <h4 class="unicase-checkout-title"> <a data-toggle="collapse" class="collapsed" data-parent="#accordion" href="#collapseTwo"> <span>2</span>Change Password </a> </h4> </div> <div id="collapseTwo" class="panelcollapse collapse"> <div class="panel-body"> <form class="register-form" role="form" method="post" name="chngpwd" onSubmit="return valid();"> <div class="form-group"> <label class="info-title" for="Current Password">Current Password<span>*</span></label> <input type="password" class="form-control 29 unicase-form-control text-input" id="cpass" name="cpass" required="required"> </div> <div class="form-group"> <label class="info-title" for="New Password">New Password <span>*</span></label> <input type="password" class="form-control unicase-form-control text-input" id="newpass" name="newpass"> </div> <div class="form-group"> <label class="info-title" for="Confirm Password">Confirm Password <span>*</span></label> <input type="password" class="form-control unicase-form-control text-input" id="cnfpass" name="cnfpass" required="required" > </div> <button type="submit" name="submit" class="btnupper btn btn-primary checkout-page-button">Change </button> </form> </div> </div> </div> <!-- checkout-step-02 --> </div><!-- /.checkout-steps --> </div> <?php include('includes/myaccount-sidebar.php');?> </div><!-- /.row --> </div><!-- /.checkout-box --> <?php include('includes/brands-slider.php');?> </div> </div> <?php include('includes/footer.php');?> <script src="assets/js/jquery-1.11.1.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/bootstrap-hover-dropdown.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> <script src="assets/js/echo.min.js"></script> <script src="assets/js/jquery.easing-1.3.min.js"></script> <script src="assets/js/bootstrap-slider.min.js"></script> <script src="assets/js/jquery.rateit.min.js"></script> <script type="text/javascript" src="assets/js/lightbox.min.js"></script> <script src="assets/js/bootstrap-select.min.js"></script> <script src="assets/js/wow.min.js"></script> 30 <script src="assets/js/scripts.js"></script> <!-- For demo purposes – can be removed on production --> <script src="switchstylesheet/switchstylesheet.js"></script> <script> $(document).ready(function(){ $(".changecolor").switchstylesheet( { seperator:"color"} ); $('.show-theme-options').click(function(){ $(this).parent().toggleClass('open'); return false; }); }); $(window).bind("load", function() { $('.show-theme-options').delay(2000).trigger('click'); }); </script> </body> </html> <?php } ?> 4.2 OUTPUT: 31 32 33 34 Chapter 5 Conclusion and Future work We developed an E-Commerce website which will cover all the information related to all the products mentioned in the website which are used in our day to day life, providing users a convenient platform to order products, supplements and much more. So by this GUI based automated system, if user wants to buy something healthy from home,they are just one click away! 35 References 1. YouTube :- https://www.youtube.com/watch?v=oNQ_TB0qr7s&t=230s 36