Copyright © 2003 EMBIT Systemy Informatyczne
|
Liczba odwiedzin:
/*/ Please enter your correct mysql login data! /*/
// Host of your mysql server (usually "localhost")
$server = "localhost";
// Username of your mysql database
$user = "embit";
// Password of your mysql database
$pass = "5_akuku_3";
// Name of your database
$mysqldb = "embit";
$action = "";
$loginpasswort = "";
$install = "";
date_default_timezone_set('Europe/Warsaw');
reset ($_GET);
while (list ($key, $val) = each ($_GET)) {
if ($key == 'action') $action = $val;
if ($key == 'loginpasswort') $loginpasswort = $val;
}
if ($action == "") {
reset ($_POST);
while (list ($key, $val) = each ($_POST)) {
if ($key == 'action') $action = $val;
if ($key == 'loginpasswort') $loginpasswort = $val;
if ($key == 'newloginpasswort') $newloginpasswort = $val;
if ($key == 'newabstand') $newabstand = $val;
if ($key == 'newipabstand') $newipabstand = $val;
if ($key == 'newgesamt') $newgesamt = $val;
if ($key == 'newheute') $newheute = $val;
if ($key == 'newtemplate') $newtemplate = $val;
}
}
/*/ DO NOT EDIT BELOW THIS LINE!!! /*/
if ($install == "") {
mysql_connect($server, $user, $pass) or DIE("tot");
mysql_select_db($mysqldb);
if ($action == "") {
$ip = $_SERVER['REMOTE_ADDR'];
$zeit = time();
$datum = date("d.m.Y");
$a = "0";
$b = "0";
$result2 = mysql_query("SELECT * FROM silvercounter WHERE id = '1'");
$resultb = mysql_fetch_array($result2);
$alt = $zeit-$resultb[7];
mysql_query("DELETE FROM silvercounter_today WHERE zeit < '$alt'");
$result1 = mysql_query("SELECT * FROM silvercounter_today");
while ($resulta = mysql_fetch_array($result1)) {
if ($resulta[1] == $ip) {$a = "1";}
}
$result3 = mysql_query("SELECT * FROM silvercounter_online");
while ($resultc = mysql_fetch_array($result3)) {
if ($resultc[1] == $ip) {$b = "1";}
}
if ($a == "0") {
$neugesamt = $resultb[1]+1;
$neuheute = $resultb[6]+1;
mysql_query("UPDATE silvercounter SET gesamt = '$neugesamt', heute = '$neuheute' WHERE id = '1'");
if ($b == "0") {
mysql_query("INSERT INTO silvercounter_online (ip, zeit) VALUES ('$ip', '$zeit')");
}
mysql_query("INSERT INTO silvercounter_today (ip, zeit) VALUES ('$ip', '$zeit')");
}
if ($a == "1") {
mysql_query("UPDATE silvercounter_online SET zeit = '$zeit' WHERE ip = '$ip'");
if ($b == "0") {
mysql_query("INSERT INTO silvercounter_online (ip, zeit) VALUES ('$ip', '$zeit')");
}
}
if ($resultb[2] != $datum) {
mysql_query("UPDATE silvercounter SET datum = '$datum', heute = '1' WHERE id = '1'");
}
$alt2 = $zeit-$resultb[4];
mysql_query("DELETE FROM silvercounter_online WHERE zeit < '$alt2'");
$result4 = mysql_query("SELECT COUNT(*) FROM silvercounter_online");
$resultd = mysql_fetch_array($result4);
$result5 = mysql_query("SELECT gesamt, heute FROM silvercounter WHERE id = '1'");
$resulte = mysql_fetch_array($result5);
$total = $resulte[0];
$today = $resulte[1];
$online = $resultd[0];
function silvercounter_template() {
$gettemplate = mysql_query("SELECT template FROM silvercounter WHERE id = '1'");
$template2 = mysql_fetch_array($gettemplate);
$templatee = $template2[0];
$templatee = str_replace("\"","\\\"", $templatee);
return $templatee;
}
eval ("\$template = \"".silvercounter_template()."\";");
echo $template;
}
if ($action != "" && $action != "install") {
?>
SilverCounter - Admin Control Panel
}
$result1 = mysql_query("SELECT passwort, abstand, gesamt, template, heute, ipabstand, installdatum FROM silvercounter");
$resulta = mysql_fetch_array($result1);
$resulta[3] = str_replace(" title=\"Powered by SilverCounter v1.0.1 - © Silver-Scripts.de\"", "", $resulta[3]);
if ($loginpasswort != $resulta[0] && $action == "login") {
?>
}
if ($loginpasswort != $resulta[0] && $action == "acp") {
?>
� Wrong Password |
|
|
You entered a wrong password! Please hit the Back-Button of your browser to return to the login screen. |
}
if ($loginpasswort == $resulta[0] && $action == "acp") {
?>
}
if ($action == "save" && $loginpasswort == $resulta[0]) {
if ($newloginpasswort == "") {$fehler = "Password";}
if ($newabstand == "") {$fehler = "User-Online Time";}
if ($newipabstand == "") {$fehler = "When to delete IPs";}
if ($newgesamt == "") {$fehler = "Total Users";}
if ($newheute == "") {$fehler = "Today Users";}
if ($newtemplate == "") {$fehler = "Template";}
if ($fehler != ""){
?>
� Error |
|
|
You didn't enter anything in the following field: |
}
if ($fehler == "") {
$newtemplate = str_replace("
}
}
?> |
Redakcja witryny: webmaster@embit.net
|
|