summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-06-02 01:09:03 +0200
committerPhilip Häusler <msquare@notrademark.de>2011-06-02 01:09:03 +0200
commit10683c4759c2c3563ff7ed48b15d12e85cd0631b (patch)
treea6c2b76a3a2c088a86b7a882afefb67424f48334
parentc90fdf75a26e6abf2434068d4aa3cfcb190eb600 (diff)
counter
-rw-r--r--includes/crypt.php12
-rw-r--r--includes/funktion_counter.php14
-rw-r--r--includes/sys_counter.php10
-rw-r--r--includes/sys_menu.php4
-rw-r--r--www-ssl/index.php3
5 files changed, 15 insertions, 28 deletions
diff --git a/includes/crypt.php b/includes/crypt.php
deleted file mode 100644
index 8de22030..00000000
--- a/includes/crypt.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
- function PassCrypt($passwort) {
- include "../../config/config.php";
-
- switch ($crypt_system) {
- case "crypt":
- return "{crypt}" . crypt($passwort, "77");
- case "md5":
- return md5($passwort);
- }
- }
-?>
diff --git a/includes/funktion_counter.php b/includes/funktion_counter.php
deleted file mode 100644
index 39d65a1f..00000000
--- a/includes/funktion_counter.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
- $SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"" . $Page["Name"] . "\"";
- $Erg = mysql_query($SQL, $con);
-
- echo mysql_error($con);
-
- if(mysql_num_rows($Erg) == 0) {
- $SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) VALUES ('" . $Page["Name"] . "', '1');";
- $Erg = mysql_query($SQL, $con);
- } elseif(mysql_num_rows($Erg) == 1) {
- $SQL = "UPDATE `Counter` SET `Anz` = '" . (mysql_result($Erg, 0, 0) +1) . "' WHERE `URL` = '" . $Page["Name"] . "' LIMIT 1 ;";
- $Erg = mysql_query($SQL, $con);
- }
-?>
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 ;");
+}
+?>
diff --git a/includes/sys_menu.php b/includes/sys_menu.php
index 8c993d1b..6a24deaf 100644
--- a/includes/sys_menu.php
+++ b/includes/sys_menu.php
@@ -36,8 +36,8 @@ function make_onlineusers() {
$html .= "<li>";
- if (isset ($user))
- $html .= DisplayAvatar($online_user['UID']);
+ //if (isset ($user))
+ //$html .= DisplayAvatar($online_user['UID']);
// Show Admin Page
if (in_array("admin_user_edit", $privileges)) {
diff --git a/www-ssl/index.php b/www-ssl/index.php
index 5126981c..1e63ede7 100644
--- a/www-ssl/index.php
+++ b/www-ssl/index.php
@@ -1,6 +1,7 @@
<?php
require_once ('bootstrap.php');
require_once ('includes/sys_auth.php');
+require_once ('includes/sys_counter.php');
require_once ('includes/sys_lang.php');
require_once ('includes/sys_menu.php');
require_once ('includes/sys_mysql.php');
@@ -70,4 +71,6 @@ echo template_render('../templates/layout.html', array (
'menu' => make_menu(),
'content' => $content
));
+
+counter();
?>