diff options
Diffstat (limited to 'includes/sys_counter.php')
-rw-r--r-- | includes/sys_counter.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/sys_counter.php b/includes/sys_counter.php new file mode 100644 index 00000000..abcb652b --- /dev/null +++ b/includes/sys_counter.php @@ -0,0 +1,10 @@ +<?php +function counter() { + global $p; + + 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 ;"); +} +?> |