[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/functions/ -> specials.php (source)

   1  <?php
   2  /*

   3  $Id: specials.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13  ////

  14  // Sets the status of a special product

  15    function tep_set_specials_status($specials_id, $status) {
  16      return tep_db_query("update " . TABLE_SPECIALS . " set status = '" . $status . "', date_status_change = now() where specials_id = '" . (int)$specials_id . "'");
  17    }
  18  
  19  ////

  20  // Auto expire products on special

  21    function tep_expire_specials() {
  22      $specials_query = tep_db_query("select specials_id from " . TABLE_SPECIALS . " where status = '1' and now() >= expires_date and expires_date > 0");
  23      if (tep_db_num_rows($specials_query)) {
  24        while ($specials = tep_db_fetch_array($specials_query)) {
  25          tep_set_specials_status($specials['specials_id'], '0');
  26        }
  27      }
  28    }
  29  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7