[TEP-COMMIT] [CVS catalog] New Reviews System
mevans-OfajU3CKLf1/[email protected] 3 Nov 2004 09:01:49 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">product_info.php</a></tt></td><td align="right" id="added">+12</td><td align="right" id="removed">-5</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_info.php?rev=1.105&content-type=text/vnd.viewcvs-markup">1.105</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_info.php.diff?r1=1.105&r2=1.106">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_info.php?rev=1.106&content-type=text/vnd.viewcvs-markup">1.106</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">product_reviews.php</a></tt></td><td align="right" id="added">+24</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews.php?rev=1.54&content-type=text/vnd.viewcvs-markup">1.54</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews.php.diff?r1=1.54&r2=1.55">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a></td></tr>
<tr><td><tt><a href="#file3">product_reviews_info.php</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_info.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_info.php.diff?r1=1.55&r2=1.56">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_info.php?rev=1.56&content-type=text/vnd.viewcvs-markup">1.56</a></td></tr>
<tr class="alt"><td><tt><a href="#file4">product_reviews_write.php</a></tt></td><td align="right" id="added">+65</td><td align="right" id="removed">-10</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_write.php?rev=1.60&content-type=text/vnd.viewcvs-markup">1.60</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_write.php.diff?r1=1.60&r2=1.61">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_write.php?rev=1.61&content-type=text/vnd.viewcvs-markup">1.61</a></td></tr>
<tr><td><tt><a href="#file5">reviews.php</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/reviews.php?rev=1.52&content-type=text/vnd.viewcvs-markup">1.52</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/reviews.php.diff?r1=1.52&r2=1.53">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/reviews.php?rev=1.53&content-type=text/vnd.viewcvs-markup">1.53</a></td></tr>
<tr class="alt"><td><tt>includes/<a href="#file6">database_tables.php</a></tt></td><td></td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/database_tables.php?rev=1.5&content-type=text/vnd.viewcvs-markup">1.5</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/database_tables.php.diff?r1=1.5&r2=1.6">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/database_tables.php?rev=1.6&content-type=text/vnd.viewcvs-markup">1.6</a></td></tr>
<tr><td><tt>includes/boxes/<a href="#file7">reviews.php</a></tt></td><td align="right" id="added">+46</td><td align="right" id="removed">-41</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/reviews.php?rev=1.41&content-type=text/vnd.viewcvs-markup">1.41</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/reviews.php.diff?r1=1.41&r2=1.42">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/reviews.php?rev=1.42&content-type=text/vnd.viewcvs-markup">1.42</a></td></tr>
<tr class="alt"><td><tt>includes/classes/<a href="#file8"><span id="added">reviews.php</span></a></tt></td><td align="right" id="added">+92</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/reviews.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td><tt>includes/languages/english/<a href="#file9">product_reviews_write.php</a></tt></td><td align="right" id="added">+4</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english/product_reviews_write.php?rev=1.7&content-type=text/vnd.viewcvs-markup">1.7</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english/product_reviews_write.php.diff?r1=1.7&r2=1.8">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english/product_reviews_write.php?rev=1.8&content-type=text/vnd.viewcvs-markup">1.8</a></td></tr>
<tr class="alt"><td><tt>includes/languages/espanol/<a href="#file10">product_reviews_write.php</a></tt></td><td align="right" id="added">+4</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol/product_reviews_write.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol/product_reviews_write.php.diff?r1=1.10&r2=1.11">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol/product_reviews_write.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a></td></tr>
<tr><td><tt>includes/languages/german/<a href="#file11">product_reviews_write.php</a></tt></td><td align="right" id="added">+4</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german/product_reviews_write.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german/product_reviews_write.php.diff?r1=1.10&r2=1.11">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german/product_reviews_write.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a></td></tr>
<tr class="alt"><td><tt>includes/modules/services/<a href="#file12"><span id="added">reviews.php</span></a></tt></td><td align="right" id="added">+47</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/reviews.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td><tt>install/<a href="#file13">oscommerce.sql</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce.sql?rev=1.103&content-type=text/vnd.viewcvs-markup">1.103</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce.sql.diff?r1=1.103&r2=1.104">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce.sql?rev=1.104&content-type=text/vnd.viewcvs-markup">1.104</a></td></tr>
<tr class="alt"><td><tt> /<a href="#file14">oscommerce_sample_data.sql</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce_sample_data.sql?rev=1.6&content-type=text/vnd.viewcvs-markup">1.6</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce_sample_data.sql.diff?r1=1.6&r2=1.7">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce_sample_data.sql?rev=1.7&content-type=text/vnd.viewcvs-markup">1.7</a></td></tr>
<tr><td></td><td align="right" id="added">+318</td><td align="right" id="removed">-76</td><td></td></tr>
</table>
<small id="info">2 added + 12 modified, total 14 files</small><br />
<pre class="comment">
New Reviews System
* Now a Service Module
* Guest Reviews Now Allowed
* Reviews Only after Purchase No Allowed
* Reviews Moderation
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader"><big><b>product_info.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_info.php?rev=1.105&content-type=text/vnd.viewcvs-markup">1.105</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_info.php.diff?r1=1.105&r2=1.106">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_info.php?rev=1.106&content-type=text/vnd.viewcvs-markup">1.106</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.105 -r1.106
--- product_info.php 2004/10/31 09:46:08 1.105
+++ product_info.php 2004/11/03 09:00:49 1.106
@@ -162,9 +162,10 @@
</small></pre><pre class="diff" id="context"> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
</pre><pre class="diff" id="removed">- $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$_GET['products_id'] . "'");
- $reviews = tep_db_fetch_array($reviews_query);
- if ($reviews['count'] > 0) {
</pre><pre class="diff" id="added">+ if ($osC_Services->isStarted('reviews')) {
+ $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$_GET['products_id'] . "'");
+ $reviews = tep_db_fetch_array($reviews_query);
+ if ($reviews['count'] > 0) {
</pre><pre class="diff" id="context"> ?>
<tr>
<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
</pre><pre class="diff"><small id="info">@@ -173,8 +174,8 @@
</small></pre><pre class="diff" id="context"> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
</pre><pre class="diff" id="added">+ }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="context"> if (tep_not_null($product_info['products_url'])) {
?>
<tr>
</pre><pre class="diff"><small id="info">@@ -209,7 +210,13 @@
</small></pre><pre class="diff" id="context"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</pre><pre class="diff" id="removed">- <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
</pre><pre class="diff" id="added">+ <td class="main">
+<?php
+ if ($osC_Services->isStarted('reviews')) {
+ echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>';
+ }
+?>
+ </td>
</pre><pre class="diff" id="context"> <td class="main" align="right"><?php echo osc_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader"><big><b>product_reviews.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews.php?rev=1.54&content-type=text/vnd.viewcvs-markup">1.54</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews.php.diff?r1=1.54&r2=1.55">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.54 -r1.55
--- product_reviews.php 2004/10/31 09:46:08 1.54
+++ product_reviews.php 2004/11/03 09:00:50 1.55
@@ -12,6 +12,10 @@
</small></pre><pre class="diff" id="context">
require('includes/application_top.php');
</pre><pre class="diff" id="added">+ if (!$osC_Services->isStarted('reviews')) {
+ tep_redirect(tep_href_link(FILENAME_DEFAULT));
+ }
+
</pre><pre class="diff" id="context"> $product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$_GET['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$osC_Session->value('languages_id') . "'");
if (!tep_db_num_rows($product_info_query)) {
tep_redirect(tep_href_link(FILENAME_REVIEWS));
</pre><pre class="diff"><small id="info">@@ -74,12 +78,24 @@
</small></pre><pre class="diff" id="context"> <tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
</pre><pre class="diff" id="added">+<?php
+ if ($messageStack->size('reviews') > 0) {
+?>
+ <tr>
+ <td><?php echo $messageStack->output('reviews'); ?></td>
+ </tr>
+ <tr>
+ <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
+ </tr>
+<?php
+ }
+?>
</pre><pre class="diff" id="context"> <tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
</pre><pre class="diff" id="removed">- $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$product_info['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$osC_Session->value('languages_id') . "' order by r.reviews_id desc";
</pre><pre class="diff" id="added">+ $reviews_query_raw = "select r.reviews_id, left(r.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, customers_name from " . TABLE_REVIEWS . " r where r.products_id = '" . (int)$product_info['products_id'] . "' and languages_id = '" . (int)$osC_Session->value('languages_id') . "' and r.reviews_status = 1 order by reviews_id desc";
</pre><pre class="diff" id="context"> $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0) {
</pre><pre class="diff"><small id="info">@@ -164,7 +180,13 @@
</small></pre><pre class="diff" id="context"> <tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
</pre><pre class="diff" id="removed">- <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>
</pre><pre class="diff" id="added">+ <td class="main" align="right">
+<?php
+ if ($osC_Reviews->is_enabled === true) {
+ echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>';
+ }
+?>
+ </td>
</pre><pre class="diff" id="context"> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader"><big><b>product_reviews_info.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_info.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_info.php.diff?r1=1.55&r2=1.56">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_info.php?rev=1.56&content-type=text/vnd.viewcvs-markup">1.56</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.55 -r1.56
--- product_reviews_info.php 2004/10/31 09:46:09 1.55
+++ product_reviews_info.php 2004/11/03 09:00:50 1.56
@@ -12,8 +12,12 @@
</small></pre><pre class="diff" id="context">
require('includes/application_top.php');
</pre><pre class="diff" id="added">+ if (!$osC_Services->isStarted('reviews')) {
+ tep_redirect(tep_href_link(FILENAME_DEFAULT));
+ }
+
</pre><pre class="diff" id="context"> if (isset($_GET['reviews_id']) && tep_not_null($_GET['reviews_id']) && isset($_GET['products_id']) && tep_not_null($_GET['products_id'])) {
</pre><pre class="diff" id="removed">- $review_check_query = tep_db_query("select count(*) as total from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$_GET['reviews_id'] . "' and r.products_id = '" . (int)$_GET['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$osC_Session->value('languages_id') . "'");
</pre><pre class="diff" id="added">+ $review_check_query = tep_db_query("select count(*) as total from " . TABLE_REVIEWS . " r where r.reviews_id = '" . (int)$_GET['reviews_id'] . "' and r.products_id = '" . (int)$_GET['products_id'] . "' and r.languages_id = '" . (int)$osC_Session->value('languages_id') . "'");
</pre><pre class="diff" id="context"> $review_check = tep_db_fetch_array($review_check_query);
if ($review_check['total'] < 1) {
</pre><pre class="diff"><small id="info">@@ -25,7 +29,7 @@
</small></pre><pre class="diff" id="context">
tep_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . (int)$_GET['reviews_id'] . "'");
</pre><pre class="diff" id="removed">- $review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$osC_Session->value('languages_id') . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$osC_Session->value('languages_id') . "'");
</pre><pre class="diff" id="added">+ $review_query = tep_db_query("select r.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$_GET['reviews_id'] . "' and r.languages_id = '" . (int)$osC_Session->value('languages_id') . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$osC_Session->value('languages_id') . "' and r.reviews_status = 1");
</pre><pre class="diff" id="context"> $review = tep_db_fetch_array($review_query);
if ( ($osC_Services->isStarted('specials')) && ($new_price = $osC_Specials->getPrice($review['products_id'])) ) {
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader"><big><b>product_reviews_write.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_write.php?rev=1.60&content-type=text/vnd.viewcvs-markup">1.60</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_write.php.diff?r1=1.60&r2=1.61">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/product_reviews_write.php?rev=1.61&content-type=text/vnd.viewcvs-markup">1.61</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.60 -r1.61
--- product_reviews_write.php 2004/10/31 09:46:09 1.60
+++ product_reviews_write.php 2004/11/03 09:00:50 1.61
@@ -12,7 +12,13 @@
</small></pre><pre class="diff" id="context">
require('includes/application_top.php');
</pre><pre class="diff" id="removed">- if ($osC_Customer->isLoggedOn() == false) {
</pre><pre class="diff" id="added">+ require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_PRODUCT_REVIEWS_WRITE);
+
+ if (!$osC_Services->isStarted('reviews')) {
+ tep_redirect(tep_href_link(FILENAME_DEFAULT));
+ }
+
+ if ( ($osC_Customer->isLoggedOn() == false ) && (SERVICE_REVIEW_ENABLE_REVIEWS == 1) ) {
</pre><pre class="diff" id="context"> $navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
</pre><pre class="diff"><small id="info">@@ -25,13 +31,22 @@
</small></pre><pre class="diff" id="context"> $product_info = tep_db_fetch_array($product_info_query);
}
</pre><pre class="diff" id="removed">- $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$osC_Customer->id . "'");
- $customer = tep_db_fetch_array($customer_query);
-
</pre><pre class="diff" id="added">+ if ($osC_Customer->isLoggedOn() === true) {
+ $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$osC_Customer->id . "'");
+ $customer = tep_db_fetch_array($customer_query);
+ }
+
</pre><pre class="diff" id="context"> if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
$rating = tep_db_prepare_input($_POST['rating']);
$review = tep_db_prepare_input($_POST['review']);
</pre><pre class="diff" id="added">+ if ($osC_Customer->isLoggedOn() === false) {
+ $customer_name = $_POST['customer_name'];
+ } else {
+ $customer_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname'];
+ }
+
+
</pre><pre class="diff" id="context"> $error = false;
if (strlen($review) < REVIEW_TEXT_MIN_LENGTH) {
$error = true;
</pre><pre class="diff"><small id="info">@@ -46,11 +61,25 @@
</small></pre><pre class="diff" id="context"> }
if ($error == false) {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added) values ('" . (int)$_GET['products_id'] . "', '" . (int)$osC_Customer->id . "', '" . tep_db_input($customer['customers_firstname']) . ' ' . tep_db_input($customer['customers_lastname']) . "', '" . tep_db_input($rating) . "', now())");
- $insert_id = tep_db_insert_id();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text) values ('" . (int)$insert_id . "', '" . (int)$osC_Session->value('languages_id') . "', '" . tep_db_input($review) . "')");
-
</pre><pre class="diff" id="added">+ if ($osC_Reviews->is_moderated === true) {
+ $reviews_status = '0';
+ $messageStack->add_session('reviews', TEXT_REVIEW_MODERATION, 'success');
+ } else {
+ $reviews_status = '1';
+ }
+
+ $Qreview = $osC_Database->query('insert into :table_reviews (products_id, customers_id, customers_name, reviews_rating, languages_id, reviews_text, reviews_status, date_added) values (:products_id, :customer_id, :customers_name, :rating, :language_id, :review, :review_status, now())');
+ $Qreview->bindTable(':table_reviews', TABLE_REVIEWS);
+ $Qreview->bindInt(':products_id', $_GET['products_id']);
+ $Qreview->bindInt(':customer_id', $osC_Customer->id);
+ $Qreview->bindValue(':customers_name', $customer_name);
+ $Qreview->bindValue(':rating', trim($rating));
+ $Qreview->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qreview->bindValue(':review', trim($review));
+ $Qreview->bindInt(':review_status', $reviews_status);
+ $Qreview->execute();
+
</pre><pre class="diff" id="context"> tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action'))));
}
}
</pre><pre class="diff"><small id="info">@@ -67,8 +96,6 @@
</small></pre><pre class="diff" id="context"> $products_name = $product_info['products_name'];
}
</pre><pre class="diff" id="removed">- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_PRODUCT_REVIEWS_WRITE);
-
</pre><pre class="diff" id="context"> $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
</pre><pre class="diff"><small id="info">@@ -151,9 +178,37 @@
</small></pre><pre class="diff" id="context"> <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
</pre><pre class="diff" id="added">+<?php
+ if ($osC_Customer->isLoggedOn() == false) {
+?>
+ <tr>
+ <td><table width="50%" border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="main"><?php echo '<b>' . ENTRY_NAME . '</b> '; ?></td>
+ <td class="main"><?php echo osc_draw_input_field('customer_name'); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
+ </tr>
+ <tr>
+ <td class="main"><?php echo '<b>' . ENTRY_EMAIL_ADDRESS . '</b> '; ?></td>
+ <td class="main"><?php echo osc_draw_input_field('customer_email_address'); ?></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
+ </tr>
+<?php
+ } else {
+ ?>
</pre><pre class="diff" id="context"> <tr>
<td class="main"><?php echo '<b>' . SUB_TITLE_FROM . '</b> ' . tep_output_string_protected($customer['customers_firstname'] . ' ' . $customer['customers_lastname']); ?></td>
</tr>
</pre><pre class="diff" id="added">+<?php
+ }
+ ?>
</pre><pre class="diff" id="context"> <tr>
<td class="main"><b><?php echo SUB_TITLE_REVIEW; ?></b></td>
</tr>
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader"><big><b>reviews.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/reviews.php?rev=1.52&content-type=text/vnd.viewcvs-markup">1.52</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/reviews.php.diff?r1=1.52&r2=1.53">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/reviews.php?rev=1.53&content-type=text/vnd.viewcvs-markup">1.53</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.52 -r1.53
--- reviews.php 2003/11/17 21:06:26 1.52
+++ reviews.php 2004/11/03 09:00:50 1.53
@@ -12,6 +12,10 @@
</small></pre><pre class="diff" id="context">
require('includes/application_top.php');
</pre><pre class="diff" id="added">+ if (!$osC_Services->isStarted('reviews')) {
+ tep_redirect(tep_href_link(FILENAME_DEFAULT));
+ }
+
</pre><pre class="diff" id="context"> require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_REVIEWS);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_REVIEWS));
</pre><pre class="diff"><small id="info">@@ -53,7 +57,7 @@
</small></pre><pre class="diff" id="context"> <tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
</pre><pre class="diff" id="removed">- $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$osC_Session->value('languages_id') . "' and rd.languages_id = '" . (int)$osC_Session->value('languages_id') . "' order by r.reviews_id DESC";
</pre><pre class="diff" id="added">+ $reviews_query_raw = "select r.reviews_id, left(r.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$osC_Session->value('languages_id') . "' and r.languages_id = '" . (int)$osC_Session->value('languages_id') . "' and r.reviews_status = 1 order by r.reviews_id DESC";
</pre><pre class="diff" id="context"> $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0) {
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a><br /></span>
<div class="fileheader"><big><b>database_tables.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/database_tables.php?rev=1.5&content-type=text/vnd.viewcvs-markup">1.5</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/database_tables.php.diff?r1=1.5&r2=1.6">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/database_tables.php?rev=1.6&content-type=text/vnd.viewcvs-markup">1.6</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- database_tables.php 2004/08/25 20:02:46 1.5
+++ database_tables.php 2004/11/03 09:00:58 1.6
@@ -51,7 +51,6 @@
</small></pre><pre class="diff" id="context"> define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', DB_TABLE_PREFIX . 'products_options_values_to_products_options');
define('TABLE_PRODUCTS_TO_CATEGORIES', DB_TABLE_PREFIX . 'products_to_categories');
define('TABLE_REVIEWS', DB_TABLE_PREFIX . 'reviews');
</pre><pre class="diff" id="removed">- define('TABLE_REVIEWS_DESCRIPTION', DB_TABLE_PREFIX . 'reviews_description');
</pre><pre class="diff" id="context"> define('TABLE_SESSIONS', DB_TABLE_PREFIX . 'sessions');
define('TABLE_SPECIALS', DB_TABLE_PREFIX . 'specials');
define('TABLE_TAX_CLASS', DB_TABLE_PREFIX . 'tax_class');
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes">boxes</a><br /></span>
<div class="fileheader"><big><b>reviews.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/reviews.php?rev=1.41&content-type=text/vnd.viewcvs-markup">1.41</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/reviews.php.diff?r1=1.41&r2=1.42">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/reviews.php?rev=1.42&content-type=text/vnd.viewcvs-markup">1.42</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.41 -r1.42
--- reviews.php 2004/02/16 07:26:17 1.41
+++ reviews.php 2004/11/03 09:01:00 1.42
@@ -9,61 +9,66 @@
</small></pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff" id="added">+
+ if ($osC_Services->isStarted('reviews')) {
+
</pre><pre class="diff" id="context"> ?>
<!-- reviews //-->
<tr>
<td>
<?php
</pre><pre class="diff" id="removed">- $info_box_contents = array();
- $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);
-
- new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_REVIEWS));
</pre><pre class="diff" id="added">+ $info_box_contents = array();
+ $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $info_box_contents = array();
-
- $random_query = 'select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from :table_reviews r, :table_reviews_description rd, :table_products p, :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.reviews_id = rd.reviews_id and rd.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id';
- if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
- $random_query .= ' and p.products_id = :products_id';
- }
- $random_query .= ' order by r.reviews_id desc limit :max_random_select_reviews';
</pre><pre class="diff" id="added">+ new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_REVIEWS));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $Qreviews = $osC_Database->query($random_query);
- $Qreviews->bindRaw(':table_reviews', TABLE_REVIEWS);
- $Qreviews->bindRaw(':table_reviews_description', TABLE_REVIEWS_DESCRIPTION);
- $Qreviews->bindRaw(':table_products', TABLE_PRODUCTS);
- $Qreviews->bindRaw(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
- $Qreviews->bindInt(':language_id', $osC_Session->value('languages_id'));
- $Qreviews->bindInt(':language_id', $osC_Session->value('languages_id'));
- $Qreviews->bindRaw(':max_random_select_reviews', MAX_RANDOM_SELECT_REVIEWS);
</pre><pre class="diff" id="added">+ $info_box_contents = array();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
- $Qreviews->bindInt(':products_id', $_GET['products_id']);
- }
</pre><pre class="diff" id="added">+ $random_query = 'select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from :table_reviews r, :table_products p, :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1';
+ if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
+ $random_query .= ' and p.products_id = :products_id';
+ }
+ $random_query .= ' order by r.reviews_id desc limit :max_random_select_reviews';
+
+ $Qreviews = $osC_Database->query($random_query);
+ $Qreviews->bindRaw(':table_reviews', TABLE_REVIEWS);
+ $Qreviews->bindRaw(':table_products', TABLE_PRODUCTS);
+ $Qreviews->bindRaw(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
+ $Qreviews->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qreviews->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qreviews->bindRaw(':max_random_select_reviews', MAX_RANDOM_SELECT_REVIEWS);
+
+ if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
+ $Qreviews->bindInt(':products_id', $_GET['products_id']);
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if ($Qreviews->executeRandomMulti()) {
</pre><pre class="diff" id="added">+ <span id="addedchars"> </span>if ($Qreviews->executeRandomMulti()) {
</pre><pre class="diff" id="context"> // display random review box
</pre><pre class="diff" id="removed">- $Qreview_text = $osC_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews_description where reviews_id = :reviews_id and languages_id = :languages_id');
- $Qreview_text->bindRaw(':table_reviews_description', TABLE_REVIEWS_DESCRIPTION);
- $Qreview_text->bindInt(':reviews_id', $Qreviews->valueInt('reviews_id'));
- $Qreview_text->bindInt(':languages_id', $osC_Session->value('languages_id'));
- $Qreview_text->execute();
-
- $review_text = tep_break_string($Qreview_text->valueProtected('reviews_text'), 15, '-<br>');
-
- $info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $Qreviews->valueInt('products_id') . '&reviews_id=' . $Qreviews->valueInt('reviews_id')) . '">' . tep_image(DIR_WS_IMAGES . $Qreviews->value('products_image'), $Qreviews->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $Qreviews->valueInt('products_id') . '&reviews_id=' . $Qreviews->valueInt('reviews_id')) . '">' . $review_text . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $Qreviews->valueInt('reviews_rating') . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $Qreviews->valueInt('reviews_rating'))) . '</div>');
-
- $Qreview_text->freeResult();
- $Qreviews->freeResult();
- } elseif (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
</pre><pre class="diff" id="added">+ $Qreview_text = $osC_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id');
+ $Qreview_text->bindRaw(':table_reviews', TABLE_REVIEWS);
+ $Qreview_text->bindInt(':reviews_id', $Qreviews->valueInt('reviews_id'));
+ $Qreview_text->bindInt(':languages_id', $osC_Session->value('languages_id'));
+ $Qreview_text->execute();
+
+ $review_text = tep_break_string($Qreview_text->valueProtected('reviews_text'), 15, '-<br>');
+
+ $info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $Qreviews->valueInt('products_id') . '&reviews_id=' . $Qreviews->valueInt('reviews_id')) . '">' . tep_image(DIR_WS_IMAGES . $Qreviews->value('products_image'), $Qreviews->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $Qreviews->valueInt('products_id') . '&reviews_id=' . $Qreviews->valueInt('reviews_id')) . '">' . $review_text . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $Qreviews->valueInt('reviews_rating') . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $Qreviews->valueInt('reviews_rating'))) . '</div>');
+
+ $Qreview_text->freeResult();
+ $Qreviews->freeResult();
+ } elseif (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
</pre><pre class="diff" id="context"> // display 'write a review' box
</pre><pre class="diff" id="removed">- $info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $_GET['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $_GET['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td></tr></table>');
- } else {
</pre><pre class="diff" id="added">+ $info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $_GET['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $_GET['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td></tr></table>');
+ } else {
</pre><pre class="diff" id="context"> // display 'no reviews' box
</pre><pre class="diff" id="removed">- $info_box_contents[] = array('text' => BOX_REVIEWS_NO_REVIEWS);
- }
</pre><pre class="diff" id="added">+ $info_box_contents[] = array('text' => BOX_REVIEWS_NO_REVIEWS);
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- new infoBox($info_box_contents);
</pre><pre class="diff" id="added">+ <span id="addedchars"> </span>new infoBox($info_box_contents);
</pre><pre class="diff" id="context"> ?>
</td>
</tr>
<!-- reviews_eof //-->
</pre><pre class="diff" id="added">+<?php
+ }
+?>
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes">classes</a><br /></span>
<div class="fileheader" id="added"><big><b>reviews.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/reviews.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N reviews.php
--- /dev/null Wed Nov 3 10:01:05 2004
+++ /tmp/cvsAAAW4aqVW Wed Nov 3 10:01:05 2004
@@ -0,0 +1,92 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ class osC_Reviews {
+ var $is_enabled = false,
+ $is_moderated = false;
+
+// class constructor
+ function osC_Reviews() {
+
+ $this->enableReviews();
+ $this->enableModeration();
+ }
+
+ function enableReviews() {
+ global $osC_Database, $osC_Customer;
+
+ switch (SERVICE_REVIEW_ENABLE_REVIEWS) {
+ case 0:
+ $this->is_enabled = true;
+ break;
+ case 1:
+ if ($osC_Customer->isLoggedOn() == true) {
+ $this->is_enabled = true;
+ } else {
+ $this->is_enabled = false;
+ }
+ break;
+ case 2:
+ if ($this->hasPurchased() == true) {
+ $this->is_enabled = true;
+ } else {
+ $this->is_enabled = false;
+ }
+ break;
+ default:
+ $this->is_enabled = false;
+ break;
+ }
+ }
+
+ function hasPurchased() {
+ global $osC_Database, $osC_Customer;
+
+ $Qhaspurchased = $osC_Database->query('select count(*) as total from :table_orders o, :table_orders_products op, :table_products p where o.customers_id = :customers_id and o.orders_id = op.orders_id and op.products_id = p.products_id and op.products_id = :products_id');
+ $Qhaspurchased->bindRaw(':table_orders', TABLE_ORDERS);
+ $Qhaspurchased->bindRaw(':table_orders_products', TABLE_ORDERS_PRODUCTS);
+ $Qhaspurchased->bindRaw(':table_products', TABLE_PRODUCTS);
+ $Qhaspurchased->bindInt(':customers_id', $osC_Customer->id);
+ $Qhaspurchased->bindInt(':products_id', $_GET['products_id']);
+ $Qhaspurchased->execute();
+
+ if ($Qhaspurchased->valueInt('total') >= '1') {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ function enableModeration() {
+ global $osC_Database, $osC_Customer;
+
+ switch (SERVICE_REVIEW_ENABLE_MODERATION) {
+ case -1:
+ $this->is_moderated = false;
+ break;
+ case 0:
+ if ($osC_Customer->isLoggedOn() === true) {
+ $this->is_moderated = false;
+ } else {
+ $this->is_moderated = true;
+ }
+ break;
+ case 1:
+ $this->is_moderated = true;
+ break;
+ default:
+ $this->is_moderated = true;
+ break;
+ }
+ }
+ }
+?>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english">english</a><br /></span>
<div class="fileheader"><big><b>product_reviews_write.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english/product_reviews_write.php?rev=1.7&content-type=text/vnd.viewcvs-markup">1.7</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english/product_reviews_write.php.diff?r1=1.7&r2=1.8">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/english/product_reviews_write.php?rev=1.8&content-type=text/vnd.viewcvs-markup">1.8</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- product_reviews_write.php 2003/06/05 23:23:52 1.7
+++ product_reviews_write.php 2004/11/03 09:01:05 1.8
@@ -20,5 +20,9 @@
</small></pre><pre class="diff" id="context"> define('TEXT_BAD', '<small><font color="#ff0000"><b>BAD</b></font></small>');
define('TEXT_GOOD', '<small><font color="#ff0000"><b>GOOD</b></font></small>');
</pre><pre class="diff" id="added">+define('ENTRY_NAME', 'Name:');
+
+define('TEXT_REVIEW_MODERATION', 'Your review has been recieved and queued for approval by the store owner');
+
</pre><pre class="diff" id="context"> define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');
?>
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol">espanol</a><br /></span>
<div class="fileheader"><big><b>product_reviews_write.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol/product_reviews_write.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol/product_reviews_write.php.diff?r1=1.10&r2=1.11">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/espanol/product_reviews_write.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- product_reviews_write.php 2003/07/08 16:45:36 1.10
+++ product_reviews_write.php 2004/11/03 09:01:09 1.11
@@ -20,5 +20,9 @@
</small></pre><pre class="diff" id="context"> define('TEXT_BAD', '<small><font color="#ff0000"><b>MALO</b></font></small>');
define('TEXT_GOOD', '<small><font color="#ff0000"><b>BUENO</b></font></small>');
</pre><pre class="diff" id="added">+define('ENTRY_NAME', 'Name:');
+
+define('TEXT_REVIEW_MODERATION', 'Your review has been recieved and queued for approval by the store owner');
+
</pre><pre class="diff" id="context"> define('TEXT_CLICK_TO_ENLARGE', 'Haga Click para agrandar');
?>
</pre></div>
<hr /><a name="file11" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german">german</a><br /></span>
<div class="fileheader"><big><b>product_reviews_write.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german/product_reviews_write.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german/product_reviews_write.php.diff?r1=1.10&r2=1.11">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/languages/german/product_reviews_write.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- product_reviews_write.php 2003/06/05 23:23:53 1.10
+++ product_reviews_write.php 2004/11/03 09:01:11 1.11
@@ -20,5 +20,9 @@
</small></pre><pre class="diff" id="context"> define('TEXT_BAD', '<small><font color="#ff0000"><b>SCHLECHT</b></font></small>');
define('TEXT_GOOD', '<small><font color="#ff0000"><b>SEHR GUT</b></font></small>');
</pre><pre class="diff" id="added">+define('ENTRY_NAME', 'Name:');
+
+define('TEXT_REVIEW_MODERATION', 'Your review has been recieved and queued for approval by the store owner');
+
</pre><pre class="diff" id="context"> define('TEXT_CLICK_TO_ENLARGE', 'F&uuml;r eine gr&ouml;ssere Darstellung<br>klicken Sie auf das Bild.');
?>
</pre></div>
<hr /><a name="file12" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services">services</a><br /></span>
<div class="fileheader" id="added"><big><b>reviews.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/reviews.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N reviews.php
--- /dev/null Wed Nov 3 10:01:18 2004
+++ /tmp/cvsAAArha4kX Wed Nov 3 10:01:18 2004
@@ -0,0 +1,47 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ class osC_Services_reviews {
+ var $title = 'Reviews',
+ $description = 'Enable Product Reviews.',
+ $uninstallable = true,
+ $depends,
+ $preceeds;
+
+ function start() {
+ global $osC_Reviews;
+ include('includes/classes/reviews.php');
+
+ $osC_Reviews = new osC_Reviews();
+ return true;
+ }
+
+ function stop() {
+ return true;
+ }
+
+ function install() {
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('New Reviews', 'MAX_DISPLAY_NEW_REVIEWS', '6', 'Maximum number of new reviews to display', '6', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Selection of Random Reviews', 'MAX_RANDOM_SELECT_REVIEWS', '10', 'How many records to select from to choose one random product review', '6', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Review Level', 'SERVICE_REVIEW_ENABLE_REVIEWS', '1', 'Customer level required to write a review.', '6', '0', 'tep_cfg_select_option(array(\'0\', \'1\', \'2\'), ', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Moderate Reviews', 'SERVICE_REVIEW_ENABLE_MODERATION', '-1', 'Should reviews be approved by store admin.', '6', '0', 'tep_cfg_select_option(array(\'-1\', \'0\', \'1\'), ', now())");
+ }
+
+ function remove() {
+ tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ function keys() {
+ return array('MAX_DISPLAY_NEW_REVIEWS', 'MAX_RANDOM_SELECT_REVIEWS', 'SERVICE_REVIEW_ENABLE_REVIEWS', 'SERVICE_REVIEW_ENABLE_MODERATION');
+ }
+ }
+?>
</pre></div>
<hr /><a name="file13" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install">install</a><br /></span>
<div class="fileheader"><big><b>oscommerce.sql</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce.sql?rev=1.103&content-type=text/vnd.viewcvs-markup">1.103</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce.sql.diff?r1=1.103&r2=1.104">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce.sql?rev=1.104&content-type=text/vnd.viewcvs-markup">1.104</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.103 -r1.104
--- oscommerce.sql 2004/10/31 09:46:20 1.103
+++ oscommerce.sql 2004/11/03 09:01:18 1.104
@@ -489,20 +489,15 @@
</small></pre><pre class="diff" id="context"> customers_id int,
customers_name varchar(64) NOT NULL,
reviews_rating int(1),
</pre><pre class="diff" id="added">+ languages_id int NOT NULL,
+ reviews_text text NOT NULL,
</pre><pre class="diff" id="context"> date_added datetime,
last_modified datetime,
reviews_read int(5) NOT NULL default '0',
</pre><pre class="diff" id="added">+ reviews_status tinyint(1) NOT NULL,
</pre><pre class="diff" id="context"> PRIMARY KEY (reviews_id)
);
</pre><pre class="diff" id="removed">-DROP TABLE IF EXISTS osc_reviews_description;
-CREATE TABLE osc_reviews_description (
- reviews_id int NOT NULL,
- languages_id int NOT NULL,
- reviews_text text NOT NULL,
- PRIMARY KEY (reviews_id, languages_id)
-);
-
</pre><pre class="diff" id="context"> DROP TABLE IF EXISTS osc_sessions;
CREATE TABLE osc_sessions (
sesskey varchar(32) NOT NULL,
</pre><pre class="diff"><small id="info">@@ -649,8 +644,6 @@
</small></pre><pre class="diff" id="context"> INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Manufacturers List', 'MAX_DISPLAY_MANUFACTURERS_IN_A_LIST', '0', 'Used in manufacturers box; when the number of manufacturers exceeds this number, a drop-down list will be displayed instead of the default list', '3', '7', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Manufacturers Select Size', 'MAX_MANUFACTURERS_LIST', '1', 'Used in manufacturers box; when this value is \'1\' the classic drop-down list will be used for the manufacturers box. Otherwise, a list-box with the specified number of rows will be displayed.', '3', '7', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Length of Manufacturers Name', 'MAX_DISPLAY_MANUFACTURER_NAME_LEN', '15', 'Used in manufacturers box; maximum length of manufacturers name to display', '3', '8', now());
</pre><pre class="diff" id="removed">-INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('New Reviews', 'MAX_DISPLAY_NEW_REVIEWS', '6', 'Maximum number of new reviews to display', '3', '9', now());
-INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Selection of Random Reviews', 'MAX_RANDOM_SELECT_REVIEWS', '10', 'How many records to select from to choose one random product review', '3', '10', now());
</pre><pre class="diff" id="context"> INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Selection of Random New Products', 'MAX_RANDOM_SELECT_NEW', '10', 'How many records to select from to choose one random new product to display', '3', '11', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Categories To List Per Row', 'MAX_DISPLAY_CATEGORIES_PER_ROW', '3', 'How many categories to list per row', '3', '13', now());
</pre><pre class="diff"><small id="info">@@ -756,7 +749,7 @@
</small></pre><pre class="diff" id="context"> INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Confirm Terms and Conditions During Checkout Procedure', 'DISPLAY_CONDITIONS_ON_CHECKOUT', 'false', 'Show the Terms and Conditions during the checkout procedure which the customer must agree to.', '16', '1', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Confirm Privacy Notice During Account Creation Procedure', 'DISPLAY_PRIVACY_CONDITIONS', 'false', 'Show the Privacy Notice during the account creation procedure which the customer must agree to.', '16', '2', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now());
</pre><pre class="diff" id="removed">-INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Service Modules', 'MODULE_SERVICES_INSTALLED', 'output_compression;se<span id="removedchars">fu;session;language;currencies;simple_counter;category_path;breadcrumb;whos_online;banner;specials;debug</span>', 'Installed services modules', '6', '0', now());
</pre><pre class="diff" id="added">+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Service Modules', 'MODULE_SERVICES_INSTALLED', 'output_compression;se<span id="addedchars">ssion;language;currencies;simple_counter;category_path;breadcrumb;whos_online;banner;specials;debug;reviews</span>', 'Installed services modules', '6', '0', now());
</pre><pre class="diff" id="context"> INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Show Number Of Products In Each Category', 'SHOW_COUNTS', 'true', 'Recursively count how many products are in each category.', '6', '0', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Use Default Language Currency', 'USE_DEFAULT_LANGUAGE_CURRENCY', 'false', 'Automatically use the currency set with the language (eg, German->Euro).', '6', '0', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Page Execution Time Log File', 'SERVICE_DEBUG_EXECUTION_TIME_LOG', '', 'Location of the page execution time log file (eg, /www/log/page_parse.log).', '6', '0', now());
</pre><pre class="diff"><small id="info">@@ -777,6 +770,10 @@
</small></pre><pre class="diff" id="context"> INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Check IP Address', 'SERVICE_SESSION_CHECK_IP_ADDRESS', 'False', 'Check the IP address on every page request.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Regenerate Session ID', 'SERVICE_SESSION_REGENERATE_ID', 'False', 'Regenerate the session ID when a customer logs on or creates an account (requires PHP >= 4.1).', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Detect Search Engine Spider Robots', 'SERVICE_WHOS_ONLINE_SPIDER_DETECTION', 'True', 'Detect search engine spider robots (GoogleBot, Yahoo, etc).', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());
</pre><pre class="diff" id="added">+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('New Reviews', 'MAX_DISPLAY_NEW_REVIEWS', '6', 'Maximum number of new reviews to display', '6', '0', now());
+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Selection of Random Reviews', 'MAX_RANDOM_SELECT_REVIEWS', '10', 'How many records to select from to choose one random product review', '6', '0', now());
+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Review Level', 'SERVICE_REVIEW_ENABLE_REVIEWS', '1', 'Customer level required to write a review.', '6', '0', 'tep_cfg_select_option(array(\'0\', \'1\', \'2\'), ', now());
+INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Moderate Reviews', 'SERVICE_REVIEW_ENABLE_MODERATION', '-1', 'Should reviews be approved by store admin.', '6', '0', 'tep_cfg_select_option(array(\'-1\', \'0\', \'1\'), ', now());
</pre><pre class="diff" id="context"> INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Special Products', 'MAX_DISPLAY_SPECIAL_PRODUCTS', '9', 'Maximum number of products on special to display', '6', '0', now());
INSERT INTO osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Selection of Products on Special', 'MAX_RANDOM_SELECT_SPECIALS', '10', 'How many records to select from to choose one random product special to display', '6', '0', now());
</pre></div>
<hr /><a name="file14" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install">install</a><br /></span>
<div class="fileheader"><big><b>oscommerce_sample_data.sql</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce_sample_data.sql?rev=1.6&content-type=text/vnd.viewcvs-markup">1.6</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce_sample_data.sql.diff?r1=1.6&r2=1.7">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/install/oscommerce_sample_data.sql?rev=1.7&content-type=text/vnd.viewcvs-markup">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- oscommerce_sample_data.sql 2004/10/31 09:46:21 1.6
+++ oscommerce_sample_data.sql 2004/11/03 09:01:19 1.7
@@ -363,9 +363,7 @@
</small></pre><pre class="diff" id="context"> INSERT INTO osc_products_to_categories VALUES (26,9);
INSERT INTO osc_products_to_categories VALUES (27,5);
</pre><pre class="diff" id="removed">-INSERT INTO osc_reviews VALUES (1,19,1,'John doe',5, now(),'',0);
-
-INSERT INTO osc_reviews_description VALUES (1,1, 'this has to be one of the funniest movies released for 1999!');
</pre><pre class="diff" id="added">+INSERT INTO osc_reviews VALUES (1,19,1,'John doe',5,1, 'this has to be one of the funniest movies released for 1999!', now(),'',0, 1);
</pre><pre class="diff" id="context">
INSERT INTO osc_specials VALUES (1,3, 39.99, now(), '', '', '', '', '1');
INSERT INTO osc_specials VALUES (2,5, 30.00, now(), '', '', '', '', '1');
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click