| [ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: counter.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 $counter_query = tep_db_query("select startdate, counter from " . TABLE_COUNTER); 14 15 if (!tep_db_num_rows($counter_query)) { 16 $date_now = date('Ymd'); 17 tep_db_query("insert into " . TABLE_COUNTER . " (startdate, counter) values ('" . $date_now . "', '1')"); 18 $counter_startdate = $date_now; 19 $counter_now = 1; 20 } else { 21 $counter = tep_db_fetch_array($counter_query); 22 $counter_startdate = $counter['startdate']; 23 $counter_now = ($counter['counter'] + 1); 24 tep_db_query("update " . TABLE_COUNTER . " set counter = '" . $counter_now . "'"); 25 } 26 27 $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4))); 28 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |