bei mir funktioniert das irgendwie nicht
ich poste mal die ganze funktion glaub das is irgendwie weil
die sonderzeihen gesperrt sidn aber so siche rbin ich mir da auch net x_X
function user_login_check () {
global $allgAr;
if ( isset ($_POST['user_login_sub']) AND isset ($_POST['name']) AND isset ($_POST['pass']) ) {
debug ('posts vorhanden');
$name = escape_nickname($_POST['name']);
if ($name != $_POST['name'] OR strlen($_POST['name']) > 15) {
return false;
}
$erg = db_query("SELECT name,id,recht,pass,llogin,premium_time FROM prefix_user WHERE email = BINARY '".$name."'");
if ( db_num_rows($erg) == 1 ) {
debug ('user gefunden');
$row = db_fetch_assoc($erg);
if ( $row['pass'] == md5($_POST['pass']) ) {
debug ('passwort stimmt ... '.$row['name']);
if ( $row['premium_time'] >= time() ) {
if ( $row['recht'] > $allgAr['premium_right'] ){
$row['recht'] = $allgAr['premium_right'];
}
$_SESSION['premium'] = true;
} else {
$_SESSION['premium'] = false;
}
$_SESSION['authname'] = $row['name'];
$_SESSION['authid'] = $row['id'];
$_SESSION['authright'] = $row['recht'];
$_SESSION['authgfx'] = $row['template'];
$_SESSION['lastlogin'] = $row['llogin'];
$_SESSION['authsess'] = session_und_cookie_name();
db_query("UPDATE prefix_online SET uid = ".$_SESSION['authid']." WHERE sid = '".session_id()."'");
setcookie($_SESSION['authsess'], $row['id'].'='.$row['pass'] , time() + 31104000, "/" );
user_set_grps_and_modules();
return (true);
}
}
## IP Mod
$ip = db_fetch_assoc(db_query("SELECT * FROM `prefix_ipsperre` WHERE ip = '".getip()."'"));
$ipw = db_fetch_assoc(db_query("SELECT * FROM `prefix_ipsperre` WHERE user = '".$_POST['name']."'"));
if($ipw['try'] > 4){
$title = $allgAr['title'].' :: Login gesperrt';
$hmenu = 'Login gesperrt du Noob';
$design = new design ( $title , $hmenu);
$design->header();
wd('index.php',"Du hast versucht dich bei einem Account anzumelden, der durch den IP-Blocker gesperrt wurde!",5);
db_query('INSERT INTO `prefix_ipsperre` (ip,date,try,user) VALUES ("'.getip().'","'.time().'","5","'.$_POST['name'].'") ' );
$design->footer();
}else{
if($ip['ip'] > 0){
db_query('UPDATE `prefix_ipsperre` SET date = "'.time().'", try = "'.$ip['try'].'"+1, user = "'.$_POST['name'].'" WHERE ip = "'.getip().'"');
}else{
db_query('INSERT INTO `prefix_ipsperre` (ip,date,try,user) VALUES ("'.getip().'","'.time().'","1","'.$_POST['name'].'") ' );
}
## IP Mod
global $menu;
$menu->set_url (0, 'user');
$menu->set_url (1, 'login');
}
}
return ( false );
}
maunz? ^^