<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<div class="mainbox">
<!---##########################右边样式部分##########################--->
	<div class="page_right">
	<ul class="border">
		<h1 class="font14"><?=$lang['tpl.str109']?></h1>
		<table width="96%">
		<tr>
			<td><?=$lang['tpl.str110']?>
<?
foreach( $admin_list as $key=>$user ){
?>
			<a target="_blank" href="dispuser.php?id=<?=$user['userid']?>" class="yellow"><?=$user['username']?></a>&nbsp;
<?
}
?>
			</td>
		</tr>
		<tr>
			<td><?=$lang['tpl.str111']?><em><a href="indivgroup_member.php?groupid=<?=$_GET['groupid']?>" class="yellow"><u><?=$groupinfo['usernum']?></u></a></em><?=$lang['tpl.str113']?> <?=$lang['tpl.str114']?><em><?=$groupinfo['topicnum']?></em>个 <?=$lang['tpl.str112']?><em><?=$groupinfo['todaynum']?></em>个</td>
		</tr>
		<tr>
			<td><?=$lang['tpl.str115']?><em><?=$groupinfo['appdate']?></em></td>
		</tr>
<?
if($master || $groupmaster){
?>
		<tr>
			<td><a href="indivgroup_manage.php?groupid=<?=$_GET['groupid']?>"><?=$lang['tpl.str116']?></a></td>
		</tr>
<?
}
?>
		</table><br />
	</ul><br>
	<ul class="border">
	<h1 class="font14"><?=$lang['tpl.str117']?></h1>
	<div class="padding">
		<?=$lang['tpl.str118']?><?=$groupinfo['usernum']?><?=$lang['tpl.str119']?> <a href="indivgroup_member.php?groupid=<?=$_GET['groupid']?>"><?=$lang['tpl.str120']?></a>
<?
foreach( $user_list as $key=>$user ){
?>
			<div class="photoroom"><img src="<?=$user['userface']?>" width="42" height="42" /><br /><a target="_blank" href="dispuser.php?id=<?=$user['userid']?>"><?=$user['username']?></a></div>
<?
}
?>
		<div style="clear:both"></div><br />
	</div>
	</ul>
	</div>
<!---########################## end 右边样式部分##########################--->
<!---##########################左边样式部分##########################--->
	<div class="page_left border" style=" padding:20px;">
		<table width="99%">
		<tr>
		<td width="60" valign="top"><img src="<?=$groupinfo['groupface']?>" width="120" /></td>
		<td width="10"></td>
		<td valign="top">
		<span class="username font14"><?=$groupinfo['groupname']?><?=$lang['tpl.str121']?></span>　<a href="<?=$ForumUrl?>indivgroup_index.php?groupid=<?=$_GET['groupid']?>"><?=$ForumUrl?>indivgroup_index.php?groupid=<?=$_GET['groupid']?></a>　[ <a href="indivgroup_join.php?groupid=<?=$_GET['groupid']?>"><?=$lang['tpl.str122']?></a>]<br />
		<span class="font14 leftcolor padding"><?=str_replace("\r","<br>",$groupinfo['groupinfo'])?></span>
		</td>
		</tr>
		</table>
	</div><br />
	<div class="page_left border">
		<h3 class="titlebig">
<?
	$forumonclick = ($forumchildcount > 0) ? "onclick=\"collapse(this,'category".$forum['boardid']."')\"":'';
?>
		<em><img src="<?=$imgurl?>tab.gif" onclick="collapse(this,'category')" alt="<?=$lang['tpl.str123']?>" /></em>
		<?=$lang['tpl.str125']?>
		</h3>
		<div id="category" style="display:''">
<?
if ($groupboardid == 0){
	$i = 0;
	foreach( $_forum as $key=>$forum ) 
	{
		
		$ii = 0;
		$forum['boardmaster']=explode('|', $forum['boardmaster']);
		$forum['lastpost']=explode('$', $forum['lastpost']);
		if( $forum['ishidden'] == 1 ){
			$forumchild = $forumchild-1;
			$ishidden = 1;
		}else{
			$ishidden = 0;
		}

		//掩藏开始
		if($ishidden == 0){	//列表开始
			$i++;$i=1;
			if ($i === 1) {
?>
		<table width="98%">
		<tr>
			<td width="60"><div class="<?if ($forum['todaynum'] >0 )echo "todaynew";else echo "today";?>"><?=$forum['todaynum']?><p><?=$lang['tpl.str46']?></p></div></td>
			<td>
			<b><a href="?groupid=<?=$forum['rootid']?>&groupboardid=<?=$forum['boardid']?>"><?=$forum['boardtype']?></a></b><br /><?=$forum['boardinfo']?><br />
			<span><?=$lang['tpl.str126']?>
<?
			$i= 0;
			foreach ($forum['boardmaster'] as $val){
				$i++;
				if($i != 1)
					echo ' | ';
				$url=urlencode($val);
?>
					<a href="dispuser.php?name=<?=$url?>" target="_blank"><?=$val?></a>
<?
			}
?>	
			 | <?=$lang['tpl.str127']?><a href="indivgroup_dispbbs.php?groupid=<?=$forum['rootid']?>&groupboardid=<?=$forum['boardid']?>&id=<?=$forum['lastpost'][6]?>"><?=$forum['lastpost'][3]?>....</a>  <em>( <?=$lang['tpl.str128']?><?=$forum['postnum']?>   |  <?=$lang['tpl.str129']?><?=$forum['topicnum']?> )</em></span></td>
		</tr>
		</table>
<?
			}
		}
	}
}
?>
		</div>
	</div><br />
	<div class="page_left border">
		<h3 class="titlebig">
		<?=$lang['tpl.str130']?>
		</h3>
			<table width="98%" class="heightd tableborder" style="border:0px;" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td style="border-top:0px;"><?=$lang['tpl.str38']?></td>
				<td style="border-top:0px;"><?=$lang['tpl.str38']?></td>
				<td style="border-top:0px;"><?=$lang['tpl.str131']?></td>
				<td style="border-top:0px;"><?=$lang['tpl.str132']?> | <?=$lang['tpl.str133']?></td>
			</tr>
<?
$t = 0;
foreach( $_topics as $key=>$topic ){
	$topic['lastpost']=explode('$',$topic['lastpost']);
	$topic['lastpost'][2] = gmdate('Y-m-d', $topic['lastpost'][2]+getUserTimeZoneOffset());
	(-1 == $topic['isvote']) AND ($topic['title'] = '['.$lang['list.tpl.str70'].']&nbsp;'.$topic['title']);
	$datedifftime = 0;
	if ( intval($board_settings[64]) > 0 ){
		if ( intval($board_settings[63]) == 0 ){
			$datedifftime = dateDiff('M',$topic['lastpost'][2],$nowtimes);
		}else{
			$datedifftime = dateDiff('M',$topic['dateandtime'],$nowtimes);
		}
		if ( $datedifftime > intval($board_settings[64]) ){
			$datedifftime = 0;
		}
	}
	$dispfile = 'indivgroup_dispbbs.php';
?>
			<tr>
				<td class="list1" style="background:none">
					<a href="<?=$dispfile?>?groupid=<?=$topic['groupid']?>&amp;groupboardid=<?=$topic['boardid']?>&amp;id=<?=$topic['topicid']?>&amp;page=<?=$page?>" target="_blank"><img src="<?=$imgurl?>icon/folder.gif" alt="" /></a>
				</td>
				<td class="list2">
<?
	$topic['lastpost'][3] = preg_replace( '/<([^<>]*?)>/i' ,'' ,$topic['lastpost'][3]);
	$topic['dateandtime'] = gmdate("Y-m-d H:i:s",$topic['dateandtime']+getUserTimeZoneOffset());
	$html_locktopic = htmlspecialchars($topic['locktopic']);
	$html_postusername = htmlspecialchars($topic['postusername']);
	$html_lastpost = htmlspecialchars($topic['lastpost'][3]);
?>
<a href="<?=$dispfile?>?groupid=<?=$topic['groupid']?>&amp;groupboardid=<?=$topic['boardid']?>&amp;id=<?=$topic['topicid']?>&amp;page=<?=$page?>" title="<?=$lang['list.tpl.str71']?><?=$html_locktopic?><?=$lang['list.tpl.str72']?>&#xA;<?=$lang['list.tpl.str31']?><?=$html_postusername?>&#xA;<?=$lang['list.tpl.str32']?><?=$topic['dateandtime']?>&#xA;<?=$lang['list.tpl.str33']?><?=$html_lastpost?> " <?=$topic['topicmode']?>><?=$topic['title']?></a>
<?
if ($topic['isvote'] != -1 AND ($topic['child'] + 1) > $board_settings[61]){
	$pagelinks = '';
	if ($board_settings[61] < 1) {
		$board_settings[61] = 20;
	}
	$topicpages = ceil(($topic['child'] + 1) / $board_settings[61]);
	for ($i = 1; $i <= $topicpages; $i++) {
		$pagelinks .= "<a href=\"".$dispfile."?groupid=".$topic['groupid']."&amp;groupboardid=".$topic['boardid']."&id=".$topic['topicid']."&page=".$page."&star=".$i."\">".$i."</a> ";
		if($i == 6) {
			$i = $topicpages + 1;
		}
	}
	if($topicpages > 6) {
		$pagelinks .= " .. <a href=\"".$dispfile."?groupid=".$topic['groupid']."&amp;groupboardid=".$topic['boardid']."&id=".$topic['topicid']."&page=".$page."&star=".$topicpages."\">".$topicpages."</a> ";
	}
?>
	<small>( <b><?=$pagelinks?></b> )</small>
<?
}
?>
				</td>
				<td class="list4"><a href="dispuser.php?id={$topic['postuserid']}" target="_blank"><?=$topic['postusername']?></a></td>
				<td class="list4"><a href="dispuser.php?id={$topic['lastpost'][5]}" target="_blank"><?=$topic['lastpost'][0]?></a><br><em><?=$topic['lastpost'][2]?></em></td>
			</tr>
<?
}
?>
			</table><br />
	</div>
<!---########################## end 左边样式部分##########################--->
</div>