date_sub(now(), interval 60 minute) "); $counter_c1 = mysqlFetch($counter_q1); if($counter_c1[0] == 0) { if(!$HTTP_REFERER) { $HTTP_REFERER = "µµ¸ÞÀÎÁÖ¼Ò ÀÔ·Â(¶Ç´Â Áñ°Üã±â)"; } $counter_q2 = mysqlQuery(" insert into n_counter(code, visited, ip, browser, path, visit) values('', now(), '$REMOTE_ADDR', '$HTTP_USER_AGENT', '$HTTP_REFERER', '$PHP_SELF') "); } /////////////////////////////////// $counterApply = "done"; } if($counterDate == 't') { $counter_q1 = mysqlQuery(" select count(code) from n_counter "); $counter_c1 = mysqlFetch($counter_q1); $counterTotal = sprintf('%07d', $counter_c1[0]); for($i=0;$i<7;$i++) { echo ""; } } else if($counterDate == 'h') { $counter_q1 = mysqlQuery(" select count from n_counterPage where pageUrl = '$PHP_SELF' "); $counter_c1 = mysqlFetch($counter_q1); $counterHit = sprintf('%07d', $counter_c1[0]); for($i=0;$i<7;$i++) { echo ""; } } else if($counterDate == '') { // do not display } else if($counterDate == '0') { $counter_q1 = mysqlQuery(" select now() "); $counter_c1 = mysqlFetch($counter_q1); $countComp = dateFormat($counter_c1[0]); $counter_q2 = mysqlQuery(" select count(code) from n_counter where visited like '$countComp[0]-$countComp[1]-$countComp[2] %' "); $counter_c2 = mysqlFetch($counter_q2); $counterToday = sprintf('%07d', $counter_c2[0]); for($i=0;$i<7;$i++) { echo ""; } } else { $counterDate = abs($counterDate); if($counterDate != 0) { $counter_q1 = mysqlQuery(" select date_sub(now(), INTERVAL $counterDate DAY) "); $counter_c1 = mysqlFetch($counter_q1); $countComp = dateFormat($counter_c1[0]); $counter_q2 = mysqlQuery(" select count(code) from n_counter where visited like '$countComp[0]-$countComp[1]-$countComp[2] %' "); $counter_c2 = mysqlFetch($counter_q2); $counterBefore = sprintf('%07d', $counter_c2[0]); for($i=0;$i<7;$i++) { echo ""; } } } ?>