Modified:
/trunk/Geekzbookshelf2/StyleSheets/item.css
/trunk/Geekzbookshelf2/data/dbRetrieval.php
/trunk/Geekzbookshelf2/review/insertReview.php
/trunk/Geekzbookshelf2/review/writeReview.php
=======================================
--- /trunk/Geekzbookshelf2/StyleSheets/item.css Mon Dec 13 13:00:43 2010
+++ /trunk/Geekzbookshelf2/StyleSheets/item.css Mon Dec 13 17:35:08 2010
@@ -40,7 +40,7 @@
top: 1;
left:150px;
height: 148px;
- width:60%;
+ width:70%;
position:relative;
}
=======================================
--- /trunk/Geekzbookshelf2/data/dbRetrieval.php Sun Dec 12 23:25:12 2010
+++ /trunk/Geekzbookshelf2/data/dbRetrieval.php Mon Dec 13 17:35:08 2010
@@ -180,7 +180,7 @@
function getStatisticsforBookWith_FiveStar($bookID)
{
openmydb();
- $sql = "Select `BookID`, Count(`Rating`) As Rating\n"
+ $sql = "Select `BookID`, Count(`Rating`) As Rating \n"
. "From Review\n"
. "Where `Rating`= 5 \n"
. "Group By `BookID`\n"
@@ -191,7 +191,7 @@
function getStatisticsforBookWith_FourStar($bookID)
{
openmydb();
- $sql = "Select `BookID`, Count(`Rating`) As Rating\n"
+ $sql = "Select `BookID`, Count(`Rating`) As Rating \n"
. "From Review\n"
. "Where `Rating`= 4 \n"
. "Group By `BookID`\n"
@@ -202,7 +202,7 @@
function getStatisticsforBookWith_ThreeStar($bookID)
{
openmydb();
- $sql = "Select `BookID`, Count(`Rating`) As Rating\n"
+ $sql = "Select `BookID`, Count(`Rating`) As Rating \n"
. "From Review\n"
. "Where `Rating`= 3 \n"
. "Group By `BookID`\n"
@@ -213,7 +213,7 @@
function getStatisticsforBookWith_TwoStar($bookID)
{
openmydb();
- $sql = "Select `BookID`, Count(`Rating`) As Rating\n"
+ $sql = "Select `BookID`, Count(`Rating`) As Rating \n"
. "From Review\n"
. "Where `Rating`= 2 \n"
. "Group By `BookID`\n"
@@ -224,7 +224,7 @@
function getStatisticsforBookWith_OneStar($bookID)
{
openmydb();
- $sql = "Select `BookID`, Count(`Rating`) As Rating\n"
+ $sql = "Select `BookID`, Count(`Rating`) As Rating \n"
. "From Review\n"
. "Where `Rating`= 1 \n"
. "Group By `BookID`\n"
@@ -233,19 +233,17 @@
return $result;
}
- function getStatisticsforBook_TotalReview($bookID)
- {
+ function getStatisticsforBook_TotalReview($bookID) {
openmydb();
- $sql = "Select Count(Rating) As TotalReview From Review\n"
+ $sql = "Select Count(Rating) As TotalReview From Review \n"
. " Group By BookID\n"
. "Having BookID = $bookID ";
$result = mysql_query($sql);
return $result;
}
- function getAverageRating_ForOneBook($bookID)
-{
+ function getAverageRating_ForOneBook($bookID){
openmydb();
$sql = "Select Floor(Avg(Rating)) As Avg From Review \n"
@@ -253,8 +251,7 @@
$result = mysql_query($sql);
return $result;
}
- function getNoOfUsersForAVGRating_ForOneBook($bookID)
-{
+ function getNoOfUsersForAVGRating_ForOneBook($bookID){
openmydb();
$sql = "Select Count(Rating) As Totalpeople From Review \n"
=======================================
--- /trunk/Geekzbookshelf2/review/insertReview.php Sun Dec 5 00:11:31 2010
+++ /trunk/Geekzbookshelf2/review/insertReview.php Mon Dec 13 17:35:08 2010
@@ -17,7 +17,25 @@
}
$msg = insertReview($bookID, $rating, $review, $userID);
-echo "<b><h2>Thank you, your review is being processed</b><h2></br>";
-echo "Your review will be posted on the site, typically within 24 hours.
If you are still unable to see your review on the product page after 24
hours, then your review couldn't be posted on <a
href='http://hci.cs.sfsu.edu/~fall2010.09/'>GeekzBookShelf.com</a> Please
read our posting guidelines before resubmitting your review.";
+echo "<div id='middle' name='middle'><b><h2>Thank you, your review is
being processed</b><h2></br>";
+echo "Your review will be posted on the site, typically within 24 hours.
If you are still unable to see your review on the product page after 24
hours, then your review couldn't be posted on <a
href='../index.php'>GeekzBookShelf.com</a> Please read our posting
guidelines before resubmitting your review.
+ <br/><br/><form action='../index.php' method='GET' name='login'>
+ <br/> <input type='submit' value=' Continue Shopping ' />
+ <br />
+
+ </form></div>";
?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Write a review</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" type="text/css"
href="../StyleSheets/mainStyleSheet.css" />
+ <link rel="stylesheet" type="text/css"
href="../StyleSheets/review.css" />
+ <link rel="shortcut icon" type="image/x-icon"
href="../images/favicon.ico">
+ </head>
+ <body>
+ <div id ="top">
+ <a href="../index.php" title="Go back to Home"><img
src="../images/logo.jpg" id="image"></a>
+ </div >
+ </body>
=======================================
--- /trunk/Geekzbookshelf2/review/writeReview.php Fri Dec 10 15:23:57 2010
+++ /trunk/Geekzbookshelf2/review/writeReview.php Mon Dec 13 17:35:08 2010
@@ -35,33 +35,7 @@
<input type="submit" value="Submit Review" title="Click me to
save your review">
<br/><br/>
</form>
- <div id="Stattitle" style="width: 300px" title="Statistics of
ratings" >
- <div id="reviewtitle" > Total reviews:   <?php
$line = mysql_fetch_assoc(getStatisticsforBook_Totalreview($bookID)); if
($line['TotalReview'] >= 1) {echo $line['TotalReview'];} else {
echo "0";}?></div>
- </br>   <div id="stars"
class="s_five"></div>  :
- <?php $line =
mysql_fetch_assoc(getStatisticsforBookWith_FiveStar($bookID));
- if ($line['Rating'] >= 1)
- {echo "By (".$line['Rating'].") People";}
- else { echo "By (0) People"; ;}
- ?>
-
- </br>   <div id="stars"
class="s_four"></div>  : <?php $line =
mysql_fetch_assoc(getStatisticsforBookWith_FiveStar($bookID));
- if ($line['Rating'] >= 1)
- {echo "By (".$line['Rating'].") People";}
- else { echo "By (0) People"; ;}
- ?>
- </br>   <div id="stars"
class="s_three"></div>  : <?php $line =
mysql_fetch_assoc(getStatisticsforBookWith_FiveStar($bookID));
- if ($line['Rating'] >= 1)
- {echo "By (".$line['Rating'].") People";}
- else { echo "By (0) People"; ;}
- ?> </br>   <div id="stars"
class="s_two"></div>  : <?php $line =
mysql_fetch_assoc(getStatisticsforBookWith_FiveStar($bookID));
- if ($line['Rating'] >= 1)
- {echo "By (".$line['Rating'].") People";}
- else { echo "By (0) People"; ;}
- ?> </br>   <div id="stars"
class="s_one"></div>  :<?php $line =
mysql_fetch_assoc(getStatisticsforBookWith_FiveStar($bookID));
- if ($line['Rating'] >= 1)
- {echo "By (".$line['Rating'].") People";}
- else { echo "By (0) People"; ;}
- ?> </br></div>
+
</br> <b>Other reviews:<b>
</br>
<div id="review">
@@ -74,7 +48,7 @@
while ($line = mysql_fetch_assoc($results))
{
echo "<div id='review' style=' '><b>By - ".
$line['UserID_Guest']."</b>  " ;
-
+
if ($line['Rating'] == 5 )
{
echo "<div id='stars' class='s_five'></div>";
@@ -98,7 +72,7 @@
echo "</br>" .$line['Review']. "</br><hr></div>" ;
-
+
}
}
else {