<!-- start module contents -->

<div align="left"><strong><{$lang_welcomemsg}></strong><br />
      <small><{$smarty.const._MD_TOSTART}></small></div>
<hr />
    <div align="right"><small><{$lang_currenttime}><br />
<{$lang_lastvisit}></small> </div>
  <hr />

<table cellspacing="0" width="100%">
  <tr>
    <th width="100%"><small><{$smarty.const._MD_TOTALTOPICSC}><strong><{$total_topics}></strong> | <{$smarty.const._MD_TOTALPOSTSC}><strong><{$total_posts}></strong></small>

</th>
       <th width="100%"> <div align="center">
              <ul class="newbb_level1">
                <li class="newbb_folder">
                  <div class="newbb_submenu"><strong><{$down}>&nbsp;<{$smarty.const._MD_MAINFORUMOPT}></strong></div>
                  <ul class="newbb_level2">
                    <table cellspacing="1" cellpadding="4" border="0" width="100%">
                      <tr>
                        <th><{$smarty.const._MD_MAINFORUMOPT}></th>
                      </tr>
<{if $mark_read}>
                      <tr>
                        <td class="head"><small><a class="newbb_link" href="<{$mark_read}>"><{$smarty.const._MD_MARK_ALL_FORUMS}>&nbsp;<{$smarty.const._MD_MARK_READ}></a></small></td>
                      </tr>
                      <tr>
                        <td class="head"><small><a class="newbb_link" href="<{$mark_UNread}>"><{$smarty.const._MD_MARK_ALL_FORUMS}>&nbsp;<{$smarty.const._MD_MARK_UNREAD}></a></small></td>
                      </tr>
<{/if}>
                      <tr>
                        <td class="head"><small><a class="newbb_link" href="<{$all_link}>"><{$smarty.const._MD_VIEW}>&nbsp;<{$smarty.const._MD_ALL}></a></small></td>
                      </tr>
                      <tr>
                        <td class="head"><small><a class="newbb_link" href="<{$digest_link}>"><{$smarty.const._MD_VIEW}>&nbsp;<{$smarty.const._MD_DIGEST}></a></small></td>
                      </tr>
                      <tr>
                        <td class="head"><small><a class="newbb_link" href="<{$unreplied_link}>"><{$smarty.const._MD_VIEW}>&nbsp;<{$smarty.const._MD_UNREPLIED}></a></small></td>
                      </tr>
                      <tr>
                        <td class="head"><small><a class="newbb_link" href="<{$unread_link}>"><{$smarty.const._MD_VIEW}>&nbsp;<{$smarty.const._MD_UNREAD}></a></small></td>
                      </tr>
<{if $forum_index_cpanel}>
                      <tr>
                        <td class="bg3"><{$forum_index_cpanel}> </td>
                      </tr>
<{/if}>
                    </table>
                  </ul>
                </li>
              </ul>
            </div></th>
          </tr>

</table>
<!-- start forum categories -->
<{foreach item=category from=$categories}> <{if $category.forums }> <{if $category.permission}>
<table cellspacing="0" width="100%">
  <tr align="left" valign="top">
    <td class="head" align="center" width="5%"><img onclick="ToggleBlock2('cat_<{$category.cat_id}>', this)" src="<{$category.cat_display_icon}>" alt="" /></td>
    <td class="head" width="95%" colspan="5"><a href="<{$xoops_url}>/modules/newbb/index.php?cat=<{$category.cat_id}>"><{$category.cat_title}></a> <br /><{$category.cat_description}> </td>
  </tr>
</table>

<div id="cat_<{$category.cat_id}>" style="display: <{$category.cat_display}>">
<table cellspacing="1" width="100%">
    <tr class="head" align="center">
      <td width="5%">&nbsp;</td>
<{if $subforum_display == "expand"}>
      <td colspan="2" width="57%" nowrap="nowrap" align="left"><{$smarty.const._MD_FORUM}></td>
<{else}>
      <td width="57%" nowrap="nowrap" align="left"><{$smarty.const._MD_FORUM}></td>
<{/if}>
      <td width="9%" nowrap="nowrap"><{$smarty.const._MD_TOPICS}></td>
      <td width="9%" nowrap="nowrap"><{$smarty.const._MD_POSTS}></td>
      <td width="20%" nowrap="nowrap"><{$smarty.const._MD_LASTPOST}></td>
    </tr>

  <!-- start forums -->
<{if $subforum_display == "expand"}>

<{foreach item=forum from=$category.forums}>
<{if $forum.forum_permission}>
    <tr>
      <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td>
      <td colspan="2" class="odd">
		<a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$forum.forum_id}>"><strong><{$forum.forum_name}></strong></a>
		<br /> <{$forum.forum_desc}>
		<{if $forum.forum_moderators}><br /><small><strong><{$smarty.const._MD_MODERATOR}></strong> <{$forum.forum_moderators}> </small> <{/if}>
      </td>
      <td class="even" align="center" valign="middle"><{$forum.forum_topics}> </td>
      <td class="odd" align="center" valign="middle"><{$forum.forum_posts}> </td>
      <td class="even" align="right" valign="middle"><{$forum.forum_lastpost_time}> <br />
		<{$forum.forum_lastpost_icon}> <br />
		<{$forum.forum_lastpost_user}>
	  </td>
    </tr>
<{if $forum.subforum}>
    <tr class="head" >
      <td width="5%">&nbsp;</td>
      <td width="5%" align="center"><{$img_subforum}>&nbsp;</td>
      <td colspan="4" nowrap="nowrap" align="left"><{$smarty.const._MD_SUBFORUMS}></td>
    </tr>
<{foreach item=subforum from=$forum.subforum}>
    <tr>
      <td class="odd" width="5%">&nbsp;</td>
      <td class="even" align="center" valign="middle" width="5%"><{$subforum.forum_folder}></td>
      <td width="52%" class="odd"><strong><a href="viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a></strong><br />
		<{$subforum.forum_desc}>
		<{if $subforum.forum_moderators}><br /><small> <strong><{$smarty.const._MD_MODERATOR}></strong> <{$subforum.forum_moderators}> </small> <{/if}>
	  </td>
      <td class="even" width="9%" align="center" valign="middle"><{$subforum.forum_topics}> </td>
      <td class="odd" width="9%" align="center" valign="middle"><{$subforum.forum_posts}> </td>
      <td class="even" width="20%" align="right" valign="middle"><{$subforum.forum_lastpost_time}> <br />
		<{$subforum.forum_lastpost_icon}> <br />
		<{$subforum.forum_lastpost_user}>
	  </td>
   </tr>
<{/foreach}>
<{/if}> <{/if}> <{/foreach}>

<{elseif $subforum_display == "collapse"}>

<{foreach item=forum from=$category.forums}>
<{if $forum.forum_permission}>
	<tr>
		<{if $forum.subforum}>
      	<td class="even" rowspan="2" align="center" valign="middle"><{$forum.forum_folder}></td>
		<{else}>
      	<td class="even" align="center" valign="middle"><{$forum.forum_folder}></td>
		<{/if}>
      	<td class="odd" onclick="window.location='<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$forum.forum_id}>'"><a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$forum.forum_id}>"><strong><{$forum.forum_name}></strong></a>
      		<br /><{$forum.forum_desc}> <{if $forum.forum_moderators}> <br />
        	<small><strong><{$smarty.const._MD_MODERATOR}></strong> <{$forum.forum_moderators}> </small><{/if}>
        </td>
      	<td class="even" align="center" valign="middle"><{$forum.forum_topics}> </td>
      	<td class="odd" align="center" valign="middle"><{$forum.forum_posts}> </td>
      	<td class="even" align="right" valign="middle"><{$forum.forum_lastpost_time}> <br />
			<{$forum.forum_lastpost_icon}> <br />
			<{$forum.forum_lastpost_user}>  </td>
    </tr>
	<{if $forum.subforum}>
    <tr>
     	<td colspan="4" align="left"><{$smarty.const._MD_SUBFORUMS}>&nbsp;<{$img_subforum}>&nbsp;
			<{foreach item=subforum from=$forum.subforum}>
			&nbsp;[<a href="viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a>]
			<{/foreach}>
		</td>
	</tr>
	<{/if}>
<{/if}>
<{/foreach}>

<{else}>

<{foreach item=forum from=$category.forums}>
<{if $forum.forum_permission}>
	<tr>
      	<td class="even" align="center" valign="middle"><{$forum.forum_folder}></td>
      	<td class="odd"><a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$forum.forum_id}>"><strong><{$forum.forum_name}></strong></a>
      		<br /><{$forum.forum_desc}> <{if $forum.forum_moderators}> <br />
        	<small> <strong><{$smarty.const._MD_MODERATOR}></strong> <{$forum.forum_moderators}></small><{/if}>
        </td>
      	<td class="even" align="center" valign="middle"><{$forum.forum_topics}> </td>
      	<td class="odd" align="center" valign="middle"><{$forum.forum_posts}> </td>
      	<td class="even" align="right" valign="middle"><{$forum.forum_lastpost_time}> <br />
			<{$forum.forum_lastpost_icon}> <br />
			<{$forum.forum_lastpost_user}>
		</td>
    </tr>
<{/if}>
<{/foreach}>

<{/if}>
  <!-- end forums -->
</table></div>
<{/if}> <{/if}> <{/foreach}>
<!-- end forum categories -->
<form action="search.php" method="post" name="search" id="search">
  <table width="100%">
    <tr>
      <td valign="middle"><{$img_hotfolder}> = <{$smarty.const._MD_NEWPOSTS}><br />
        <{$img_folder}> = <{$smarty.const._MD_NONEWPOSTS}><br />
        <{$img_locked_newposts}> = <{$smarty.const._MD_PRIVATEFORUM_NEWPOSTS}><br />
        <{$img_locked_nonewposts}> = <{$smarty.const._MD_PRIVATEFORUM_NONEWPOSTS}></td>
      <td align="right" valign="bottom"><strong><{$smarty.const._MD_SEARCH}></strong>&nbsp;
        <input name="term" type="text" size="20" />
        <input type="hidden" name="forum" value="all" />
        <input type="hidden" name="sortby" value="p.post_time desc" />
        <input type="hidden" name="searchin" value="both" />
        <input type="submit" name="submit" value="<{$smarty.const._MD_SEARCH}>" />
        <br />
        [ <a href="<{$xoops_url}>/modules/newbb/search.php"><{$smarty.const._MD_ADVSEARCH}></a> ]</td>
    </tr>
  </table>
</form>
<br />
<{$rss_enable}>
<br />
<br />
<{if $online}><{include file='db:newbb_online.html'}><{/if}>
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->