Chciałem wstawić mod z profilem
Kod: Zaznacz cały
<?php
//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>';
//kod odpowiadający za prywatne wiadomosci
if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) )
{
if ( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}
$s_privmsg_new = 1;
$icon_pm = $images['pm_new_msg'];
}
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_new_msg'];
}
}
else
{
$l_privmsgs_text = $lang['No_new_pm'];
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}
}
else
{
$icon_pm = $images['pm_no_new_msg'];
$l_privmsgs_text = $lang['Login_check_pm'];
$l_privmsgs_text_unread = '';
$s_privmsg_new = 0;
}
//link Prywatne Wiadomości
echo ' | <a href="'.append_sid("forum/privmsg.".$phpEx."?folder=inbox") . '" onclick="jump_to_inbox();return false;" target="_new">'.$userdata['user_new_privmsg'].'</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>';
}
?>