mwop.htm : The front page,
which calls idc script to find unique animal types and substitutes
them
into a search menu.
search.idc: Query file to find unique animal types; passes them into mwop.htx template form.
mwop.htx: Main
search page. Fills in animal types from query, uses a form
to allow user to search by type and price.
Calls findapet.idc to find appropriate animal.
findapet.idc: Exectues
parameterized query for pets of a specified type costing less
than a specified price.
Passes data into querydb1.htx for formatting.
querydb1.htx: Formats output from query to the pet database.
<html>
<body bgcolor="#FFFFFF">
<p><font size="4"><strong>Madden's
Wild World Of
Pets</strong></font></p>
<p>Welcome to Madden's Wild World Of Pets!</p>
<p> Click on "Search" to search for a pet <p>
<form method="POST" action="search.idc">
<input type="submit"
name="B1" value="Search"></p>
</form>
<p>
</body>
</html>
Datasource: cs169-ta-db1
Username: cs169-ta
Template: mwop.htx
SQLStatement:
+ SELECT DISTINCT Animals.Type
+ FROM Animals
<html>
<body bgcolor="#FFFFFF">
<p><font size="4"><strong>Madden's
Wild World Of
Pets</strong></font></p>
<p><p>Welcome to Madden's Wild World Of Pets!</p>
<p>We have a multitude of exciting animals
to choose from; search them using the form below:</p>
<form method="POST" action="findapet.idc">
<p>Pet Type: <select name="type"
size="1">
<%begindetail%>
<option><%Type%></option>
<%enddetail%>
</select></p>
<p>Maximum Price: <input type="text"
value = "100" size="20" name="cost">
<input type="submit" name="B1"
value="Submit"></p>
</form>
<p>
</body>
</html>
Datasource: cs169-ta-db1
Username: cs169-ta
Template: querydb1.htx
SQLStatement:
+ SELECT Animals.*
+ FROM Animals
+ WHERE Type='%type%' AND Cost <= %cost%
+ ORDER By Cost
<html>
<title>Found Animals</title>
<h1>The following animals are available:</h1>
<table>
<%begindetail%>
<%if CurrentRecord EQ 0%>
<tr>
<th align="center"><b>Name</b></th>
<th align="center"><b>Type</b></th>
<th align="center"><b>Price</b></th>
</tr>
<%endif%>
<tr>
<th align="left"><b><%Name%></b></th>
<th align="left"><b><%Type%></b></th>
<th align="left">$<%Cost%></th>
</tr>
<%enddetail%>
</table><p>
<%if CurrentRecord EQ 0%>
<b>No pets were found which match your search criteria</b>
<%else%>
<%endif%>
<p>
<a href="http://scotland/cs169/cs169-ta/access/search.idc">Back
To Search Page</a><p>
</body>
</html>