Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

184
 
210
 
210
 
reviews.php
_> 11 <?php
  22 /*
<> 3 -  $Id: reviews.php 184 2005-09-07 14:48:20Z hpdl $
   3+  $Id: reviews.php 210 2005-10-04 05:47:42Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
8888         break;
  8989       }
  9090     }
<>  91+
   92+    function getTotal($id) {
   93+      global $osC_Database;
   94+
   95+      $Qcheck = $osC_Database->query('select count(*) as total from :table_reviews where products_id = :products_id and languages_id = :languages_id and reviews_status = 1 limit 1');
   96+      $Qcheck->bindTable(':table_reviews', TABLE_REVIEWS);
   97+      $Qcheck->bindInt(':products_id', $id);
   98+      $Qcheck->bindInt(':languages_id', $_SESSION['languages_id']);
   99+      $Qcheck->execute();
   100+
   101+      return $Qcheck->valueInt('total');
   102+    }
   103+
   104+    function exists($id) {
   105+      global $osC_Database;
   106+
   107+      $Qcheck = $osC_Database->query('select reviews_id from :table_reviews where products_id = :products_id and languages_id = :languages_id and reviews_status = 1 limit 1');
   108+      $Qcheck->bindTable(':table_reviews', TABLE_REVIEWS);
   109+      $Qcheck->bindInt(':products_id', $id);
   110+      $Qcheck->bindInt(':languages_id', $_SESSION['languages_id']);
   111+      $Qcheck->execute();
   112+
   113+      if ($Qcheck->numberOfRows() === 1) {
   114+        return true;
   115+      }
   116+
   117+      return false;
   118+    }
<_ 91119   }   
  92120 ?>