<!--<?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">{#medalset}</a></b>]
			[<a href="$basename&action=edit">{#medalinfo}</a>]
			[<a href="$basename&action=add">{#add_mnewedal}</a>]
		</td>
	</tr>
</table>
<br>

<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr><td class=head colspan=2>{#guide}</td></tr>
	<tr><td class=b><br>{#medalset_info}<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">{#medalset_title}</td></tr>
	<tr class=b>
		<td width="30%">{#medalset_ifopen}</td>
		<td>
			<input type="radio" value="1" name="config[md_ifopen]" $ifopen_Y> {#_yes} 
			<input type="radio" value="0" name="config[md_ifopen]" $ifopen_N> {#_no}
		</td>
	</tr>
	<tr class=b>
		<td>{#medalset_ifmsg}</td>
		<td>
			<input type="radio" value="1" name="config[md_ifmsg]" $ifmsg_Y> {#_yes} 
			<input type="radio" value="0" name="config[md_ifmsg]" $ifmsg_N> {#_no}
		</td>
	</tr>
	<tr class=b>
		<td>{#medalset_group}</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="{#submit}">
	<input type=reset value="{#reset}">
</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">{#medalset}</a>]
			[<a href="$basename&action=edit"><b>{#medalinfo}</b></a>]
			[<a href="$basename&action=add">{#add_mnewedal}</a>]
		</td>
	</tr>
</table>
<br>
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
	<tr><td class=head colspan=2>{#guide}</td></tr>
	<tr><td class=b><br>{#medaledit_info}<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>{#medalset_title}</b></td></tr>
	<tr class="head_2" align="center">
		<td width="5%">ID</td>
		<td width="15%">{#medalset_name}</td>
		<td width="*">{#medalset_descrip}</td>
		<td width="15%">{#medalset_img}</td>
		<td width="15%">{#medalset_demo}</td>
		<td width="6%">{#del}</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">{#del}</a></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br>
<center><input type="submit" name="hello" value="{#submit}"></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">{#medalset}</a>]
			[<a href="$basename&action=edit">{#medalinfo}</a>]
			[<a href="$basename&action=add"><b>{#add_mnewedal}</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">{#medalset_title}</td></tr>
	<tr class=b>
		<td width="30%">{#medalset_name}</td>
		<td><input type="text" name="newname"></td>
	</tr>
	<tr class=b>
		<td>{#medalset_descrip}</td>
		<td><input type="text" name="newintro"></td>
	</tr>
	<tr class=b>
		<td>{#medalset_img}</td>
		<td><input type="text" name="newpicurl"></td>
	</tr>
</table>
<br>
<center><input type="submit" name="hello" value="{#submit}"></center>
</form>

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