<!--<?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');
?>-->