<?php if (!defined('APP_PATH')) exit;?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="http://127.0.0.5/Magic/Data/Public/css/style.css" rel="stylesheet"/>
<script type="text/javascript" src="http://127.0.0.5/Magic/Data/Public/js/jquery.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/jquery.nicescroll.min.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/main.js"></script>
</head>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li>首页</li>
		<li>网站管理员</li>
		<li>编辑网站管理员</li>
	</ul>
</div>
<div class="formbody">
    <div class="formtitle"><span>基本信息</span></div>
	<iframe name="blank" style="display:none"></iframe>
	<form method="post" target="blank"  action="?r=admin-index-save">
	<input type="hidden" name="uid"  value="<?php echo $admin['uid'];?>">
		<table border="0" cellspacing="0" cellpadding="0" class="forminfo">
		<tr><td colspan="2">
		<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" >
		<tr>
		<td width="100" align="right">账户名：</td><td><input type="text" name="uname" value="<?php echo $admin['uname'];?>" class="insty" size="30"></td>
		</tr>
		<tr>
			<td width="100" height="50" align="right">昵称：</td><td><input type="text" name="nickname" value="<?php echo $admin['nickname'];?>" class="insty" size="30"></td>
		</tr>
		<tr>
			<td width="100" height="50" align="right">管理员组：</td>
			<td>
				<select name="rid" <?php if($admin['uid']==1 && $admin['rid']==1){ ?> disabled <?php }?>class="selectbox" >
					<?php foreach ($role as $vo){?>
					<option value="<?php echo $vo['rid'];?>"<?php if($vo['rid']==$admin['rid']){ ?> selected<?php }?>><?php echo $vo['name'];?></option>
					<?php }?>
				</select>
			</td>
		</tr>
		<?php if($admin['uid']==1 && $admin['rid']==1){ ?> <input type="hidden" name="rid"  value="<?php echo $admin['rid'];?>"> <?php }?>
		
		<tr>
			<td width="100" height="50" align="right">密码：</td><td><input type="password" name="password" class="insty" size="30"></td>
		</tr>
		<tr>
			<td width="100" height="50" align="right">确认密码：</td><td><input type="password" name="repassword" class="insty" size="30"></td>
		</tr>
		<tr>
			<td width="100" height="50" align="right">状态：</td><td>
				<input type="radio" name="status" value="1" <?php if($admin['status']==1 || !isset($admin['status'])){ ?>checked<?php }?>>&nbsp;启用&nbsp;
				<input type="radio" name="status" value="0" <?php if($admin['status']==0 && isset($admin['status'])){ ?>checked<?php }?>> &nbsp;禁用&nbsp;
			</td>
		</tr>
		<tr>
			<td width="120" align="right">注册时间：</td><td>
			<input type="text" name="regtime" id="regtime" readonly value="<?php if (empty($admin['regtime'])){ ?><?php echo date('Y-m-d H:i:s',time());?><?php }else{ ?><?php echo date('Y-m-d H:i:s',$admin['regtime']);?><?php }?>"  size="25">
			</td>
		</tr>
		
		<tr>
			<td width="120" align="right">最后登录时间：</td><td>
			<input type="text" name="logtime"  readonly value="<?php if (empty($admin['logtime'])){ ?><?php echo date('Y-m-d H:i:s',time());?><?php }else{ ?><?php echo date('Y-m-d H:i:s',$admin['logtime']);?><?php }?>" size="25"></td>
		</tr>
		<?php if (!empty($admin['uid'])){ ?>
		<tr>
			<td width="100" height="50" align="right">最后登录IP：</td><td><?php echo $admin['ip'];?></td>
		</tr>
		<tr>
			<td width="100" height="50" align="right">登录次数：</td><td><?php echo $admin['lognum'];?>次</td>
		</tr>
		<?php }?>
		</table>
		</td>
	<tr>
		<td width="100" height="80" align="right"></td><td><input type="submit" class="scbtn1" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="scbtn4"></td>
	</tr>
	</table>
	</form>	
</div>
</body>
</html>
