Your SlideShare is downloading. ×
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Project report final
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Project report final

1,659

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,659
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
69
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BABY SHOPPING is a website in which consumers go through products which areneeded by babies and purchase them over the internet.Shopping has evolved with the growth of technology. Online shopping widens thetarget audience by providing them the facility to shop online and get the productsdelivered at the desired address.The web project “Baby Shopping” is developed exclusively for baby products. An effort hasbeen made to cover all possible baby products. This web project aims to help customers searchfor the desired products and buy them on mouse click. The user can pay for the productsshopped using credit card’s pin number.Facility is provided for a user to register himself and shop. The web project has importantfeature of shopping cart which help customer to collect products and purchase all of themtogether. The purchase feature is available only to those customers who are registered with thewebsite. Also some more features available to the registered customer are 1.1 Search: Customer can search for products based on different categories 1.2 Sell: Customer can sell products 1.3 Buy: He can buy proucts 1.4 Reviews: He can also view reviews about particular productBefore the user is asked to make the payment he is shown the sum total of all thegoods in the cart which gives him an idea as to how much money he would need forthe selected products. After this, he is requested to submit his personal as well asshipping details to where the products have to be delivered after the payment ismade. This is done because the user is not shopping in a real market but in a virtualmarket and the goods have to be delivered to the shipping address provided. This 1
  • 2. also provides the flexibility for the user to select the goods as gifts for someone bythe shipping address to where the package has to be sent.It includes various categories of baby products like: • Action toys & figures • Arts & Crafts • Discovery & Learning • Dolls & Soft Toys • Games & Puzzles • Collectibles • Infant & Preschool • Novelty & Virtual • Outdoors The proposed project is a web-based portal .Consumers finds baby products ofinterest by visiting the website and searching for it. Searching is made more userfriendly by providing sufficient categories through which the user can select therequired product. Customer is also allowed to select multiple items and pay the totalamount in one go.A process follows in which payment and delivery information is collected. Weallow consumers to sign up for a permanent online account so that some or all ofthis information only needs to be entered once. 2
  • 3. 2.1 IntroductionThis document provides details about the entire software requirements specificationfor the project Baby Shopping.2.1.1 PurposeThe purpose of this project is to provide easy shopping facility online and easypayment options and delivery of products in time. Customers can choose from ourwide range of categories of products.2.1.2 ScopeThe name of the project is Baby ShoppingThe software stores details of customer.The software provides the following facilities to the customers:Facilitates easy shopping online any whereProvides information about the products in categoriesCustomers are provided with up to date information on the products availableEnables user to shop for products as gifts for someone.2.1.3 References 3
  • 4. IEEE SRS Format 4
  • 5. 2.2 Overall Description2.2.1. Product PerspectiveBaby Shopping is aimed towards the vendors who want to reach out to themaximum section of customer and common people who can be potential customer.This project envisages bridging the gap between the retailer and the customer.This website is totally self contained and works relatively as efficient as otherpackages related to the subject. It provides simple database rather than complexones for high requirements and it provides good and easy graphical user interface tonew, naive as well as experienced users of the computers.2.2.1.1. System InterfacesThe software provides good graphical interface for the front end and appropriatemessages to guide the user2.2.1.2. Hardware Interfaces1. Monitor to display the pages of products.2. Keyboard3. Mouse2.2.1.3. Software InterfacesThe software requires the support of the following softwares for the database andother requirementsMicrosoft Access for databaseServerNetBeans 6.7.1 5
  • 6. 2.2.1.4. Communication InterfacesLocal intranetInternet protocols2.2.1.5. Memory ConstraintsAt least 1 GB of RAM and10 GB of hard disk will be required for running the application.2.2.1.6. OperationsThis product will not cover any automated housekeeping aspects of database.2.2.1.7. Site adaptation requirementsThe terminals at client side will have to support the hardware and softwareinterfaces specified in the above sections.2.2. User characteristicsNo pre knowledge of htmlNo pre knowledge of database managementShould be familiar with internetShould know EnglishShould be able to use and do according to the graphical user interface2.3. ConstraintsThe system may become slow due to increased no. of records being stored. 6
  • 7. To host the website a computer with an operating system that can serve as a serveris required.2.4. Assumptions and DependenciesThe product assumes that the users don’t opt for the same product numbersimultaneously2.5. Specific RequirementsThe following screens will be providedIndex PageIt is the starting page of the website. It provides following features: (i) Login for old users (ii) Registration for new users (iii) Categories (iv) Featured Products (v) ContactsRegistration Page:It allows new users to enter their details for being registered.It asks: 1. Initial Name 2. Final Name 3. Email ID 4. Password 5. Area 6. Age 7. Contact No. 7
  • 8. Login PageThis is a page that opens when user clicks on login.It asks for:- 1. Email ID 2. PasswordProductsThis page shows the images of the various products at our website to users.The name and prices of the products are given.ViewCart pageThis gives the details of the products in the shopping cart.It provides two options: 1. Back to shopping 2. PurchasePurchase PageThis page gives the user the total sum of the bill for the items in the shopping cart.Checkout PageIt seeks the information from the user so as to ship the products purchased by theuser according to the details provided.It asks for: 1. Name 2. mobile no 3. landline no 4. Address 5. City 8
  • 9. 6. State 7. CountryDetails pageIt gives the address provided by the user along with the total price.Payment pageIt asks for 16-digit credit card number and the type of credit card for payment.Search pageThe user can search an item on the basis of the category.SearchedItem pageThis page is displayed when a user searches for an item on the search page.It displays the item under the given category along with name and price.Sell PageThe user can sell the old products by providing following information: 1. Browsing the image of the product 2. Name of the product 3. Category 4. Expected priceBuy pageThe user can also buy the old products submitted by the other users.Review pageThe user can choose any item to give review to share his experience of using thiswebsite or of the product bought. 9
  • 10. Logical Database Requirements:The following information will be placed in the database.Login: - initial, finalname, email, pass, area, dob, contact.Shopping: - name, mobile, landline, address, city, state, country.Items: - item, category, image, price, idReview: - id, review, email 10
  • 11. Entity Relationship Diagram:-The Entity Relationship Diagram (ERD) is the graphical notations of relationshipbetween different entities and attributes.The ER diagram for Baby Shopping as follows:-Figure 3.1. E-R Model showing relationship between Customer and Products:- Customer Name Passwor Customer Views Address Contact Numbe Product Name Price Category 11
  • 12. Figure 3.2. E-R Model showing relationship between Cart and Transactions:- Products Sum Selected Total Cart Shoppin Total Products Transaction Details Entering Customer Details Contact Name Numbe User Details Shipping Credit Card Address Details 12
  • 13. Figure 3.3. E-R Model showing relationship between customer and cart: Search in Customer logi categories give Product Product Category Price Product Details Product Name Add to 13 Cart
  • 14. Sum Products Total selected Total products Figure 3.4. Data Flow Diagram for Baby Shopping:Registration Login Customer enter details Enter email id and Baby password Search on Shopping basis of categories Enter product name and price Customer enter details for Sell Purchase shipping products products 14
  • 15. System testing is an expensive but critical process that can take as much as 50percent of the budget for program development. The common view of testing heldby users is that it is performed to prove that there are no errors in the program.Testing is the process of executing a program with the explicit intention of findingerrors that is, making the program fail. A successful test, then, is one that finds anerror.Test the modules thoroughly- cover all the access paths. Generate enough data tocover all the access paths arising from conditions.Test the modules by passing wrong data.To test the different access paths, look at the conditional statement. Enter some datain the test file, which would satisfy the condition and again test the script. Repeatthis process many times.After each test, analyze the log file to ensure proper, understandable and usefulmessages are present in the log file.Test for locking by invoking multiple concurrent processes. 4.1 Types of Testing TYPES OF TESTING WHITE BOX TESTING BLACK BOX TESTING 15
  • 16. 4.1.1 WHITE BOX TESTING:White Box testing which is performed early in the testing process is also calledglass-box testing. Using white box testing, the software engineer can derive testcases thatGuarantee that all the independent paths within the module have been exercised atleast once.Exercise all logical decisions on their true and false sides.Execute all loops at their boundaries and within their operational bounds.Exercise internal data structure to assure their validity.4.1.2 BLACK BOX TESTING:Black box testing is to be applied during later stage of testing. Black box testingfocuses on the functional requirement of the software. Black box testing enables thesoftware engineer to derive sets of input conditions that will fully exercise thefunctional requirement of a program.Black box testing enables to find error in the following categories:-Incorrect or missing functions.Interface errors.Errors in the data structure or external database access.Performance errors.Initialization and termination errors 16
  • 17. 4.2 TEST PLANS (TEST CASE)1. LoginTest Case stored in database OutputParul@yahoo.com,parul yes redirects to customer pageParul@yahoo.com,9876 no is not redirected to customerpage2. Prepare Bill PageTest Case OutputAll the entries filled up but except one Page is not submittedOne Entry filled others not filled Page is not submittedEntries filled rest not filled Page is not submitted3. Customer Shopping cartDelete itemTest case Output1. Text field blank, but delete button No item is deletedIs clicked2. Item not present in cart is type nothing happens3. Name Of item present in cart is typed item is deleted and bill amount is adjusted 17
  • 18. 4. Payment DetailsTest Case OutputAll the entries filled up but except one Page is not submittedOne Entry filled others not filled Page is not submittedEntries filled rest not filled Page is not submitted 18
  • 19. ImplementationA crucial phase in the system life cycle is the successful implementation of the newsystem design. Implementation includes all those activities that take place toconvert from the old system to the new. The new system may be totally new,replacing an existing manual or automated system.In our project implementation is done in following mannerInstallation of software: First of all, the files are copied into CD writer. On the diskalso copy Microsoft Access database .Now all the files are copied in a folder onserver. The script is run on the query analyzer and all procedures are copied intodatabase on server.Training the Operating Staff: All the users are given demonstration after copying allthe files. In this demonstration all the input variables are taken and project isexecuted. After requirement of the user grew we have to amend our software forbefore full installation.Installation of Hardware: The only need is to install proper hardware for thesoftware. Deploy a server and install the software for proper working of software.ADVANTAGESIt simplifies the operation.It avoids a lot of manual work.Every Transaction is obtained and processed immediately. Avoids errors byavoiding the manual work.User friendly screen to enter the data in database tables.Contact information available.User can easily access the system without much experience.Provide Hardware and software securities.Portable and flexible for further extension. 19
  • 20. RESULTThe system has been implemented and tested successfully. It meets therequirements specified to the great extent. Although the system has been designedkeeping the Present and future requirements in mind and made very flexible. Thereare limitations of the System. Proper consideration has been given for a wide rangeof new enhancements proposed in the future, throughout the development ofsystem. The system is developed user friendly. 20
  • 21. SUMMARY AND CONCLUSIONThe central concept of the application is to allow the customer to shop virtuallyusingthe Internet and allow customers to buy the items and articles of their desire fromthe store. This system offers information relevant to the user accessing theapplication thus avoiding unnecessary overloading and at the same timemaintaining the security.The system has been developed for the given condition and is found workingeffectively. The developed system is flexible and changes can be made easilywhenever required. Using the facilities and functionalities of .net, the website hasbeen developed in a neat and simple manner, thereby reducing the operator’s work.The speed and accuracy are maintained in proper way. The user-friendly nature ofthis website developed in Advanced Java is very easy to work with. The resultsobtained are satisfactory from the user point of view.The system is verified with valid as well as invalid data in each manner. The systemis run with an insight into the necessary modifications that may be required in thefuture. Hence the system can be maintained successfully. 21
  • 22. REFERENCES1. Herbert Schildt, The Complete Reference Java 2, 5th edition, ISBN number:978-00722242072. Thinking in Java, by Bruce Eckel, 3rd Ed. ISBN number: 97801310028763. http://my.execpc.com/java/java_tutorial.html4.http://ieeexplore.ieee.org/search/freesrchabstract.jsp?tp=&arnumber=885952&queryText%3Ddatabase+connectivity+on+java%26openedRefinements%3D*%26searchField%3DSearch+All5. http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html6. http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf 22
  • 23. INDEX.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style.css" /></head><script language="JavaScript"> <!-- function addItem( name, price ) { var i = 1; for( ; getCookieValue( "item" + i ) != "" ; i++ ); document.cookie = "item" + i + "=" + name + "," + price; document.cookie = "items=" + i; } function getCookieValue( name ) { 23
  • 24. var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; return( c.slice( begin, end ) ); } // --> </script><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="inner_copy"><a href="http://www.greatdirectories.org/">web directories</a><a href="http://www.bestfreetemplates.info/">free CSS templates</a></div> <div class="topnav"> <span><strong>Welcome</strong> &nbsp;<a href="login.jsp">Login</a> &nbsp; | &nbsp; <a href="register.jsp">Register</a></span></div> <% session.setAttribute("emailid",""); session.setAttribute("item",""); session.setAttribute("total",""); %> <ul id="menu"> 24
  • 25. <li><a href="index.jsp"><img src="images/but1.gif" alt="" width="110" height="32"/></a></li><li><a href="login.jsp"><img src="images/but2.gif" alt="" width="110" height="32"/></a></li><li><a href="register.jsp"><img src="images/but3.gif" alt="" width="110" height="32"/></a></li><li><a href="login.jsp"><img src="images/but4.gif" alt="" width="110" height="32"/></a></li><li><a href="viewcart.jsp"><img src="images/but5.gif" alt="" width="110" height="32"/></a></li><li><a href="login.jsp"><img src="images/but6.gif" alt="" width="110" height="32"/></a></li> </ul> </div> <div id="content"> <div id="sidebar"> <div><img src="images/title1.gif" alt="" width="233" height="41" /><br /><ul class="categories"><li><a href="itemaction.jsp">Action Toys &amp; Figures</a></li><li><a href="itemarts.jsp">Arts &amp; Crafts</a></li><li><a href="itemdiscovery.jsp">Discovery &amp; Learning</a></li><li><a href="itemdolls.jsp">Dolls &amp; Soft Toys</a></li><li><a href="itemgames.jsp">Games &amp; Puzzles</a></li><li><a href="itemcollectibles.jsp">Collectibles</a></li><li><a href="iteminfants.jsp">Infant &amp; Preschool</a></li><li><a href="itemnovelty.jsp">Novelty &amp; Virtual</a></li><li><a href="itemoutdoors.jsp">Outdoors</a></li><li><a href="itemtv.jsp">TV &amp; Films</a></li> 25
  • 26. </ul><img src="images/title2.gif" alt="" width="233" height="41" /><br /><div class="inner_copy"><a href="http://www.bestfreetemplates.org/">free templates</a><a href="http://www.bannermoz.com/">banner templates</a></div> <div class="review"> <a href="login.jsp"><img src="images/pic1.jpg" alt="" width="181"height="161" /></a><br /> Baby Block Fun</a><br /> <p>hii, Just loved it...Moreover, delivery is within a day..!! </p> <img src="images/stars.jpg" alt="" width="118" height="20" class="stars" /> </div><div style="float:left"><table><img src="images/logo_2.gif"/></table></div></div></div><script language="JavaScript">var source = 0;var replacement = 1;function createRollOver(originalImage,replacementImage) {var imageArray = new Array;imageArray[source] = new Image;imageArray[source].src = originalImage;imageArray[replacement] = new Image;imageArray[replacement].src = replacementImage;return imageArray;}var rollImage1 = createRollOver("images/pic2.jpg","images/shop.jpg"); 26
  • 27. </script><script language="JavaScript">var imageList = new Array;imageList[0] = new Image;imageList[0].src = "images/photo.jpg";imageList[1] = new Image;imageList[1].src = "images/baby.jpg";imageList[2] = new Image;imageList[2].src = "images/baby1.jpg";imageList[3] = new Image;imageList[3].src = "images/photo.jpg";function slideShow(imageNumber) {document.slideShow.src =imageList[imageNumber].src;imageNumber += 1;if (imageNumber < imageList.length) {window.setTimeout("slideShow(" + imageNumber +")",3000);}}</script><div id="main"><img src="images/photo.jpg" alt="" width="682" height="334" border="0" usemap="#Map"name="slideShow" /><br ><div id="inside">FIRST TIME IN INDIA ALL BABY PRODUCTS AT YOUR DOORSTEP<br /><div class="info"> 27
  • 28. <a href="#" onMouseOver="document.myImage1.src = rollImage1[replacement].src;"onMouseOut="document.myImage1.src = rollImage1[source].src;"><img src="images/pic2.jpg" width="159" height="132" name="myImage1" border=0></a><p>Baby care reminds you of a toddler and having one at home is really a delightfulexperience. Be it for first timers or even for experienced couples, parenting a baby with babyproducts and love is a whole new learning process. </p><a href="contact.jsp" class="more"><img src="images/more.gif" alt="" width="106"height="28" /></a> </div> <img src="images/title4.gif" alt="" width="159" height="17" /><br /> <div id="items"> <div class="item"> <img src="itemimages/collectibles/Vanity Table.gif" width="213" height="192"/></a><br /> <p>Vanity Table</a></p><span class="price">$125</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Vanity +Table, 125 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"> </div> <div class="item center"> <img src="itemimages/infants and preschool/Betty Butterfly Plush RockingAnimal.jpg" width="213" height="192"/></a><br /> <p>Betty Rocking</a></p><span class="price">$215</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Betty +Rocking, 215 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"> 28
  • 29. </div> <div class="item"> <img src="itemimages/infants and preschool/Art Go Round.jpg" width="213"height="192" /></a><br /> <p>Art Go Round</a></p><span class="price">$85</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Art + Go + Round, 85 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"> </div> <div class="item"> <img src="itemimages/infants and preschool/Touch And Learn Picture Card Bank.jpg"width="213" height="192"/></a><br /> <p>Touch and Learn</a></p><span class="price">$35</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Touch +and + Learn, 35 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"> </div> <div class="item center"> <img src="itemimages/novelty and virtual/Magic Board.jpg" width="213"height="192" /></a><br /> <p>Magic Board</a></p><span class="price">$27</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Magic +Board, 27 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"> 29
  • 30. </div> <div class="item"> <img src="itemimages/novelty and virtual/Crystal Climbers.jpg" width="213"height="192" /></a><br /> <p>Crystal Climbers</a></p><span class="price">$40</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Crystal +Climbers, 40 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"> </div></div></div></div></div> <div id="footer"> <img src="images/cards.jpg" alt="" width="919" height="76" /> </div> <map name="Map"> <area shape="rect" coords="16,306,159,326" href="#"> </map></body></html> 30
  • 31. LOGIN.JSP<%@page session="true" contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style3.css" /></head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a> <div class="inner_copy"><a href="http://www.greatdirectories.org/">webdirectories</a><a href="http://www.bestfreetemplates.info/">free CSS templates</a></div><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp;<a href="index.jsp">Home</a></span></div><div id="main"><br><br><div style="font:14;color:#FE2E9A;width:682;height:434 "> 31
  • 32. <table align="right"> <tr align="right"> <td> <a href="register.jsp"> <img src="images/signup1.jpg"/></a> </td> </tr></table><table width="300"><FORM name=form1 onsubmit="return val1(this)" method="post" action="user.jsp" ><script language="javascript">function val1(f) {if(f.email.value=="") {alert("Please enter email id!!");f.email.focus();return false;}else if(f.password.value=="") {alert("Please enter password !!");f.password.focus();return false;}return true; 32
  • 33. }</script><td align="left"><td height=34>&nbsp;</td><td height=34>EMAIL ID</td><td> <input type="text" name="email" value="" /></td></tr><tr align="left"><tr height=34>&nbsp;</td><tr height=34>PASSWORD</td><tr> <input type="password" name="password" value="" /></td></tr><tr><td height=34>&nbsp;</td><td><input type="checkbox" name="remember" value="ON" /></td><td> remember me</td></tr><tr><td width=20></td><td width=25></td><TD align="left" height=53> <INPUT type="submit" value="submit"></td> 33
  • 34. </tr></form></table></div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></div></body></html> 34
  • 35. USER.JSP<%@page session="true" contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data" class="edow.loginbean"/><jsp:setProperty name="data" property="*"/><%if(data.login()){%><%String s=request.getParameter("email");session.setAttribute("emailid",s);%><script language="JavaScript"> <!—function addItem( name, price ) { var i = 1; for( ; getCookieValue( "item" + i ) != "" ; i++ ); document.cookie = "item" + i + "=" + name + "," + price; document.cookie = "items=" + i; } function getCookieValue( name ) 35
  • 36. { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; return( c.slice( begin, end ) ); } // --> </script><html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="inner_copy"><a href="http://www.greatdirectories.org/">web directories</a><ahref="http://www.bestfreetemplates.info/">free CSS templates</a></div> <div class="topnav"> <span><strong>Welcome</strong></span> 36
  • 37. <% if(data.login()==true) {String s2=session.getAttribute("emailid").toString().toUpperCase(); out.println(s2); }%> &nbsp;<a href="index.jsp">sign out</a></div><ul id="menu"></ul></div><div id="content"> <div id="sidebar"> <div id="navigation"> <ul> <li><a href="search.jsp">search</a></li> <li><a href="sell.jsp">sell</a></li> <li><a href="products.jsp">buy</a></li> <li><a href="review.jsp">Reviews</a></li> <li><a href="contact.jsp">Contacts</a></li> </ul> <div id="cart"> <strong>Shopping cart:</strong> <br /> 0 items </div></div><div><img src="images/title1.gif" alt="" width="233" height="41" /><br /><ul class="categories"> 37
  • 38. <li><a href="itemaction.jsp">Action Toys &amp; Figures</a></li><li><a href="itemarts.jsp">Arts &amp; Crafts</a></li><li><a href="itemdiscovery.jsp">Discovery &amp; Learning</a></li><li><a href="itemdolls.jsp">Dolls &amp; Soft Toys</a></li><li><a href="itemgames.jsp">Games &amp; Puzzles</a></li><li><a href="itemcollectibles.jsp">Collectibles</a></li><li><a href="iteminfants.jsp">Infant &amp; Preschool</a></li><li><a href="itemnovelty.jsp">Novelty &amp; Virtual</a></li><li><a href="itemoutdoors.jsp">Outdoors</a></li><li><a href="itemtv.jsp">TV &amp; Films</a></li></ul><img src="images/title2.gif" alt="" width="233" height="41" /><br /><div class="inner_copy"><a href="http://www.bestfreetemplates.org/">free templates</a><ahref="http://www.bannermoz.com/">banner templates</a></div><div class="review"><a href="seereview.jsp"><img src="images/pic1.jpg" alt="" width="181" height="161"/></a><br /><a href="seereview.jsp">Baby Fun Blocks</a><br /><p>hii, Just loved it...Moreover, delivery is within a day..!! </p><img src="images/stars.jpg" alt="" width="118" height="20" class="stars" /></div></div></div><div id="main"><img src="images/photo.jpg" alt="" width="682" height="334" border="0" usemap="#Map" /> 38
  • 39. <div id="inside"><img src="images/title3.gif" alt="" width="159" height="15" /><br /><div class="info"><img src="images/pic2.jpg" alt="" width="159" height="132" /><p>Baby care reminds you of a toddler and having one at home is really a delightfulexperience. Be it for first timers or even for experienced couples, parenting a baby with babyproducts and love is a whole new learning process. </p><a href="#" class="more"><img src="images/more.gif" alt="" width="106" height="28" /></a></div><img src="images/title4.gif" alt="" width="159" height="17" /><br /><div id="items"><div class="item"><a href="#"><img src="images/item1.jpg" width="213" height="192" /></a><br /><p><a href="#">Baby shoes</a></p><span class="price">$125</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Baby + Shoes, 125 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item center"><a href="#"><img src="images/item2.jpg" width="213" height="192" /></a><br /><p><a href="#">Baby Bottle</a></p><span class="price">$215</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Baby + Bottle, 215 );"> 39
  • 40. <input type="button" value="View Cart" onClick="JavaScript: document.location=viewcart.jsp;"> </div> <div class="item"> <a href="#"><img src="images/item3.jpg"width="213" height="192" /></a><br /><p><a href="#">Sipper</a></p><span class="price">$85</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( Sipper , 85 );"> <input type="button" value="View Cart" onClick="JavaScript: document.location=viewcart.jsp;"> </div> <div class="item"> <a href="#"><img src="images/item4.jpg"width="213" height="192" /></a><br /> <p><a href="#">Teddy Bear</a></p><spanclass="price">$35</span><br /><input type="button" value="Add to cart" ="JavaScript: addItem( Teddy+ Bear, 35 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div> 40
  • 41. <div class="item center"><a href="#"><img src="images/item5.jpg" width="213" height="192" /></a><br /><p><a href="#">Baby Toy</a></p><span class="price">$27</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( Baby + Toy, 27 );"> <input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"><a href="#"><img src="images/item6.jpg" width="213" height="192" /></a><br /><p><a href="#">Pyramid</a></p><span class="price">$40</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( Pyramid, 40 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div></div></div></div></div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /> <ul> <li><a href="#">Home page</a> |</li> 41
  • 42. <li><a href="#">New Products</a> |</li> <li><a href="#">All Products</a> |</li> <li><a href="#">Reviews</a> |</li> <li><a href="#">F.A.Q.</a> |</li> <li><a href="#">Contacts</a></li> </ul></div><map name="Map"><area shape="rect" coords="16,306,159,326" href="#"></map><%}else{response.sendRedirect("login.jsp");%><%}%></body></html> 42
  • 43. ITEMACTION.JSP<%@page session="true" contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data" class="edow.loginbean"/><jsp:setProperty name="data" property="*"/><script language="JavaScript"> <!-- function addItem( name, price ) { var i = 1; for( ; getCookieValue( "item" + i ) != "" ; i++ ); document.cookie = "item" + i + "=" + name + "," + price; document.cookie = "items=" + i; } function getCookieValue( name ) { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; return( c.slice( begin, end ) ); 43
  • 44. } // --> </script><html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="inner_copy"><a href="http://www.greatdirectories.org/">web directories</a><ahref="http://www.bestfreetemplates.info/">free CSS templates</a></div> <div class="topnav"> <span><strong>Welcome</strong> &nbsp;</span> <% String s2=session.getAttribute("emailid").toString().toUpperCase(); if(s2=="") {%><a href="login.jsp">Log in</a> &nbsp; | &nbsp; <ahref="register.jsp">Register</a></span> <%}else{out.println(s2); %><a href="index.jsp">sign out</a><%}%> 44
  • 45. </div> <%if(s2==""){%> <ul id="menu"> <li><a href="index.jsp"><img src="images/but1.gif" alt="" width="110" height="32" /></a></li> <li><a href="login.jsp"><img src="images/but2.gif" alt="" width="110" height="32" /></a></li> <li><a href="register.jsp"><img src="images/but3.gif" alt="" width="110" height="32"/></a></li> <li><a href="login.jsp"><img src="images/but4.gif" alt="" width="110" height="32" /></a></li> <li><a href="viewcart.jsp"><img src="images/but5.gif" alt="" width="110"height="32" /></a></li> <li><a href="checkout.jsp"><img src="images/but6.gif" alt="" width="110"height="32" /></a></li> </ul><%}%> </div><div id="content"><div id="sidebar"><div><img src="images/title1.gif" alt="" width="233" height="41" /><br /><ul class="categories"><li><a href="itemaction.jsp">Action Toys &amp; Figures</a></li> <li><a href="itemarts.jsp">Arts &amp;Crafts</a></li> <li><a href="itemdiscovery.jsp">Discovery &amp;Learning</a></li> 45
  • 46. <li><a href="itemdolls.jsp">Dolls &amp; Soft Toys</a></li><li><a href="itemgames.jsp">Games &amp; Puzzles</a></li><li><a href="itemcollectibles.jsp">Collectibles</a></li><li><a href="iteminfants.jsp">Infant &amp; Preschool</a></li><li><a href="itemnovelty.jsp">Novelty &amp; Virtual</a></li><li><a href="itemoutdoors.jsp">Outdoors</a></li><li><a href="itemtv.jsp">TV &amp; Films</a></li></ul><img src="images/title2.gif" alt="" width="233" height="41" /><br /><div class="review"><a href="seereview.jsp">Baby Fun Blocks</a><br /><p>hii, Just loved it...Moreover, delivery is within a day..!! </p><img src="images/stars.jpg" alt="" width="118" height="20" class="stars" /></div></div></div><div id="main"><div id="items"><div class="item"><img src="itemimages/Images_1/Action toys and figures/2 in 2 Pack Woody.jpeg"width="213" height="192" /><br /><p>2 in 2 Pack Woody</p><span class="price">$125</span><br /> <input type="button" value="Add to cart" onClick="JavaScript: addItem( 2 + 2 + Pack+Woody, 125 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"> 46
  • 47. </div><div class="item center"><img src="itemimages/Images_1/Action toys and figures/Deluxe Alien Action.jpeg"width="213" height="192" /><br /><p>Deluxe Alien Action</p><span class="price">$215</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( Deluxe + Alien + Alien + Action, 215 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/Heroes.jpeg" width="213"height="192" /><br /><p>Heroes</p><span class="price">$85</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( Heroes , 85 );"> <input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/John McCain Action Figure.jpeg"width="213" height="192" /><br /><p>John McCain</p><span class="price">$35</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( John + McCain+Action+ Figure, 35 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item center"> 47
  • 48. <img src="itemimages/Images_1/Action toys and figures/Iron Man.jpeg" width="213"height="192" /></a><br /><p>Iron Man</p><span class="price">$27</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( Iron + Man, 27 );">onClick="JavaScript: document.location=viewcart.jsp;"></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/Leap Frog Baby Little Leaps.jpeg"width="213" height="192" /><br /><p>Leap Frog Baby</p><span class="price">$40</span><br />input type="button" value="Add to cart"onClick="JavaScript: addItem( Leap + Frog + Baby + Little+ Leaps, 40 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/McFarlaneToys.jpeg" width="213"height="192" /><br /><p>McFarlane Toys</p><span class="price">$85</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( McFarlane + Toys, 85 );"> <input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><br/><div class="item center"><img src="itemimages/Images_1/Action toys and figures/Military Action Figures.jpeg"width="213" height="192" /><br /><p>Military Action Figures</p><span class="price">$35</span><br /> 48
  • 49. <input type="button" value="Add to cart"onClick="JavaScript: addItem( Military + Action+Figures, 35 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/Pokemon.jpeg" width="213"height="192" /><br /><p>Pokemon</p><span class="price">$27</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( Pokemon , 27 );"><input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div id="items"><div class="item"><img src="itemimages/Images_1/Action toys and figures/Ratatouille.jpeg" width="213"height="192" /><br /><p>Ratatouille</p><span class="price">$125</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( Ratatouille , 125 );"><input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item center"><img src="itemimages/Images_1/Action toys and figures/Resin figures.jpeg" width="213"height="192" /><br /><p>Resin figures</p><span class="price">$215</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( Resin + figures, 215 );"> 49
  • 50. <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/StarWars.jpeg" width="213"height="192" /><br /><p>StarWars</p><span class="price">$85</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( StarWars , 85 );"><input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"><img src="itemimages/Images_1/Action toys and figures/Street Fighters.jpeg" width="213"height="192" /><br /><p>Street Fighters</p><span class="price">$35</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( Street + Fighters, 35 );"> <input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item center"><img src="itemimages/Images_1/Action toys and figures/Transformers.jpeg" width="213"height="192" /><br /><p>Transformers</p><span class="price">$27</span><br /><input type="button" value="Add to cart" onClick="JavaScript: addItem( Transformers ,27 );"> <input type="button" value="View Cart"onClick="JavaScript:document.location=viewcart.jsp;"></div><div class="item"> 50
  • 51. <img src="itemimages/Images_1/Action toys and figures/X-figures.jpeg" width="213"height="192" /><br /><p>X-figures</p><span class="price">$40</span><br /><input type="button" value="Add to cart"onClick="JavaScript: addItem( X-figures , 40 );"><input type="button" value="View Cart" onClick="JavaScript:document.location=viewcart.jsp;"></div></div></div></div></div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 51
  • 52. VIEWCART.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>View Cart</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style3.css" /> <script language="JavaScript"> <!-- function getCookieValue( name ) { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; return( c.slice( begin, end ) );} 52
  • 53. function removeItem( name ) { document.cookie = name + "=;"; document.location = document.location; }function getItemName( item ){ var c = getCookieValue( item ); if( c ) { return( c.split( "," )[0] ); } else return( "" ); } function getItemPrice( item ) { var c = getCookieValue( item ); if( c ) { return( c.split( "," )[1] ); } 53
  • 54. else return( "" ); } // --> </script></head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><b><font size="10" color=#FF0080>BABY STORE </font></b><br><font size="6" color=#408080>for all your paraphernalia needs</font><br><br><br><font size="4" color=#408080>Details of Items present in the cart </font><br><br></div><form> <table width="100%" border="2"> <script language="JavaScript"> <!-- for( i = 1 ; i <= parseInt( getCookieValue( "items" ) ) ; i++ ) { document.write( "<tr><td>" ); 54
  • 55. document.write( getItemName( "item" + i ) + "</td><td>" ); document.write( "$" + getItemPrice( "item" + i ) ); document.write( "<input type=button value=Remove " + "onClick=JavaScript: removeItem( "item" +i + "" );>" ); document.write( "</td></tr>" ); } // --> </script> <tr><td colspan="3" align="center"> <input type="button" value="Back to shopping" onClick="JavaScript: document.location=index.jsp;"> <input type="button" value="purchase" onClick="JavaScript: document.location=purchase.jsp;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td></tr> </table> <center> <img align="center" src="images/shopcart.jpg" width="400"height="300"></center> </form><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 55
  • 56. PURCHASE.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Store Checkout</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style3.css" /> <script language="JavaScript"> <!-- var total = 0; function getCookieValue( name ) { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; return( c.slice( begin, end ) ); } function getItemName( item ) 56
  • 57. { var c = getCookieValue( item ); if( c ) { return( c.split( "," )[0] ); } else return( "" ); } function getItemPrice( item ) { var c = getCookieValue( item ); if( c ) { return( c.split( "," )[1] ); } else return( "" ); } function fixTotal( n ) { n *= 100; var good = parseInt( n ); while( good < n ) good += 1; return( good / 100 ); } // --></script> 57
  • 58. </head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><b><font size="10" color=#FF0080>BABY STORE </font></b> <br> <font size="6" color=#408080>for all your paraphernalia needs</font><br><br> <br> <font size="4" color=#408080>Your Total Bill </font><br><br> </div> <form> <table width="100%" border="2"> <script language="JavaScript"> <!-- for( i = 1 ; i <= parseInt( getCookieValue( "items" ) ) ; i++ ) { if( getItemName( "item" + i ) != "" && getItemPrice( "item" + i ) != undefined ) { document.write( "<tr><td>" ); document.write( getItemName( "item" + i ) + "</td><td>" ); document.write( getItemPrice( "item" + i ) ); document.write( "</td></tr>" ); 58
  • 59. total += parseFloat( getItemPrice( "item" + i ) ); } } // --> </script> <tr> <td><b>Total</b></td> <td>$ <script language="JavaScript"> <!-- document.write( fixTotal( total ) ); --> </script> &nbsp;</td> </tr> </table><input type="button" value="back to shopping" onClick="JavaScript: document.location=index.jsp;"> <%session.setAttribute("item",0); String s2=session.getAttribute("emailid").toString().toUpperCase(); if(s2=="") {%> <input type="button" value=" check out" 59
  • 60. onClick="JavaScript: document.location=login.jsp;"> <%}else{%><input type="button" value=" check out" onClick="JavaScript: document.location=checkout.jsp;"><%}%><table width="100%"> <tr> <td><img align="left" src="images/shopbag1.jpg" width="400" height="300"> </td> <td><img align="right" src="images/shopbag2.jpg" width="400" height="300"> </td></tr></table><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div> </form> </body></html> 60
  • 61. CHECKOUT.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style3.css" /> <title>checkout1</title> </head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><b><font size="10" color=#FF0080>BABY STORE </font></b><br><font size="6" color=#408080>for all your paraphernalia needs</font><br><br><br></div> <form action="checkout1.jsp"> 61
  • 62. <br> <br> <script language="JavaScript">var imageList = new Array;imageList[0] = new Image;imageList[0].src = "images/adlogo2.jpg";imageList[1] = new Image;imageList[1].src = "images/adlogo1.jpg";imageList[2] = new Image;imageList[2].src = "images/dhl.jpg";imageList[3] = new Image;imageList[3].src = "images/adlogo3.jpg";imageList[4] = new Image;imageList[4].src = "images/adlogo2.jpg";function slideShow(imageNumber) {document.slideShow.src =imageList[imageNumber].src;imageNumber += 1;if (imageNumber < imageList.length) {window.setTimeout("slideShow(" + imageNumber+ ")",3000);}}</script><right> <img src="images/adlogo2.jpg" alt="" width="100%" height="200" border="0"name="slideShow" /></right><table align="center" width="682"><tr align="left"><TD height=34>&nbsp&nbsp;</TD><td align="center"> 62
  • 63. <h1 align="center" style="color:#8D38C9">SHIPPING AND CONTACTDETAILS</h1></td></tr><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>Name</TD> <TD> <input type="text" name="name" value="" /></TD> </TR><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>MobileNo</TD> <TD> <input type="text" name="mobile" value="" /></TD> </TR><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>LandlineNo</TD> <TD><input name="land" type="text" value=""></TD> </TR> <TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>Address</TD> <TD><input name="address" type="text" value=""></TD> </TR><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>City</TD> <TD><input name="city" type="text" value=""></TD> </TR> 63
  • 64. <TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>State</TD> <TD><input name="state" type="text" value=""></TD> </TR> <TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>Country</TD> <TD><input name="country" type="text" value=""></TD> <TD align="left" height=53> <INPUT type="submit" value="submit"> </TR> </table><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></form></body></html> 64
  • 65. DETAILS.JSP<%@page session="true" contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <% int s1=Integer.parseInt(session.getAttribute("item").toString()); if(s1==0){ %> <script language="JavaScript"> <!-- var total = 0; function getCookieValue( name ) { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; return( c.slice( begin, end ) ); } 65
  • 66. function getItemName( item ){ var c = getCookieValue( item ); if( c ) { return( c.split( "," )[0] ); } else return( "" );}function getItemPrice( item ){ var c = getCookieValue( item ); if( c ) { return( c.split( "," )[1] ); } else return( "" ); } function fixTotal( n ) { n *= 100; var good = parseInt( n ); while( good < n ) good += 1; return( good / 100 ); }// --> 66
  • 67. </script> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style3.css" /> <title>details</title> </head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><b><font size="10" color=#FF0080>BABY STORE </font></b><br> <font size="6" color=#408080>for all your paraphernalia needs</font><br><br> <br> <br> <br></div><form action="payment.jsp"><center><h1>PRODUCT DETAILS</h1></center><table style="font:bold ;color:white" align="center" bgcolor=#2B60DE width="600"border="6" cellspacing="2" cellpadding="2"><tr><td><b>itemnames</b></td><td><b>shipping address</b></td><td><b>total price</b></td></tr> <tr><td> <script language="JavaScript"> 67
  • 68. <!-- for( i = 1 ; i <= parseInt( getCookieValue( "items" ) ) ; i++ ) { if( getItemName( "item" + i ) != "" && getItemPrice( "item" + i ) != undefined ) { document.write( getItemName( "item" + i ) ); total += parseFloat( getItemPrice( "item" + i ) ); } } // --> </script></td> <td> <% String s2=session.getAttribute("address").toString().toUpperCase(); out.println(s2); %></td> <td><script language="JavaScript"> <!-- document.write( fixTotal( total ) ); --> </script></td></tr> <tr width="400"><td><input type="submit" value="review & confirm" /></td></tr> </table><br><br> 68
  • 69. <br><p> *Please click on review and confirm to make payement and generate your order.</p> </form> <%}else{%> <% try { /* Create string of connection url within specified format with machine name, port number and database name. Here machine name id localhost and database name is student. */ String connectionURL = "jdbc:odbc:perry"; // declare a connection by using Connection interface Connection connection = null; /* declare object of Statement interface that is used for executing sql statements. */ Statement statement = null; // declare a resultset that uses as a table for output data from tha table. ResultSet rs = null; // Load JBBC driver "com.mysql.jdbc.Driver" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); /* Create a connection by using getConnection() method that takes parameters of string type connection url, user name and password to connect to database.*/ connection = DriverManager.getConnection(connectionURL, "", ""); /* createStatement() is used for create statement object that is used for sending sql statements to the specified database. */ 69
  • 70. statement = connection.createStatement(); // sql query to retrieve values from the secified table. String QueryString = "SELECT * from items1 where id="+s1+""; rs = statement.executeQuery(QueryString); while (rs.next()) { %> <form action="payment.jsp"> <h1>PRODUCT DETAILS</h1> <table width="400" border="4" cellspacing="2" cellpadding="2"><tr><td><b>itemnames</b></td><td><b>shipping address</b></td><td><b>total price</b></td></tr> <tr><td><%=rs.getString(1)%></td> <td><% String s2=session.getAttribute("address").toString().toUpperCase(); out.println(s2);%></td> <td><%@ page import="java.sql.*" %><%@ page import="java.io.*" %><%=rs.getString(4)%> <%} rs.close(); statement.close(); connection.close();} catch (Exception ex) { %> <% 70
  • 71. out.println("Unable to connect to database.");} %></td></tr><tr width="400"><td><input type="submit" value="review & confirm" /></td></tr></table><br><br><br><br></form><%}%><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 71
  • 72. PAYMENT.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>payment</title> </head> <script language="javascript"> function checkCreditCard(card){ if(card.length==0){ window.alert("you must provide a number"); return false; } card=card.replace("",""); if(card.length!=16){ window.alert("Should be 16-digit"); return false; } else{ return true; 72
  • 73. }for (i=0; i<card.length; i++) {if (card.charAt(i) < "0" || card.charAt(i) > "9") {window.alert("CCard must only contain numbers.");return false;}}return true; } function checkForm(formObj) {return checkCreditCard(formObj.myField.value); }</script><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><b><font size="10" color=#FF0080>BABY STORE </font></b><br> <font size="6" color=#408080>for all your paraphernalia needs</font><br><br> <br> <br> <br></div><form name="myForm" action="thanks.jsp" 73
  • 74. onSubmit="return checkForm(this);"> <center> Credit Card No. <input type="text" name="myField"> <font color="red" size="3">**Should be 16-digit</font> <br><br><input type="radio" name="creditcard" value="" />VISA <br> <br><input type="radio" name="creditcard" value="" />AMERICAN EXPRESS <br> <br><input type="radio" name="creditcard" value="" />MASTER CARD<br><br><input type="submit"name="Submit" value="Submit"> </center> <br> <br> <p> <font color="red" style="italics" size="3"> *Disclaimer<br> <br> 1.The mode of payement provided is through credit card.<br> 2.The credit card should be valid uptill the date of delivery.<br> 3.Personal information as entered by the customer will remain secure with us. </font> </p></form> <div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 74
  • 75. THANKS.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><%@ page import="java.util.*" %><html> <head> <title>thanks</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style3.css" /> </head><body onload="slideShow(0)"><div><img src="images/logo.gif" width="237" height="123" class="float" alt="setalpm" /><div class="topnav"><%String s3=session.getAttribute("address").toString().toUpperCase();String s2=session.getAttribute("emailid").toString().toUpperCase();%><font size="5" color="blue"> <span><strong>THANKS FOR SHOPPING</strong></font><img align="right" src="images/baby3.jpg" width="400" height="400"><br><br> <br><br><br><br><font size="4" color="red"> 75
  • 76. Shipping Address :<%=s3%><br><br> <br><br><bottom>Your personal details have been saved with us for future transactions<%=s2%></bottom><br><br> <br><br><bottom>The order will be delivered at this address within next 48 hoursYou have to pay the shipping cost that is 50$ at the time of delivery</bottom></span></font></div></div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 76
  • 77. SEARCH.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Baby Shopping</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style3.css" /></head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><script language="javascript"> function val(f){ if(f.item.value==""){ alert("please enter something"); f.item.focus(); return false; } return true; } 77
  • 78. </script><div id="main"><img src="images/photo.jpg" alt="" width="682" height="334" border="0" usemap="#Map"name="slideShow" /><br /><div>&nbsp;&nbsp;<h3><font color=#FF0080> SEARCH ON THE BASIS OF ITEM ORCATEGORY</font></h3><br><br><FORM name=form method="post" action="searcheditem.jsp" >&nbsp;ITEM NAME<input type="text" name="item" value="" /><br/><br/><br/><br/>CATEGORY<select name="category"> <option>action toys & figures </option> <option>arts & crafts</option> <option>discovery & learning</option> <option>dolls & soft toys</option> <option>games & puzzles</option> <option>collectibles</option> <option>infants & preschool</option> <option>novelity & virtual</option> <option>outdoors</option> <option>tv & films</option> </select> <input type="submit" value="search" /> </form> </div> 78
  • 79. </div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 79
  • 80. SEARCHEDITEM.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data" class="search.searchitem"/> <jsp:setProperty name="data" property="*"/><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style3.css" /> <title>Searched item</title> </head><body onload="slideShow(0)"><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a> <% if(data.search(out,request,response)==true){ out.println(""); } %><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 80
  • 81. SELL.JSP<html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style3.css" /></head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp; | &nbsp; <a href="index.jsp">Home</a></span></div><br><script language="JavaScript" type="text/JavaScript"><!--function call(form1){if(document.form1.file.value==""){alert("Please give the path of file!!!!");form1.file.select();form1.file.focus();return false;} 81
  • 82. return true;}//--></script><div id="main"><div style="font:14;color:lime;width:682;height:334 "><table width="682" ><form name="form1" method="post" onsubmit="javascript: return call(this);"action="sold.jsp"><tr align="left"><TD height=34>&nbsp&nbsp;</TD><td align="center"><h1 align="center"><font color=#FF0080>ADD ITEM</font></h1></td></tr> <br> <br><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>Please select the browse button to select the photo</TD> <TD> <input type="file" name="file" /></TD> </TR><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>Enter your item name</TD> <TD> <input type="text" name="profile" /></TD> </TR> <TR><TD width=20></TD><TD width=125 height=34> 82
  • 83. Select the Category</TD> <TD width=200><select size=1 name="category"> <option value="cat">Action toys & figures</option> <option value="vikas puri">EAST DELHI</option> <option value="vikas puri">WEST DELHI</option> <option value="vikas puri">SOUTH DELHI</option> </select></TD></TR><TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>Enter your expected price</TD> <TD><input name="price" type="text" /></TD> </TR> <TR align="left"> <TD height=34>&nbsp;</TD> <TD height=34>submit</TD> <TD><input name="Submit" type= "Submit" vaulue="submit"></TD> </TR> </form> </table> </div> 83
  • 84. </div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 84
  • 85. SOLD.JSP<%@ page import="java.sql.*" %><%@ page import="java.io.*" %><jsp:useBean id="data3" class="photo.photobean"/><jsp:setProperty name="data3" property="request" value="<%=request%>" /><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Sell old products</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style.css" /></head><body><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><br><br> <%String name=request.getParameter("file");if(name==null){}else{request.setAttribute("file1",name); 85
  • 86. }%><%boolean reply=data3.photoloadb();if(reply==true){%><table width="529" align="center" border="1" cellspacing="2" cellpadding="2"> <tr> <td width="517" height="43" align="center" ><h4 align="center"><strong><spanclass="style2">....You have Successfully Stored Your Item... </span></strong></h4></td> </tr></table><font size="18"><table width="403" align="center" border="1" cellspacing="2"cellpadding="2"> </tr></table></font><table width="403" align="center" border="1" cellspacing="2" cellpadding="2"> <td width="391" align="center"><a href="index.jsp">go to home page</a> </td> </tr></table><font size="18"><table width="403" align="center" border="1" cellspacing="2"cellpadding="2"> </tr></table></font><table width="403" align="center" border="1" cellspacing="2" cellpadding="2"> <td align="center"><span class="style3"><a href="sell.jsp">...Go to previous page...</a></span></td> </tr></table><font size="18"><table width="403" align="center" border="1" cellspacing="2" cellpadding="2"> <%} else if(reply==false) 86
  • 87. { %> <td height="59" ><p align="center">You have not successfully stored your item..</p> <p align="center">plz try again later !!! </p> <p><center><a href="sell.jsp">Go To Previous Page...</a></center></p> <p><center><a href="index.jsp">Go To Home Page...</a></center></p></td></table> <% }%></font><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></body></html> 87
  • 88. PRODUCTS.JSP<%@page session="true" contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data" class="edow.loginbean"/><jsp:setProperty name="data" property="*"/><%@ page import="java.sql.*" %><%@ page import="java.io.*" %><% try { /* Create string of connection url within specified format with machine name, port number and database name. Here machine name id localhost and database name is student. */ String connectionURL = "jdbc:odbc:perry"; // declare a connection by using Connection interface Connection connection = null; /* declare object of Statement interface that is used for executing sql statements. */ Statement statement = null; // declare a resultset that uses as a table for output data from tha table. ResultSet rs = null; // Load JBBC driver "com.mysql.jdbc.Driver" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); /* Create a connection by using getConnection() method that takes parameters of string type connection url, user name and password to connect to database.*/ 88
  • 89. connection = DriverManager.getConnection(connectionURL, "", ""); /* createStatement() is used for create statement object that is used for sending sql statements to the specified database. */ statement = connection.createStatement(); // sql query to retrieve values from the secified table. String QueryString = "SELECT * from items1"; rs = statement.executeQuery(QueryString);%><script language="JavaScript"> <!-- function addItem( name, price ) { var i = 1; for( ; getCookieValue( "item" + i ) != "" ; i++ ); document.cookie = "item" + i + "=" + name + "," + price; document.cookie = "items=" + i; } function getCookieValue( name ) { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; 89
  • 90. return( c.slice( begin, end ) ); } // --> </script><html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a> <div class="topnav"> <span><strong>Welcome</strong> &nbsp;</span> <% String s2=session.getAttribute("emailid").toString().toUpperCase(); if(s2=="") {%><a href="login.jsp">Log in</a> &nbsp; | &nbsp; <a href="register.jsp">Register</a></span> <%}else{out.println(s2); %><a href="index.jsp">sign out</a><%}%> </div> <%if(s2==""){%> 90
  • 91. <%}%> </div> <% while (rs.next()) { int i=rs.getRow();i++;%><div id="content"><div id="sidebar"></div><div id="items"><table align="right"><tr><td></form></td></tr></table><table><div class="item"><a href="buy.jsp?id=<%=i%>"><img src="<%=rs.getString(3)%>" width="213"height="192" /></a><br /><p><%=rs.getString(1)%></p><span class="price"><%=rs.getInt(4)%>$</span><br /></table></div> <%} rs.close(); statement.close(); connection.close();} catch (Exception ex) { 91
  • 92. %><% out.println("Unable to connect to database."); }%><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></body></html> 92
  • 93. BUY.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data3" class="buy.buying"/> <jsp:setProperty name="data3" property="*"/><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Buy old products</title> </head> <body><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a> <center> <% if(data3.search(out,request,response)==true){ }int s1=(Integer.parseInt(request.getParameter("id")));session.setAttribute("item", s1--); %> </center> <br> <br> 93
  • 94. <br> <br> <center> <a href="checkout.jsp"><img src="images/buynow.jpg"/></a> </center><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></body></html> 94
  • 95. REVIEW.JSP<%@page session="true" contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data" class="edow.loginbean"/><jsp:setProperty name="data" property="*"/><%@ page import="java.sql.*" %><%@ page import="java.io.*" %><% try { /* Create string of connection url within specified format with machine name, port number and database name. Here machine name id localhost and database name is student. */ String connectionURL = "jdbc:odbc:perry"; // declare a connection by using Connection interface Connection connection = null; /* declare object of Statement interface that is used for executing sql statements. */ Statement statement = null; // declare a resultset that uses as a table for output data from tha table. ResultSet rs = null; // Load JBBC driver "com.mysql.jdbc.Driver" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); /* Create a connection by using getConnection() method that takes parameters of string type connection url, user name and password to connect to database.*/ 95
  • 96. connection = DriverManager.getConnection(connectionURL, "", ""); /* createStatement() is used for create statement object that is used for sending sql statements to the specified database. */ statement = connection.createStatement(); // sql query to retrieve values from the secified table. String QueryString = "SELECT * from items1"; rs = statement.executeQuery(QueryString);%><script language="JavaScript"> <!-- function addItem( name, price ) { var i = 1; for( ; getCookieValue( "item" + i ) != "" ; i++ ); document.cookie = "item" + i + "=" + name + "," + price; document.cookie = "items=" + i; } function getCookieValue( name ) { var c = document.cookie; var begin = c.indexOf( name ); if( begin < 0 ) return( "" ); begin += name.length + 1; var end = c.indexOf( ";", begin ); if( end == -1 ) end = c.length; 96
  • 97. return( c.slice( begin, end ) ); } // --> </script><html><head><title>Baby Shop</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp;</span> <% String s2=session.getAttribute("emailid").toString().toUpperCase(); if(s2=="") {%><a href="login.jsp">Log in</a> &nbsp; | &nbsp; <a href="register.jsp">Register</a></span> <%}else{out.println(s2); %><a href="index.jsp">sign out</a><%}%> </div> <%if(s2==""){%> 97
  • 98. <ul id="menu"><li><a href="index.jsp"><img src="images/but1.gif" alt="" width="110" height="32"/></a></li><li><a href="login.jsp"><img src="images/but2.gif" alt="" width="110" height="32"/></a></li><li><a href="register.jsp"><img src="images/but3.gif" alt="" width="110" height="32"/></a></li><li><a href="login.jsp"><img src="images/but4.gif" alt="" width="110" height="32"/></a></li><li><a href="viewcart.jsp"><img src="images/but5.gif" alt="" width="110" height="32"/></a></li><li><a href="checkout.jsp"><img src="images/but6.gif" alt="" width="110" height="32"/></a></li></ul><%}%></div><% while (rs.next()) { int i=rs.getRow();i++; %><div id="content"><div id="sidebar"></div><div id="items"><table align="right"><tr><td></form></td></tr></table> 98
  • 99. <table><div class="item"><a href="givereview.jsp?id=<%=i%>"><img src="<%=rs.getString(3)%>" width="213"height="192" /></a><br /><p><%=rs.getString(1)%></p><span class="price"><%=rs.getInt(4)%></span><br /></table></div><%} rs.close(); statement.close(); connection.close();} catch (Exception ex) {%><% out.println("Unable to connect to database."); }%><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></body></html> 99
  • 100. GIVEREVIEW.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="data3" class="buy.buying"/> <jsp:setProperty name="data3" property="*"/><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="style3.css" /><title>Review</title></head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a> <p> <br> <br> <br> <h3 align="center"> <font color=#FF0080>We would greatly appreciate your feedbackabout our products </font> </h3> 100
  • 101. </p> <br> <br> <% if(data3.search(out,request,response)==true){ }int s1=(Integer.parseInt(request.getParameter("id")));session.setAttribute("item", s1--); %><form action="reviewdone.jsp"> <center> **Kindly enter the Name of the product also <textarea name="review" rows="4" cols="20"> </textarea> <br> <br> <input type="submit" value="submit"</center></form><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> 101
  • 102. REVIEWDONE.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Thanks for review!</title> </head><body onload="slideShow(0)"><div><a href="#"><img src="images/logo.gif" width="237" height="123" class="float"alt="setalpm" /></a><div class="topnav"><span><strong>Welcome</strong> &nbsp;<a href="login.jsp">Log in</a> &nbsp; | &nbsp; <ahref="register.jsp">Register</a></span> <br> <br> <br> </div> <jsp:useBean id="ship" class="shipping.shippingbean" /> <jsp:setProperty name="ship" property="*" /> 102
  • 103. <%@ page import="java.sql.*" %><%@ page import="java.io.*" %><%String name = request.getParameter("review"); /* Create string of connection url within specified format with machine name, port number and database name. Here machine name id localhost and database name is student. */ String s=session.getAttribute("item").toString(); String s1=session.getAttribute("emailid").toString(); String connectionURL = "jdbc:odbc:perry"; // declare a connection by using Connection interface Connection connection = null; // declare object of Statement interface that uses for //executing sql statements. PreparedStatement pstatement = null; // Load JBBC driver "com.mysql.jdbc.Driver" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); int updateQuery = 0; // check if the text box is empty if(name!=null){ // check if the text box having only blank spaces if(name!="" ) { 103
  • 104. try { /* Create a connection by using getConnection() method that takes parameters of string type connection url, user name and password to connect to database. */ connection = DriverManager.getConnection (connectionURL, "", ""); // sql query to insert values in the secified table. String queryString = "INSERT INTO reviews(id, review,email) VALUES (?,?,?)"; /* createStatement() is used for create statement object that is used for sending sql statements to the specified database. */ pstatement = connection.prepareStatement(queryString); pstatement.setString(1, s); pstatement.setString(2, name); pstatement.setString(3,s1); updateQuery = pstatement.executeUpdate(); if (updateQuery != 0) {out.println(" " + "Thanks for giving your review..!");%> <br> <br> <br> <br> <center> <table style="background-color: #F6CEF5;" WIDTH="30%" border="1"> <tr><th>Data is inserted successfully 104
  • 105. in database.</th></tr> </table> </center> <br> <br> <br> <br> <% } } catch (Exception ex) { out.println("Unable to connect to batabase."); } finally { // close all the connections. pstatement.close(); connection.close(); } } }%><center> <img align="center" src="images/thanks.jpg" width="400" height="300"></center><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /> </body></html> 105
  • 106. CONTACT.JSP<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Contact us</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style2.css" /> </head> <body onload="slideShow(0)"> <div> <a href="#"><img src="images/logo.gif" width="237" height="123"class="float" alt="setalpm" /></a> <span><strong>Welcome</strong> &nbsp; &nbsp; <% String s2=session.getAttribute("emailid").toString().toUpperCase(); if(s2=="") {%><a href="login.jsp">Log in</a> &nbsp; | &nbsp; <a href="register.jsp">Register</a></span> <%}else{out.println(s2); %><a href="index.jsp">sign out</a><%}%> </div> </div> 106
  • 107. <div id="content"> <div id="sidebar"> </div> <div id="main"> <img src="images/photo.jpg" alt="" align ="left" width="682" height="334" border="0"usemap="#Map" name="slideShow" /> <br /> </div> </div> <div id="inside"> <div class="info"> <p> <b> Contact Details :</b><br> <br> Address :<br> 4th Floor, Camex House,<br> Near. Samved Hospital<br> Stadium - Commerce Road,<br> Navrangpura, Ahmedabad 380 009<br> Gujarat, India.<br> <br><br> <b>Mon to Fri Timings :</b> 0930 - 1830 hrs IST<br> <b>Sat Timings :</b> 0930 - 1400 hrs IST<br> FAX (India) : +91-79-6630 7311<br> 107
  • 108. <font color="red">In case you get an answering machine, please leavea detailed message</font></p></div></div></div><div id="footer"><img src="images/cards.jpg" alt="" width="919" height="76" /></div></body></html> BUY.BUYING.JAVA 108
  • 109. package buy;import java.sql.*;import javax.servlet.jsp.*;import javax.servlet.*;import javax.servlet.http.*;import java.sql.*;public class buying {private String item,code,image;private int id;public int getid() {return id; } public void setid(int id) { this.id=id; }public String getitem() {return item; } public void setitem(String item) { this.item=item; } 109
  • 110. public String getcode() { return code; } public void setcode(String code){ this.code=code; } public String getimage() { return image; } public void setimage(String image){ this.image=image; }public boolean search(JspWriter out,javax.servlet.ServletRequestrequest,javax.servlet.ServletResponse response) throws Exception{int s1=(Integer.parseInt(request.getParameter("id")));s1--; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:perry","", ""); try{boolean flag=false;Statement stm=con.createStatement();ResultSet rs=stm.executeQuery("select * from items1 where id="+s1+"");response.setContentType("image/jpeg");response.setContentType("text/html");while(rs.next()) { 110
  • 111. String item=rs.getString(1); String code=rs.getString(2); String image=rs.getString(3); String price=rs.getString(4);out.println("<table border=2 align=center><tr><td><imgsrc="+image+"width=300height=200 /></td></tr></table><table align=centerborder=1width=300><tr><td><b><font color=red>PRODUCTFEATURES</b></td></tr><br/><tr><td><p>item:"+item+"</p></td></tr><tr><td><spanclass=price>price:"+price+"</span></td></tr><br></font></table>"); flag=true; }return flag;}catch(Exception e){return false;}}} EDOW.LOGINBEAN.JAVA 111
  • 112. package edow;import java.sql.*;public class loginbean {private static String email,password;public String getemail() {return email; } public void setemail(String email) { this.email=email; } public String getpassword() { return password; } public void setpassword(String password){ this.password=password; }public boolean login() throws Exception{boolean flag=false; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:perry","", ""); try{Statement stm=con.createStatement(); 112
  • 113. ResultSet rs=stm.executeQuery("select * from login"); while(rs.next()) { if((rs.getString(4).equals(password)) && (rs.getString(3).equals(email))) { flag=true; } } return flag; } catch(Exception e) { return false; }}} EDOW.PHOTOINDEXBEAN.JAVA 113
  • 114. package edow;import java.sql.*;import java.io.*;public class photoindexbean{public boolean photoloadd(String s1,String profile,String category,String price,int id)throwsException{try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:perry","", ""); PreparedStatement s = con.prepareStatement("insert intoitems1(item,category,image,price,id)values(?,?,?,?,?)"); s.setString(1, profile); s.setString(2, category); s.setString(3,s1); s.setString(4,price ); s.setInt(5,id); s.executeUpdate (); s.close (); } catch(Exception e){ System.out.println("Exception is ;"+e); } return true;}} PACK.REGISTRATIONBEAN.JAVA 114
  • 115. package pack;import java.sql.*;import javax.servlet.jsp.*;import java.sql.*;public class registrationbean { private String initial,finalname,email,pass,area,dob,contact; public String getinitial() {return initial; } public void setinitial(String initial) { this.initial=initial; } public String getfinalname() { return finalname; } public void setfinalname(String finalname){ this.finalname=finalname; } public String getemail() { return email; } 115
  • 116. public void setemail(String email){ this.email=email; } public String getpass() { return pass; } public void setpass(String pass){ this.pass=pass; }public String getarea() { return area; } public void setarea(String area){ this.area=area; } public String getdob() { return dob; } public void setdob(String dob){ this.dob=dob; } public String getcontact() { 116
  • 117. return contact; } public void setcontact(String contact){ this.contact=contact; }public boolean registrationd() throws Exception{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:perry","", ""); Try{ PreparedStatement s = con.prepareStatement("insert intologin(initial,finalname,email,pass,area,dob,contact)values(?,?,?,?,?,?,?)"); s.setString(1, initial); s.setString(2, finalname); s.setString(3,email ); s.setString(4, pass); s.setString(5, area); s.setString(6, dob); s.setString(7, contact); s.executeUpdate(); s.close(); } catch(Exception e){ System.out.println("Exception is ;"+e); } return true;} 117
  • 118. public boolean showinfo(JspWriter out){try{Connection con=DriverManager.getConnection("jdbc:odbc:perry","",""); Statement s=con.createStatement();ResultSet rs=s.executeQuery("select * from stores");while(rs.next()){String name=rs.getString(1);String location=rs.getString(2);String contact=rs.getString(3);String manager=rs.getString(4);out.println("<table width=845 height=119 border=1><tr><td width=122rowspan=3>"+name+"</td><td width=125 height=20>LOCATION-:</td><tdwidth=255>"+location+"</td></tr><tr><tdheight=20>CONTACT-:</td><td>"+contact+"</td></tr><tr><tdheight=20>MANAGER-:</td><td>"+manager+"</td></tr></table><br>");}}catch(Exception e){e.printStackTrace();}return true;}public boolean show(JspWriter out){try 118
  • 119. {Connection con=DriverManager.getConnection("jdbc:odbc:perry","",""); Statement s=con.createStatement();ResultSet rs=s.executeQuery("select * from prices where storename=spencer andcategory=home");while(rs.next()){String item=rs.getString(2);String price=rs.getString(4);out.println("<table align=left width=200 height=50 style=margin-bottom:20;margin-top:40;border-color:lime border=4><tr><th>"+"spencer"+"</th></tr><tr><td width=100height=20>item</td><td width=100 height=20>price</td></tr><tr><tdwidth=100>"+item+"</td><td width=100>"+price+"</td></tr></table>");}ResultSet rs1=s.executeQuery("select * from prices where storename=easy day andcategory=home");while(rs1.next()){String item=rs1.getString(2);String price=rs1.getString(4);ut.println("<table align=center width=200 height=50 border=4 style=margin-bottom:20;margin-top:40;border-color:lime><tr><th>"+"easy day"+"</th></tr><tr><tdwidth=100 height=20>item</td><td width=100 height=20>price</td></tr><tr><tdwidth=100>"+item+"</td><td width=100>"+price+"</td></tr></table>");} 119
  • 120. ResultSet rs2=s.executeQuery("select * from prices where storename=big apple andcategory=home");while(rs2.next()){String item=rs2.getString(2);String price=rs2.getString(4)out.println("<table align=center width=200 height=50 border=4 style=margin-top:0;border-color:lime;float:right><tr><th>"+"big apple"+"</th></tr><tr><td width=100height=20>item</td><td width=100 height=20>price</td></tr><tr><tdwidth=100>"+item+"</td><td width=100>"+price+"</td></tr></table>");}}catch(Exception e){e.printStackTrace();}return true;}public boolean showfruits(JspWriter out){try{Connection con=DriverManager.getConnection("jdbc:odbc:perry","",""); Statement s=con.createStatement();ResultSet rs=s.executeQuery("select * from prices where storename=spencer andcategory=fruit");while(rs.next()){ 120
  • 121. String item=rs.getString(2);String price=rs.getString(4);out.println("<table align=left width=200 height=50 border=4 style=margin-bottom:20;margin-top:300;border-color:lime ><tr><th>"+"spencer"+"</th></tr><tr><tdwidth=100 height=20>item</td><td width=100 height=20>price</td></tr><tr><tdwidth=100>"+item+"</td><td width=100>"+price+"</td></tr></table><br>");}ResultSet rs1=s.executeQuery("select * from prices where storename=easy day andcategory=fruit");while(rs1.next()){String item=rs1.getString(2);String price=rs1.getString(4);out.println("<table align=center width=200 height=50 border=4 style=margin-bottom:20;margin-top:40;border-color:lime ><tr><th>"+"easy day"+"</th></tr><tr><tdwidth=100 height=20>item</td><td width=100 height=20>price</td></tr><tr><tdwidth=100>"+item+"</td><td width=100>"+price+"</td></tr></table><br>");}ResultSet rs2=s.executeQuery("select * from prices where storename=big apple andcategory=fruit");while(rs2.next()){String item=rs2.getString(2);String price=rs2.getString(4);out.println("<table align=right width=200 height=50 border=4 style=margin-bottom:20;margin-top:40;border-color:lime ><tr><th>"+"big apple"+"</th></tr><tr><tdwidth=100 height=20>item</td><td width=100 height=20>price</td></tr><tr><tdwidth=100>"+item+"</td><td width=100>"+price+"</td></tr></table><br>");} 121
  • 122. }catch(Exception e){e.printStackTrace();}return true;}} PHOTO.PHOTOBEAN.JAVA 122
  • 123. package photo;import java.io.*;import java.sql.*;public class photobean{private String profile,category,price;private int id;javax.servlet.ServletRequest request;javax.servlet.ServletConfig config;public String getcategory() { return category; } public void setcategory(String category){ this.category=category; }public void setProfile(){this.profile=profile;}public String getProfile(){return profile;} 123
  • 124. public void setprice(){this.price=price;}public String getprice(){return price;}public void setid(){this.id=id;}public int getid(){return id;}public void setRequest(javax.servlet.ServletRequest request){this.request=request; }public boolean photoloadb() throws Exception{price=request.getParameter("price");category=request.getParameter("category"); 124
  • 125. profile=request.getParameter("profile"); int id=addid();String f1 =request.getAttribute("file1").toString();edow.photoindexbean pic=new edow.photoindexbean();return(pic.photoloadd("itemimages/"+f1,profile,category,price,id));}public int addid() throws Exception{int i=1;Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con=DriverManager.getConnection("jdbc:odbc:perry","", "");Statement stm=con.createStatement();ResultSet rs=stm.executeQuery("select * from items1");while(rs.next()){ i=rs.getRow(); i++;}return i;}} SEARCH.SEARCHITEM.JAVA 125
  • 126. package search;import java.sql.*;import javax.servlet.jsp.*;import javax.servlet.*;import java.sql.*;public class searchitem {private String item,code,image;public String getitem() {return item; } public void setitem(String item) { this.item=item; } public String getcode() { return code; } public void setcode(String code){ this.code=code; } public String getimage() { return image; 126
  • 127. } public void setimage(String image){ this.image=image; }public boolean search(JspWriter out,javax.servlet.ServletRequestrequest,javax.servlet.ServletResponse response) throws Exception{String s1=request.getParameter("item").toString(); String s2=(String)request.getParameter("category"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:perry","", ""); try{boolean flag=false;Statement stm=con.createStatement();ResultSet rs=stm.executeQuery("select * from items1 where item="+s1+" orcategory="+s2+"");response.setContentType("image/jpeg");response.setContentType("text/html");while(rs.next()){String item=rs.getString(1);String code=rs.getString(2);String image=rs.getString(3);int price=rs.getInt(4);out.println("<table border=1><tr><td><img src="+image+" width=213 height=192/></td></tr><tr><td><b>PRODUCT FEATURES</b></td></tr><br/><tr><td><p>item----"+item+"</p></td></tr><tr><td><span class=price>price----"+price+"$</span></td></td><br />"); 127
  • 128. flag=true;}return flag;}catch(Exception e){return false;}}} SHIPPING.SHIPPINGBEAN.JAVA 128
  • 129. package shipping;import javax.servlet.jsp.*;import java.sql.*;public class shippingbean {private String Name1, MobileNo, LandlineNo, Address, City, State, Country;public String getName1() {return Name1; }public void setName1(String Name1) { this.Name1=Name1; }public String getMobileNo() { return MobileNo; } public void setMobileNo(String MobileNo){ this.MobileNo=MobileNo; } public String getLandlineNo() { return LandlineNo; 129
  • 130. } public void setLandlineNo(String LandlineNo){ this.LandlineNo=LandlineNo; }public String getAddress() { return Address; } public void setAddress(String Address){ this.Address=Address; } public String getCity() { return City; } public void setCity(String City){ this.City=City; } public String getState() { return State; } public void setState(String State){ this.State=State; } public String getCountry() 130
  • 131. { return Country; } public void setCountry(String Country){ this.Country=Country; }public boolean shippingd() throws Exception{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:perry","", ""); try{ PreparedStatement s = con.prepareStatement("insert into shipping(name1, mobile, landline,address, city, state, country)values(?,?,?,?,?,?,?)"); s.setString(1, Name1); s.setString(2, MobileNo); s.setString(3, LandlineNo); s.setString(4, Address); s.setString(5, City); s.setString(6, State); s.setString(7, Country); s.executeUpdate(); s.close(); } catch(Exception e){ System.out.println("Exception is ;"+e); } return true;}} 131
  • 132. INDEX PAGE 132
  • 133. LOGIN PAGE 133
  • 134. ITEMS PAGE 134
  • 135. VIEWCART PAGE 135
  • 136. PURCHASE PAGE 136
  • 137. CHECKOUT PAGE 137
  • 138. PRODUCT DETAILS PAGE 138
  • 139. SEARCH PAGE 139
  • 140. SELL PAGE 140

×