2011-06-02 01:09:03 +02:00
|
|
|
<?php
|
2013-10-13 00:52:44 +02:00
|
|
|
|
2011-06-02 01:09:03 +02:00
|
|
|
function counter() {
|
2013-10-13 00:52:44 +02:00
|
|
|
global $p;
|
2011-06-02 01:09:03 +02:00
|
|
|
|
2013-10-13 00:52:44 +02:00
|
|
|
if (sql_num_query("SELECT `Anz` FROM `Counter` WHERE `URL`='" . sql_escape($p) . "'") == 0)
|
|
|
|
sql_query("INSERT INTO `Counter` ( `URL` , `Anz` ) VALUES ('" . sql_escape($p) . "', '1');");
|
|
|
|
else
|
|
|
|
sql_query("UPDATE `Counter` SET `Anz` = `Anz` + 1 WHERE `URL` = '" . sql_escape($p) . "' LIMIT 1 ;");
|
2011-06-02 01:09:03 +02:00
|
|
|
}
|
|
|
|
?>
|