Added:
/trunk/BookGet/Include/basic_style.php
/trunk/BookGet/Include/header_bar.php
Modified:
/trunk/BookGet/Include/category_bar.php
/trunk/BookGet/index.php
/trunk/BookGet/login.php
/trunk/BookGet/nbproject/project.properties
/trunk/BookGet/registration.php
/trunk/BookGet/search.php
/trunk/BookGet/style/layout.css
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/basic_style.php Thu Dec 2 23:26:16 2010
@@ -0,0 +1,6 @@
+<?php
+print <<<EOF
+<link rel="stylesheet" href="style/layout.css" type="text/css" />
+<link rel="icon" type="image/ico" href="img/icon.ico" />
+EOF
+?>
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/header_bar.php Thu Dec 2 23:26:16 2010
@@ -0,0 +1,26 @@
+<?php
+$header = '
+<div id="headerbar">
+ </div>
+ <div id="headerwrapper">
+ <div id="pageheader">
+ <div id="logodiv">
+ <span id="book">book</span><span id="get">get</span>
+ </div>
+ <div id="headercontent" class="clearboth">
+ <form method="get" action="search.php">
+ <div id="searchdiv" class="searchbar">
+ <input id="searchbox" type="text" name="query"
size="40" class="search" />
+ <button id="searchbutton" type="submit"
class="search"></button>
+ </div>
+ </form>
+
+ <div id="accountsettings">
+ <a href="settings.php">Settings</a>
+ <a href="account.php">Account</a>
+ <a href="login.php">Login</a>
+ </div>
+ </div>
+ </div>
+ </div>';
+?>
=======================================
--- /trunk/BookGet/Include/category_bar.php Mon Nov 29 01:13:44 2010
+++ /trunk/BookGet/Include/category_bar.php Thu Dec 2 23:26:16 2010
@@ -1,3 +1,35 @@
<?php
-print("<span>blah<br/>blah<br/>blah<br/></span>");
+print("<span><br /><h3><b>Categories</b></h3><br />
+
+ <b>Department</b><br />
+ <a href='search.php?query=Literature'>Literature</a><br />
+ <a href='search.php?query=Math'>Math</a><br />
+ <a href='search.php?query=Science'>Science</a><br />
+ <a href='search.php?query=History'>History</a><br />
+ <a href='search.php?query=Art'>Art</a><br />
+ <a href='search.php?query=Economics'>Economics</a><br />
+ <a href='search.php?query=Foreign Language'>Foreign Language</a><br />
+ <a href='search.php?query=Social Studies'>Social Studies</a><br />
+ <a href='search.php?query=Computer Science'>Computer Science</a><br />
+ <a href='search.php?query=Engineering'>Engineering</a><br />
+ <a href='search.php?query=Business'>Business</a><br />
+
+
+ <br /><b>Price</b><br />
+ <a href=''>$0.01 - $9.99</a><br />
+ <a href=''>$10.00 - $24.99</a><br />
+ <a href=''>$25.00 - $49.99</a><br />
+ <a href=''>$50.00 - $99.99</a><br />
+ <a href=''>$100.00 > </a><br />
+
+ <br /><b>Quality</b><br />
+ <a href=''>Best</a><br />
+ <a href=''>Good</a><br />
+ <a href=''>Bad</a><br />
+
+ <br /><b>Schools</b><br />
+ <a href='search.php?query=FAU'>FAU</a><br />
+ <a href='search.php?query=SFSU'>SFSU</a><br />
+
+</span>");
?>
=======================================
--- /trunk/BookGet/index.php Mon Nov 29 01:13:44 2010
+++ /trunk/BookGet/index.php Thu Dec 2 23:26:16 2010
@@ -1,32 +1,13 @@
-<?php include "Include/mimetype.php" ?>
+<?php include "Include/mimetype.php";
+ include "Include/header_bar.php"; ?>
<head>
<title>BookGet.com</title>
- <link rel="stylesheet" href="style/layout.css" type="text/css" />
+ <?php include "Include/basic_style.php" ?>
</head>
<body>
<div id="headerbar">
</div>
- <div id="headerwrapper">
- <div id="pageheader">
- <div id="logodiv">
- <span id="book">book</span><span id="get">get</span>
- </div>
- <div id="headercontent" class="clearboth">
- <form method="get" action="search.php">
- <div id="searchdiv" class="searchbar">
- <input id="searchbox" type="text" name="query"
size="40" class="search" />
- <button id="searchbutton" type="submit"
class="search"></button>
- </div>
- </form>
-
- <div id="accountsettings">
- <a href="settings.php">Settings</a>
- <a href="account.php">Account</a>
- <a href="login.php">Login</a>
- </div>
- </div>
- </div>
- </div>
+ <?php print $header; ?>
<div id="pagewrapper">
<div id="leftcol">
<?php include("Include/category_bar.php"); ?>
=======================================
--- /trunk/BookGet/login.php Tue Nov 30 15:56:57 2010
+++ /trunk/BookGet/login.php Thu Dec 2 23:26:16 2010
@@ -39,46 +39,30 @@
} else {
$logonSuccess = false;
}
-} ?>
+}
+include "Include/header_bar.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
+
<head>
<title>BookGet.com</title>
- <link rel="stylesheet" href="style/layout.css" type="text/css" />
+ <?php include "Include/basic_style.php" ?>
<link rel="stylesheet" href="style/login.css" type="text/css" />
</head>
<body>
<div id="headerbar">
</div>
- <div id="headerwrapper">
- <div id="pageheader">
- <div id="logodiv">
- <span id="book">book</span><span id="get">get</span>
- </div>
- <div id="headercontent" class="clearboth">
- <form method="get" action="search.php">
- <div id="searchdiv" class="searchbar">
- <input id="searchbox" type="text" name="query"
size="40" class="search" />
- <button id="searchbutton" type="submit"
class="search"></button>
- </div>
- </form>
-
- <div id="accountsettings">
- <a href="settings.php">Settings</a>
- <a href="account.php">Account</a>
- <a href="logout.php">Logout</a>
- </div>
- </div>
+ <div id="headerbar">
</div>
- </div>
- <div id="pagewrapper">
- <div id="leftcol">
-<?php include("Include/category_bar.php"); ?>
- </div>
- <div id="pagecontent">
- <div id="rightcol" >
-<?php include("Include/account_settings.php"); ?>
+ <?php print $header; ?>
+ <div id="pagewrapper">
+ <div id="leftcol">
+ <?php include("Include/category_bar.php"); ?>
</div>
+ <div id="pagecontent">
+ <div id="rightcol" >
+ <?php include("Include/account_settings.php"); ?>
+ </div>
<div id="content">
<table id= "loginbox" >
=======================================
--- /trunk/BookGet/nbproject/project.properties Sun Nov 21 18:28:16 2010
+++ /trunk/BookGet/nbproject/project.properties Thu Dec 2 23:26:16 2010
@@ -1,6 +1,11 @@
ignore.path=
-include.path=${php.global.include.path}
+include.path=\
+ ${php.global.include.path}
php.version=PHP_5
+phpunit.bootstrap=
+phpunit.bootstrap.create.tests=false
+phpunit.configuration=
+phpunit.suite=
source.encoding=UTF-8
src.dir=.
tags.asp=false
=======================================
--- /trunk/BookGet/registration.php Mon Nov 29 01:13:44 2010
+++ /trunk/BookGet/registration.php Thu Dec 2 23:26:16 2010
@@ -72,44 +72,25 @@
exit;
}
}
-include "Include/mimetype.php" ?>
+include "Include/mimetype.php";
+include "Include/header_bar.php"; ?>
<head>
<title>BookGet.com</title>
<link rel="stylesheet" href="style/layout.css" type="text/css" />
<link rel="stylesheet" href="style/registration.css" type="text/css" />
</head>
<body>
- <div id="headerbar">
- </div>
- <div id="headerwrapper">
- <div id="pageheader">
- <div id="logodiv">
- <span id="book">book</span><span id="get">get</span>
- </div>
- <div id="headercontent" class="clearboth">
- <form method="get" action="search.php">
- <div id="searchdiv" class="searchbar">
- <input id="searchbox" type="text" name="query"
size="40" class="search" />
- <button id="searchbutton" type="submit"
class="search"></button>
- </div>
- </form>
-
- <div id="accountsettings">
- <a href="settings.php">Settings</a>
- <a href="account.php">Account</a>
- <a href="logout.php">Logout</a>
- </div>
- </div>
+ <div id="headerbar">
</div>
- </div>
- <div id="pagewrapper">
- <div id="leftcol">
- <?php include("Include/category_bar.php"); ?>
- </div>
- <div id="pagecontent">
- <div id="rightcol" >
- <?php include("Include/account_settings.php"); ?>
+ <?php print $header; ?>
+ <div id="pagewrapper">
+ <div id="leftcol">
+ <?php include("Include/category_bar.php"); ?>
</div>
+ <div id="pagecontent">
+ <div id="rightcol" >
+ <?php include("Include/account_settings.php"); ?>
+ </div>
<div id="content">
<table id="registrationbox">
<th id="registrationtitle">Create a GetBook
Account</th>
=======================================
--- /trunk/BookGet/search.php Tue Nov 30 15:56:57 2010
+++ /trunk/BookGet/search.php Thu Dec 2 23:26:16 2010
@@ -1,20 +1,37 @@
<?php
require_once("Include/SearchEngine.php");
+// Search box function
+function omnisearch($query) {
+ $db = SearchEngine::getInstance();
+ $res = array();
+ $ret = array();
+
+ $res[] = $db->Search_Phrase($query, "title");
+ $res[] = $db->Search_Phrase($query, "title");
+ $res[] = $db->Search_Phrase($query, "author");
+ $res[] = $db->Search_Phrase($query, "author_one");
+ $res[] = $db->Search_Phrase($query, "Description");
+ $res[] = $db->Search_Phrase($query, "ISBN");
+ $res[] = $db->Search_Phrase($query, "Department");
+ $res[] = $db->Search_Phrase($query, "School");
+
+ foreach ($res as $row) {
+ foreach ($row as $item) {
+ if (!in_array($item,$ret)) {
+ $ret[] = $item;
+ }
+ }
+ }
+
+ return $ret;
+}
$termsIsEmpty = true;
if ($_GET["query"] != "") {
$termsIsEmpty = false;
- $db = SearchEngine::getInstance();
- $res1 = $db->Search_Phrase($_GET["query"], "title");
- $res2 = $db->Search_Phrase($_GET["query"], "author");
- $res3 = $db->Search_Phrase($_GET["query"], "author_one");
- $res4 = $db->Search_Phrase($_GET["query"], "Description");
- $res5 = $db->Search_Phrase($_GET["query"], "ISBN");
-
- $searchresults = array_merge($res1, $res2, $res3, $res4, $res5);
-
-
+
+ $searchresults = omnisearch($_GET["query"]);
if (count($searchresults) < 1) {
$termsIsEmpty = true;
$noResults = true;
@@ -24,35 +41,26 @@
exit;
}
?>
-<?php include("Include/mimetype.php") ?>
+<?php include("Include/mimetype.php");
+include "Include/header_bar.php"; ?>
<head>
<title>BookGet.com</title>
<link rel="stylesheet" href="style/layout.css" type="text/css" />
+ <style>
+ .book
+ {
+ width: 130px;
+ }
+
+ .Results {
+ text-align: center;
+ }
+ </style>
</head>
<body>
<div id="headerbar">
</div>
- <div id="headerwrapper">
- <div id="pageheader">
- <div id="logodiv">
- <span id="book">book</span><span id="get">get</span>
- </div>
- <div id="headercontent" class="clearboth">
- <form method="get" action="search.php">
- <div id="searchdiv" class="searchbar">
- <input id="searchbox" type="text" name="query"
size="40" class="search" />
- <button id="searchbutton" type="submit"
class="search"></button>
- </div>
- </form>
-
- <div id="accountsettings">
- <a href="settings.php">Settings</a>
- <a href="account.php">Account</a>
- <a href="login.php">Login</a>
- </div>
- </div>
- </div>
- </div>
+ <?php print $header; ?>
<div id="pagewrapper">
<div id="leftcol">
<?php include("Include/category_bar.php"); ?>
@@ -64,6 +72,7 @@
<div id="content">
<table id="results">
<tr>
+ <th scope="col" class="label">Cover</th>
<th scope="col" class="label">ISBN</th>
<th scope="col" class="label">Title</th>
<th scope="col" class="label">Authors</th>
@@ -92,11 +101,9 @@
print "<tr>\n";
print " <td class=\"Results\">\n";
- print " <img src='img/".$id.".gif'
height='100%' width='100%' alt='".$Title."'/>\n";
- print "</td>\n";
- print "<tr>\n";
- print " <td class=\"Results\">" .
$ISBN . "</td>\n";
- print "</tr>\n";
+ print " <img src='img/".$id.".gif'
class='book'/>\n";
+ print " </td>\n";
+
print "<td class=\"Results\"><a
href='book.php?id=".$id."' >" . $Title ."</a></td>\n";
print "<td class=\"Results\">" .
$Author . "<br/>$Author1</td>\n";
=======================================
--- /trunk/BookGet/style/layout.css Sat Nov 27 20:32:18 2010
+++ /trunk/BookGet/style/layout.css Thu Dec 2 23:26:16 2010
@@ -196,7 +196,7 @@
div#content
{
padding: 20px;
- width: 700px;
+ width: 730px;
min-height: 400px;
height: auto;
border: none;
@@ -205,7 +205,7 @@
div#rightcol
{
float: right;
- width: 99px;
+ width: 30px;
height: auto;
min-height: 400px;
top: 0;