{template header}

<div style="width: {TABLEWIDTH}; clear: both; overflow: hidden;">

<div class="left" style="line-height: 18px;">
<span class="bold">
<!--{if $supe['status']}--><a href="$supe[siteurl]" target="_blank">$supe['sitename']</a>&nbsp;-<!--{/if}-->
<!--{if $gid || !$discuz_uid}--><a href="$indexname">$bbname</a>&nbsp;<!--{else}-->$discuz_user&nbsp;<!--{/if}-->
<!--{if $discuz_uid}-->
	<!--{if $supe['status'] && $xspacestatus}-->
		- <a href="$supe[siteurl]?uid/$discuz_uid" target="_blank">{lang space}</a>
	<!--{elseif $spacestatus}-->
		- <a href="space.php?uid=$discuz_uid" target="_blank">{lang space}</a>
	<!--{/if}-->
	<!--{if $supe['status'] && !$xspacestatus}-->
		<!--{if $spacestatus}-->
			- <a href="$supe[siteurl]?uid/$discuz_uid" target="_blank">{lang space_upgrade_space}</a>
		<!--{else}-->
			- <a href="$supe[siteurl]?uid/$discuz_uid" target="_blank">{lang supe_signin_xspace}</a>
		<!--{/if}-->
	<!--{/if}-->
<!--{/if}-->
</span>
<br>
{lang credits}: <span class="bold smalltxt">$credits</span>&nbsp;<span id="creditlist" onmouseover="showMenu(this.id)">{lang credits_detail}</span> / {lang index_status}:
<!--{if $validdays}-->
	<a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a>
<!--{else}-->
	<span class="bold">$grouptitle</span>
<!--{/if}-->
<!--{if $allowinvisible && $discuz_uid}-->{lang online_status}:
	<!--{if !empty($invisible)}-->
		<a href="member.php?action=switchstatus" title="{lang login_switch_normal_mode}" id="ajax_switchstatus" onclick="ajaxmenu(event, this.id, 2000, 'changestatus', 0)">{lang login_invisible_mode}</a>
	<!--{else}-->
		<a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" id="ajax_switchstatus" onclick="ajaxmenu(event, this.id, 2000, 'changestatus', 0)">{lang login_normal_mode}</a>
	<!--{/if}-->
<!--{/if}--><br>
{lang your_lastvisit} <span class="smalltxt">$lastvisittime</span><br>
</div>

<div class="right" style="line-height: 18px;">
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<a href="digest.php">{lang digest}</a> |
<a href="member.php?action=markread" id="ajax_markread" onclick="ajaxmenu(event, this.id)">{lang mark_read}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
<br>
{lang total} <span class="smalltxt">$threads</span> {lang index_threads} / <span class="smalltxt">$posts</span> {lang index_posts} / {lang index_today} <span class="smalltxt">$todayposts</span> {lang index_posts}<br>
{lang total} <span class="smalltxt">$totalmembers</span> {lang index_members} / {lang welcome_newmember} <a href="space.php?username=$memberenc"><span class="bold">$lastmember</span></a>
</div>

</div><br>

<!--{if empty($gid)}-->
	<!--{if !empty($announcements)}-->
		<div id="announcement">$announcements</div><script type="text/javascript">announcement();</script>
	<!--{/if}-->
	<!--{if !empty($qihoo_status) && $searchboxstatus}-->
		<div class="subtable" style="clear: both; width: {TABLEWIDTH}">
		<div class="right">
		<form method="post" action="search.php?srchtype=qihoo" onSubmit="this.target='_blank';">
		<input type="hidden" name="searchsubmit" value="yes">
		<input type="text" name="srchtxt" value="$qihoo_searchboxtxt" size="30" class="input" style="{BGCODE};" onmouseover="this.focus();this.value='';this.onmouseover=null;">
		<select name="stype"><option value="" selected>{lang qihoo_search_filltext}</option><option value="1">{lang qihoo_search_title}</option><option value="2">{lang qihoo_search_author}</option></select>
		<input name="searchsubmit" class="button" type="submit" value="{lang search}">
		</form>
		</div>
		<!--{if $qihoo_links['keywords']}-->
			<span class="bold">{lang qihoo_hot_searches}</span>&nbsp;
			<!--{loop $qihoo_links['keywords'] $link}-->
				$link&nbsp;
			<!--{/loop}-->
		<!--{/if}-->
		</div>
		<div class="subtable" style="clear: both; width: {TABLEWIDTH}">
		<div class="right">
		<!--{if $customtopics}-->
			<span class="bold">{lang qihoo_custom_topics}</span>&nbsp;&nbsp;$customtopics [<a href="###" onclick="window.open('misc.php?action=customtopics', '', 'width=320,height=450,resizable=yes,scrollbars=yes');">{lang edit}</a>]
		<!--{/if}-->
		</div>
		<!--{if $qihoo_links['topics']}-->
			<span class="bold">{lang qihoo_topics}</span>&nbsp;
			<!--{loop $qihoo_links['topics'] $url}-->
				{$url} &nbsp;
			<!--{/loop}-->
		<!--{/if}-->
		</div>
	<!--{/if}-->
<!--{/if}-->

<!--{if !empty($newpmexists) || $announcepm}-->
	<div style="clear: both; margin-top: 5px" id="pmprompt">
	{template pmprompt}
	</div>
<!--{/if}-->

<!--{if !empty($advlist['text'])}-->
	<div style="clear: both; margin-top: 5px;">
	<div class="spaceborder" style="width: {TABLEWIDTH}">
	<table cellspacing="1" border="0" cellpadding="{TABLESPACE}" width="100%" style="background: {BGBORDER}">$advlist[text]</table>
	</div><br></div>
<!--{/if}-->

<!--{if $supe['status'] && $supe['items']['status'] && $_DCACHE['supe_updateitems']}-->
	<div style="clear: both; margin-top: 5px;">
	<div class="spaceborder" style="width: {TABLEWIDTH}">
	<table cellspacing="0" border="0" cellpadding="{TABLESPACE}" width="100%">
	<tr><td colspan="$supe[items][columns]" class="header" style="padding-left:20px">
	<div class="subtable" style="padding: 0px"><a href="$supe[siteurl]" target="_blank">{lang supe_updateitems}</a></div>
	</td></tr>
	<script language="javascript">document.write('$_DCACHE[supe_updateitems]');</script></table>
	</div></div>
<!--{/if}-->

<!--{loop $catlist $key $cat}-->
	<!--{if $cat['forumscount']}-->
		<div class="spaceborder spacebottom" style="width: {TABLEWIDTH}; clear: both; margin-top: 5px;"><table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
		<tr><td colspan="<!--{if $cat['forumcolumns']}-->$cat[forumcolumns]<!--{else}-->7<!--{/if}-->" class="header" style="padding-left:20px">
		<div class="subtable" style="padding: 0px"><div class="right">
		<!--{if $cat['moderators']}--><font color="{HEADERTEXT}">{lang forum_category_modedby}: $cat[moderators]</font> <!--{/if}-->
		<a href="###" onclick="toggle_collapse('category_$cat[fid]');"><img id="category_$cat[fid]_img" src="{IMGDIR}/$cat[collapseimg]" border="0" alt="" /></a>&nbsp;
		</div><a href="$indexname?gid=$cat[fid]">$cat[name]</a></div>
		</td></tr>
		<!--{if !$cat['forumcolumns']}-->
			<tbody id="category_$cat[fid]" style="$collapse['category_'.$cat[fid]]">
			<tr class="category" align="center">
			<td width="5%">&nbsp;</td>
			<td width="56%" align="left">{lang forum_name}</td>
			<td width="5%">{lang forum_threads}</td>
			<td width="5%">{lang forum_posts}</td>
			<td width="13%">{lang forum_lastpost}</td>
			<td width="16%">{lang forum_moderators}</td>
			</tr>
			<!--{loop $cat[forums] $forumid}-->
				<!--{eval $forum=$forumlist[$forumid];}-->
				<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
				<td align="center">$forum[folder]</td>
				<td align="left" class="subject">
				$forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a>
				<!--{if $forum[todayposts]}--><span class="todayposts">($forum[todayposts])</span><!--{/if}-->
				<br><span class="smalltxt">$forum[description]<!--{if $forum['subforums']}--><br><span class="bold">{lang forum_subforums}:</span> $forum['subforums']<!--{/if}--></span></td>
				<td align="center">$forum[threads]</td>
				<td align="center">$forum[posts]</td>
				<!--{if $forum['permission'] == 1}-->
					<td align="center"><span class="smalltxt">{lang private_forum}</span></td>
				<!--{else}-->
					<!--{if is_array($forum['lastpost'])}-->
						<td align="center" title="{lang forum_lastpost_in}: {$forum[lastpost][subject]}" nowrap>
						<span class="smalltxt"><a href="redirect.php?tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost">$forum[lastpost][dateline]</a></span><br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->
						</td>
					<!--{else}-->
						<td align="center"><span class="smalltxt">{lang never}</span></td>
					<!--{/if}-->
				<!--{/if}-->
				<td align="center" style="word-break: keep-all">$forum[moderators]</td></tr>
			<!--{/loop}-->
		<!--{else}-->
			<tbody id="category_$cat[fid]" style="$collapse['category_'.$cat[fid]]"><tr class="altbg2">
			<!--{loop $cat['forums'] $forumid}-->
				<!--{eval $forum=$forumlist[$forumid];}-->
				<!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
					</tr>
					<!--{if $forum['orderid'] < $cat['forumscount']}-->
						<tr class="altbg2">
					<!--{/if}-->
				<!--{/if}-->
				<td width="$cat[forumcolwidth]" valign="top" class="altbg2" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
				<table cellspacing="0" cellpadding="0" width="100%">
				<tr><td rowspan="3" align="center" width="15%">$forum[folder]</td><td colspan="3" class="bold subject"><a href="forumdisplay.php?fid=$forum[fid]">$forum[name]</a></td></tr>
				<tr class="smalltxt"><td colspan="3">{lang forum_lastpost}:
				<!--{if is_array($forum['lastpost'])}-->
					<a href="redirect.php?tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost">$forum[lastpost][dateline]</a>
					{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->
				<!--{else}-->
					{lang never}
				<!--{/if}-->
				</td></tr><tr class="smalltxt"><td>{lang forum_threads}: $forum[threads]</td><td>{lang forum_posts}: $forum[posts]</td><td>{lang forum_todayposts}: $forum[todayposts]</td></tr></table>
				</td>
			<!--{/loop}-->
			$cat['endrows']
		<!--{/if}-->
		</tbody></table></div>
		<!--{if !empty($advlist['intercat']) && $key < max(array_keys($catlist))}--><div style="clear: both; margin-top: 5px;"><!--{echo $advlist['intercat'][array_rand($advlist['intercat'])]}--></div><!--{else}--><br><!--{/if}-->
	<!--{/if}-->
<!--{/loop}-->

<!--{if empty($gid) && ($_DCACHE['forumlinks'] || $whosonlinestatus || $bdaystatus == 1 || $bdaystatus == 3)}-->
	<div class="spaceborder" style="width: {TABLEWIDTH}"><table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
	<!--{if $_DCACHE['forumlinks']}-->
		<tbody><tr><td colspan="3" class="header"><a href="###" onclick="toggle_collapse('forumlinks');"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg[forumlinks]" border="0" align="right" alt="" /></a>
		<span class="bold">{lang board_links}</span></td></tr></tbody>
		<tbody id="forumlinks" style="$collapse[forumlinks]">
		<!--{loop $_DCACHE['forumlinks'] $flink}-->
			<!--{if $flink['type'] == 1}-->
				<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
				<td width="5%" align="center" valign="middle"><img src="{IMGDIR}/forumlink.gif" alt="" /></td>
				<td width="77%" valign="middle">$flink[content]</td>
				<td width="18%" align="center" valign="middle"><img src="$flink[logo]" border="0" alt="" /></td>
				</tr>
			<!--{elseif $flink['type'] == 2}-->
				<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
				<td width="5%" align="center" valign="middle"><img src="{IMGDIR}/forumlink.gif" alt="" /></td>
				<td width="95%" colspan="2" valign="middle" style="word-break: keep-all">$flink[content]</td>
				</tr>
			<!--{else}-->
				<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
				<td width="5%" align="center" valign="middle"><img src="{IMGDIR}/forumlink.gif" alt="" /></td>
				<td width="95%" colspan="2" valign="middle" style="word-break: keep-all">$flink[content]</td>
				</tr>
			<!--{/if}-->
		<!--{/loop}-->
		</tbody>
	<!--{/if}-->

	<!--{if $maxbdays}-->
		<tbody><tr><td colspan="3" class="header"><a href="###" onclick="toggle_collapse('birthdays');"><img id="birthdays_img" src="{IMGDIR}/$collapseimg[birthdays]" align="right" border="0" alt="" /></a>
		<a href="member.php?action=list&amp;type=birthdays"><span class="bold">{lang todays_birthdays}</span></a></td></tr></tbody>
		<tbody id="birthdays" style="$collapse[birthdays]">
		<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
		<td width="5%" align="center" valign="middle"><img src="{IMGDIR}/birthday.gif" alt="" /></td>
		<td width="95%" colspan="2" valign="middle" style="word-break: keep-all">
		<!--{if $_DCACHE['birthdays_index']['todaysbdays']}-->$_DCACHE[birthdays_index][todaysbdays]<!--{else}-->{lang todays_birthdays_none}<!--{/if}-->
		</td></tr>
		</tbody>
	<!--{/if}-->

	<!--{if $supe['status'] && $supe['maxupdateusers'] && $_DCACHE['supe_updateusers']}-->
		<tbody><tr><td colspan="3" class="header"><a href="###" onclick="toggle_collapse('supe_maxupdateusers');"><img id="supe_maxupdateusers_img" src="{IMGDIR}/collapsed_no.gif" align="right" border="0" alt="" /></a>
		<a href="$supe[siteurl]" target="_blank"><span class="bold">{lang supe_updateusers}</span></a></td></tr></tbody>
		<tbody id="supe_maxupdateusers">
		<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
		<td width="5%" align="center" valign="middle"><img src="{IMGDIR}/supe_updateusers.gif" alt="" /></td>
		<td width="95%" colspan="2" valign="middle" style="word-break: keep-all">
		<!--{loop $_DCACHE['supe_updateusers'] $supe_updateuser}-->
			<a href="$supe[siteurl]/?uid/{$supe_updateuser[uid]}" target="_blank">{$supe_updateuser[username]}</a>
		<!--{/loop}-->
		</td></tr>
		</tbody>
	<!--{/if}-->

	<!--{if $whosonlinestatus}-->
		<!--{if $detailstatus}-->
			<tbody><tr class="header"><td colspan="3" class="smalltxt" style="font-weight: normal; color: {HEADERTEXT}">
			<a name="online"></a><a href="$indexname?showoldetails=no#online"><img src="{IMGDIR}/collapsed_no.gif" align="right" border="0" alt="" /></a>
			<span class="bold"><a href="member.php?action=online">{lang index_activeusers}</a></span> -
			&nbsp;<span class="bold">$onlinenum</span> {lang onlines} - <span class="bold">$membercount</span> {lang index_members}(<span class="bold">$invisiblecount</span> {lang index_invisibles}),
			<span class="bold">$guestcount</span> {lang index_guests} | {lang index_mostonlines} <span class="bold">$onlineinfo[0]</span> {lang on} <span class="bold">$onlineinfo[1]</span>.
			</td></tr></tbody>
		<!--{else}-->
			<tbody><tr class="header"><td colspan="3" class="smalltxt" style="font-weight: normal; color: {HEADERTEXT}">
			<a name="online"></a><a href="$indexname?showoldetails=yes#online"><img src="{IMGDIR}/collapsed_yes.gif" align="right" border="0" alt="" /></a>
			<span class="bold"><a href="member.php?action=online">{lang index_activeusers}</a></span> -
			&nbsp;{lang total} <span class="bold">$onlinenum</span> {lang onlines} | {lang index_mostonlines} <span class="bold">$onlineinfo[0]</span> {lang on} <span class="bold">$onlineinfo[1]</span>.
			</td></tr></tbody>
		<!--{/if}-->
		<tbody>
		<tr class="altbg2">
		<td width="5%" align="center"><img src="{IMGDIR}/online.gif" alt="" /></td>
		<td colspan="2">
		<table cellspacing="0" cellpadding="0" border="0" width="98%" align="center">
		<tr><td colspan="7" valign="middle">$_DCACHE[onlinelist][legend]</td></tr>
		<!--{if $detailstatus}-->
			<tbody><tr><td colspan="7"><hr class="line" size="0"></td></tr><tr><td nowrap>
			<!--{if $whosonline}-->
				<!--{loop $whosonline $key $online}-->
					<!--{if $key % 7 == 0}--></td></tr><tr><td width="15%" nowrap><!--{else}--></td><td width="15%" nowrap><!--{/if}-->
					<img src="images/common/$online[icon]"  alt="" />
					<!--{if $online['uid']}-->
						<a href="space.php?uid=$online[uid]"
						<!--{else}-->
						<a href="###"
					<!--{/if}-->title="{lang time}: $online[lastactivity]{LF}
					{lang action}: $online[action]
					<!--{if $online['fid']}-->{LF}{lang forum}: $online[fid]<!--{/if}-->
					">$online[username]</a>
				<!--{/loop}-->
			<!--{else}-->
				&nbsp; &nbsp; {lang online_only_guests}
			<!--{/if}-->
		<!--{/if}-->
		</td></tr></tbody></table></td></tr>
	<!--{/if}-->
	</table></div><br><br></div>
<!--{/if}-->

<div class="tableborder" style="width: 300px; padding: 9px; background-color: {ALTBG1}"><span class="smalltxt">
<img src="{IMGDIR}/red_forum.gif" class="absmiddle" alt="" />&nbsp; {lang forum_newposts}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<img src="{IMGDIR}/forum.gif" class="absmiddle" alt="" />&nbsp; {lang forum_nonewpost}</span></div>

<div title="menu" class="popupmenu_popup" id="creditlist_menu" style="display: none">
<div class="popupmenu_option" style="text-align: left">
{lang credits}: $credits<br>
<!--{loop $extcredits $id $credit}-->
$credit[title]: $GLOBALS['extcredits'.$id] $credit[unit]<br>
<!--{/loop}-->
</div></div>

<script language="javascript">
	function changestatus(obj) {
		if(obj.innerHTML == '{lang login_invisible_mode}') {
			obj.innerHTML = '{lang login_normal_mode}';
			obj.title = '{lang login_switch_invisible_mode}';
		} else {
			obj.innerHTML = '{lang login_invisible_mode}';
			obj.title = '{lang login_switch_normal_mode}';
		}
	}
</script>

{template footer}
