summaryrefslogtreecommitdiff
path: root/includes/sys_counter.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-10-13 00:52:44 +0200
committerPhilip Häusler <msquare@notrademark.de>2013-10-13 00:52:44 +0200
commit3c4321ff76accb98ec3c99316766234ebcafae90 (patch)
tree7461bf942302ec3344a5006f3d40c49963ac28dc /includes/sys_counter.php
parentbfb0cacd541cc20129a3c0ac77130370741dca18 (diff)
30c3 theme
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 ;");
}
?>