You are on page 1of 61

CHAPTER-4

SYSTEM IMPLEMENTATION , TESTING
4.1 SYSTEM IMPLEMENTATION
CODING:
4.1.1 Index.php
<?phpsession_start(); ?>
<html>
<head>
<?php
include("include/head.inc.php");
?>
</head>
<body>
<div id="container">
<div id='cssmenu'>
<?php
include("include/menu.inc.php");
?>
</div>
<div id="logo-wrap">
<div id="logo">
<?php
include("include/logo.inc.php");
?>
</div>
<div id="header">
<div id="special_offers">
<!--flash image -->
</div>
</div><!-- end of header -->
<div id="content">
39

<div id="content_left">
<div class="content_left_section">
<!-- start sidebar -->
<div id="sidebar">
<?php
include("include/search.inc.php");
?>
</div>
<!-- end sidebar -->
</div></div>
</div>
<div id="content_right">
<div id="content_right1">
<div id="page">
<!-- start content -->
<div class="post">
<div class="login_box1">
<h1 class="title"><font color="black">Welcome to
<?php
if(isset($_SESSION['status']))
{
echo $_SESSION['unm'];
}
else
{
echo 'Bookstore';
}
?>
</h1>
<div class="entry">
<br>
<p>
The Book Den is a venture of WebTech Inc. <a href="developer.php"><font
color="purple">Laksh Pasricha</font></a> founded Webtech Inc. over a decade ago
40

and today it is a leading on-line marketplace solution for the consumer products and
business-to-business categories.
WebTech has operated primarily in the online book market and has successfully
transformed in an enterprise comprising of an Online Division, Wholesale Division
and Retail Division. WebTech has grown from a company of one man with a vision to
an enterprise poised to redefine the online marketplace for books, other consumer
products and beyond. WebTech is currently New in marketplace sellers but due to its
dynamic and proprietary pricing engine, fulfillment, distribution, inventory
assortment and depth, value pricing and management team It is growing
consistently.
</p><br>
<object width="550" height="400">
<!--<param name="movie" value="somefilename.swf">-->
<embed src="images/Hot.gif" width="550" height="400">
</embed>
</object>
<br><br>
<p>
The BookDen.com was started as an on-line bookseller for consumers in the INDIA.
Currently The BookDen.com, the INDIA website, operates in the consumer trade and
the mass-market book trade. The Book Den Books.com has positioned itself as a
leader in book assortment, inventory depth, fulfillment, distribution and value pricing.
It boasts over 1 million titles from leading publishers and distributors. Every title in
the TheBookworld Books.com assortment is priced utilizing The Book Den Books'
dynamic and proprietary pricing engine, which enables The Book Den Books.com to
aggressively discount prices while maintaining competitive gross margins.
</p>
</div></div></div>
<!-- end content -->
</div>
<!-- start footer -->
<div id="footer-wrap">
<?php
41

?> </div> </body> </html> 42 .php").inc.include("include/footer.

php").php : <?phpsession_start().inc. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu. ?> <html> <head> <?php include("include/head. ?> </div> <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.end of header --> <div id="content"> <div id="content_left"> <div class="content_left_section"> <!-.4.inc. ?> </div> <div id="header"> <div id="special_offers"> <!--flash image --> </div> </div><!-.2 Login.php").php").1.start sidebar --> <div id="sidebar"> 43 .inc.

44 .php"). } ?> </h1> <div class="entry"> <br> <p> The Book Den is a venture of WebTech Inc.end sidebar --> </div> </div> </div> <div id="content_right"> <div id="content_right1"> <div id="page"> <!-. } else { echo 'Bookstore'.start content --> <div class="post"> <div class="login_box1"> <h1 class="title"><font color="black">Welcome to <?php if(isset($_SESSION['status'])) { echo $_SESSION['unm']. over a decade ago and today it is a leading on-line marketplace solution for the consumer products and business-to-business categories.<?php include("include/search. ?> </div> <!-.inc. <a href="developer.php"><font color="purple">Laksh Pasricha </font></a> founded WebTech Inc.

distribution.com assortment is priced utilizing The Book Den Books' dynamic and proprietary pricing engine. Every title in the The Book world Books. the INDIA website. which enables The Book Den Books. distribution and value pricing.swf">--> <embed src="images/Hot. value pricing and management team It is growing consistently.start footer --> <div id="footer-wrap"> <?php 45 .com to aggressively discount prices while maintaining competitive gross margins. fulfillment.end content --> </div> <!-. fulfillment. </p> <br> <object width="550" height="400"> <!--<param name="movie" value="somefilename. inventory depth. operates in the consumer trade and the mass-market book trade. Currently The BookDen. other consumer products and beyond. inventory assortment and depth.WebTech has operated primarily in the online book market and has successfully transformed in an enterprise comprising of an Online Division. WebTech has grown from a company of one man with a vision to an enterprise poised to redefine the online marketplace for books. The Book Den Books. Wholesale Division and Retail Division. It boasts over 1 million titles from leading publishers and distributors.com was started as an on-line bookseller for consumers in the INDIA.gif" width="550" height="400"> </embed> </object> <br> <br> <p> The BookDen. </p> </div> </div> </div> <!-. WebTech is currently New in marketplace sellers but due to its dynamic and proprietary pricing engine.com has positioned itself as a leader in book assortment.com.

inc. ?> </div> </body> </html> 46 .php").include("include/footer.

inc. ?> </div> <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.inc.end of header --> <div id="content"> <div id="content_left"> <div class="content_left_section"> <!-.php").3 Register.inc. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu. ?> </div> <div id="header"> <div id="special_offers"> <!--flash image --> </div> </div><!-.php").inc.php: <?phpsession_start().4.php"). 47 . ?> <html> <head> <?php include("include/head.start sidebar --> <div id="sidebar"> <?php include("include/search.php").1.

&nbsp.</td> <td><input type='text' size="70" maxlength="30" name='fnm'></td> 48 .&nbsp. } ?> <table> <tr> <td><b><font color="black"> &nbsp.&nbs p.&nbsp. :</b> &nbsp. echo '<br><br>'.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</font>'.&nbsp.&nbsp.&nbsp.&nbsp. echo '<br><br>'.$_GET['error'].&nbsp.&nbsp.&nbsp.&nbsp.&nbsp. } if(isset($_GET['ok'])) { echo '<font color="blue">You are successfully Registered.&nbsp.&nbsp.&nbsp.end sidebar --> <div id="content_right"> <form action="process_register.'</font>'.&nbsp..&nbsp.&nbsp.&nbsp. Full Name &nbsp.php" method="POST"> <h1 class="title" align="center"><font color="black">Welcome to Registeration</h1> <div class="entry"> <?php if(isset($_GET['error'])) { echo '<font color="red">'.&nbsp.&nbsp.&nbsp.&nbsp.?> </div> <!-. &nbsp.&nbsp.&nbsp.

&nbsp.</td> </tr> <tr><td>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr><td>&nbsp. :</b>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp. :</b>&nbsp.&nbsp.&nbsp.&nbs p.&nbsp.&nbsp.&nbsp. Confirm Password &nbsp.&nbsp.&nbsp. :</b>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b><font color="black"> &nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b> <font color="black"> &nbsp.&nbsp.&nbsp. &nbsp.&nbsp.&nbsp.&nbsp. </td> <td><input type='text' size="70" maxlength="30" name='unm'></td> <td>&nbsp.&nbsp.&nbsp.&nbsp. &nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b><font color="black"> &nbsp.&nbsp.&nbsp. User Name &nbsp.</td> <td><input type='password' name='pwd' size="70"></td> </tr> <tr><td>&nbsp.&nbsp. Password &nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</td> 49 .

:</b>&nbsp.&nbsp.&nbsp.&nbsp.<td><input type='password' name='cpwd' size="70"></td> </tr> <tr><td>&nbsp.&nbsp.&nbsp.&nbsp. Gender &nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b><font color="black"> &nbsp.&nbsp.&nbsp.&nbsp.&nbsp. :</b>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b><font color="black"> &nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp. Contact No 50 .&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b><font color="black"> &nbsp.&nbsp.&nbsp. E-mail Address &nbsp.&nbsp.&nbsp.&nbs p.&n bsp.&nbsp.&nbsp.&nbsp.&nbs p.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</td> <td><input type='text' name='mail' size="70"></td> </tr> <tr><td>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</td> <td> <input type="radio" value="Male" name="gender" id='m'> <font color="black"> Male <input type="radio" value="Female" name="gender" id='f'> <font color="black">Female <input type="radio" value="Other" name="gender" id='o'> <font color="black">Other</td> </tr> <tr><td>&nbsp.

City &nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbs p.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&n bsp.&nbsp.</tr> 51 ." name="city"> <option>Select City</option> <option>Ahmedabad <option>Baroda <option>Jamnagar <option>New Delh <option>punjab <option>Rajkot <option>Porbandar <option>Anand <option>Surat <option>Surendranagar <option>Jamnagar <option>Junagadh <option>Amreli <option>Bhavnagar <option>Mehsana </select> </tr> <tr><td>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</td> <td><input type='text' name='contact' size="70"></td> </tr> <tr><td>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp. </b>&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp. :</b>&nbsp.&nbsp.&nbsp.</td> <td> <select style="width: 445px.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.</tr> <tr> <td><b><font color="black"> &nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbsp.&nbs p.

start footer --> <div id="footer5-wrap"> <?php include("include/footer.inc.php"). ?> </div> </body> </html> 52 .<tr> <td colspan='2' align='center'> <input type='submit' value=" OK "> </td> </tr> </form> </table> </div></div></div></div></div></div></div></div> <!-.

$totalres=mysql_query($totalq.1.$link) or die("Can't Connect to Database..").").php'><span>Home</span></a></li> <li><a href='aboutus.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id='cssmenu'> <ul> <li><a href='index. $page_per_page=6. $page_total_rec=$totalrow['total'].4 Booklist. $link=mysql_connect("localhost".php <?phpsession_start().. mysql_select_db("shop".. $cat=$_GET['subcatid'].$link) or die("Can't Execute Query."root"..")."")or die("Can't Connect. $page_total_page=ceil($page_total_rec/$page_per_page). $totalq="select count(*) \"total\" from book where b_subcat='$cat'". } ?> <html> <head> <title>Book Store</title> <link href="style2. $totalrow=mysql_fetch_assoc($totalres).. } else { $page_current_page=$_GET['page']. if(!isset($_GET['page'])) { $page_current_page=1.4.php'><span>About</span></a></li> <li class='last'><a href='contact.php'><span>Contact</span></a></li> 53 ..

} ?> </ul> </div> <div id="header"> <div id="special_offers"> <!--flash image --> </div> </div><!-. } ?><br><br><br> <ul> <li> <h1>Categories</h1> <ul> <!-<li><a href="#">Economics</a></li> 54 .end of header --> <div id="content"> <div id="content_left"> <div class="content_left_section"> <div id="sidebar"> <?php if(isset($_SESSION['status'])) { echo '<h2>Hello : '.'</h2>'.<li><a href='viewcart.$_SESSION['unm'].php'><span>View Cart</span></a></li> <?php if(isset($_SESSION['status'])) { echo '<li><a href="logout. } else { echo '<li><a href="login.php">Login</a></li>'.php">Logout</a></li>'.

$row["cat_nm"]...? ></b></td> 55 .php?cat='.'</a></li>'. $query="select * from category ".'&catnm='.. $res=mysql_query($query. mysql_select_db("shop". while($row=mysql_fetch_assoc($res)) { echo'<li><a href="subcat.<li><a href="#">Fiction</a></li> <li><a href="#">Forestry &WildLife</a></li> <li><a href="#">Health & Physics</a></li> <li><a href="#">Historical</a></li> <li><a href="#">Social</a></li> <li><a href="#">Sports & Physical Education</a></li> <li><a href="#">Terrorism</a></li> <li><a href="#">Tourism</a></li> <li><a href="#">Tracking </a></li> <li><a href="#">Yoga</a></li> --> <?php $link=mysql_connect("localhost". //pass catid not catnm } ?><br> </ul> </li> </ul> </div></div> </div> <div id="content_right"> <div class="login_box0"> <font color="black"> <table align="center"> <tdalign="center"><b><font color="black"><?php echo $_GET['subcatnm'].'">'.")..$link)."")or die("Can't Connect. $row["cat_nm"].$link) or die("Can't Connect to Database.").$row['cat_id']."root".

.".php?id='. $res=mysql_query($query.$link) or die("Can't Execute Query.'</a> </td>'. $query="select *from book where b_subcat='$cat' LIMIT ".". echo '<td valign="top" width="20%" align="center"> <a href="detail.start footer --> <div id="footer-wrap"> <?php include("include/footer.")..'" width="80" height="100"> <br>'.</tr></table></div> <div class="login_box2"> <div class="login_box3"> <table width="100%" cellspacing="10" border=1 bgcolor="black"> <?php $k=($page_current_page-1)*$page_per_page. while($row=mysql_fetch_assoc($res)) { echo '<tr>'.inc. echo '</tr>'. $count=0.$row['b_id'].$_GET['subcatnm'].$k .$row['b_nm']. } ?> </table> </div> </div> </div> </div> </div> <!-.$row['b_img'].php").'"> <imgsrc="'.'&cat='.end content --> <!-. ?> </div> </body> 56 .$page_per_page.

</html> 57 .

js" type="text/javascript"></script> <script type="text/javascript" src="js/java. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu. $res=mysql_query($q.js"></script> <?php include("include/head.").js" type="text/javascript"></script> <script src="js/scriptaculous.").$link) or die("Can't Connect to Database."")or die("Can't Connect. ?> <html> <head> <link rel="stylesheet" href="lightbox.js?load=effects" type="text/javascript"></script> <script src="js/lightbox. ?> </div> <div id="logo-wrap"> <div id="logo"> <?php 58 ..$link) or die("Can't Execute Query.php").")..4. mysql_select_db("shop".inc... $id=$_GET['id']. $row=mysql_fetch_assoc($res).inc.. $link=mysql_connect("localhost".css" type="text/css" media="screen" /> <script src="js/prototype. $q="select * from book where b_id=$id".1.php <?phpsession_start().5 Detail.php")."root".

php").end of header --> <div id="content"> <div id="content_right"> <div id="content_right1"> <div id="page"> <!-.start content --> <div class="post"> <div class="login_box1"> <h1 class="title"><font color="black"><?php echo $row['b_nm'].include("include/logo.inc.?></h1> <div class="entry"> <?php echo ' <hr color="purple"> Item Details <hr color="purple"> <table bgcolor="#black"> <tr> <td width="10%" rowspan="2"> <imgsrc="'.end header --><div id="header"> <div id="special_offers"> <!--flash image --> </div> </div><!-. ?> </div> </div> <!-.'" width="140" height="170"> </td> </tr> 59 .$row['b_img'].

$row['b_page'].'</td> </tr> <tr> <td align="right"><font color="black">Publisher </td> <td>: </td> <td align="left"><font color="black">'.$row['b_edition'].$row['b_nm'].$row['b_price'].'</td> </tr> </table> 60 .$row['b_isbn'].'</td> </tr> <tr> <td align="right"><font color="black"> Edition</td> <td>: </td> <td align="left"><font color="black">'.$row['b_publisher'].'</td> </tr> <tr> <td align="right"><font color="black">PAGES</td> <td>: </td> <td align="left"><font color="black">'.'</td> </tr> <tr> <td align="right"><font color="black">ISBN:</td> <td>: </td> <td align="left"><font color="black">'.<tr> <td width="50%" height="80%"> <table border="0" width="100%" height="100%"> <trvalign="top"> <td align="right" width="10%"><font color="black">NAME</td> <td width="2%"> :</td> <td align="left"><font color="black">'.'</td> </tr> <tr> <td align="right"><font color="black">PRICE</td> <td>: </td> <td align="left"><font color="black">'.

$row['b_price'].'&rate='.'"> <imgsrc="images/addcart.$row['b_nm']. if(isset($_SESSION['status'])) { echo '<td> <ahref="process_cart.' <tr><td colspan=1><hr color="purple"></td></tr> <table border="0" width="100%"> <tr align="center">'.jpg"> </a></td>'.</td> </tr> </table> <table border="0" width="100%"> <tr> <td><hr color="purple"></td> </tr> <tr align="center" bgcolor="#EEE9F3"> <td><font color="black">DESCRIPTION</td> </tr> <tr> <td><hr color="purple"></td> </tr> </table> '.'&cat='. } else { echo '<td> <button onclick="myFunction()"> <imgsrc="images/addcart.$row['b_desc'].jpg"> </button> 61 .php?nm='.$_GET['cat'].

} echo '</tr></table>'.start footer --> <div id="footer4-wrap"> <?php include("include/footer.end sidebar --> </div></div> </div> <!-.inc.php").start sidebar --> <div id="sidebar"> <?php include("include/search.<script> function myFunction() { alert("Please Login!!!!").end page --> <!-. ?> </div> </body> </html> 62 . } </script> '.end content --> <div id="content"> <div id="content_left"> <div class="content_left_section"> <!-. ?> </div> </div> </div></div></div></div></div> <!-.php").inc. ?> </div> <!-.

php <?phpsession_start().1.php").php").php").inc. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu.end of header --> <div id="content"> <div id="content_right"> <div id="content_right1"> <div id="page"> <!-. ?> </div> <div id="header"> <div id="special_offers"> <!--flash image --> </div> </div><!-.6 Viewcart.?> <html> <head> <?php include("include/head.inc.start content --> 63 .inc. ?> </div> <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.4.

php" method="POST"> <h1 class="title"><font color="black">Viewcart</h1> <div class="entry"> <pre><?php // print_r($_SESSION).print()" class="btnbtn-info"> <imgsrc="images/print. $i = 1. ?></pre> <table width="100%" border="0" bgcolor="black"> <tr><td align="right"> <a href="" onclick="window. 64 .<div class="post"> <form action="process_cart.jpg" width="40"> <font color="white">PRINT&nbsp&nbsp&nbsp&nbsp&nbsp </a> </tr><table width="100%" border="0"> <tr> <Td><b><font color="black">No <td><b><font color="black">Category <td><b><font color="black">Product <td><b><font color="black">Qty <td><b><font color="black">Rate <td><b><font color="black">Price <td><b><font color="black">Delete </tr> <tr><td colspan="7"><hr style="border:1px Solid #a1a1a1."></tr> <?php $tot = 0.

?></h4></td> </tr> <tr><td colspan="7"><hr style="border:1px Solid #a1a1a1."></tr> 65 .$x['rate'].' <td><a href="process_cart.$x['cat'].'"><font color="black">Delete</a> </tr> '.' <td><font color="black">'.' <td><font color="black">'.$i.'"> <td><font color="black">'.($x['qty']*$x['rate']).'" name="'.<?php echo $tot. $tot = $tot + ($x['qty']*$x['rate']).$x['nm']. } } ?> <tr><td colspan="7"><hr style="border:1px Solid #a1a1a1.$id.' <td><input type="text" size="2" value="'.' <td><font color="black">'. $i++.$x['qty'].if(isset($_SESSION['cart'])) { foreach($_SESSION['cart'] as $id=>$x) { echo ' <tr> <Td><font color="black">'."></tr> <tr> <td colspan="6" align="right"> <h4><font color="black">Total:</h4> </td> <td><h4><font color="black">Rs.php?id='.$id.

?> <input type="submit" value=" Re-Calculate " > <a href="payment.start footer --> <div id="footer4-wrap"> <?php include("include/footer. ?> 66 .start sidebar --> <div id="sidebar"> <?php include("include/search.start footer --> <!-.<Br> </table> <br><br> <?php include("include/nbsp.inc.php").end page --> <!-.end sidebar --> </div></div> </div> <!-.inc.php"> <input type="button" value=" NEXT " > </a> </form> </div></div></div></div></div></div> <div id="content"> <div id="content_left"> <div class="content_left_section"> <!-.inc. ?> </div> <!-.php").php").

</div> </body> </html> 67 .

php"). ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu.end of header --> <div id="content"> <div id="content_left"> <div class="content_left_section"> <!-.inc.7 contactus.php").inc.inc.start sidebar --> 68 .php").1.4. ?> </div> <div id="header"> <div id="special_offers"> <!--flash image --> </div> </div><!-.php <?phpsession_start(). ?> <html> <head> <?php include("include/head. ?> </div> <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.

inc.php"). ?> </div> <!-.end sidebar --> </div></div> </div> <div id="content_right"> <div id="content_right1"> <form action="process_contact.<div id="sidebar"> <?php include("include/search.php" method="POST"> <h1 class="title" align="center"><font color="black">Contact us</h1> <div class="entry" > <br><font color="black"> <b> &nbsp&nbsp&nbsp&nbsp Name : <br> &nbsp&nbsp&nbsp&nbsp <input type='text' name='nm' size=15> <br><br><br> &nbsp&nbsp&nbsp&nbsp E-mail ID:<br>&nbsp&nbsp&nbsp&nbsp <input type='text' name='email' size=35> <br><br><br> &nbsp&nbsp&nbsp&nbsp Query:<br> &nbsp&nbsp&nbsp&nbsp <textarea cols="40" rows="10" name='query' ></textarea> <br><br><br> 69 .

&nbsp&nbsp&nbsp&nbsp <input type='submit' name='btn' value=' OK ' > </form> </div> </div></div></div></div> <!-.end content --> <!-.inc.php"). ?> </div> </body> </html> 70 .start footer --> <div id="footer3-wrap"> <?php include("include/footer.

1../index.inc. if(!(isset($_SESSION['status'])&& $_SESSION['unm']=="admin")) { header("location:.php").php <?phpsession_start().php").ADMIN 4.php"). ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu. ?> </div></div> --></div></div> 71 .inc. } ?> <html> <head> <?php include("include/head.8 index. ?> </div> <div id="header"> <div id="special_offers"> <!--flash image <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.php").inc.

jpg" width="160" height="160"> </td> <td> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs p <imgsrc="images/logo/contactus.png" width="160" height="160"> </td> <td> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs p <imgsrc="images/logo/books.start page --> <div id="content_right"> <form> <h1 class="title" align="center"><font color="black"> Welcome to Admin ...</h1> <div class="entry"> <table> <tr> <td> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs p <imgsrc="images/logo/category.start sidebar --> </div></div></div> <!-.jpg" width="160" height="160"> </td> <td> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs p 72 ..<div id="content"> <!-..

inc.php"> <input type="button" value="Contact"> </a> <td><a href="user.php"> <input type="button" name="t1" value="Categories"> </a> <td><a href="addbook.end content --> <!-.<imgsrc="images/logo/user.php"> <input type="button" value="Users"> </a></tr></table> </div></div></div> <!-.php").start footer --> <div id="footer-wrap"> <?php include("include/footer.php"> <input type="button" value="Books"> </a> <td><a href="contact. ?> </div> <!-.end footer --> </body> </html> 73 .jpg" width="160" height="160"> </tr> <tr><td> <a href="category.

1.inc. ?> </div></div> --></div></div> <div id="content"> 74 .php <?phpsession_start().inc. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu.php").4.inc.. if(!(isset($_SESSION['status'])&& $_SESSION['unm']=="admin")) { header("location:.php"). ?> </div> <div id="header"> <div id="special_offers"> <!--flash image <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.php")./index. } ?> <html> <head> <?php include("include/head.9 Category.php").

end content --> <!-.gif" width="160" height="160"> </td></tr><tr> <td> <a href="addbookcat.php").gif" width="160" height="160"> </td><td> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs <imgsrc="images/logo/delbook.start sidebar --> </div></div></div> <!-.inc.php"> <input type="button" value="Del Category"> </a> </tr></table></div></div></div> <!-.<!-.php"> <input type="button" name="t4" value="Add category"> </a> <td> <a href="delbook.start footer --> <div id="footer-wrap"> <?php include("include/footer. 75 .start page --> <div id="content_right"> <form> <h1 class="title" align="center"><font color="black"> Categories</h1> <div class="entry"> <table> <tr><td> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs <imgsrc="images/logo/addbook.

?> </div> <!-.end footer --> </body> </html> 76 .

4.1.10 Addbook.php
<?phpsession_start();?>
<html>
<head>
<?php
include("include/head.inc.php");
?>
</head>
<body>
<div id="container">
<div id='cssmenu'>
<?php
include("include/menu.inc.php");
?>
</div>
<div id="header">
<div id="special_offers">
<!--flash image
<div id="logo-wrap">
<div id="logo">
<?php
include("include/logo.inc.php");
?>
</div></div> --></div></div>
<div id="content">
<!-- start sidebar -->
</div></div></div>
<!-- start page -->
<div id="content_right">

77

<div id="page">
<!-- start content -->
<div id="content">
<form action='process_addbook.php' method='POST' enctype="multipart/formdata">
<h1 class="title" align="center"><font color="black"> BOOK</h1>

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<b><font color="black">Book Name:</b><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type='text' name='name' size='40'>
<br><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<b>Category:</b><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<select style="width: 200px;" name="cat">
<?php
$link=mysql_connect("localhost","root","")or die("Can't Connect...");
mysql_select_db("shop",$link) or die("Can't Connect to Database...");
$query="select * from category ";
$res=mysql_query($query,$link);
while($row=mysql_fetch_assoc($res))
{
echo "<option disabled>".$row['cat_nm'];
$q2 = "select * from subcat where parent_id = ".$row['cat_id'];
$res2 = mysql_query($q2,$link) or die("Can't Execute Query..");
78

while($row2 = mysql_fetch_assoc($res2))
{
echo '<option value="'.$row2['subcat_id'].'"> ---> '.$row2['subcat_nm'];

}
}
mysql_close($link);
?>
</select>
<br><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<b>Description:</b><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<textarea cols="40" rows="6" name='description' ></textarea>
<br><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<b>Publisher:</b><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type='text' name='publisher' size='40'>
<br><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<b>Edition:</b><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type='text' name='edition' size='40'>
<br><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<b>ISBN:</b><br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<input type='text' name='isbn' size='40'>
79

end sidebar --> 80 .<br><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>PAGES:</b><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <input type='text' name='pages' size='40'> <br><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>PRICE:</b><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <input type='text' name='price' size='40'> <br><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>Image:</b><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <input type='file' name='img' size='35'> <br><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>E-Book:</b><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <input type='file' name='ebook' size='35'> <br><br> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <input type='submit' value=' OK ' > </form> </div> </div> </div> <!-.start sidebar --> <!-.end content --> <!-.

<div style="clear: both.php").">&nbsp.</div> </div> <!-.end page --> <!-. ?> </div> <!-.start footer --> <div id="footer-wrap"> <?php include("include/footer.end footer --> </body> </html> 81 .inc.

inc. ?> </div></div> --></div></div> <div id="content"> <!-. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu.start sidebar --> </div></div></div> <!-.1.start page --> <div id="content_right"> 82 .inc.inc.11 delbook.php <?phpsession_start().php"). ?> </div> <div id="header"> <div id="special_offers"> <!--flash image <div id="logo-wrap"> <div id="logo"> <?php include("include/logo.?> <html> <head> <?php include("include/head.4.php").php").

.")."root"."root". while($row=mysql_fetch_assoc($res)) { echo "<option>".$row['cat_nm'].")." name="del"> <?php $link=mysql_connect("localhost".php' method='POST'> <hr>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>DELETE SUB CATEGORY </b> <br><br>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <select style="width: 170px. } mysql_close($link).php' method='POST'> <h1 class="title" align="center"><font color="black"> CATEGORY</h1> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>DELETE CATEGORY </b> <br><br>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <select style="width: 170px.."")or die("Can't Connect. 83 .$link) or die("Can't Connect to Database. $res=mysql_query($query.")."")or die("Can't Connect." name="subcatnm"> <?php $link=mysql_connect("localhost". $query="select * from category "..$link).. mysql_select_db("shop". mysql_select_db("shop"... $query="select * from category ".").$link) or die("Can't Connect to Database. ?> </select> &nbsp&nbsp&nbsp&nbsp <input type='submit' value=' DELETE '> <br><br> <form action='process_delsubcategory..<div id="content"> <form action='process_delcategory..

?> </select> &nbsp&nbsp&nbsp&nbsp <input type='submit' value=' DELETE '> </form> <br> <hr> <imgsrc="images/logo/1.")."'> ---> ". while($roww = mysql_fetch_assoc($ress)) { echo "<option value='". $ress = mysql_query($qq.$roww['subcat_id'].end content --> 84 .JPG" width="1160" height="460"> </div> </div> </div> <!-. $qq = "select * from subcat where parent_id=". } } mysql_close($link).$res=mysql_query($query.$link) or die("wrong delete subcat query..$row['cat_nm'].$link).$roww['subcat_nm'].$row['cat_id']. while($row=mysql_fetch_assoc($res)) { echo "<option>".

end footer --> </body> </html> 85 .end sidebar --> <div style="clear: both.start footer --> <div id="footer-wrap"> <?php include("include/footer.start sidebar --> <!-.">&nbsp.<!-.end page --> <!-.inc.</div> </div> <!-. ?> </div> <!-.php").

."")or die("Can't Connect..").$link) or die("Can't Connect to Database. mysql_close($link).php")."root". 86 ..php <?php session_start()..4.php").1.12 Contact. $q="select * from contact".. mysql_select_db("shop".php"). ?> <html> <head> <?php include("include/head. $link=mysql_connect("localhost".").. $res=mysql_query($q.inc.inc. ?> </div> <div id="header"> <div id="special_offers"> <!--flash image <div id="logo-wrap"> <div id="logo"> <?php include("include/logo. ?> </head> <body> <div id="container"> <div id='cssmenu'> <?php include("include/menu.").inc.$link) or die("Can't Execute Query.

$row['con_nm'].$row['con_query']. while($row=mysql_fetch_assoc($res)) { echo '<tr> <td>'.?> </div></div> --></div></div> <div id="content"> <!-.' <td>'.$row['con_email'].start page --> <div id="content_right"> <div id="content"> <form> <h1 class="title" align="center"><font color="black">CONTACT</h1> <div class="entry"> <table border='1' WIDTH='100%' class="a"> <tr> <td WIDTH='10%'><b><u>NO</u></b> <TD WIDTH='20%'><b><u>NAME</u></b> <TD WIDTH='20%'><b><u>EMAIL</u></b> <TD WIDTH='50%'><b><u>QUERY</u></b> <TD WIDTH='25%'><b><u>DELETE</u></b> </tr> <?php $count=1.' <td>'.start sidebar --> </div></div></div> <!-.$count.' 87 .' <td>'.

'"><imgsrc="images/drop. $row['con_id'].inc.">&nbsp.</div> </div> <div id="footer-wrap"> <?php include("include/footer. } ?> </TABLE></div></div></div> <div style="clear: both. $count++.php").<td><a href="process_del_contact.png" ></a> </tr>'.php?sid='. ?></div> </body> </html> 88 .

comparable products. contracts. or other criteria. Testing cannot establish that a product functions properly under all conditions but can only establish that it does not function properly under specific conditions. but are not limited to the process of executing a program or application with the intent of finding software bugs (errors or other defects). There are various roles for testing team members. a testing organization may be separate from the development team. • Works as expected. Software testing can also provide an objective. A primary purpose of testing is to detect software failures so that defects may be discovered and corrected. applicable laws. past versions of the same product. Instead.4. relevant standards. Software testing can be stated as the process of validating and verifying that a computer program/application/product: 1. Meets the requirements that guided its design and development. 89 . it furnishes a criticism or comparison that compares the state and behavior of the product against oracles—principles or mechanisms by which someone might recognize a problem. user or customer expectations. Testing can never completely identify all the defects within software.2 SYSTEM TESTING INTRODUCTION: Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. scope of software testing often includes examination of code as well as execution of that code in various environments and conditions as well as examining the aspects of code: does it do what it is supposed to do and do what it needs to do. • Can be implemented with the same characteristics. Test techniques include. These oracles may include (but are not limited to) specifications. independent view of the software to allow the business to appreciate and understand the risks of software implementation. In the current culture of software development. and satisfies the needs of stakeholders. Information derived from software testing may be used to correct the process by which software is developed. inferences about intended or expected purpose.

Integration testing Fig 4.2.1TYPES OF TESTING 1. Unit Testing 2. More significantly.can be highly subjective. even with a simple product. reliability. 4. This means that the number of defects in a software product can be very large and defects that occur infrequently are difficult to find in testing.1 (Types of Testing) of Bookstore Management System 90 . performance.A very fundamental problem with software testing is that testing under all combinations of inputs and preconditions (initial state) is not feasible. scalability. System Testing 3. non-functional dimensions of quality (how it is supposed to be versus what it is supposed to do-) usability. something that constitutes sufficient value to one person may be intolerable to another.

In procedural.g.2. As a result.. A unit test provides a strict. although many software development environments do not rely solely upon code to document the product in development. objects. but is more commonly an individual function or procedure. and make sure the module still works correctly (e. documents these critical characteristics. Its implementation can vary from being very manual (pencil and paper)to being formalized as part of build automation.. a unit is often an entire interface. he goal of unit testing is to isolate each part of the program and show that the individual parts are correct. relaxed practices in keeping documents up-to-date). Unit testing allows the programmer to refactor code at a later date. it affords several benefits. and test harnesses can be used to assist testing a module in isolation.1 UNIT TESTING In computer programming. Intuitively. but could be an individual method. By contrast. sets of one or more computer program modules together with associated control data. design changes. usage procedures.1. each test case is independent from the others. fakes. one can view a unit as the smallest testable part of an application. Unit test cases embody characteristics that are critical to the success of the unit. unit testing is a method by which individual units of source code. written contract that the piece of code must satisfy. The procedure is to write test cases for 91 . Substitutes such as method stubs. Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended. such as a class. Developers looking to learn what functionality is provided by a unit and how to use it can look at the unit tests to gain a basic understanding of the unit's API. These characteristics can indicate appropriate/inappropriate use of a unit as well as negative behaviors that are to be trapped by the unit. In object-oriented programming. feature creep. Unit tests are created by programmers or occasionally by white box testers during the development process.g. ordinary narrative documentation is more susceptible to drifting from the implementation of the program and will thus become outdated (e. in regression testing). Ideally. and operating procedures are tested to determine if they are fit for use. Unit testing provides a sort of living documentation of the system. in and of itself.4. A unit test case. a unit could be an entire module.

all functions and methods so that whenever a change causes a fault. through the inherent practice of sustained maintenance.2(Unit Testing) of Bookstore Management System 92 . Fig 4. up-to-the-second accuracy can be maintained. In continuous unit testing environments. Depending upon established development practices and unit test coverage. unit tests will continue to accurately reflect the intended use of the executable and code in the face of any change. Readily available unit tests make it easy for the programmer to check whether a piece of code is still working properly. it can be quickly identified.

It is also intended to test up to and beyond the bounds defined in the software/hardware requirements specification(s). but also the behavior and even the believed expectations of the customer.2 SYSTEM TESTING System testing of software or hardware is testing conducted on a complete. The purpose of integration testing is to detect any inconsistencies between the software units that are integrated together (called assemblages) or between any of the assemblages and the hardware. A series of systematic procedures are referred to while testing is being performed. a tester may put in a city in a search engine designed to only accept states. System testing falls within the scope of black box testing. should require no knowledge of the inner design of the code or logic. System testing is a more limited type of testing.1. as its input.4. 93 . all of the "integrated" software components that have passed integration testing and also the software system itself integrated with any applicable hardware system(s).2. integrated system to evaluate the system's compliance with its specified requirements. and as such. As a rule. system testing takes. it seeks to detect defects both within the "inter-assemblages" and also within the system as a whole. System testing is performed on the entire system in the context of a Functional Requirement Specification(s) (FRS) and/or a System Requirement Specification (SRS). The process of performing a variety of tests on a system to explore functionality or to identify problems. System testing tests not only the design. to see how the system will respond to the incorrect input. System testing is usually required before and after a system is put in place. Testers usually try to "break the system" by entering data that may cause the system to malfunction or return incorrect information. For example. These procedures tell the tester how the system should perform and where common mistakes may be found.

3(System Testing) of Bookstore Management System 94 .Fig 4.

success and error cases being simulated via appropriate parameter and data inputs. and delivers as its output the integrated system ready for system testing. for example across procedure calls or process activations. groups them in larger aggregates.2. and this is done after testing individual modules. The purpose of integration testing is to verify functional. applies tests defined in an integration test plan to those aggregates. assemblages (or groups of units). i. Integration testing becomes necessary to verify the software modules work in unity 2. Simulated usage of shared data areas and inter-process communication is tested and individual subsystems are exercised through their input interface. Test cases are constructed to test whether all the components within assemblages interact correctly. Need for integration testing:1.1. At the time of module development. Some different types of integration testing are big bang. Other Integration Patterns are: Collaboration Integration. These new requirements may not be unit tested and hence integration testing becomes necessary.e. Interfaces of the software modules with the database could be erroneous 95 . Integration testing takes as its input modules that have been unit tested. i.3 INTEGRATION_TESTING Integration testing (sometimes called integration and testing. It occurs after unit testing and before validation testing. The overall idea is a "building block" approach. performance. Distributed Services Integration and Highfrequency Integration. there wide chances of change in requirements by the clients. abbreviated I&T) is the phase in software testing in which individual software modules are combined and tested as a group. Layer Integration. are exercised through their interfaces using black box testing. and reliability requirements placed on major design items. top-down. These "design items". unit testing. Client/Server Integration. and bottom-up. 3.4.e. in which verified assemblages are added to a verified base which is then used to support the integration testing of further assemblages. A Module in general is designed by an individual software developer who understanding and programming logic may differ from other programmers. Backbone Integration.

4.2. 4. External Hardware interfaces.2. is a set of conditions or variables under which a tester will determine whether an application. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test oracle.when they are usually collected into test suites.1 TEST CASE ID: 1 Table 4. It may take many test cases to determine that a software program or system is considered sufficiently scrutinized to be released. 4. software system or one of its features is working as it was originally established for it to do.2 TEST CASE: A test case.1(Test Id 1) of Bookstore Management System 96 . if any.2. Test cases are often referred to as test scripts. in software engineering. could be erroneous Inadequate exception handling could cause issues. particularly when written .

g. requirements and design parameters. Typical black-box test design techniques include: • Decision table testing • All-pairs testing • State transition tables 97 . including specifications.3. Although the tests used are primarily functional in nature. This method of test can be applied to virtually every level of software testing: unit.3 TESTING STRATEGIES:4. system and acceptance Test cases are generally derived from external descriptions of the software. integration. The test designer selects both valid and invalid inputs and determines the correct output without any knowledge of the test object's internal structure.4. non-functional tests may also be used.1 BLACK BOX TESTING Black-box testing is a method of software testing that examines the functionality of an application (e.2(Test Id 2) of Bookstore Management System 4.2.2 Test Case ID: 2 Table 4. what the software does) without peering into its internal structures or workings (see white-box testing).2.

glass box testing. These White-box testing techniques are the building blocks of white-box testing. and structural testing) is a method of testing software that tests internal structures or workings of an application.3. This is analogous to testing nodes in a circuit. blackboxtesting). e. transparent box testing. White-box testing is the use of these techniques as guidelines to create an error free environment by examining any fragile code. While white-box testing can be applied at the unit. are used to design test cases. Though this method of test design can uncover many errors or problems. it is usually done at the unit level.g. paths between units during integration. as opposed to its functionality (i. branch testing.e. path testing. data flow testing. as well as programming skills. whose essence is the careful testing of the application at the source code level to prevent any hidden errors later on. It can test paths within a unit. The tester chooses inputs to exercise paths through the code and determine the appropriate outputs. The test cases are derived through the use of the design techniques mentioned above control flow testing. statement coverage and decision coverage as well as modified condition/decision coverage. it might not detect unimplemented parts of the specification or missing requirements. integration and system levels of the software testing process. and between subsystems during a system–level test. In white-box testing an internal perspective of the system. White-box test design techniques include: • Control flow testing • Data flow testing • Branch testing • Path testing • Statement coverage • Decision coverage White-box testing is a method of testing the application at the level of the source code.2 WHITE BOX TESTING White-box testing (also known as clear box testing. These different techniques exercise every visible path of the source code to minimize errors 98 .• Equivalence partitioning 4. in-circuit testing (ICT).

99 . The whole point of white-box testing is the ability to know which line of the code is being executed and being able to identify what the correct output should be.and create an error-free environment. Approach adopted:In our minor project i.e. In this testing we will use boundary value analysis and Equivalence partitioning. “Bookstore Management system” we are using BLACK BOX TESTING.