';
mysql_query($sql);
}
function showActionLog(){
$qry = mysql_query('Select g.time, u.nickname, g.ip, g.message from gm_actions as g inner join user as u on g.userid = u.id order by time desc LIMIT 100');
while($row = mysql_fetch_assoc($qry)){
echo $row['time'].' '.$row['nickname'].' ('.$row['ip'].'): '.$row['message'].'
'."\n";
}
echo 'Zum Hauptmenu';
}
// Returns bool
function checkLoginData($userid, $password){
if(checkSessionPasswort($userid, $password)){
return true;
} else{
logout();
return false;
}
}
function loginUser($user,$pass){
if(checkLoginPassword($user,$pass)){
$test = 'SELECT * from user where nickname = \''.$user.'\'';
$qry = mysql_query($test);
$result = mysql_fetch_assoc($qry);
$usergroups = getUserGroups($user);
if(isUserInGroup($usergroups, ADMIN)) {
$_SESSION['user'] = $result['id'];
$_SESSION['username'] = $result['nickname'];
$_SESSION['password'] = $result['passwort'];
$_SESSION['usergroups'] = $usergroups;
echo 'Zum Hauptmenu';
return true;
}
return false;
}
echo displayHistoryBackLink();
return false;
}
function displayLogin(){
?>
"Bilderschau",
"faq" => "FAQ bearbeiten",
"rassen" => "Rassen bearbeiten",
"arena" => "Arena bearbeiten",
"attacken" => "Attacken bearbeiten",
"attackentypen" => "Attackentypen bearbeiten",
"poll" => "Umfragen bearbeiten",
"items" => "Items bearbeiten",
"rezept" => "Rezepte bearbeiten",
"clan" => "Clan bearbeiten",
"geheim" => "Geheim bearbeiten",
"usergroups" => "Nutzergruppen bearbeiten",
"bann" => "Banns und andere unschöne Sachen",
"tournament" => "Turniere bearbeiten",
"qnpc" => "Schatzsuche-Monster bearbeiten",
"npc" => "NPC bearbeiten",
"shop" => "Shakkys Shop Angebote bearbeiten",
"news" => "News bearbeiten",
"cheat" => "Multiuser und Cheater",
"log" => "Log ansehen",
"logout" => "Log out"
);
echo ''."\n";
foreach($entries as $key => $value) {
echo ''.$value.' |
'."\n";
}
echo '
'."\n";
}
function logout(){
session_unset();
}
function notyetimplemented(){
?>
Leider ist diese Funktion noch nicht implementiert!
|
Zum Hauptmenu'; ?>
|
';
displayLogin();
}
} else{
// Einloggen
displayLogin();
}
?>