<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
$_tpl_ispaceUrl = $mArchiveLink;
$_tpl_spaceUrl = $ModHtmlLinked;
$skinpath = $_tpl_skinPath = $spaceConfig_System['s_path'];
if( !empty($arrArchiveLink) && is_array($arrArchiveLink) ){
	$_arrTmp = explode('-',$arrArchiveLink[1]);
	$_count = count($_arrTmp);
	if( $_count == 3 ){
		$_strTmp = str_replace('.html','',$_arrTmp[2]);
		$_iPage = is_numeric($_strTmp) ? $_strTmp : 0;
		$_catID = $_arrTmp[0];
		$_keyWord = $_arrTmp[1];
	} elseif( $_count == 2 ){
		$_strTmp = str_replace('.html','',$_arrTmp[1]);
		$_iPage = is_numeric($_strTmp) ? $_strTmp : 0;
		$_catID = $_arrTmp[0];
	} else{
		$_iPage = 1;
		$_strTmp = str_replace('.html','',$_arrTmp[0]);
		$_catID = is_numeric($_strTmp) ? $_strTmp : 0;
	}
}
print <<<EOT
		<link href="{$skinpath}css/space_index.css" type="text/css" rel="stylesheet" />
        <div class="tag_top">
			<h1>{$lang['tpl.su.str12']}</h1>
EOT;
if (!empty($spaceConfig_Syscat) AND is_array($spaceConfig_Syscat) ){
	$index = 0;
	foreach( $spaceConfig_Syscat as $_scatid => $_arrTmp ){
		$strtmp = '';
		if (0 == $index % 11) {
			if (0 == $index) {
				$strtmp = '<h2>';
			} else {
				$strtmp = '</h2><h2>';
			}
		}
		$index++;
		$_tpl_CatName = $_arrTmp['scattitle'];
		$_tpl_catid = $_scatid;
		print <<<EOT
		{$strtmp}{$lang['tpl.str127']}<a href="{$_tpl_ispaceUrl}show_user.{$_tpl_catid}.html">{$_tpl_CatName}</a>
EOT;
	}
}
$strmenunav = $lang['tpl.st.str14'];
if ($_catID > 0) {
	$strmenunav = $spaceConfig_Syscat[$_catID]['scattitle'];
}
print <<<EOT
			</h2>
		</div>
		<div class="tag_list">
			<h4><img src="{$skinpath}images/mright.gif" alt="" /> {$lang['tpl.su.str12']} {$lang['tpl.str124']}  {$strmenunav}  </h4>
		</div>
		<style type="text/css">
				<!--
				/*³£¹æÑùÊ½*/
				.tag_title { font-size: 12px; font-family: arial, helvetica, sans-serif, "{$lang['tpl.su.str13']}"; padding:0px; background:#1799E0; width:778px;; margin:4px auto 0px auto; overflow-x:hidden; height:24px; line-height:24px; color:#fff; font-weight:bold; }
				.line-1 { width:80px; display:block; float:left; border-right:1px solid #A1D3EE; }
				.line-2 { width:235px; display:block; float:left; border-right:1px solid #A1D3EE; text-align:left; padding-left:5px; }
				.line-3 { width:60px; display:block; float:left; border-right:1px solid #A1D3EE; }
				.line-4 { width:128px; display:block; float:left; }
				.showuser_tag_list { font-size: 12px; font-family: arial, helvetica, sans-serif, "{$lang['tpl.su.str13']}"; padding:0px; width:776px;; margin:0px auto 0px auto; overflow-x:hidden; height:24px; line-height:24px; border-bottom:1px solid #ddd; border-left:1px solid #ddd; border-right:1px solid #ddd;  }
				.line-01 { width:80px; display:block; float:left; border-right:1px solid #ddd; line-height:24px;  }
				.line-02 { width:235px; display:block; float:left; border-right:1px solid #ddd; line-height:24px;  text-align:left; padding-left:5px; background:#f9f9f9; }
				.line-03 { width:60px; display:block; float:left; border-right:1px solid #ddd; line-height:24px;  background:#f9f9f9; }
				.line-04 { width:126px; display:block; float:left; line-height:24px;  }
				-->
		</style>
		<div class="tag_title">
			<span class="line-1">{$lang['tpl.su.str2']}</span>
			<span class="line-2">{$lang['tpl.su.str3']}</span>
			<span class="line-1">{$lang['tpl.su.str4']}</span>
			<span class="line-3">{$lang['tpl.su.str5']}</span>
			<span class="line-3">{$lang['tpl.su.str6']}</span>
			<span class="line-3">{$lang['tpl.su.str7']}</span>
			<span class="line-3">{$lang['tpl.su.str8']}</span>
			<span class="line-4">{$lang['tpl.su.str9']}</span>
		</div>
EOT;
$arrspaceuserinfo =& showuser_getspaceUser($_caatID, $_iPage);
if (!empty($arrspaceuserinfo['ResultSet']) AND is_array($arrspaceuserinfo['ResultSet'])) {
	foreach ($arrspaceuserinfo['ResultSet'] AS $val) {
		$_arrTmp =& $spaceConfig_Syschatcat[$val['scatid']];
		if( empty($_arrTmp) ){
			$_tpl_CatName = $lang['tpl.str4'];
		} else{
			$_tpl_CatName = $_arrTmp['scattitle'];
		}
		$_tpl_spaceTitle = htmlspecialchars($val['spacetitle']);
		$_tpl_subSpaceTitle = htmlspecialchars($val['SubSpaceTitle']);
		$_tpl_spaceSn = htmlspecialchars($val['spacename']);
		$_tpl_nickname = htmlspecialchars($val['nickname']);
		$_tpl_subnickname = htmlspecialchars($val['SubNickName']);
		$_tpl_JoinTime = gmdate("Y-m-d H:i:s",$val['joinspacetime']+getUserTimeZoneOffset());
		print <<<EOT
		<div class="showuser_tag_list">
			<span class="line-01">{$_tpl_CatName}</span>
			<span class="line-02"><a href="{$_tpl_spaceUrl}{$_tpl_spaceSn}.index.html" title1="{$lang['tpl.su.str10']}" title="{$_tpl_spaceTitle}" target="_blank">{$_tpl_subSpaceTitle}</a></span>
			<span class="line-01"><a href="dispuser.php?id={$val['userid']}" title1="{$lang['tpl.su.str11']}" title="{$_tpl_nickname}" target="_blank"><b>{$_tpl_subnickname}</b></a></span>
			<span class="line-03">{$val['topicnum']}</span>
			<span class="line-03">{$val['postnum']}</span>
			<span class="line-03">{$val['favnum']}</span>
			<span class="line-03">{$val['photonum']}</span>
			<span class="line-04">{$_tpl_JoinTime}</span>
		</div>
EOT;
	}//end foreach
	$_tpl_PageSearch = "{$mArchiveLink}show_user.{$_catID}";
	print <<<EOT
			<div style="height:10px;font-size: 6px;"></div>
			<div class="tag_list">
				<script type="text/JavaScript" src="space/script/pagination.js"></script>
				<h3 style="width: 776px;; height: 30px; padding:0px; margin: 0px auto;overflow: hidden;">
				<script type="text/JavaScript">
				PageList({$arrspaceuserinfo['AbsolutePage']},3,{$arrspaceuserinfo['PageSize']},{$arrspaceuserinfo['RecordCount']},"{$_tpl_PageSearch}",5);
				</script>
				</h3>
			</div>
EOT;
} else {
	print <<<EOT
		<div class="showuser_tag_list">
			<span >{$lang['spaceError.str2']}</span>
		</div>
EOT;
}
?>