<!-- marine add -->
<{include_php file="`$smarty.const.XOOPS_THEME_PATH`/`$xoops_theme`/d3forum_main_listcategories.php"}>
<!-- marine add -->
<{include_php file="`$smarty.const.XOOPS_THEME_PATH`/`$xoops_theme`/theme_config.php"}>

<!-- start module contents -->
<!-- breadcrumbs -->
<div id="main_listcategories" class="clearfix">

<div class="d3f_breadcrumbs">
	<a href="<{$mod_url}>/index.php?cat_ids=0"><{$smarty.const._MD_D3FORUM_LISTALLTOPICS}></a>
</div>

<div class="d3f_top_message">

<{$mod_config.top_message}>
<div class="d3f_rss"><a href="<{$mod_url}>/index.php?page=rss&amp;cat_ids=<{$category.id}>&amp;odr=1"><img src="<{$xoops_imageurl}>images/icon_rss.png" alt="RSS" width="20" height="20" /></a></div>

<a href="<{$mod_url}>/index.php?forum_id=1" class="d3f_c001"><img src="<{$xoops_imageurl}><{$smarty.const._THEME_CONFIG_d3f_ICONVISITORS_BOOK_IMG}>" alt="welcome" title="welcome" /></a>
</div>

<a href="#" id="d3f_wrap_open">open</a>

<div>
<dl class="d3f_bbsinfo">
<dt><{$smarty.const._MD_D3FORUM_TOTALTOPICSCOUNT}>:</dt>
	<dd><{$total_topics_count}></dd>
<dt><{$smarty.const._MD_D3FORUM_TOTALPOSTSCOUNT}>:</dt>
	<dd><{$total_posts_count}></dd>
<dt><{$smarty.const._MD_D3FORUM_TIMENOW}>:</dt>
	<dd><{$currenttime_formatted}></dd>
<dt><{$smarty.const._MD_D3FORUM_LASTVISIT}>:</dt>
	<dd><{$lastvisit_formatted}></dd>
</dl>

<!-- top controller -->
<a href="#" class="d3f_list_oc"><img src="<{$xoops_imageurl}><{$smarty.const._THEME_CONFIG_d3f_LISTOC_IMG}>" alt="open" title="open" />Information</a>
<ul class="d3f_ctrl">
	<{if $xoops_isadmin}>
		<li><a href="<{$mod_url}>/index.php?page=makecategory"><{$smarty.const._MD_D3FORUM_LINK_MAKECATEGORY}></a></li>
	<{/if}>
	<li><a href="<{$mod_url}>/index.php?page=rss&amp;cat_ids=0&amp;odr=1"><{$smarty.const._MD_D3FORUM_LINK_ALLRSS}> <img src="<{$xoops_imageurl}>images/icon_rss.png" alt="<{$smarty.const._EDIT}>" width="16" height="16" /></a></li>
</ul>

</div>

<div id="d3f_cat_wrap">
<{foreach item="category" from=$top_categories}>
<div class="d3f_cat"><!-- start categories -->
	<div class="d3f_cat_main">
		<a href="<{$mod_url}>/index.php?cat_id=<{$category.id}>"><img src="<{$xoops_imageurl}>images/category_<{$category.bit_new}>.gif" alt="" width="16" height="16" /> <{$category.title}></a>&nbsp;&nbsp;&gt;
	</div>
	<div class="d3f_cat_sub">
		<ul>
		<{foreach item=forum from=$category.forums}><!-- forums -->
		<li><a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>"><img src="<{$xoops_imageurl}>images/forum_<{$forum.bit_new}>.gif" alt="<{$forum.title}>" width="16" height="16" /><{$forum.title}></a></li>
		<{/foreach}>
		</ul>
	</div>
</div><!-- End categories -->
<{/foreach}>
</div>

<div class="d3_scat"><!-- Sub Categories -->

<{foreach item="category" from=$top_categories}>
<{if $category.subcategories}>
<ul>
<li><a href="<{$mod_url}>/index.php?cat_id=<{$category.id}>"><img src="<{$xoops_imageurl}>images/category_<{$category.bit_new}>.gif" alt="" width="16" height="16" /><{$category.title}></a>&nbsp;&nbsp;&gt;&nbsp;&nbsp;
<{foreach item=category from=$category.subcategories}>
<ul>
<li>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="<{$mod_url}>/index.php?cat_id=<{$category.id}>"><img src="<{$xoops_imageurl}>images/category_<{$category.bit_new}>.gif" alt="" width="16" height="16" /><{$category.title}></a>&nbsp;&nbsp;&gt;&nbsp;&nbsp;

	<{foreach item=forum from=$category.forums}>
		<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>" title="<{$block.lang_lastupdated}>:<{$forum.last_post_time_formatted}>"><img src="<{$xoops_imageurl}>images/forum_<{$forum.bit_new}>.gif" alt="<{$forum.title}>" width="16" height="16" /><{$forum.title}></a>
	<{/foreach}>
</li>
</ul></li>
<{/foreach}>
<{/if}>
</ul>
<{/foreach}>
</div>

<div>
<!-- marine modifi xugj_block topics-->
<{xugj_block file="modules/`$xoops_dirname`/blocks/blocks.php" func="b_d3forum_list_topics_show" opt="`$xoops_dirname`,10,1,time,1,0,," item="block"}>
<{if $block.full_view == true}>
<table class="outer" cellspacing="1">
<thead>
<tr>
	<th><{$block.lang_forum}></th>
	<th><{$block.lang_topic}></th>
	<th align="center"><{$block.lang_replies}></th>
	<th align="center"><{$block.lang_views}></th>
	<th align="center" colspan="2"><{$block.lang_lastpost}></th>
</tr>
</thead>
<{foreach item=topic from=$block.topics}>
<{strip}>
<tr class="<{cycle values="even,odd"}>">
	<td><a href="<{$block.mod_url}>/index.php?forum_id=<{$topic.forum_id}>"><{$topic.forum_title}></a></td>
	<td><a href="<{$block.mod_url}>/index.php?topic_id=<{$topic.id}>#post_id<{$topic.last_post_id}>">
	<{if $topic.u2t_marked}><img src="<{$block.mod_imageurl}>/block_marked.gif" alt="<{$block.lang_alt_marked}>" /><{/if}>
	<{* displays the last post's subject or topic title *}>
	<{if $block.disp_last_subject }>
	<{$topic.last_subject}>
	<{else}>
	<{$topic.title}>
	<{/if}></a>
	<{if ! $topic.solved}><img src="<{$block.mod_imageurl}>/block_unsolved.gif" alt="<{$block.lang_alt_unsolved}>" /><{/if}></td>
	<td align="center"><{$topic.replies}></td>
	<td align="center"><{$topic.views}></td>
	<td align="center" nowrap="nowrap"><{$topic.last_uname}></td>
	<td align="right" nowrap="nowrap"><{$topic.last_post_time_formatted}></td>
</tr>
<{/strip}>
<{/foreach}>
</table>

<a href="<{$block.mod_url}>/index.php?page=search"><{$block.lang_linktosearch}></a>
&nbsp;
<{if is_numeric( $block.forums ) }>
<a href="<{$block.mod_url}>/index.php?forum_id=<{$block.forums}>"><{$block.lang_linktolisttopics}></a>
<{else}>
<a href="<{$block.mod_url}>/index.php?cat_ids=<{$block.categories}>"><{$block.lang_linktolisttopics}></a>
<{/if}>
&nbsp;
<{if is_numeric( $block.categories ) }>
<a href="<{$block.mod_url}>/index.php?cat_id=<{$block.categories}>"><{$block.lang_linktolistforums}></a>
&nbsp;
<{/if}>
<a href="<{$block.mod_url}>/index.php"><{$block.lang_linktolistcategories}></a>

<{else}>

<ol style="padding:3px;margin:0;">
<{foreach item=topic from=$block.topics}>
	<li><a href="<{$block.mod_url}>/index.php?topic_id=<{$topic.id}>"><{$topic.title}></a>(<{$topic.replies}>) <{$topic.last_uname}> <{$topic.last_post_time_formatted}></li>
<{/foreach}>
</ol>

<{/if}>
</div>

<div id="d3f_wrap_oc">
<a href="#" id="goback">close</a>
<div class="d3f_wrap">
<!-- start categories -->
<{foreach item="category" from=$top_categories}>
<{if $category.subcategories or $category.forums or $xoops_isadmin}>

<div class="d3f_head">
<h2><a href="<{$mod_url}>/index.php?cat_id=<{$category.id}>"><img src="<{$xoops_imageurl}>images/category_<{$category.bit_new}>.gif" alt="" width="16" height="16" /> <{$category.title}></a></h2>
	<p>
		<{include file="db:`$mydirname`_inc_moderators.html" target=$category}>
		<{$smarty.const._MD_D3FORUM_TOTALTOPICSCOUNT}>: <{$category.topics_count_in_tree}> <{$smarty.const._MD_D3FORUM_TOTALPOSTSCOUNT}>: <{$category.posts_count_in_tree}>
		<{if $category.last_post_time}><{$smarty.const._MD_D3FORUM_LASTPOST}>: <{$category.last_post_time_formatted}><{/if}>
		<a href="<{$mod_url}>/index.php?page=rss&amp;cat_ids=<{$category.id}>&amp;odr=1"><img src="<{$xoops_imageurl}>images/icon_rss.png" alt="RSS" title="<{$smarty.const._MD_D3FORUM_LINK_CATEGORYRSS}>" width="16" height="16" /></a>
	</p>
</div>

<{if $category.desc}><p class="d3f_info"><{$category.desc}></p><{/if}>

<{if $category.subcategories}>
<h3 class="d3f_head_h3"><{$smarty.const._MD_D3FORUM_SUBCATEGORIES}></h3>
<ul class="d3f_subcategories">
<{foreach item="subcategory" from=$category.subcategories}>
	<li>
		<a href="<{$mod_url}>/index.php?cat_id=<{$subcategory.id}>" title="<{$subcategory.desc}>"><img src="<{$xoops_imageurl}>images/category_<{$subcategory.bit_new}>.gif" alt="<{$subcategory.title}>" width="16" height="16" /> <{$subcategory.title}></a> (<{$smarty.const._MD_D3FORUM_TOTALTOPICSCOUNT}>: <{$subcategory.topics_count_in_tree}>, <{$smarty.const._MD_D3FORUM_TOTALPOSTSCOUNT}>: <{$subcategory.posts_count_in_tree}>)
		<{if $xoops_isadmin}><a href="<{$mod_url}>/index.php?page=categorymanager&amp;cat_id=<{$subcategory.id}>"><img src="<{$xoops_imageurl}>images/icon_pencil22.gif" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._MD_D3FORUM_LINK_CATEGORYMANAGER}>" width="16" height="16" /></a><{/if}>
		<a href="<{$mod_url}>/index.php?page=rss&amp;cat_ids=<{$subcategory.id}>&amp;odr=1"><img src="<{$xoops_imageurl}>images/icon_rss.png" alt="RSS" title="<{$smarty.const._MD_D3FORUM_LINK_CATEGORYRSS}>" width="16" height="16" /></a>
	</li>
<{/foreach}>
</ul>
<{/if}>

<{if $category.forums}>
<h3 class="d3f_head_h3"><{$smarty.const._MD_D3FORUM_FORUM}></h3>
<ul class="d3f_listforums">
<{foreach item=forum from=$category.forums}>
	<li>
		<a href="<{$mod_url}>/index.php?forum_id=<{$forum.id}>">
			<img src="<{$xoops_imageurl}>images/forum_<{$forum.bit_new}>.gif" alt="<{$forum.title}>" width="16" height="16" />
			<{$forum.title}>
		</a>
		<{$smarty.const._MD_D3FORUM_TOPICSCOUNT}>: <{$forum.topics_count}> <{$smarty.const._MD_D3FORUM_POSTSCOUNT}>: <{$forum.posts_count}>
		<{if $forum.last_post_time}><{$smarty.const._MD_D3FORUM_LASTPOST}>: <{$forum.last_post_time_formatted}><{/if}>
		<{if $xoops_isadmin}><a href="<{$mod_url}>/index.php?page=forummanager&amp;forum_id=<{$forum.id}>"><img src="<{$xoops_imageurl}>images/icon_pencil22.gif" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._MD_D3FORUM_LINK_FORUMMANAGER}>" width="16" height="16" /></a><{/if}>
		<a href="<{$mod_url}>/index.php?page=rss&amp;forum_id=<{$forum.id}>"><img src="<{$xoops_imageurl}>images/icon_rss.png" alt="RSS" title="<{$smarty.const._MD_D3FORUM_LINK_FORUMRSS}>" width="16" height="16" /></a>
	</li>
<{/foreach}>
</ul>
<{/if}>

<div class="d3f_info_ctrl">
	<{strip}>
	<a href="<{$mod_url}>/index.php?cat_ids=<{$category.id}>"><{$smarty.const._MD_D3FORUM_LISTTOPICSINCATEGORY}></a>
	<{if $xoops_isadmin}>
		&nbsp;-&nbsp;<a href="<{$mod_url}>/index.php?page=categorymanager&amp;cat_id=<{$category.id}>"><img src="<{$xoops_imageurl}>images/icon_pencil22.gif" alt="<{$smarty.const._EDIT}>" width="16" height="16" /><{$smarty.const._MD_D3FORUM_LINK_CATEGORYMANAGER}></a>
	<{/if}>
	<{if $category.can_makeforum}>
		&nbsp;-&nbsp;<a href="<{$mod_url}>/index.php?page=makeforum&amp;cat_id=<{$category.id}>"><{$smarty.const._MD_D3FORUM_LINK_MAKEFORUM}></a>
	<{/if}>
	<{if $xoops_isadmin}>
		&nbsp;-&nbsp;<a href="<{$mod_url}>/index.php?page=makecategory&amp;cat_id=<{$category.id}>"><{$smarty.const._MD_D3FORUM_LINK_MAKESUBCATEGORY}></a>
	<{/if}>
	<{/strip}>
</div>
<{/if}>
<{/foreach}>
<!-- end categories -->
</div>

<!-- icon explanation -->
<div class="d3f_iconexps">
<ul class="d3f_iconexp">
	<li><img src="<{$xoops_imageurl}>images/forum_1.gif" alt="" width="18" height="18" /> = <{$smarty.const._MD_D3FORUM_ALT_NEWPOSTS}></li>
</ul>
<ul class="d3f_iconexp">
	<li><img src="<{$xoops_imageurl}>images/forum_0.gif" alt="" width="18" height="18" /> = <{$smarty.const._MD_D3FORUM_ALT_NONEWPOSTS}></li>
</ul>
</div>

<!-- marine modifi xugj_block posts-->
<div class="d3f_xbp">
<{$block.lang_posts}>
<{xugj_block file="modules/d3forum/blocks/blocks.php" func="b_d3forum_list_posts_show" opt="$mydirname,20,time,,,0" item="block"}>
<ol style="padding:3px;margin:0;">
<{foreach item=post from=$block.posts}>
	<li style="margin:2px;margin-left:20px;list-style-type:decimal;">
		<a href="<{$block.mod_url}>/index.php?forum_id=<{$post.forum_id}>"><{$post.forum_title}></a>&nbsp;&nbsp;&gt;&nbsp;&nbsp;
		<a href="<{$block.mod_url}>/index.php?post_id=<{$post.id}>"><{$post.subject}></a>&nbsp;&nbsp;<{$post.uname}>&nbsp;&nbsp;<{$post.post_time_formatted}>
  </li>
<{/foreach}>
</ol>
</div>
<!-- End marine modifi -->

</div><!-- end d3f_wrap_oc -->

</div>
<{include file='db:system_notification_select.html'}>
<!-- end module contents -->
