<?php if( $userdata['session_logged_in'] ){ echo ' | <a href=\"'.append_sid($phpbb_root_path.'profile.php?mode=editprofile').'\">Edytuj profil</A><br>'; if ( $userdata['user_new_privmsg'] ){ $l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; 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']; }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; } echo ' | <a href=\"'.append_sid(\"forum/privmsg.\".$phpEx.\"?folder=inbox\") . '\" onclick=\"jump_to_inbox();return false;\" target=\"_new\">'.$userdata['user_new_privmsg'].'</a><br>'; '.$redir.'&sid='.$userdata['session_id']).'\">Wyloguj</a><br>'; }else{ 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>'; } ?>
Podzielić na php i TPL? Niezabardzo wiem jak się za to zabrac, chodzi by ktoś utworzył z tego kodu plik php i tpl.
Z góry dziękuje i pozdrawiam.