';
echo '
';
// display user name
echo '
';
echo '
', theme_linktree2(), '
| ';
echo '
';
if($context['user']['is_logged'])
{
echo '
Welcome, ', $context['user']['name'] , '. ';
}
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
Private Messages: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total. ';
}
// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
', $txt[616], ' ';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' ', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], ' ', $txt['approve_members_waiting'], ' ';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'], ' ';
// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], ' ';
}
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
';
}
echo '
|
';
echo '
';
// The main content should go here.
echo '
';
// If you want to put some ads or something on your pages, add them in this.
echo '
';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
|