counter
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 ;");
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue