This commit is contained in:
Philip Häusler 2011-06-02 01:09:03 +02:00
parent c90fdf75a2
commit 10683c4759
5 changed files with 15 additions and 28 deletions

View File

@ -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);
}
}
?>

View File

@ -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);
}
?>

10
includes/sys_counter.php Normal file
View File

@ -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 ;");
}
?>

View File

@ -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)) {

View File

@ -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();
?>