<html><hand>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=<?php echo CHARSET;?>">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta HTTP-EQUIV="Content-Language" CONTENT="<?php echo CHARSET;?>">
<script language='JavaScript' src='admin/img/admin.js'></script>
<link href="admin/img/style.css" rel="stylesheet" type="text/css">
<?php 
if(!defined('IN_ADMIN')) exit('Access Denied');
switch ($action){
	case 'add':
?>
<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<form name='myform' method='post' Action='<?=SCRIPT_NAME;?>?file=admin&action=add'>
<tr class=td4><td colspan=2><strong>添加管理员</strong></td></tr>
<tr class=td2><td width='20%'><strong>用户名</strong></td>
<td width='80%'><input name=info[username] maxlength=20 value="" style='height:18px;width:150px'></td></tr>
<tr class=td2><td><strong>密　码</strong></td>
<td><input name=info[password] type=password maxlength=20 style='height:18px;width:150px'></td></tr>
<tr class=td2><td></td>
<td><input type=submit value=' 提 交 ' name='dosubmit'></td></tr>
</form>
</table>
<?php 	
	break;
	case 'list':
	?>
<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<tr class=td4><td colspan=3><strong>管理员管理</strong></td></tr>
<tr align='center' class=td3>
<td width='30%'>管理帐号</td>
<td width='50%'>管理权限</td>
<td width='20%'>操作</td></tr>
<?php 
if(is_array($adm) && !empty($adm)){
	foreach($adm as $admi){ 
	?>
<tr align=center class=td2 onMouseMove="this.className='td3'" onMouseOut="this.className='td2'">
<td><?=$admi['username']?></td>
<td><span class=Font2>超级管理员</span></td>
<td><span class=Font5><a href="?file=admin&action=edit&id=<?=$admi['id']?>">修改</a> | <a href="?file=admin&action=del&id=<?=$admi['id']?>">删除</a></span></td>
</tr>
<?php }}?>
</table>
<table width='100%' border=0 cellspacing=0 cellpadding=5 style='border-top:1px #C4D8ED solid'>
<tr><td align=center class=td2><?=$dispage;?>
</td>
</tr>
</table>
<?php 	
	break;
	case 'edit':
	?>
	<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<form name='myform' method='post' Action='<?=SCRIPT_NAME;?>?file=admin&action=edit'>
<tr class=td4><td colspan=2><strong>修改管理员</strong></td></tr>
<input name=id type=hidden value='<?=$adm['id']?>'>
<tr class=td2><td width='20%'><strong>用户名</strong></td>
<td width='80%'><?=$adm['username']?></td></tr>
<tr class=td2><td><strong>密　码</strong></td>
<td><input name=password type=password maxlength=20 style='height:18px;width:150px'></td></tr>
<tr class=td2><td></td>
<td><input type=submit value=' 提 交 ' name='dosubmit'></td></tr>
</form>
</table>
	<?php 
	break;
}
?>