<!--<?php
require_once uTemplate::PrintEot('header');
$_P = array('0'=>'<font color="red" size="+">&#215;</font>','1'=>'<font color="green" size="+">&#8730;</font>');
require_once uTemplate::PrintEot('profile_left');
print <<<EOT
-->
<div class="contUser">
	<div class="p15">
		<h4 class="site"><span>權限</span></h4>
		<div class="navC mb10">
			<ul>
				<li class="current"><a style="cursor:pointer" hidefocus="true">權限查看</a></li>
				<li><a style="cursor:pointer" href="profile.php?action=buy" hidefocus="true">特殊組購買</a></li>
			</ul>
		</div>
		<div class="sidebar fr">
<!--
EOT;
if (empty($fid)) {print <<<EOT
-->
			<div class="boxC mb10">
				<h3>我擁有的權限有</h3>
				<ul class="ulE">
<!--
EOT;
foreach($mygpdb as $key => $value){print <<<EOT
-->
					<li id="myg_$key"><a href="profile.php?action=permission&gid=$key">$value</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			</div>
<!--
EOT;
if(!empty($_gmember)){print <<<EOT
-->
			<div class="boxC mb10">
				<h3>會員組權限查看</h3>
				<ul class="ulE">
<!--
EOT;
foreach($_gmember as $key => $value){print <<<EOT
-->
					<li id="sg_$key"><a href="profile.php?action=permission&gid=$key">$value[title]</a>︰$value[post]</li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}if(!empty($_gsystem)){print <<<EOT
-->
			<div class="boxC mb10">
				<h3>系統組權限查看</h3>
				<ul class="ulE">
<!--
EOT;
foreach($_gsystem as $key => $value){print <<<EOT
-->
					<li id="sg_$key"><a href="profile.php?action=permission&gid=$key">$value[title]</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}if(!empty($_gspecial)){print <<<EOT
-->
			<div class="boxC mb10">
				<h3>特殊組權限查看</h3>
				<ul class="ulE">
<!--
EOT;
foreach($_gspecial as $key => $value){print <<<EOT
-->
					<li id="sg_$key"><a href="profile.php?action=permission&gid=$key">$value[title]</a></li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
			</div>
<!--
EOT;
}print <<<EOT
-->
<script>
setCurrent('myg_{$gid}', '', 'current');
setCurrent('sg_{$gid}', '', 'current');
</script>
<!--
EOT;
}print <<<EOT
-->
		</div>
		<div class="content fl">
			<div class="p_lr_10">
<!--
EOT;
if ($fid) {print<<<EOT
-->
					<div class="mb10"><span class="f14 mr20">版塊權限︰<a href="profile.php?action=permission&fid=$fid" class="s2">$per[name]</a></span>查看用戶權限︰<a href="profile.php?action=permission">{$gp_grouptitle}</a></div>
<!--
EOT;
} else {print <<<EOT
-->
					<div class="mb10"><span class="mr20 f14">現使用的權限為︰<span class="s2">{$gp_grouptitle}</span></span>
					<!--
EOT;
if($groupselect){print <<<EOT
-->
<form action="profile.php?action=permission" method="post">
	<input type="hidden" value="2" name="step">
    <select name="newgroupid" class="select_wa mr10" onchange="this.form.submit()">
        $groupselect
    </select>
</form>
<!--
EOT;
}print <<<EOT
--></div>
<!--
EOT;
}print <<<EOT
-->
				</div>
<!--
EOT;
if ($fid) {print<<<EOT
-->
				<div class="h5"><strong>版塊基本權限</strong></div>
				<table width="100%" class="mb10" style="table-layout:fixed; word-wrap:break-word;">
					<tr class="tr6">
						<th width="80">瀏覽版塊</th>
						<td>{$_P[$per[visit]]}</td>
						<th width="80">發表主題</th>
						<td>{$_P[$per[post]]}</td>
						<th width="80">回復主題</th>
						<td>{$_P[$per[rp]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">上傳附件</th>
						<td>{$_P[$per[down]]}</td>
						<th width="80">下載附件</th>
						<td>{$_P[$per[upload]]}</td>
						<th width="80">&nbsp;</th>
						<td>&nbsp;</td>
					</tr>
				</table>
				<div class="h5"><strong>版塊積分設置</strong></div>
				<table width="100%" class="mb10" style="table-layout:fixed; word-wrap:break-word;">
					<tr class="tr6">
						<th>積分名稱</th>
						<th class="tac">精華主題</th>
						<th class="tac">取消精華</th>
						<th class="tac">發表主題</th>
						<th class="tac">刪除主題</th>
						<th class="tac">發表回復</th>
						<th class="tac">刪除回復</th>
					</tr>
<!--
EOT;
foreach($forumright as $key=>$val){print <<<EOT
-->
					<tr class="tr6">
						<th>{$credit->cType[$key]}</th>
						<td class="tac">{$val[Digest]}</td>
						<td class="tac">{$val[Undigest]}</td>
						<td class="tac">{$val[Post]}</td>
						<td class="tac">{$val[Delete]}</td>
						<td class="tac">{$val[Reply]}</td>
						<td class="tac">{$val[Deleterp]}</td>
					</tr>
<!--
EOT;
}print <<<EOT
-->
				</table>
<!--
EOT;
} else {print <<<EOT
-->
				<div class="mb10"><span class="mr20 f14">綜合積分︰$totalcredit</span>(&nbsp;綜合積分 =
<!--
EOT;
$cNames = array('postnum' => '發帖數', 'digests' => '精華', 'onlinetime' => '會員的歷史在線時間') + $cNames;
$add = '';
foreach ($upgradeset as $key => $value) {
if ($value) {print <<<EOT
-->
												$add $cNames[$key]*$value
<!--
EOT;
$add = '+';
}}print <<<EOT
-->)
				</div>
				<div class="h5"><strong>資料權限</strong></div>
				<table width="100%" class="mb10" style="table-layout:fixed; word-wrap:break-word;">
					<tr class="tr6">
						<th width="80">隱身登錄</th>
						<td>{$_P[$per[hide]]}</td>
						<th width="80">瀏覽帖子</th>
						<td>{$_P[$per[read]]}</td>
						<th width="80">搜索權限</th>
						<td>{$_P[$per[search]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">會員列表</th>
						<td>{$_P[$per[member]]}</td>
						<th width="80">舉報功能</th>
						<td>{$_P[$per[report]]}</td>
                        <th width="80">頭像上傳</th>
						<td>{$_P[$per[upload]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">自定義頭像</th>
						<td>{$_P[$per[portait]]}</td>
                        <th width="80">統計排行</th>
						<td>{$_P[$per[sort]]}</td>
						<th width="80">發消息</th>
						<td>{$_P[$per[messege]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">消息上限</th>
						<td>{$per[maxmsg]}</td>
                        <th width="80">收藏夾容量</th>
						<td>{$per[maxfavor]}</td>
						<th width="80">草稿箱容量</th>
						<td>{$per[maxgraft]}</td>
					</tr>
<!--
EOT;
if($per['signnum'] != 0){print <<<EOT
-->
					<tr class="tr6">
						<th width="80">簽名大小上限</th>
						<td>{$per[signnum]} [字節]</td>
                        <th width="80"></th>
						<td></td>
                        <th width="80"></th>
						<td></td>
					</tr>
<!--
EOT;
}else{print <<<EOT
-->
					 <tr class="tr6">
						<th width="80">簽名大小上限</th>
						<td>無限制</td>
                        <th width="80"></th>
						<td></td>
                        <th width="80"></th>
						<td></td>
					</tr>
<!--
EOT;
}print <<<EOT
-->                    
				</table>
				<div class="h5"><strong>版塊權限</strong></div>
				<table width="100%" class="mb10" style="table-layout:fixed; word-wrap:break-word;">
					<tr class="tr6">
						<th width="80">發表主題</th>
						<td>{$_P[$per[post]]}</td>
						<th width="80">回復主題</th>
						<td>{$_P[$per[rp]]}</td>
						<th width="80">發起投票</th>
						<td>{$_P[$per[newvote]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">參與投票</th>
						<td>{$_P[$per[vote]]}</td>
						<th width="80">查看投票</th>
						<td>{$_P[$per[vwvt]]}</td>
						<th width="80">發html帖</th>
						<td>{$_P[$per[html]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">發隱藏帖</th>
						<td>{$_P[$per[hidden]]}</td>
						<th width="80">發出售帖</th>
						<td>{$_P[$per[sell]]}</td>
						<th width="80">評分權限</th>
						<td>{$_P[$per[mark]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">發團購帖</th>
						<td>{$_P[$per[allowpcid1]]}</td>
						<th width="80">發活動帖</th>
						<td>{$_P[$per[allowpcid2]]}</td>
						<th width="80">發懸賞帖</th>
						<td>{$_P[$per[reward]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">發匿名帖</th>
						<td>{$_P[$per[anonymous]]}</td>
						<th width="80">樓主留言</th>
						<td>{$_P[$per[leaveword]]}</td>
						<th width="80"></th>
						<td></td>
					</tr>
				</table>
				<div class="h5"><strong>附件權限</strong></div>
				<table width="100%" class="mb10" style="table-layout:fixed; word-wrap:break-word;">
					<tr class="tr6">
						<th width="80">上傳附件</th>
						<td>{$_P[$per[attach]]}</td>
						<th width="80">附件個數</th>
						<td>$per[allownum] [1天]</td>
						<th width="80">下載附件</th>
						<td>{$_P[$per[down]]}</td>
					</tr>
					<tr class="tr6">
						<th width="80">附件允許後綴</th>
						<td colspan="5">$per[uptype] [k]</td>
					</tr>
				</table>
<!--
EOT;
}print <<<EOT
-->
			</div>
	</div>
</div>
<!--
EOT;
require_once(uTemplate::printEot('footer'));
?>-->