habe recht viele module drauf,aber wer is den für den login verantwortlich,die login.php,oder?ich poste ma meinen code hier:
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$delt = time()-86400;
db_query('DELETE FROM `prefix_ipsperre` WHERE date < "'.$delt.'"');
$tpl = new tpl ( 'user/boxen_login.htm' );
if ( loggedin() ) {
if ( user_has_admin_right($menu,false) ) {
$tpl->set ( 'ADMIN', '<a class="box" target="_blank" href="admin.php?admin"><img border="0" src="include/images/buttons/admin.png" width="100" height="16"></a>' );
} else {
$tpl->set ( 'ADMIN', '' );
}
if ( $allgAr['Fpmf'] == 1 ) {
$erg = db_query("SELECT COUNT(id) FROM `prefix_pm` WHERE gelesen = 0 AND status < 1 AND eid = ".$_SESSION['authid']);
$check_pm = db_result($erg,0);
$nachrichten_link = '<a class="box" href="index.php?forum-privmsg"><img border="0" src="include/images/buttons/nachrichten.png" width="100" height="16"></a>';
} else {
$nachrichten_link = '';
}
$erg=db_query('SELECT * FROM prefix_kasse_beitraege WHERE uid='.$_SESSION['authid']);
if(@db_num_rows($erg)==1){
$row=db_fetch_assoc($erg);
$payedto= mktime(0, 0, 0, date ("m",$row['date'])+$row['zyklus'] , date ("d",$row['date']), date("Y",$row['date']));
$prewarn= mktime(0, 0, 0, date ("m") , date ("d")+20, date("Y"));
$warn= mktime(0, 0, 0, date ("m") , date ("d")+7, date("Y"));
$alert= mktime(0, 0, 0, date ("m") , date ("d")+2, date("Y"));
$payedto2=date("d.m.Y",$payedto);
if($payedto<time()){
$beitrag='<div style="color:#9F0000;"><h3>Beitrag war zu zahlen am '.$payedto2.'</h3></div>';
} elseif($payedto>time() AND $payedto<=$alert){
$beitrag='<div style="color:#FF0033;">Beitrag ist zu zahlen am '.$payedto2.'</div>';
} elseif($payedto>time() AND $payedto<=$warn){
$beitrag='<div style="color:#FF7F00;">Beitrag ist zu zahlen am '.$payedto2.'</div>';
} elseif($payedto>time() AND $payedto<=$prewarn){
$beitrag='<div style="color:#5CE72E;">Beitrag ist bezahlt<br>bis '.$payedto2.'</div>';
} elseif($payedto>time()){
$beitrag='<div style="color:#ffffff;">Beitrag ist bezahlt<br>bis '.$payedto2.'</div>';
}
} else{
$beitrag='';
}
$abf = 'SELECT id, name, avatar FROM prefix_user WHERE name = "'.$_SESSION['authname'].'"';
$erg = db_query($abf);
$row = db_fetch_object($erg);
if ( file_exists($row->avatar)) {
$avatar = '<br><img src="'.$row->avatar.'" border="0"><br>';
}else{
$avatar = '<br><img src="include/images/avatars/noavatar.gif" border="0" alt="no Avatar"><br>';
}
# USERGB START
$usergb = db_query("SELECT COUNT(id) FROM `prefix_usergb` WHERE uid = ".$_SESSION['authid']."");
$eintrage = db_result($usergb,0);
$usergb2 = '<a class="box" href="index.php?user-usergb-view-'.$_SESSION['authid'].'"><img border="0" src="include/images/buttons/gbook.png" width="100" height="16"></a>';
$tpl->set ( 'USERGB' , $usergb2 );
# USERGB ENDE
$tpl->set ( 'ID' , $row->id );
$tpl->set ( 'AVATAR' , $avatar );
$tpl->set ( 'SID' , session_id() );
$tpl->set ( 'NACHRICHTEN' , $nachrichten_link );
$tpl->set ( 'BEITRAG' , $beitrag );
$tpl->set ( 'NAME', $_SESSION['authname'] );
$tpl->out (0);
} else {
if (empty($_POST['login_name'])) { $_POST['login_name'] = 'Nickname'; }
if (empty($_POST['login_pw'])) { $_POST['login_pw'] = 'ääääääää'; }
$regist = '';
if ( $allgAr['forum_regist'] == 1 ) {
$regist = '<a href="index.php?user-regist"><img border="0" src="include/images/buttons/reg.png" width="100" height="16"></a>';
}
$ip = db_fetch_assoc(db_query("SELECT * FROM `prefix_ipsperre` WHERE ip = '".getip()."'"));
if($ip['try'] >= 5){$loginbutton = 'Login Closed';}
else{$loginbutton = '<br><input type="image" src="include/images/buttons/login.png" style="border:0;" name="user_login_sub" value="Login"/>';}
$tpl->set_ar_out ( array ( 'LOGINBUTTON' => $loginbutton,'regist' => $regist, 'wdlink' => '?'.$allgAr['smodul'], 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name'] ) , 1 );
}
unset($tpl);
?>