<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Login';
$hmenu = $extented_forum_menu.'Login'.$extented_forum_menu_sufix;
$tpl = new tpl ( 'user/login.htm' );
if ( loggedin() ) {
$design = new design ( $title , $hmenu, 0);
$design->header();
if (isset($_POST['wdlink'])) { $wd = $_POST['wdlink']; }
else { $wd = 'index.php?'.$allgAr['smodul']; }
wd ($wd, $lang['yourareloged']);
$design->footer();
} else {
$design = new design ( $title , $hmenu );
$design->header();
$tpl = new tpl ( 'user/login.htm' );
if ($allgAr['smodul_ws'] == 1) {
$ws = $allgAr['smodul'];
} elseif ($allgAr['smodul_ws'] == 0} {
$ws = $allgAr['smodul_neu'];
}
$tpl->set_out('WDLINK','index.php?'.$ws,0);
$design->footer();
}
?>
Habe den Schnipsel hier eingefügt, aber kommt immer noch das selbe Fenster nach login obwohl ich in der Datenbank "smodul_ws = 0" hab.
edit: Es funktioniert doch. Das Problem ist wo anders.
Ich habe den Design Creator von Maretz und dort schimpft sich die Box "login_creator". Ich war davon ausgegangen der Schluss der Datei ist inhaltlich gleich zur boxes/login.php.
<?php
# Copyright by: Manuel Staechele
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$tpl = new tpl ( 'user/boxen_login_creator.htm' );
if ( loggedin() ) {
if ( user_has_admin_right($menu,false) ) {
$tpl->set ( 'ADMIN', '<a href="admin.php?admin">'.$lang['adminarea'].'</a>' );
} else {
$tpl->set ( 'ADMIN', '' );
}
$posts = db_query('SELECT posts from `prefix_user` WHERE id= "' . $_SESSION['authid'].'"' );
if($posts = mysql_fetch_row($posts))
$posts = $posts[0];
else
$posts = 0;
$galerie = db_query('SELECT count(id) from `prefix_usergallery` WHERE uid= "' . $_SESSION['authid'].'"' );
if($galerie = mysql_fetch_row($galerie))
$galerie = $galerie[0];
else
$galerie = 0;
$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 = ' <a href="index.php?user-details-'.$_SESSION['authid'].'" title="Profil ansehen"><img src="'.$row->avatar.'" border="0" width="60" /></a>';
}else{
$avatar = '<a href="index.php?user-details-'.$_SESSION['authid'].'" title="Profil ansehen"><img src="include/images/avatars/wurstegal.jpg" border="0" width="60" /></a>';
}
$q = "SELECT COUNT(DISTINCT a.id) FROM prefix_topics a
LEFT JOIN prefix_forums b ON b.id = a.fid
LEFT JOIN prefix_posts c ON c.tid = a.id
LEFT JOIN prefix_user d ON c.erstid = d.id
LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = b.view
LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = b.reply
LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = b.start
WHERE (((b.view >= ".$_SESSION['authright']." AND b.view <= 0) OR
(b.reply >= ".$_SESSION['authright']." AND b.reply <= 0) OR
(b.start >= ".$_SESSION['authright']." AND b.start <= 0)) OR
(vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR ".$_SESSION['authright']." = -9))
AND c.time >= ". (time() - (3600 * 24 * 360)) ." AND c.time >= {$_SESSION['lastlogin']}
ORDER BY c.time DESC";
$lpost = db_query($q);
if($lpost = mysql_fetch_row($lpost))
$lpost = $lpost[0];
else
$lpost = 0;
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 href="index.php?forum-privmsg">'.$lang['messages'].'</a> <span style="color:#ff0000;">('.$check_pm.')</span>';
} else {
$nachrichten_link = '';
}
$tpl->set ( 'UGALLERY', '<a href="index.php?user-usergallery-'.$_SESSION['authid'].'">Meine Gallery</a> <span >('.$galerie.')</span>');
$tpl->set ( 'PROFILANSICHT', '<a href="index.php?user-details-'.$_SESSION['authid'].'">Profil ansehen</a> ');
$tpl->set ( 'SID' , session_id);
$tpl->set ( 'NACHRICHTEN' , $nachrichten_link );
$tpl->set ( 'NAME', $_SESSION['authname'] );
$tpl->set('POSTS', $posts);
$tpl->set('LPOSTS', $lpost);
$tpl->set ( 'AVATAR' , $avatar );
$tpl->set ( 'POPUP', check_for_pm_popup() );
$tpl->out (0);
} else {
if (empty($_POST['login_name'])) { $_POST['login_name'] = 'Username'; }
if (empty($_POST['login_pw'])) { $_POST['login_pw'] = 'ההההההההה'; }
$regist = '';
if ( $allgAr['forum_regist'] == 1 ) {
$regist = '<a href="index.php?user-regist">Registrieren</a> <a href="index.php?user-remind">Passwort vergessen?</a>';
}
if ($allgAr['smodul_ws'] == 1) {
$ws = $allgAr['smodul'];
} elseif ($allgAr['smodul_ws'] == 0) {
$ws = $allgAr['smodul_neu'];
}
$tpl->set_ar_out ( array ( 'regist' => $regist, 'wdlink' => '?'.$ws, 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name'] ) , 1 );
}
unset($tpl);
?>
Also wenn ich mich über die contents/login.php anmelde funktioniert der Code über die Login-Creator-Box von Maretz allerdings nicht.
Zuletzt modifiziert von Nenolam am 04.06.2015 - 13:49:48