You are on page 1of 53

Minor Project on Ecommerce

Electroshop.com (An Online computer h/w and s/w shop)

Master of Computer Science(M.Sc) Information Technology (May 2010)

INDEX
S. NO. 1 2 3 4 5 6 7 8 9 10 11 12 CONTENTS Acknowledgement Certificate About Ecommerce About the project System Requirements Frontend - Screenshots Frontend - Coding Backend - Screenshots Backend Coding Database Structure Testing PAGE NO. 3 4 5 6 6 8 10 24 27 29 31 32

2

ACKNOWLEDGEMENT
There is always a sense of gratitude, which is an expression to others, for helpful and needy services they render during all phases of life. It is indeed a matter of profound pleasure and privilege to express deep sense of appreciation and gratitude to my lecturer Mr.Jatinder Kumar for his guidance, constructive and creative suggestions, constant and effective encouragement which has been a constant source of inspiration for me throughout the course of this project. I am extremely grateful to our respected principal for providing the excellent lab facilities with which we are able to complete our project. It is my heartfelt pleasure and deepest sense of gratitude to offer my humble and sincere thanks to department of computer applications for providing me the opportunity to work there. I also owe sincere thanks to all my teachers and my parents for their moral support and encouragement. Last but not the least, I express my gratitude to all the faculty members, my parents, friends and College for providing the infrastructure, the kind blessings of who made me strong during ups and downs while accomplishing the task in time.

3

CERTIFICATE

This is to certify that the project on Ecommerce website development which is being submitted by Mr. Jatinder Pal for the fulfillment of the requirement for award of degree of “Master of Science in Information Technology” is an authentic work carried out by him at Sri Guru Gobind Singh College Sector-26, Chandigarh under my supervision & guidance during the second semester of session 2009-10. The matter embedded in this project work has’t been submitted earlier for the award of any other Degree or Diploma . He worked with utmost dedication and zeal. I wish him all the best. We express our deep appreciation and sincere commendation of their effort.

4

A little bit about Ecommerce
Unless you have been living under a rock for the last few years, you have probably heard about e-commerce. And you have heard about it from several different angles. You may have: • heard about all of the companies that offer e-commerce because you have been bombarded by their TV and radio ads • read all of the news stories about the shift to e-commerce and the hype that has developed around e-commerce companies • seen the huge valuations that Web companies get in the stock market, even when they don't make a profit • purchased something on the Web, so you have direct personal experience with e-commerce. Electronic commerce, commonly known as e-commerce or eCommerce,or ebusiness consists of the buying and selling of products or services over electronic systems such as the Internet and other computer networks. The amount of trade conducted electronically has grown extraordinarily with widespread Internet usage. The use of commerce is conducted in this way, spurring and drawing on innovations in electronic funds transfer, supply chain management, Internet marketing, online transaction processing, electronic data interchange (EDI), inventory management systems, and automated data collection systems. Modern electronic commerce typically uses the World Wide Web at least at some point in the transaction's lifecycle, although it can encompass a wider range of technologies such as e-mail as well. A large percentage of electronic commerce is conducted entirely electronically for virtual items such as access to premium content on a website, but most electronic commerce involves the transportation of physical items in some way. Online retailers are sometimes known as e-tailers and online retail is sometimes known as e-tail. Almost all big retailers have electronic commerce presence on the World Wide Web.
5

com”. The administrator also has the ability to send newsletters to the visitor of the website who have subscribed for the newsletters. The well formatted layout with proper positioning of categories and products as well as use of good graphics will make the user feel good and increase the chances of conversion of user to customer. about us etc. The Electroshop displays the well formatted layout of the website that is a user friendly interface and easy to understand and use. Features like searching have also been added. Best efforts have been put in to make the website look awesome and full of features. The project also has an ADMIN panel that allows the administrator of the website to add categories and products to the website as well as change the information on pages like contact us. People can access the website through a domain name and can order products at the comfort of sitting at home and just ordering product needed at a few clicks.About the project This project is based on ecommerce application in real life. 6 . The project focuses on online shopping of computers hardware and softwares. This project has been named “Electroshop. SYSTEM REQUIREMENTS • One Personal Computer or any web browsing device • 32 MB or Higher RAM • Any Operating System that support web browsing • Web Browser Software • An expert user. who has complete knowledge to operate Internet.

FRONTEND 7 .

SCREENSHOTS HOME PAGE 8 .

DETAIL PAGE 9 .

charset=windows-1252" /> <title>Electronix Store</title> <link rel="stylesheet" type="text/css" href="style.org/TR/xhtml1/DTD/xhtml1-transitional.php"). if(!mysql_select_db("ecommerce")) die(mysql_error()).w3.php" method="post"><input type="text" class="search_input" name="search" /> <input type="image" src="images/search.CODING config.php <?php $linkdb = mysql_connect("localhost".org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html.gif" class="search_bt"/></form> </div> <div class="languages"> 10 . ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.dtd"> <html xmlns="http://www.0 Transitional//EN" "http://www. ?> header. "").php <?php include("config.w3.css" /> </head> <body> <div id="main_container"> <div class="top_bar"> <div class="top_search"> <div class="search_text"><a href="#">Advanced Search</a></div> <form action="search. "root".

php").php" class="nav6">Contact Us</a></li> <li class="divider"></li> </ul> <div class="right_menu_corner"></div> </div> <div><br /></div> index.php?all=1" class="nav2">View All Products</a></li> <li class="divider"></li> <li><a href="aboutus.gif" alt="" title="" border="0" /></a> <a href="#" class="lang"><img src="images/de. include("leftbar.<div class="lang_text">Languages:</div> <a href="#" class="lang"><img src="images/en.php").gif" alt="" title="" border="0" /></a> </div> </div> <div id="header"> <div id="logo"> <a href="index.png" alt="" title="" border="0" width="237" height="140" /></a> </div> </div> <div id="main_content"> <div id="menu_tab"> <div class="left_menu_corner"></div> <ul class="menu"> <li><a href="index.php" class="nav1"> Home </a></li> <li class="divider"></li> <li><a href="index.php"><img src="images/logo.php <?php include("header. } 11 . ?> <div class="center_content"> <div class="center_title_bar">Latest Products</div> <?php if($_REQUEST['all']==1) { $products = mysql_query("select * from products order by id desc").php" class="nav4">About Us</a></li> <li class="divider"></li> <li><a href="contact.

} while($prodata = mysql_fetch_array($products)) { ?> <div class="prod_box"> <div class="top_prod_box"></div> <div class="center_prod_box"> <div class="product_title"><a href="detail.php").php?pid=<?php echo $prodata['id'].php").php?pid=<?php echo $prodata['id']. ?>$</span> <span class="price"><?php echo $prodata['discounted_price']. ? >"><?php echo $prodata['name']. ? >"><img src="media/<?php echo $prodata['image']. ?>$</span></div> </div> <div class="bottom_prod_box"></div> <div class="prod_details_tab"> <a href="#"><img src="images/cart. ?>" alt="" title="" border="0" /></a></div> <div class="prod_price"><span class="reduce"><?php echo $prodata['original_price']. include("footer.php").php?pid=<?php echo $prodata['id'].else { $products = mysql_query("select * from products order by id desc limit 9").php <?php include("header. ?> <div class="center_content"> <div class="center_title_bar">About Us</div> <div class="prod_box_big"> <div class="top_prod_box_big"></div> 12 .php"). include("leftbar. ?></a></div> <div class="product_img"><a href="detail. ?>" class="prod_details">details</a> </div> </div> <?php } ?> </div> <?php include("rightbar.gif" alt="" title="" border="0" class="left_bt" /></a> <a href="detail. ?> aboutus.

echo $contactcon['value'].php?pid=<?php echo $prodata['id']. padding-left:40px. font-weight:bold. ?> <div class="center_content"> <div class="center_title_bar">Latest <?php $catget = $_REQUEST['catid'].php <?php include("header. $cat = mysql_fetch_array(mysql_query("select * from categories where id=".php"). ? >"><?php echo $prodata['name']. ? >"><img src="media/<?php echo $prodata['image'].$catz).php").php"). ?>" alt="" title="" border="0" /></a></div> 13 .php").php?pid=<?php echo $prodata['id']. ?> category. ?></a></div> <div class="product_img"><a href="detail. ?></div> <?php $catz = $_REQUEST['catid']. backgroundcolor:#f7f3f3. include("leftbar. font-size:12px."><br /> <?php $contactcon = mysql_fetch_array(mysql_query("select * from settings where name='aboutus'")). $products = mysql_query("select * from products where cat_id=". include("footer. echo $cat['name'].<div class="center_prod_box_big"> <div style="text-align:left. ?> </div> </div> <div class="bottom_prod_box_big"></div> </div> </div> <?php include("rightbar.$catget)). while($prodata = mysql_fetch_array($products)) { ?> <div class="prod_box"> <div class="top_prod_box"></div> <div class="center_prod_box"> <div class="product_title"><a href="detail.

include("footer.gif" alt="" title="" border="0" class="left_bt" /></a> <a href="detail.php <?php include("header. ?> <div class="center_content"> <div class="center_title_bar">Contact Us</div> <div class="prod_box_big"> <div class="top_prod_box_big"></div> <div class="center_prod_box_big"> <div class="contact_form"> <div class="form_row"> <label class="contact"><strong>Name:</strong></label> <input type="text" class="contact_input" /> </div> <div class="form_row"> <label class="contact"><strong>Email:</strong></label> <input type="text" class="contact_input" /> </div> 14 . include("leftbar. ?>$</span></div> </div> <div class="bottom_prod_box"></div> <div class="prod_details_tab"> <a href="#"><img src="images/cart.php?pid=<?php echo $prodata['id'].<div class="prod_price"><span class="reduce"><?php echo $prodata['original_price']. ?> contact. ?>" class="prod_details">details</a> </div> </div> <?php } ?> </div> <?php include("rightbar.php").php").php").php"). ?>$</span> <span class="price"><?php echo $prodata['discounted_price'].

php"). ?> </div> <div class="bottom_prod_box_big"></div> </div> </div> <?php include("rightbar."><br /> <?php $contactcon = mysql_fetch_array(mysql_query("select * from settings where name='contactus'")). padding-left:40px. ?> <div class="center_content"> <div class="center_title_bar"><?php echo $products['name'].php <?php include("header. ?> detail. include("footer. ?></div> 15 . backgroundcolor:#f7f3f3.<div class="form_row"> <label class="contact"><strong>Phone:</strong></label> <input type="text" class="contact_input" /> </div> <div class="form_row"> <label class="contact"><strong>Company:</strong></label> <input type="text" class="contact_input" /> </div> <div class="form_row"> <label class="contact"><strong>Message:</strong></label> <textarea class="contact_textarea" ></textarea> </div> <div class="form_row"> <a href="#" class="contact">send</a> </div> </div> </div> <div style="text-align:left. include("leftbar.$pid)).php"). echo $contactcon['value'].php"). font-weight:bold. $pid = $_REQUEST['pid'].php"). $products = mysql_fetch_array(mysql_query("select * from products where id=". font-size:12px.

? ></span><br /> Gaurantee : <span class="blue"><?php echo $products['guarantee']. ?>$</span></div> <a href="#" class="addtocart">add to cart</a> </div> </div> <div style="text-align:left. ?>" alt="" title="" border="0" /> </div> <div class="details_big_box"> <div class="product_title_big"><?php echo $products['name_extended']. padding-left:60px.php </div> <div class="footer"> <div class="left_footer"> <img src="images/footer_logo. ? ></div> <div class="specifications"> Availability : <span class="blue"><?php echo $products['availability']. font-size:12px. ?> footer.php"). include("footer. ?></span><br /> </div> <div class="prod_price_big"><span class="reduce"><?php echo $products['original_price']. ?> </div> <div class="bottom_prod_box_big"></div> </div> </div> <?php include("rightbar."> <?php echo $products['description']. fontweight:bold.png" alt="" title="" width="170" height="49"/> </div> 16 .php"). ?>$</span> <span class="price"><?php echo $products['discounted_price']. padding-top:190px. ? ></span><br /> Shipping Cost : <span class="blue"><?php echo $products['shipping_cost']. ? ></span><br /> Delivery : <span class="blue"><?php echo $products['delivery']. background-color:#f7f3f3.<div class="prod_box_big"> <div class="top_prod_box_big"></div> <div class="center_prod_box_big"> <div class="product_img_big"> <img src="media/<?php echo $products['image'].

php">HOME</a> <a href="contact. while($catres = mysql_fetch_array($catresult)) { echo "<li class='"."'>". ?> leftbar. } echo "'><a href='category.php">CONTACT US</a> </div> </div> </div> </body> </html><?php $hits = mysql_query("update settings set value=value+1 where name='hits'").1")). if($i%2==0) { echo "odd". } else { echo "even".$catres['id']. ?> <div class="title_box">Special Products</div> 17 .php <div class="left_content"> <div class="title_box">Categories</div> <ul class="left_menu"> <?php $catresult = mysql_query("select * from categories")."</a></li>". } ?> </ul> <?php $randomproduct = mysql_fetch_array(mysql_query("select * from products order by RAND() limit 0.<div class="center_footer"><br /> All Rights Reserved 2010<br /> </div> <div class="right_footer"> <a href="index.$catres['name'].php?catid=". $i=0. $i++.

<div class="border_box"> <div class="product_title"><a href="detail. ?>" alt="" title="" border="0" /></a></div> <div class="prod_price"><span class="reduce"><?php echo $randomproduct['original_price']. ?> <div class="title_box">Whats new</div> <div class="border_box"> <div class="product_title"><a href="detail.php?pid=<?php echo $newproduct['id']. ?></a></div> 18 . ?>"><img src="media/<?php echo $randomproduct['image'].php <div class="right_content"> <div class="shopping_cart"> <div class="cart_title">Shopping cart</div> <div class="cart_details"> 0 items <br /> <span class="border_cart"></span> Total: <span class="price">0$</span> </div> <div class="cart_icon"><a href="#"><img src="images/shoppingcart. ?>"><?php echo $randomproduct['name'].png" alt="" title="" width="48" height="48" border="0" /></a></div> </div> <?php $newproduct = mysql_fetch_array(mysql_query("select * from products order by id desc limit 1")).php?pid=<?php echo $randomproduct['id']. ?>$</span> <span class="price"><?php echo $randomproduct['discounted_price'].php?pid=<?php echo $randomproduct['id']. ?>$</span></div> </div> <div class="title_box">Newsletter</div> <div class="border_box"> <input type="text" name="newsletter" class="newsletter_input" value="your email"/> <a href="#" class="join">join</a> </div> <br /> </div> rightbar. ? >"><?php echo $newproduct['name']. ?></a></div> <div class="product_img"><a href="detail.

?>" alt="" title="" border="0" /></a></div> <div class="prod_price"><span class="reduce"><?php echo $newproduct['original_price']. include("leftbar. while($prodata = mysql_fetch_array($products)) { ?> <div class="prod_box"> <div class="top_prod_box"></div> <div class="center_prod_box"> <div class="product_title"><a href="detail. ?></a></div> <div class="product_img"><a href="detail. ? >"><img src="media/<?php echo $prodata['image']. ?> <div class="center_content"> <div class="center_title_bar"><?php echo $_REQUEST['search'].php <?php include("header.php"). ?>$</span></div> </div> <div class="title_box">Manufacturers</div> <ul class="left_menu"> <li class="odd"><a href="search. ?>$</span> <span class="price"><?php echo $newproduct['discounted_price'].php?search=philips">Phillips</a></li> <li class="even"><a href="search. ?> products</div> <?php $catz = $_REQUEST['search'].php?search=fuji">Fujitsu Siemens</a></li> <li class="even"><a href="search. ? >"><img src="media/<?php echo $newproduct['image'].php"). ?>" alt="" title="" border="0" /></a></div> 19 . $products = mysql_query("select * from products where name like '%$catz%'").php?search=samsung">Samsung</a></li> <li class="odd"><a href="search. ? >"><?php echo $prodata['name'].php?search=motorola">Motorola</a></li> <li class="odd"><a href="search.php?search=gigabyte">Gigabyte</a></li> </ul> </div> search.php?search=lg">LG</a></li> <li class="odd"><a href="search.<div class="product_img"><a href="detail.php?search=sony">Sony</a></li> <li class="even"><a href="search.php?pid=<?php echo $prodata['id'].php?pid=<?php echo $newproduct['id'].php?search=daewoo">Daewoo</a></li> <li class="even"><a href="search.php?pid=<?php echo $prodata['id'].

?>" class="prod_details">details</a> </div> </div> <?php } ?> </div> <?php include("rightbar.php").top_bar{ width:1000px. sans-serif. margin:0px auto auto auto. padding:0px. background-color:#4a4a4a.jpg) no-repeat #fff center top. height:auto. } #main_container{ width:1000px. } .gif" alt="" title="" border="0" class="left_bt" /></a> <a href="detail. } .php"). font-family:Arial. ?>$</span></div> </div> <div class="bottom_prod_box"></div> <div class="prod_details_tab"> <a href="#"><img src="images/cart. margin:0px. height:38px. margin:auto. color:#000. Helvetica. height:32px. include("footer. ?>$</span> <span class="price"><?php echo $prodata['discounted_price'].css body { background:url(images/bg. font-size:11px.php?pid=<?php echo $prodata['id'].<div class="prod_price"><span class="reduce"><?php echo $prodata['original_price'].top_search{ width:370px. ?> style. padding:0. 20 . } p{ padding:2px.

_margin:0px 10px 0 0.search_input{ width:182px. } . } a.lang{ display:block.search_bt{ float:left. padding:8px 0 0 15px. float:left. padding:2px 0 0 15px. } input. background:url(images/header_bg. } 21 . width:110px.languages{ float:right. padding:0 5px 0 0. height:173px. color:#999999. float:left. border-right-color:#ffffff. } .jpg) no-repeat center.gif) no-repeat center.search_text{ float:left. } #header{ width:1000px. width:150px. color:#999999. border:1px solid #dbdbdb. margin:5px 0 0 0 . } . border-bottom-color:#ffffff. background-position:0px 0px. } . margin:auto. color:#b3adad.lang_text{ float:left. } .margin:0px 20px 0 0. padding:0 5px 0 5px. padding:8px 0 0 0. height:18px.search_text a{ text-decoration:none. float:right. background:url(images/top_search_bg.

} . } .oferte_content{ width:600px. float:right. float:left. display:block. padding:15px 30px 0 30px. margin:5px 0 0 0. padding:0 0 10px 0. float:left. text-align:justify. } . } . float:left. padding:15px.oferta{ width:538px. padding-left:5px.#logo{ float:left. text-align:center. 22 . } . width:1px.gif) no-repeat center. color:#FFFFFF. background:url(images/details_bt_bg. height:164px. line-height:15px. } a.oferta_img{ float:left.top_divider{ float:left.oferta_details{ width:400px.oferta_text{ padding:5px 0 5px 0.details{ width:83px. font-size:12px. height:164px.oferta_title{ font-size:15px. height:21px. padding:0 0 0 30px. color:#b72c24. font-weight:bold. } . } . padding:0 0 0 50px.

display:block. padding:10px 0 0 0. } 23 . div.line-height:21px. _padding:0px 0 0 0. text-align:center. line-height:23px.oferta_pagination a { width:22px. text-decoration:none. text-align:center. display:block. color:#000000. line-height:23px. height:22px. float:left. _margin:0 0 0 3px. float:left. background:url(images/pag_bg_a. } div.oferta_pagination { clear:both. margin:0 0 0 5px. background:url(images/pag_bg_a. display:block. height:22px.oferta_pagination span. float:left. margin:5px.pagination a:active { width:22px. height:22px.oferta_pagination a:hover. color:#ad1614. text-decoration:none. } div. text-align:center. } div. font-size:10px. line-height:23px.current { width:22px. text-decoration:none.gif) no-repeat center.gif) no-repeat center. } div. text-align:center. background:url(images/pag_bg.gif) no-repeat center. color:#ad1614. float:left. color:#9d8b8b. text-decoration:none.

gif) no-repeat center.} a.menu li. font-weight:bold. float:left. a. background-color:#fff. line-height:50px.gif) no-repeat center.nav1:link.menu tab----------------------*/ #menu_tab{ width:1000px. margin:0 14px 0 14px. color:#676d77.textdecoration:none. float:left. background:url(images/menu_right. margin:0 14px 0 14px. padding:0px 8px 0px 22px.height:50px. a. a.gif) no-repeat center.nav1:visited { display:block.divider { display:inline.nav3:visited { display:block.nav2:link. display:block. background:url(images/home.menu { list-style-type:none. float:left.} a.nav4:visited { 24 . float:left. padding:0px 8px 0px 22px. background:url(images/favs. background:url(images/menu_left.nav3:link.background:url(images/menu_bg.} ul.nav2:visited { display:block. background:url(images/services. color:#676d77.height:50px. height:50px. } ul.png) no-repeat left. margin:0 14px 0 14px.textdecoration:none.gif) repeat-x. width:2px. height:50px. padding:0px 8px 0px 22px. width:982px.right_menu_corner{ width:9px. } .#main_content{ clear:both. background:url(images/menu_divider.png) no-repeat left. color:#676d77. font-size:11px.left_menu_corner{ width:9px. margin:0px.menu li { display:inline. } /*---------------. float:left. height:50px. height:50px. } .height:50px.nav4:link. a. } ul.textdecoration:none.} a. float:left. float:left. } a. padding:0px.png) no-repeat left.

padding:0px 8px 0px 22px. a. height:15px. float:left.png) no-repeat left. padding:0 0 0 15px. color:#676d77. color:#676d77. color:#333333.left_content{ width:196px. float:left. padding:0px 8px 0px 22px. text-align:center. font-size:11px.nav6:hover { color:#333333. float:left. float:left.crumb_navigation{ width:980px. margin:0 14px 0 14px.} a. background:url(images/navbullet. color:#676d77. background:url(images/contact-new.nav2:hover.png) no-repeat left. a.} a. } span. _padding:12px 0 0 15px.textdecoration:none. margin:5px 0 0 0. margin:0 14px 0 14px. float:left.nav5:visited { display:block.} li.nav4:hover.png) no-repeat left. background:url(images/user_add. color:#676d77.nav5:hover.gif) no-repeat center.display:block. padding:5px 10px 0 20px. } /*-------------left_content------------------*/ .height:50px.current{ color:#0fa0dd. } /*----------------crumb_navigation-------------*/ .nav5:link. 25 .nav3:hover.textdecoration:none. text-decoration:underline.} a.currencies{ width:180px.nav6:visited { display:block. margin:0 14px 0 14px.nav1:hover.crumb_navigation a{ color:#0fa0dd. a. a.height:50px.textdecoration:none.height:50px. font-weight:bold. a. } .title_box{ width:196px. background:url(images/car. padding:0px 8px 0px 22px.nav6:link. a. } . background:url(images/menu_title_bg.png) no-repeat left. height:30px. background-position:5px 6px. a.

display:block.display:block. 26 .left_menu li.left_menu{ width:196px. } ul. line-height:30px. padding:5px 0 5px 0. height:auto.font-size:13px.height:25px.odd a{ width:166px. line-height:25px.border_box{ width:194px. } . font-weight:bold. list-style:none. } ul. border:1px #6da6b1 solid.product_title{ color:#ea2222. text-align:center.png) no-repeat left #7bbcc7.backgroundposition:5px 5px.border-bottom:1px #FFFFFF solid. } /*--------left menu---------*/ ul. color:#fff.padding:0 0 0 30px. background-position:5px 5px.even a:hover.odd a:hover{ background:url(images/checked.left_menu li.background:url(images/checked.left_menu li{ margin:0px.background:url(images/checked. } ul. font-weight:bold.left_menu li. } . } . text-decoration:none.product_title a:hover{ color:#064E5A. } . line-height:25px. ul. color:#ea2222.padding:0 0 0 30px. text-decoration:none. } ul.border-bottom:1px #FFFFFF solid. padding:0px. margin:0px. font-weight:bold. padding:5px 0 5px 0.png) no-repeat left #eee6e6. list-style:none.left_menu li.color:#504b4b.product_title a{ text-decoration:none.png) no-repeat left #dad0d0.color:#504b4b.even a{ width:166px.height:25px. color:#FFFFFF.background-position:5px 5px.

margin:0 0 0 12px. float:left. } . } /*----------newsletter--------------*/ input. padding:0 0 0 20px. } span. 27 . margin:10px 0 5px 0.prod_price{ padding:5px 0 5px 0. height:33px. padding:3px.} . text-decoration:line-through.price{ color:#ea2222. _margin:5px 0 5px 130px. font-size:12px. padding:5px 10px. background:url(images/blue-add. } /*center content--------------------------*/ .product_img{ padding:5px 0 5px 0. } . height:16px. _margin:0 0 0 6px. display:block. line-height:33px. color:#999999. color:#1c4a52. padding:0 0 0 40px.center_content{ width:585px.png) no-repeat left. } a. float:left. border:1px #ddd9d9 solid.reduce{ color:#999999.center_title_bar{ width:520px. text-decoration:none. margin:5px 0 5px 140px. } span.join{ width:17px.newsletter_input{ width:160px.

cart_icon{ float:left. margin:3px 0 3px 0. text-align:center. } . } .top_prod_box{ 28 . } span. } . background:url(images/cart_bg. height:auto. float:left.shopping_cart{ width:195px. padding:5px 0 0 0. background:url(images/bar_bg.gif) no-repeat center.font-size:12px.prod_box{ width:173px. } /*---------prod_box----------*/ .gif) no-repeat center.right_content{ width:196px. height:1px. text-align:left. padding:5px 0 0 15px. } /*----------------------right content--------------*/ . } . font-size:12px. float:left. float:left. color:#847676. font-weight:bold. } . color:#847676.cart_details{ width:115px.cart_title{ font-size:12px. border-top:1px #999999 dashed. padding:8px 0 0 0. font-weight:bold. display:block. padding:5px 0 0 5px. padding:10px 10px 10px 11px. height:84px.border_cart{ width:100px.

gif) no-repeat center top. background:url(images/square-blue-add.background:url(images/product_box_center.padding:0px. } . padding:0px.prod_box_big{ width:554px.gif) no-repeat center bottom. text-decoration:none. margin:3px 0 0 0.float:left. height:auto. } /*---------prod_box_big----------*/ . margin:0px.background:url(images/details_box_top.center_prod_box{ width:173px. } img.gif) repeat-y.float:left.gif) no-repeat center bottom.prod_details{ width:25px.height:10px.gif) no-repeat center top.gif) no-repeat left.height:12px. padding:0 0 0 20px.float:left. _margin:6px 0 0 35px. text-align:center. height:31px.float:left. margin:0px. float:left.gif) no-repeat center.background:url(images/product_box_top.height:12px. } a. margin:7px 0 0 38px. float:left. padding:10px 10px 10px 15px. margin:0px. background:url(images/products_details_bg. color:#0fa0dd. display:block. padding:0px.background:url(images/details_box_bottom.background:url(images/product_box_bottom. margin:0px. } .height: auto. float:left.bottom_prod_box_big{ width:554px.top_prod_box_big{ width:554px. } . margin:0px. padding:6px 0 0 6px. } .padding:0px.float:left. } .center_prod_box_big{ 29 .height:12px.bottom_prod_box{ width:173px.padding:0px.prod_details_tab{ width:173px.left_bt{ float:left.width:173px. } .

product_title_big{ color:#ea2222. float:left. height:27px. } . line-height:18px. font-weight:bold. padding:5px 0 5px 10px. } a. float:left. } span. font-size:16px. margin:3px 0 0 0. } .reduce{ color:#999999. } .padding:0px. display:block. } span.addtocart{ width:76px. border:1px #DFD1D1 solid. padding:5px 0 5px 0.float:left.height: auto. } . float:left.specifications{ font-size:12px. font-size:14px. padding:0 0 0 15px.background:url(images/details_box_center. } . font-weight:bold. text-decoration:line-through.gif) repeat-y.width:554px.details_big_box{ width:345px. } .gif) no-repeat left. 30 .price{ color:#ea2222. text-align:left. } .thumbs{ padding:8px 5px 8px 5px.thumbs a{ padding:3px. text-align:center. margin:0px.prod_price_big{ padding:5px 0 5px 0. background:url(images/addtocart.product_img_big{ width:170px.

background:url(images/compare. color:#1c4a52. text-align:right.contact{ width:75px. color:#999999. height:27px. padding:0 0 0 33px.compare{ width:76px. } textarea. float:left.gif) no-repeat left. display:block. text-decoration:none. } input.contact_input{ width:253px. } span. font-size:12px. height:18px. color:#a53d17. line-height:27px. padding:0px 0 0 75px. clear:both. color:#1c4a52. background-color:#fff. color: #333333. float:left.contact_form{ width:355px.form_row{ width:335px. float:left. } /*---------------contact_form------------------*/ . _padding:5px 0 5px 0. text-decoration:none. border:1px #DFDFDF solid. padding:10px 0 10px 0.padding:0 0 0 33px. } . float:left.contact_textarea{ 31 . margin:0 0 0 10px. line-height:27px. padding:4px 5px 0 0.blue{ color:#5F9FAB. } a. } label.

} . Helvetica. } . sans-serif. float:left.contact{ width:99px. padding:15px 30px 0 0. } /*--------------footer----------------*/ . width:300px. font-size:12px.right_footer a{ padding:0 0 0 7px. } . color: #666666. text-align:center. width:200px. margin:0 0 0 10px. clear:both. background-color:#fff. line-height:27px. height:65px. text-decoration:none.center_footer{ float:left. background:url(images/footer_bg. 32 . text-decoration:none. font-family:Arial. } a. } . padding:5px 0 0 10px.right_footer a:hover{ text-decoration:underline. border:1px #DFDFDF solid.left_footer{ float:left.gif) repeat-x top. background:url(images/contact_bt.width:253px. color:#1c4a52. float:right.gif) no-repeat left. } . display:block.right_footer{ float:right. color: #999999. height:27px. height:50px. padding:0 0 0 10px.footer{ width:1000px.

padding:10px 0 0 60px. } BACKEND (ADMIN AREA) Username : admin Password : admin123 33 .color:#666666.

SCREENSHOTS LOGIN PAGE 34 .

ADD CATEGORY 35 .

ADD PRODUCT 36 .

SEND NEWSLETTER 37 .

session_start().".. $password = stripslashes($password).php <?php include(". $password=$_POST['password'].CODING index. include("password.php <?php $username=$_POST['username']. $username = stripslashes($username). if($_REQUEST['page']=='') { $page='home'./config.php"). if(($username==$uname)&&($password==$upass)) { $_SESSION['login'] = 'true'. } include($page.php"). } else { if($_SESSION['login']=='true') 38 . } else { $page=$_REQUEST['page']. $username = mysql_real_escape_string($username). $password = mysql_real_escape_string($password).php"). ?> login.php"). include("login.

php?page=aboutus" method="post"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="30" width="10%" style="border:1px solid #CCCCCC. } } ?> loginform. 39 .">ABOUT US</td> <td height="30" width="40%" style="border:1px solid #CCCCCC.php" name="login" method="post"> USERNAME : <input type="text" value="" name="username" /><br /><br /> PASSWORD : <input type="password" value="" name="password" /><br /><br /> <input type="submit" value="Log In" /> </form> aboutus. } ?> <form name="bulkmail" action="index. font-weight:bold.php <?php include("header. border:1px solid" action="index. text-align:left. echo $reslt['value']."> <textarea name="message" cols="60" rows="24"> <?php $reslt = mysql_fetch_array(mysql_query("select * from settings where name='aboutus'")).php"). echo "<font color=red><b>Updated Successfully</b></font><br /><br />"." width="80%" valign="top"> <?php if(isset($_REQUEST['update'])) { $message = addslashes($_REQUEST['message']). text-align:center.{ } else { header("Location: loginform. mysql_query("update settings set value='$message' where name='aboutus'"). padding:10px. font-weight:bold. ?> <td style="padding-top:20px.php <form style="padding:160px.php").

guarantee. $category=$_REQUEST['category'].'$guarantee'.availability.'$availability'. echo "<font color=red><b>Product Added Successfully</b></font><br /><br />". $delivery=$_REQUEST['delivery']. fontweight:bold. $shipping_cost=$_REQUEST['shipping_cost'].delivery. $description=$_REQUEST['description'].'$shipping_ cost'.?> </textarea> </td> </tr> <tr> <td colspan="2" height="30" width="10%" style="border:1px solid #CCCCCC. ?> <td width="100%" valign="top" style="padding:20px"> <?php if(isset($_REQUEST['submit'])) { $name=$_REQUEST['name'].'$image'.php <?php include("header.name. $extended_name=$_REQUEST['extended_name']. $image=$_REQUEST['image'].original_price.php").'$name'.shipping_cost. $availability=$_REQUEST['availability'].'$extended_name'.image. padding:10px"><input type="submit" value="Update" name="update" /></td> </tr> </table> </form> </td> </tr> </table> </body> </html> addproduct.dis counted_price. mysql_query("insert into products (cat_id.name_extended.description) values($category.'$delivery'.'$description')"). $guarantee=$_REQUEST['guarantee'].$original_price. $original_price=$_REQUEST['original_price'].$discounted_price. $discounted_price=$_REQUEST['discounted_price']. text-align:center. } ?> 40 .

"'>".</td> <td height="30"><input type="text" name="availability" /></td> </tr> <tr> <td height="30">Guarantee</td> <td height="30">&nbsp.$catdata['name'].<form name="addproduct" action="" method="get"><input type="hidden" name="page" value="addproduct" /><input type="hidden" name="domain" value="<?=$domain ?>" /> <table width="100%" border="1" cellpadding="1" cellspacing="5"> <tr> <td width="89" height="30">Category</td> <td width="9" height="30">&nbsp.</td> <td height="30"><select name="category"> <?php $data = mysql_query("select * from categories").</td> <td height="30"><input type="text" name="extended_name" /></td> </tr> <tr> <td height="30">Availability</td> <td height="30">&nbsp.</td> <td height="30"><input type="text" name="shipping_cost" /></td> </tr> <tr> 41 .</td> <td height="30"><input type="text" name="delivery" /></td> </tr> <tr> <td height="30">Shipping Cost</td> <td height="30">&nbsp. while($catdata = mysql_fetch_array($data)) { echo "<option value='"."</option>". } ?> </select> </td> </tr> <tr> <td width="89" height="30">Name</td> <td width="9" height="30">&nbsp.$catdata['id'].</td> <td height="30"><input type="text" name="guarantee" /></td> </tr> <tr> <td height="30">Delivery</td> <td height="30">&nbsp.</td> <td height="30"><input type="text" name="name" /></td> </tr> <tr> <td height="30">Extended Name</td> <td height="30">&nbsp.

?> <td style="padding-top:20px.php").</td> <td height="30"><input type="submit" name="submit" value="Submit" /></td> </tr> </table> </form> </td> </tr> </table> </body> </html> emailsubscribers." width="80%" valign="top"> <?php if(isset($_REQUEST['sendemail'])) { $message = $_REQUEST['message'].</td> <td height="30"><input type="text" name="original_price" /></td> </tr> <tr> <td height="30">Discounted Price</td> <td height="30">&nbsp.</td> <td height="30"><input type="text" name="discounted_price" /></td> </tr> <tr> <td height="30">Image</td> <td height="30">&nbsp. 42 .</td> <td height="30">&nbsp.php <?php include("header.<td height="30">Original Price</td> <td height="30">&nbsp.</td> <td height="30"><textarea name="description" cols="40" rows="6"></textarea></td> </tr> <tr> <td height="30">&nbsp.</td> <td height="30"><input type="text" name="image" /></td> </tr> <tr> <td height="30">Description</td> <td height="30">&nbsp.

php?page=emailsubscribers" method="post"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="30" width="10%" style="border:1px solid #CCCCCC.$subject = $_REQUEST['subject']. text-align:center. padding:10px"><input type="submit" value="Send Email" name="sendemail" /></td> </tr> </table> </form> </td> 43 .= 'From:info@thewebstats. font-weight:bold. font-weight:bold. text-align:left. while($getsubsr = mysql_fetch_array($getsubs)) { $to=$getsubsr['email'].com'. $headers . $headers . } } } ?> <form name="bulkmail" action="index. fontweight:bold. text-align:center. $to.= 'Content-type: text/html.">SUBJECT</td> <td height="30" width="40%" style="border:1px solid #CCCCCC.">MESSAGE</td> <td height="30" width="40%" style="border:1px solid #CCCCCC. font-weight:bold. if(mail($to.= 'Return-Path:info@thewebstats.$subject.= 'Reply-To:info@thewebstats."> <textarea name="message" cols="60" rows="24"></textarea> </td> </tr> <tr> <td colspan="2" height="30" width="10%" style="border:1px solid #CCCCCC. text-align:center. text-align:left. $headers = 'MIME-Version: 1. "\r\n". "\r\n"."> <input type="text" size="79" name="subject" /></td> </tr> <tr> <td height="30" width="10%" style="border:1px solid #CCCCCC.$message. padding:10px.$headers)) { echo "Your mail has been sent sucessfully to ". $headers . $headers . "\r\n". font-weight:bold.0' . "\r\n".com'. "\r\n". charset=iso-8859-1' . $getsubs = mysql_query("select * from subscribers").com' . padding:10px.

?></p> </td> </tr> 44 . $categories = mysql_num_rows(mysql_query("select id from categories")).php <html xmlns="http://www.style1 { font-size: 36px. } --> </style> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%" colspan="3" bgcolor="#CCCCCC"><span class="style1">Admin Control Panel</span></td> </tr> <tr> <td width="15%" height="548" valign="top"> <?php include("leftpanel. $hits = mysql_fetch_array(mysql_query("select * from settings where name='hits'")).org/1999/xhtml"> <head> <title>Admin Control Panel</title> <link type="text/css" href="style. ?></p> <p>Total Categories : <?php echo $categories.php <?php include("header.php"). ?></p> <p>Total Hits : <?php echo $hits['value']. ?> <?php $products = mysql_num_rows(mysql_query("select id from products")).w3. ?> <td width="84%" valign="top"> <p>&nbsp.</td> home. font-weight: bold.css" rel="stylesheet" /> <style type="text/css"> <!-.</tr> </table> </body> </html> header.php"). ?> </td> <td width="1%">&nbsp.</p> <p>Total Products : <?php echo $products.

$_SESSION['login'] = 'false'. 45 .php">Logout</a></td> </tr> </table> logout.</table> </body> </html> leftpanel.php <table width="200" border="1" cellpadding="5" cellspacing="0"> <tr> <td><a href="?page=home">Statistics</a></td> </tr> <tr> <td><a href="?page=addcategories">Add a Category</a></td> </tr> <tr> <td><a href="?page=addproduct">Add a Product</a></td> </tr> <tr> <td><a href="?page=subscribers">Subscribers</a></td> </tr> <tr> <td><a href="?page=emailsubscribers">Send Newsletters</a></td> </tr> <tr height="10"> <td></td> </tr> <tr bgcolor="#CCCCCC"> <td>Edit Pages</td> </tr> <tr> <td><a href="?page=contactus">Contact Us Page</a></td> </tr> <tr> <td><a href="?page=aboutus">About Us Page</a></td> </tr> <tr bgcolor="#CCCCCC"> <td><a href="logout.php <? session_start().

} td a:hover { text-decoration:none. Arial. font-weight:bold. Arial. ?> <td width="100%" valign="top" style="padding:20px. font-size:12px. color:#990000. Helvetica."> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="30" width="10%" style="border:1px solid #CCCCCC. padding:4px.php"). text-transform:uppercase. text-transform:uppercase. background-color:#CCCCCC. sans-serif. font-family:Geneva. Arial. } subscribers.">ID</td> 46 . sans-serif. $upass = "admin123".php <?php $uname = "admin". text-align:center. ?> style. font-family:Geneva. color:#FF0000.php <?php include("header. Helvetica. sans-serif. ?> password. Helvetica. } td a { text-decoration:none.css td { border:0px solid #CCCCCC.session_destroy(). text-align:left. font-family:Geneva.

text-align:center. font-weight:bold."><?php echo $result['id'].">EMAIL</td> <td height="30" width="25%" style="border:1px solid #CCCCCC."'>PREVIOUS</a>". text-align:center.$page. text-align:center. ?></td> </tr> <?php } ?> <tr> <td height="30" colspan="2">&nbsp. $start=5*$_REQUEST['pag']."><?php echo $result['email']. 5")."><?php echo $result['verified']. font-weight:bold.<td height="30" width="40%" style="border:1px solid #CCCCCC.">VERIFIED</td> <td height="30" width="25%" style="border:1px solid #CCCCCC. echo "<a href='?page=subscribers&pag=". text-align:center."><?php if($start==0) { } else { $page = $page-1. font-weight:bold. while($result=mysql_fetch_array($fetcch)) { ?> <tr> <td height="30" style="border:1px solid #CCCCCC. text-align:center. ?></td> <td height="30" style="border:1px solid #CCCCCC.">SUBSCRIBE</td> </tr> <?php $page = 0.</td> </tr> <tr> <td height="30" colspan="2" style="border:1px solid #CCCCCC. $start=0. ?></td> <td height="30" style="border:1px solid #CCCCCC. } $fetcch=mysql_query("select * from subscribers limit $start. text-align:center. if(isset($_REQUEST['pag'])) { $page = $_REQUEST['pag']."><?php echo $result['subscribe']. text-align:center. font-weight:bold. } 47 . text-align:center. ?></td> <td height="30" style="border:1px solid #CCCCCC. $page1 = $_REQUEST['pag']. $page1 = 0.

php"). } ?>&nbsp. mysql_query("insert into categories (name) values('$category')"). </td> <td height="30" colspan="2" style="border:1px solid #CCCCCC. text-align:center.</td> <td height="30"><input type="text" name="name" /></td> </tr> <tr> 48 .$page1. </td> </tr> </table> </td> </tr> </table> </body> </html> addcategories. } ?> <form name="addcategories" action="" method="get"><input type="hidden" name="page" value="addcategories" /><input type="hidden" name="domain" value="<?=$domain ?>" /> <table width="100%" border="1" cellpadding="1" cellspacing="5"> <tr> <td width="89" height="30">Category Name</td> <td width="9" height="30">&nbsp. if(mysql_num_rows(mysql_query("select * from subscribers limit $start. font-weight:bold. echo "<a href='?page=subscribers&pag="."> <?php $start=$start+5. 5"))) { $page1 = $page1+1.php <?php include("header. echo "<font color=red><b>Product Added Successfully</b></font><br /><br />"."'>NEXT</a>". ?> <td width="100%" valign="top" style="padding:20px"> <?php if(isset($_REQUEST['submit'])) { $category=$_REQUEST['name'].?>&nbsp.

<td height="30">&nbsp.</td> <td height="30"><input type="submit" name="submit" value="Add Category" /></td> </tr> </table> </form> </td> </tr> </table> </body> </html> DATABASE STRUCTURE Categories Table 49 .</td> <td height="30">&nbsp.

Products Table 50 .

Finally. different level of testing is used. The purpose is to exercise different part of the module code to detect coding errors. the output is a document that is usually textual and non-executable. The starting point of testing is a Unit Testing. In this a module is tested separately and is often performed by the coder himself simultaneously along with the coding of the module.TESTING Testing is the major quality control measure used during software development. During integration of the modules. After the coding phase computer program are can be executed for testing purposes. on the real-life data of the client. Consequently. system testing is performed. Thus the goal of testing is to uncover requirement. which are the integrated to eventually form the entire system. the operation of the system. After this the modules are gradually integrated to subsystem. Here the system is tested against the system requirements to see if all the requirements are met and if the system performs as specified by the requirements. integration testing is performed to detect design error by focusing on the testing the interconnection between the modules. This implies testing not only has to uncover error introduced during coding. but also error introduced during the previous phases. After the system is put together. design and coding error in the programs. During requirement analysis & design. acceptance testing is performed to demonstrate to the client. 51 . Its basic function is to detect error in the software.

which list all the different test cases. In each phase we checked line-by-line coding and after then we prepared a dry run for each phase to check the logical errors. 52 . Then the different tests units. During the testing of the unit. allocate the resources. and specifies guidelines for testing. It requires proper planning of the overall testing process. different units to be tested. The final output of the testing phase is the test report and the error reports ( on of each unit tested). When we felt that this software has no error then we got it tested form students. But any problem is shaped in the system. and the manner in which the modules will be integrated together. Each test report contains the set of test cases and the result of executing the code with these test cases. the specified test cases are executed and the actual result is compared with the expected output. we try to remove it. together with the expected outputs. We have used two ways for system testing. The error report describes the error encountered and the action taken to remove the errors. a test case specification document is produced.Testing is an extremely critical and time-consuming activity. The test plan specifies conditions that should be tested. We tested each phase one by one. It does not mean that we have removed all the problems of the system. Frequently the testing process starts with a test plan that identifies all the test related activities that must be performed and specifies the schedule. In the first way we myself tested the system.

com 53 .php.net.com.google. www. www.html.BIBLIOGRAPHY NAME OF BOOK • • • AUTHOR Beginning PHP and MySQL E-Commerce Cristian Darie PHP 5 CMS Framework Development WEBSITES Martin Brampton www.