<!--<?php
print <<<EOT
-->
<div style="border-bottom:1px solid $tablecolor;">
<div class="mode-head cc">
		<ul class="nav-cms fl">
<!--
EOT;
foreach($catedbs as $key => $value){
if($value){print <<<EOT
-->
	   		<li><a href="cate.php?cateid=$key" title="$value"><span>$value</span></a></li>
<!--
EOT;
}}print <<<EOT
-->
		</ul>
		<div class="c"></div>
</div>
</div>
<!--text advertisement begin-->
<!--
EOT;
if($advertdb['text']){print <<<EOT
-->
<div class="ad-text">
	<table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
$id=0;
$idp = 100/$db_txtadnum;
foreach($advertdb['text'] as $value){
if($id==0){print <<<EOT
-->
		<tr class="tr3">
<!--
EOT;
}$id++;print <<<EOT
-->
			<td class="f_one black tac" width="$idp%">$value[code]</td>
<!--
EOT;
if($id==$db_txtadnum){
$id=0;print <<<EOT
-->
		</tr>
<!--
EOT;
}}if($id && $id<$db_txtadnum){
for($i=$id;$i<$db_txtadnum;$i++){print <<<EOT
-->
		<td class="f_one" width="$idp%"><br /></td>
<!--
EOT;
}print <<<EOT
-->
		</tr>
<!--
EOT;
}print <<<EOT
-->
	</table>
</div>
<!--
EOT;
}else{print <<<EOT
-->
<div style="margin-top:7px;"></div>
<!--
EOT;
}print <<<EOT
-->
<!--text advertisement end-->


<div class="cc">
	<!--左邊布局開始-->
    <div class="mode-main-left-bg">
    <div class="mode-main-left-bot">
    <div class="mode-main-left">

    	<div class="pt pb pl pr">
        	<h2><a href="rss.php" class="fr rss aimg" target="_blank">rss</a>社區信息</h2>
            <div class="mode-listA">
            <ul>
<!--
EOT;
if($db_todaypost){print <<<EOT
-->
			<li>今日:$tposts</li>
            <li>昨日:$yposts</li>
<!--
EOT;
}print <<<EOT
-->
			<li>最高日:$hposts</li>
            <li>主題:$topics</li>
            <li>帖子:$article</li>
            <li>會員:$totalmember</li>
            <li>新會員:$newmember</li>
            </ul></div><br />
            <h2>{degist_index}</h2>
            <div class="mode-listA">
                <ul>
                <pw id="degist_index" name="社區精華" stamp="subject" num="7"/>
                    <loop>
                    <li><a href="{url}" title="{title}" target="_blank">{title}</a></li>
                    </loop>
                </ul>
            </div>
            <br />
            <h2>{user_todaypost}</h2>
            <div class="mode-u-img mode-user-list">
            <pw id="user_todaypost" name="今日" stamp="user" num="3" />
                <loop>
                    <dl>
                    <dt><img src="{image}" /></dt>
                    <dd><a href="{url}" target="_blank">{title}</a></dd><dd>數量︰&nbsp;{value}</dd>
                    </dl>
                </loop>
            </div>
            <br />
            <h2>{active_day}</h2>
            <div class="mode-user-list mode-user-list2">
            <pw id="active_day" name="今日" stamp="active" num="3" />
				<loop>
					<dl>
						<dd><a href="{url}" target="_blank">{title}</a></dd>
						<dd>參加人數︰&nbsp;{num}<br />
							費用︰&nbsp;{costs}</dd>
						<dd>活動地點︰&nbsp;{location}</dd>

					</dl>
				</loop>
            </div>
			<br />
            <h2>{taghot}</h2>
            <div class="mode-tags-list">
            <pw id="taghot" name="熱門" stamp="tag" num="15" />
				<loop>
					<span><a href="{url}" target="_blank">{title}</a></span>
				</loop>
            </div>
            <br />
		</div>
    </div>
    <!--左邊結束右邊布局開始-->
	<div class="mode-main-right">
    	<div class="mode-wid500">
        	<div class="mode-boxC">
                <h2><div>
<!--#
if(!empty($first_notice)){
#-->
                    <span class="f9 fr ml">$first_notice[startdate]</span><a href="$first_notice[url]" class="fr blue" target="_blank">$first_notice[subject]</a>
<!--#}else{#-->
                    &nbsp;
<!--#}#-->
                    <span class="b">{index_push}</span>&nbsp;<img src="$pwModeImg/hot-icon.png" class="hot-icon" align="absmiddle" />
                </div></h2>
                <div class="mode-list-dlB ml mr pt cc" style="height:197px;overflow:hidden">
                    <pw name="社區焦點" stamp="push" id="index_push" num="2" />
                    <loop>
                    <dl class="pb">
                    <dt class="fl img"><a href="{url}" target="_blank"><img src="{image,100,84}" /></a></dt>
                    <dd class="title b"><a href="{url}" class="red" target="_blank">{title}</a></dd>
                    <dd class="text gray">{value}</dd>
                    <dd><a href="{url}" target="_blank">查看全文&laquo;</a></dd>
                    </dl>
                    </loop>
                </div>
                <h2 class="mt b"><div>{hot_redian}</div></h2>
                <ul class="mode-listA ml mr mb mt mode-listB">
                    <pw id="hot_redian" name="社區熱點" stamp="subject" num="8"/>
                    <loop>
                    <li>
                    <span class="gray">{postdate,m-d}</span>
                    <span class="name blue"><a href="u.php?uid={authorid}" target="_blank">{author}</a></span>
                    <a href="{url}" target="_blank" class="f14">{title}</a>
                    </li>
                    </loop>
                </ul>
            </div>
        </div>
    	<div class="mode-wid300">
            <div class="mode-h235 bor-gray mb">
            <!--flash開始-->
    <style>
    .pwSlide {border:6px solid #fff;background:#fff;position:relative;width:285px;height:222px;overflow:hidden;text-align:left;}
    .pwSlide a:hover{text-decoration:none;}
    .pwSlide h2 {height:24px;font-size:14px;overflow:hidden;display:block;background:#fff;width:293px;position:absolute;bottom:0px;}
    .pwSlide ul {z-index:2;position:absolute;right:5px;top:180px;}
    .pwSlide ul li {float:left;width:18px;height:13px;line-height:15px;text-align:center;margin-left:1px;background: url($imgpath/focus1.gif) no-repeat;}
    .pwSlide ul li a {display:block;width:18px;height:13px;font-size:10px;font-family:Tahoma;color:#FFFFFF;}
    .pwSlide ul li a:hover, .pwSlide ul li a.sel {color:#fff;text-decoration:none;background: url($imgpath/focus2.gif) no-repeat;}
    </style>

                        <div id="pwSlidePlayer" class="pwSlide" onmouseover="pwSlidePlayer('pause');" onmouseout="pwSlidePlayer('goon');">
                        <pw id="index_flash" name="首頁flash" stamp="push" num="6"/>
                        <loop>
    <!--#$tmpCount++;#-->
                        <div id="Switch_$key" style="display:none;">
                        	<div style="height:200px;">
                            <a href="{url}" target="_blank"><img src="{image,288,200}" title="{title}" /></a>
                            </div>
                            <h2><a href="{url}" target="_blank">{title,36}</a></h2>
                        </div>
                        </loop>
    <!--#
    if(empty($tmpCount)){
    $tmpCount = 1;
    #-->
                        <div id="Switch_0">
                            <img src="$pwModeImg/flash-no.gif" style="width:288px;height:200px;" />
                            <h2 class="bdt">趕緊去帖子頁里使用推送功能</h2>
                        </div>
    <!--#}#-->
                        <ul id="SwitchNav"></ul>
                        </div>
                    <div class="c"></div>
                    <script type="text/javascript" src="js/picplayer.js"></script>
                    <script language="JavaScript">pwSlidePlayer('play',1,$tmpCount);</script>
            <!--flash結束-->
            </div>
            <div class="mode-boxC">
            <!--版塊榜單開始-->
                <h2>
                <div id="sortforum">
                <span class="mode-cut">
                <a href="javascript:;" id="forum_tpost" class="tree" onmouseover="showTabs('sortforum','forum_tpost','a','tree')">{forumtoday}</a>
                <a id="forum_topic" href="javascript:;" onmouseover="showTabs('sortforum','forum_topic','a','tree')">{forumarticle}</a></span>
                <span class="b">版塊榜單</span>
                </div>
                </h2>
                <div class="mr mt ml">
                    <ul class="mode-listA mode-listC" id="info_forum_tpost">
                    <pw id="forumtoday" name="今日發帖" stamp="forum" num="8"/>
                    <loop>
                    <li><span class="blue">{value}</span><a href="{url}" target="_blank">{title}</a></li>
                    </loop>
                    </ul>
                    <ul class="mode-listA mode-listC" id="info_forum_topic" style="display:none">
                    <pw id="forumarticle" name="主題數" stamp="forum" num="8"/>
                    <loop>
                    <li><span class="blue">{value}</span><a href="{url}" target="_blank">{title}</a></li>
                    </loop>
                    </ul>
                </div>
			</div>
        </div>
        <div class="c"></div>
<!--社區新圖開始-->
<div class="mode-boxC"><h2><div class="b">社區新圖</div></h2></div>
        <div class="mode-pic-new">
            <div class="mode-pic-fr fr" id="LeftArr"></div>
            <div class="mode-pic-fl fl" id="RightArr"></div>
            <div style="width:700px;margin:auto;" id="ISL_Cont_1">
            	<ul class="mode-list-img img mt">
                <pw id="newimage" name="社區圖展" stamp="image" num="10" />
                <loop>
                <li><a href="{url}" title="{title}" target="_blank"><img src="{image,110,80}" height="80" /></a>
                <P><a href="{url}" title="{title}" target="_blank">{title,10}</a></P></li>
                </loop>
                </ul>
            </div>
<script src="mode/area/images/ScrollPic.js" language="javascript"></script>
<SCRIPT language=javascript type=text/javascript>
	var scrollPic_02 = new ScrollPic();
	scrollPic_02.scrollContId   = "ISL_Cont_1";
	scrollPic_02.arrLeftId      = "LeftArr";
	scrollPic_02.arrRightId     = "RightArr";

	scrollPic_02.frameWidth     = 700;
	scrollPic_02.pageWidth      = 140;

	scrollPic_02.speed          = 10;
	scrollPic_02.space          = 10;

	scrollPic_02.initialize();
</SCRIPT>
        </div>
<div class="c"></div>
<!--版塊旋環開始-->

<!--
EOT;
foreach ($index_forum as $key => $value) {
$showtype = count($value);
if ($showtype == 1){
	foreach ($value as $kfid => $fiddb) {print <<<EOT
-->
<div class="mode-boxC mt pb">
    <h2><div>
    <a href="thread.php?fid=$kfid" class="fr fn">&raquo;進入版塊</a> <span class="b">{$forum[$kfid]['name']}</span>
    </div>
    </h2>
    <div class="mode-box-left bdr pr mt">
        <dl class="mode-list-dlC fl img mr ml">
            <dt><a href="{$fiddb[newpic][0][url]}"><img src="{$fiddb[newpic][0][image]}" /></a></dt>
            <dd class="title b"><a href="{$fiddb[newpic][0][url]}" target="_blank">{$fiddb[newpic][0][title]}&nbsp;</a></dd>
            <dd class="text gray">{$fiddb[newpic][0][content]}&nbsp;</dd>
        </dl>
        <ul class="mode-listA mode-listB">
<!--
EOT;
foreach ($fiddb['new'] as $k => $v) {print <<<EOT
-->
            <li>
                <span><a href="u.php?uid=$v[authorid]" class="blue" target="_blank">$v[author]</a></span>
                <a href="read.php?tid=$v[tid]" target="_blank">$v[title]</a>
            </li>
<!--
EOT;
}print <<<EOT
-->
        </ul>
    </div>
        <div class="img fr mr ml" style="width:250px;">
<!--
EOT;
foreach ($fiddb['newpic'] as $k => $v) {
if($k == 0)continue;
print <<<EOT
-->
			<dl class="mode-list-dl mt mr">
                <dt><a href="{$v[url]}" target="_blank"><img src="{$v[image]}" /></a></dt>
                <dd class="title blue f14"><a href="{$v[url]}" target="_blank">{$v[title]}</a></dd>
                <dd class="text">{$v[content]}</dd>
                <dd class="green">{$v[replies]}條回復</dd>
            </dl>
<!--
EOT;
}print <<<EOT
-->

        </div>
        <div class="c"></div>

</div>
<div class="c"></div>
<!--
EOT;
}} elseif ($showtype == 2) {
		$count = 0;
		foreach ($value as $kfid => $fiddb) {$count++;
			$ml = $count == 2 ? 'ml' : '';
print <<<EOT
-->
			<div class="mode-boxC mode-wid400 $ml pb pt">
            	<h2><div><a href="thread.php?fid=$kfid" class="fr fn" target="_blank">&raquo;進入版塊</a> <span class="b">{$forum[$kfid]['name']} </span></div></h2>

                	<div class="c"></div>
                    <div class="mode-wid140 bdr mr mt">
                    <ul class="mode-list-img img">
<!--
EOT;
foreach ($fiddb['newpic'] as $k => $v) {print <<<EOT
-->
						<li>
                            <a href="{$v[url]}" target="_blank"><img src="{$v[image]}" /></a>
                            <p><a href="{$v[url]}" target="_blank">{$v[title]}</a></p>
                        </li>
<!--
EOT;
}print <<<EOT
--></ul>
                    </div>
                    <div class="mode-wid240">
                        <ul class="mode-listA mode-listB mt">
<!--
EOT;
foreach ($fiddb['new'] as $k => $v){print <<<EOT
-->
			             <li>
			                <span><a href="u.php?uid=$v[authorid]" class="blue" target="_blank">$v[author]</a></span>
			                <a href="read.php?tid=$v[tid]" target="_blank">$v[title]</a>
			             </li>
<!--
EOT;
}print <<<EOT
-->
				        </ul>
				        <div class="c"></div>
				    </div>

				</div>
<!--
EOT;
}print <<<EOT
-->
<div class="c"></div>
<!--
EOT;
	} elseif ($showtype == 3) {
		$count = 0;
		foreach ($value as $kfid => $fiddb) {$count++;
			$mr = $count == 3 ? '' : 'mr2';
print <<<EOT
-->
		<div class="mode-wid260 mode-boxC $mr pb pt">
			<h2><div><a href="thread.php?fid=$kfid" class="fr fn" target="_blank">&raquo;進入版塊</a> {$forum[$kfid]['name']}</div></h2>
<!--
EOT;
foreach ($fiddb['newpic'] as $k => $v) {print <<<EOT
-->
				<dl class="mode-list-dl img pt ml mr">
		            <dt><a href="{$v[url]}" target="_blank"><img src="{$v[image]}" /></a></dt>
		            <dd class="title blue f14"><a href="{$v[url]}" target="_blank">{$v[title]}</a></dd>
		            <dd class="text">{$v[content]}</dd>
		            <dd class="green">{$v[replies]}條回復</dd>
		        </dl>
<!--
EOT;
}print <<<EOT
-->
		        <div class="c"></div>
		        <ul class="mode-listA mode-listB pl pr">
<!--
EOT;
foreach ($fiddb['new'] as $k => $v){print <<<EOT
-->
		             <li>
		                <span><a href="u.php?uid=$v[authorid]" class="blue" target="_blank">$v[author]</a></span>
		                <a href="read.php?tid=$v[tid]" target="_blank">$v[title]</a>11
		             </li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			    <div class="c"></div>

		</div>
<!--
EOT;
		}
	}
}print <<<EOT
-->
            <div class="c"></div>
            <!--版塊導航開始-->
			<div class="mode-boxC mt mode-fg">
				<h2><div class="b">社區地圖</div></h2>
                <div class="pl pr pb">
				<table cellpadding="0" cellspacing="0">
<!--
EOT;
$a=0;
foreach($catedbs as $k=>$cate){
if($forumdb[$k]){
if($a==0){
print <<<EOT
-->
					<tr>
<!--
EOT;
}print <<<EOT
-->
						<td class="pt pb bdb">
						<h3><div><a href="cate.php?cateid=$k" target="_blank" class="b">$cate</a><span class="fn s3">今天{$pwTPost[$k]}帖</span></div></h3>
						<ul>
<!--
EOT;
$i=0;
foreach($forumdb[$k] as $forums){
if($i>=4)break;
print <<<EOT
-->
								<li><a href="thread.php?fid=$forums[fid]" id="fn_$forums[fid]" title="$forums[name]" target="_blank">$forums[name]</a>
<!--
EOT;
if($db_todaypost){
print <<<EOT
-->
								<span style="margin-left:5px">($forums[tpost])</span>
<!--
EOT;
}print <<<EOT
-->
								 </li>
<!--
EOT;
$i++;
}print <<<EOT
-->
						</ul>
						<div class="c"></div>
<!--
EOT;
if($i>=4){print <<<EOT
-->
						<a href="cate.php?cateid=$k" class="fr" target="_blank">&raquo; 更多</a>
<!--
EOT;
}print <<<EOT
-->
						</td>
<!--
EOT;
$a++;
if($a==2){
$a=0;
print <<<EOT
-->
					</tr>
<!--
EOT;
}print <<<EOT
<!--
EOT;
}}print <<<EOT
-->
				</table>
                </div>
            </div>
<!--版塊旋環結束-->
	</div>
    <!--右邊布局結束-->
    </div>
    </div>
</div>
<!--友情鏈接-->
<!--#
if($db_indexlink==1){
#-->
        <div id="links">
            <h4 class="powder bdb">
<!--#
if($db_ifselfshare && $groupid!='guest'){
#-->
                <span class="fr fn black">
                    <a id="selfshare" style="cursor:pointer;" onclick="sendmsg('pw_ajax.php','action=sharelink',this.id)">自助友情鏈接</a>
                </span>
<!--#}#-->
            友情鏈接
            </h4>
			<div class="linksimg">
<!--#
foreach($sharelink[0] as $share){
#-->
            $share
			<div class="c"></div>
            <div style="margin:5px 0;border-top:1px dashed #CCCCCC;"></div>
<!--#}#--></div>
            <div class="links">
            $sharelink[1]
            </div>
            <div class="c"></div>
            <h4 class="powder bdt"><span class="fn black">在線用戶<a name="online"></a> - 共 $usertotal 人在線,$userinbbs 位會員,$guestinbbs 位訪客,最多 $higholnum 人發生在 $mostinbbstime</span></h4>
        </div>
<!--#}#-->
		<div class="c"></div>
	</div>
<!--友情鏈接結束-->
<script type="text/javascript">
function showTabs(id,select,element,css){
	var o = getObj(id);
	var t = o.getElementsByTagName(element);
	for (var i=0;i<t.length;i++) {
		if (t[i].id) {
			var oo = getObj(t[i].id);
			if (t[i].id == select) {
				getObj(t[i].id).className = css;
				getObj('info_'+t[i].id).style.display = '';
			} else {
				getObj(t[i].id).className = '';
				getObj('info_'+t[i].id).style.display = 'none';
			}
		}
	}
	return false;
}
</script>
<!--
EOT;
$head_pop && require PrintEot($head_pop);
?>-->