main
Philip Häusler 14 years ago
parent c90fdf75a2
commit 10683c4759

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

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

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

@ -36,8 +36,8 @@ function make_onlineusers() {
$html .= "<li>"; $html .= "<li>";
if (isset ($user)) //if (isset ($user))
$html .= DisplayAvatar($online_user['UID']); //$html .= DisplayAvatar($online_user['UID']);
// Show Admin Page // Show Admin Page
if (in_array("admin_user_edit", $privileges)) { if (in_array("admin_user_edit", $privileges)) {

@ -1,6 +1,7 @@
<?php <?php
require_once ('bootstrap.php'); require_once ('bootstrap.php');
require_once ('includes/sys_auth.php'); require_once ('includes/sys_auth.php');
require_once ('includes/sys_counter.php');
require_once ('includes/sys_lang.php'); require_once ('includes/sys_lang.php');
require_once ('includes/sys_menu.php'); require_once ('includes/sys_menu.php');
require_once ('includes/sys_mysql.php'); require_once ('includes/sys_mysql.php');
@ -70,4 +71,6 @@ echo template_render('../templates/layout.html', array (
'menu' => make_menu(), 'menu' => make_menu(),
'content' => $content 'content' => $content
)); ));
counter();
?> ?>

Loading…
Cancel
Save