Code:
Na početku linije 397:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
// Show the start of the tab section.
echo '
<ul>';
// Show the [home] button.
echo '<li><a' , $current_action == 'home' ? ' class="active"' : '', ' href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
echo '<li><a' , $current_action == 'help' ? ' class="active"' : '', ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '<li><a' , $current_action == 'search' ? ' class="active"' : '', ' href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' , $current_action == 'pm' ? ' class="active"' : '', ' href="', $scripturl, '?action=pm">' , $txt['pm_short'] , '', $context['user']['unread_messages'] > 0 ? '[<strong> '. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' , $current_action == 'admin' ? ' class="active"' : '', ' href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' , $current_action == 'profile' ? ' class="active"' : '', ' href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' , $current_action == 'calendar' ? ' class="active"' : '', ' href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a' , $current_action == 'login' ? ' class="active"' : '', ' href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a' , $current_action == 'register' ? ' class="active' : '', ' href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a' , $current_action == 'register' ? ' class="active' : '', ' href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
// baner
echo "<a href=\"javascript:window.open('http://dzungla-chat.freehostia.com/java/', 'chatbox', 'width=650,height=520')\"></a>";
// The end of tab section.
echo '</ul>';
}