// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>';
// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>';
//This is for the pop menus
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';
echo '
function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0)
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}
function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}
// ]]></script>';
echo '
</head>
<body>';
//Change width to 100% if you want it fluid.
echo '
<div align="center">
<table id="widthControl" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="28" height="28"><img src="', $settings['images_url'], '/bc_topLeft.gif" width="28" height="28" alt="" /></td>
<td width="100%" height="28" background="', $settings['images_url'], '/bc_topBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="1" height="28" alt="" /></td>
<td width="29" height="28"><img src="', $settings['images_url'], '/bc_topRight.gif" width="29" height="28" alt="" /></td>
</tr>
<tr>
<td width="28" background="', $settings['images_url'], '/bc_leftBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="28" height="1" alt="" /></td>
<td width="100%" valign="top" style="background-color:#ffffff;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="67" align="left" valign="top" style="padding:0;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" height="67" width="527"><img src="', $settings['images_url'], '/logo.jpg" width="527" height="67" alt="MUSICONICA" title="MUSICONICA" /></td>
<td align="right" valign="top" height="67" width="100%"><img src="', $settings['images_url'], '/lcd.jpg" alt="" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" width="100%" align="left" valign="top" style="padding:0;">';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';
// display user name
echo '
<table width="100%" cellspacing="1" cellpadding="5" class="bordercolor" border="0" >
<tr>';
echo '
<td class="windowbg2" width="100%" valign="middle" align="left">
', theme_linktree2(), '
</td>';
echo '
<td width="250" valign="top" class="windowbg"><span class="middletext" style="display:block;width:250px;">';
if($context['user']['is_logged'])
{
echo '
<strong>Welcome, ', $context['user']['name'] , '.</strong><br />';
}
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
<a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.<br />';
}
// 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 '
<b>', $txt[616], '</b><br />';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'], '<br />';
// 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'], '<br />';
}
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>Username:</td>
<td><input type="text" name="user" size="10" /></td>
<td><select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="passwrd" size="10" /></td>
<td><input type="submit" value="', $txt[34], '" /></td>
</tr>
</table>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</span>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style=""', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
echo '
<td width="90%" class="column-title">
', template_menu(), '
</td>';
echo '
</tr>
</table>
</div><br><center><script type="text/javascript"><!--
google_ad_client = "pub-1513583285787672";
/* anuncio2 */
google_ad_slot = "4848105644";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="
http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>';
// The main content should go here.
echo '
<div id="bodyarea">';
// If you want to put some ads or something on your pages, add them in this.
echo '
<div id="blank-box"></div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div><center><script type="text/javascript"><!--
google_ad_client = "pub-1513583285787672";
/* anuncio2 */
google_ad_slot = "4848105644";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="
http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="left">
<a href="
http://www.webtechnica.com/" target="_blank"><img src="', $settings['images_url'], '/88x31_banner_white.gif" width="88" height="31" alt="Theme by webtechnica.com" title="Theme by webtechnica.com" /></a>.
</td>
<td valign="middle" align="center" style="white-space: nowrap;" class="copyright-links">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="right" class="copyright-links">
<a href="
http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a> | <a href="
http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a> | <a href="
http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a> | <a href="
http://jigsaw.w3.org/css-validator/check/referer" target="_blank" style="font-size:10px;">CSS</a>
</td>
</tr>
</table>';
// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';
// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{