<!--<?php
include_once PrintEot('left');
if(empty($action)){
print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr>
		<td class=b>
			[<b><a href="$basename">勛章設置</a></b>]
			[<a href="$basename&action=edit">勛章編輯</a>]
			[<a href="$basename&action=add">添加勛章</a>]
		</td>
	</tr>
</table>
<br>

<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr><td class=head colspan=2><b>提示信息</b></td></tr>
	<tr><td class=b><br>勛章中心<br>&nbsp;</td></tr>
</table>
<br>
<form action="$basename" method="post">
<input type=hidden name="step" value="2">
<table width=98% align="center" cellpadding=3 cellspacing=1 class=i_table>
	<tr class="head"><td colspan="2">勛章管理</td></tr>
	<tr class=b>
		<td width="30%">是否開啟勛章功能<br>(需要到插件中心 管理中同時啟用該插件方為有效)</td>
		<td>
			<input type="radio" value="1" name="config[md_ifopen]" $ifopen_Y> 是 
			<input type="radio" value="0" name="config[md_ifopen]" $ifopen_N> 否
		</td>
	</tr>
	<tr class=b>
		<td>頒發(摘除)勛章是否短消息通知用戶</td>
		<td>
			<input type="radio" value="1" name="config[md_ifmsg]" $ifmsg_Y> 是 
			<input type="radio" value="0" name="config[md_ifmsg]" $ifmsg_N> 否
		</td>
	</tr>
	<tr class=b>
		<td>頒發(摘除)勛章用戶組權限</td>
		<td>
			<table cellspacing='0' cellpadding='0' border='0' width='100%' align='center'>
				<tr>
<!--
EOT;
foreach($ltitle as $key => $value){
if($key==1||$key==2)continue;
$num++;
$htm_tr = $num % 4 == 0 ? '</tr><tr>' : '';
$g_ck=strpos($md_groups,",$key,")!==false ? 'checked' : '';
print <<<EOT
-->
					<td><input type='checkbox' name='groups[]' value='$key' $g_ck>$value</td>
					$htm_tr
<!--
EOT;
}print <<<EOT
-->
			</tr></table>
		</td>
	</tr>
</table>
<br>
<center><input type=submit value="提 交"></center>
</form>
<br>
<!--
EOT;
}elseif($action=='edit'){print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr>
		<td class=b>
			[<a href="$basename">勛章設置</a>]
			[<a href="$basename&action=edit"><b>勛章編輯</b></a>]
			[<a href="$basename&action=add">添加勛章</a>]
		</td>
	</tr>
</table>
<br>
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr><td class=head colspan=2><b>提示信息</b></td></tr>
	<tr><td class=b><br><br>&nbsp;</td></tr>
</table>
<br>

<form action="$basename&action=edit&" method="post">
<input type="hidden" name="step" value="2">
<table width="98%" cellpadding=3 cellspacing=1 class="i_table" align="center">
	<tr class=head><td colspan=6><b>勛章管理</b></td></tr>
	<tr class="head_2" align="center">
		<td width="5%">ID</td>
		<td width="15%">勛章名稱</td>
		<td width="*">勛章說明</td>
		<td width="15%">圖片名稱</td>
		<td width="15%">勛章圖片</td>
		<td width="6%">刪除</td>
	</tr>
<!--
EOT;
$num=0;
foreach($medaldb as $key => $value){
$num++;
$id=$value[id];
print <<<EOT
-->
	<tr class="b" align="center">
		<td>$num</td>
		<td><input type="text" name="medal[$id][name]" value="$value[name]"></td>
		<td><input type="text" name="medal[$id][intro]" value="$value[intro]" size="50"></td>
		<td><input type="text" name="medal[$id][picurl]" value="$value[picurl]"></td>
		<td><img src="$imgpath/medal/$value[picurl]"></td>
		<td><a href="$basename&action=del&id=$id">刪除</a></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br>
<center><input type="submit" name="hello" value="提 交"></center>
</form>
<!--
EOT;
}elseif($action=='add'){print <<<EOT
-->
<table width=98% align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr>
		<td class=b>
			[<a href="$basename">勛章設置</a>]
			[<a href="$basename&action=edit">勛章編輯</a>]
			[<a href="$basename&action=add"><b>添加勛章</b></a>]
		</td>
	</tr>
</table>
<br>
<form action="$basename&action=add&" method="post">
<input type=hidden name="step" value="2">
<table width=98% align="center" cellpadding=3 cellspacing=1 class=i_table>
	<tr class="head"><td colspan="2">勛章管理</td></tr>
	<tr class=b>
		<td width="30%">勛章名稱</td>
		<td><input type="text" name="newname"></td>
	</tr>
	<tr class=b>
		<td>勛章說明</td>
		<td><input type="text" name="newintro"></td>
	</tr>
	<tr class=b>
		<td>圖片名稱</td>
		<td><input type="text" name="newpicurl"></td>
	</tr>
</table>
<br>
<center><input type="submit" name="hello" value="提 交"></center>
</form>

<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->