<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站后台管理</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>
<script language="javascript" src="statics/data.input.js"></script>

</head>

<body>
	<div class="top-tips">
		<div class="tips-wrap">
			<div class="title">添加管理员</div>
			<a href="<?php echo IN_SYS;?>" target="_blank" style="color:#FF0000">获取帮助</a>
		</div>
	</div>
	
	<form action="" method="post" onsubmit="return datainputcheck('myform');" id="myform" name="myform" enctype="multipart/form-data">
	<input type="hidden" name="do_submit" value="1" />
	<table class="table-wrap" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">所属管理角色<span>*</span></td>
			<td>
			<?php
				foreach($admrole as $r)
				{
				if($r['id']==$_roleid || $_roleid==1){
			?>
			<label title="选中<?php echo $r['name'];?>"><input type="radio" <?php echo $r['id']==$info['roleid']?'checked="checked" ':'';?> value="<?php echo $r['id'];?>" name="info[roleid]" /><?php echo $r['name'];?></label> &nbsp;&nbsp;
			<?php
				}}
			?>
			</td>
			<td class="tb-tips">所属管理角色</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">管理员账号<span>*</span></td>
			<td>
			<input type="text" size="24" datatype="userName" title="管理员账号" autocomplete="off" notnull="1" name="info[username]" class="input-txt" />
			</td>
			<td class="tb-tips">管理员账号</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">管理员密码<span>*</span></td>
			<td>
			<input type="password" size="24" datatype="usePsw" title="管理员密码" autocomplete="off" notnull="1" name="info[password]" class="input-txt" />
			</td>
			<td class="tb-tips">管理员密码</td>
		</tr>
		<?php if(SITETYPE==1){?>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">所属分站点<span>*</span></td>
			<td>
			<select name="info[siteid]">
			<option value="<?php echo $_siteid;?>" selected="selected">总站</option>
			<?php
				foreach($sitelist as $r)
				{
			?>
			<label title="选中<?php echo $r['sitename'];?>"><option value="<?php echo $r['siteid'];?>" /><?php echo $areaobj->getname($r['areaid']);?> 分站</label> &nbsp;&nbsp;
			<?php
				}
			?>
			</select>
			</td>
			<td class="tb-tips">所属分站点</td>
		</tr>
		<?php }else if(SITETYPE==2){?>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">所属分站点<span>*</span></td>
			<td>
			<select name="info[siteid]">
			<option value="<?php echo $_siteid;?>" selected="selected"><?php echo $_siteid?$siteidobj->sitename($_siteid):'';?></option>
			<?php
				foreach($sitelist as $r)
				{
			?>
			<label title="选中<?php echo $r['sitename'];?>"><option value="<?php echo $r['siteid'];?>" /><?php echo $r['sitename'];?></label> &nbsp;&nbsp;
			<?php
				}
			?>
			</select>
			</td>
			<td class="tb-tips">所属分站点</td>
		</tr>
		<?php }?>
		<tr>
			<td colspan="3" class="save-td"><input type="submit" class="save-btn" value="保存管理员" /></td>
		</tr>
	</table>
	</form>
</body>
</html>
