summaryrefslogtreecommitdiff
path: root/includes/sys_counter.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/sys_counter.php')
-rw-r--r--includes/sys_counter.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/sys_counter.php b/includes/sys_counter.php
index abcb652b..40110165 100644
--- a/includes/sys_counter.php
+++ b/includes/sys_counter.php
@@ -1,10 +1,11 @@
<?php
+
function counter() {
- global $p;
+ 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 ;");
+ 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 ;");
}
?>