boxes/login.php
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$dif = date('Y-m-d H:i:s', time() - 60);
$abf = "SELECT uid FROM `prefix_online` WHERE uptime > '". $dif."'";
$resultID = db_query($abf);
$brk='';
$uid = array();
$guests = 0;
$guestn = $lang['guests'];
$content='';
while ($row = db_fetch_object($resultID)) {
if ($row->uid != 0 AND $brk!=$row->uid) {
$name=@db_result(db_query('SELECT name FROM prefix_user WHERE id='.$row->uid),0);
$content.='<a href="index.php?user-details-'.$row->uid.'">'.$name.'</a>, '."";
$uid[] = $row->uid;
}
}
$tpl = new tpl ( 'user/boxen_login.htm' );
if ( loggedin() ) {
if ( user_has_admin_right($menu,false) ) {
$tpl->set ( 'ADMIN', '<a class="box" href="admin.php?admin">'.$lang['adminarea'].'</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">'.$lang['messages'].'</a> ('.$check_pm.')<br>';
} else {
$nachrichten_link = '';
}
$abf1 = 'SELECT id, name, avatar FROM prefix_user WHERE name = "'.$_SESSION['authname'].'"';
$erg1 = db_query($abf1);
$row = db_fetch_object($erg1);
$id = $row->id;
if ( file_exists($row->avatar)) {
$avatar = '<br><img src="'.$row->avatar.'" border="0"><br>';
}else{
$avatar = '<br><img src="include/images/avatars/avat.png" border="0"><br>';
}
$tpl->set ( 'UID' , $id );
$tpl->set ( 'AVATAR' , $avatar );
$tpl->set ( 'SID' , session_id() );
$tpl->set ( 'NACHRICHTEN' , $nachrichten_link );
$tpl->set ( 'NAME', $_SESSION['authname'] );
$tpl->set ( 'USER', $content );
$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">Regist</a>';
}
$tpl->set_ar_out ( array ( 'regist' => $regist, 'wdlink' => '?'.$allgAr['smodul'], 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name'] ) , 1 );
}
unset($tpl);
?>
templates/user/boxen_login.htm
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left">Hallo <b>{NAME}</b></td>
<td align="right">{ADMIN}</td>
</tr>
</table>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="110px" align="center" valign="top"><a href="?user-details-{UID}" alt="Dein Profil" title="Dein Profil">{AVATAR}</a></td>
<td valign="top"><br />
<div id="pm"><img border="0" src="include/designs/sepp09/img/mail.png"> {NACHRICHTEN}</div>
<div id="pm"><img border="0" src="include/designs/sepp09/img/profil.png"> <a href="index.php?user-8">{_lang_profil}</a></div>
<div id="pm"><img border="0" src="include/designs/sepp09/img/logout.png"> <a href="index.php?user-3">{_lang_logout}</a></div>
</td>
</tr>
</table>
{EXPLODE}
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td align="center" valign="middle">
<form method="POST">
<img border="0" src="include/designs/sepp09/img/username.png"> <input type="text" name="name" size="30" value="{NAME}" onFocus="if (value == '{NAME}') {value = ''}" onBlur="if (value == '') {value = '{NAME}'}" maxlength="15" style="margin-top:5px; " /><br />
<img border="0" src="include/designs/sepp09/img/passwort.png"> <input type="password" size="30" value="{PASS}" onFocus="if (value == '{PASS}') {value = ''}" onBlur="if (value == '') {value = '{PASS}'}" maxlength="20" name="pass" style="margin-top:5px; " /><br />
<input type="hidden" name="wdlink" value="{wdlink}" />
<input type="submit" name="user_login_sub" value="Login" style="margin-top:5px; " />
</form><br />
<form action="index.php?user-regist" method="post"><input type="submit" value="Kostenlos Anmelden"></form>
</td>
</tr>
</table>
damit sollte es gehen.
das avatar ist verlinkt, so das man sein eigenes profil sehen kann wenn man drauf klickt.
Den Username kannst du auch ausgeben. probier einfach mal aus.