include/boxes/login.php
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$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 = '';
}
$tpl->set ( 'SID' , session_id() );
$tpl->set ( 'NACHRICHTEN' , $nachrichten_link );
$tpl->set ( 'NAME', $_SESSION['authname'] );
$tpl->set ( 'UID', $_SESSION['authid'] );
$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);
?>
include/templates/user/boxen_login.htm
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
Hallo <b>{NAME}</b>
<br />
<br />
<a class="box" href="index.php?user-details-{UID}">Profil anschauen</a><br />
{NACHRICHTEN}
<a class="box" href="index.php?user-3">{_lang_logout}</a> | <a class="box" href="index.php?user-8">{_lang_profil}</a>
<br>
{ADMIN}
</td>
</tr>
</table>
{EXPLODE}
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
<form method="POST">
<input type="text" name="name" size="13" value="{NAME}" onFocus="if (value == '{NAME}') {value = ''}" onBlur="if (value == '') {value = '{NAME}'}" maxlength="50" style="margin-top:5px; " /><br />
<input type="password" size="13" 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; " />{regist}
</form>
</td>
</tr>
</table>
// edit:
Für einen Button anstatt
<a class="box" href?"index.php?user-details-{UID}">Profil anschauen</a><br />
das machen:
<button onClick="javascript:window.location.replace('index.php?user-details-{UID}')">Profil anschauen</button>
(in der include/templates/user/boxen_login.htm
Zuletzt modifiziert von Ithron am 21.01.2008 - 11:58:38