| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:13:40 2008 ] | [ osCommRes 1.2.0 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 4 osCommerce, Open Source E-Commerce Solutions 5 http://www.oscommerce.com 6 7 Copyright (c) 2003 osCommerce 8 9 osCommRes, Services Online 10 http://www.oscommres.com 11 12 Copyright (c) 2005 osCommRes 13 14 Released under the GNU General Public License 15 */ 16 //// 17 // Sets the status of a special product 18 function tep_set_specials_status($specials_id, $status) { 19 return tep_db_query("update " . TABLE_SPECIALS . " set status = '" . $status . "', date_status_change = now() where specials_id = '" . (int)$specials_id . "'"); 20 } 21 22 //// 23 // Auto expire products on special 24 function tep_expire_specials() { 25 $specials_query = tep_db_query("select specials_id from " . TABLE_SPECIALS . " where status = '1' and now() >= expires_date and expires_date > 0"); 26 if (tep_db_num_rows($specials_query)) { 27 while ($specials = tep_db_fetch_array($specials_query)) { 28 tep_set_specials_status($specials['specials_id'], '0'); 29 } 30 } 31 } 32 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |