[php]<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
//link pierwszy LOGIN
if( $userdata['session_logged_in'] )
{
//powitanie
echo '<center><b>Witaj '.$userdata['username'].'</b></center><br>';
//edytuj profil
echo ' | <A HREF="'.append_sid($phpbb_root_path.'profile.php?mode=editprofile').'">Edytuj profil</A><br>';
//link wyloguj
echo ' | <a href="'.append_sid('forum/login.php?logout=true&redirect=
'.$redir.'&sid='.$userdata['session_id']).'">Wyloguj</a><br>';
}
//to wszystko jak jesteśmy zalogowani, pokazuje opcje
else
//to wszystko jak nie jesteśmy zalogowni, pokazują sie formularze
{
echo '<center>
<form method="post" action="forum/login.php" STYLE="display: inline" name="login">
<input width="100" height="16" type="text" name="username">
<input width="100" height="16" type="password" name="password">
<input type="hidden" name="redirect" value="../">
<input type=hidden name=login value="login">
<input class="text" type="checkbox" name="autologin">Zamiętaj mnie<br>
<input width="53" height="14" type="submit" value="Zaloguj">
</form>';
//link zarejestruj
echo '<A HREF="'.append_sid($phpbb_root_path.'profile.php?mode=register').'" class=l>Rejestracja</a>';
//link zapomniałem hasła
echo '<A HREF="'.append_sid($phpbb_root_path.'profile.php?mode=sendpassword').'" class=l>Zapomniałem hasło</a>';
}
?>[/php]
I'm a newb here. But I'm working to bring self up!
Poprzedni nickname: Deaor