<%'guidedisplay=1%>
<!--#include file="admin_start.asp" -->
<%
id=request("sort_id")

if id<>"" and 1=3 then
	set rs_t=conn.execute("select sort_grade from sys_admin_sort where sort_id="&id&" ")
	if rs_t.eof then
		MySys.error.info="您选择的用户类型不存在！"
		MySys.error.location="back"
		MySys.error.err()
	else
		if rs_t("sort_grade")>=MySys.admin_grade then 
			MySys.error.info="您不能加入比您的用户权限更高或相同的用户类型！"
			MySys.error.location="back"
			MySys.error.err()
		end if
	end if
	set rs_t=nothing
end if
%>
<body topmargin="30" marginwidth="10" marginheight="10">
<form name=edit_html target=admin_edit_html method=post><input type=hidden name=c value=''><input type=hidden name=formname value=''><input type=hidden name=inputname value=''></form>
<form name=user_admin action="admin_user_sys_edit_handle.asp?action=add" method=post>
<table cellpadding="3" cellspacing="4" width="90%" height="30" align=center style='border:1px solid #ebebeb' >
	<tr>
		<td width="2%" align=right><img alt='点击弹开编辑框' onclick="opencat(basic_open)" style='CURSOR: hand' src="Images/index_search.gif" width="8" height="16"></td>
		<td  width="98%" align=left>
		<font color="#ebebeb"> | </font>
		<img alt='点击弹开提示信息框' onclick="opencat(help_ads_open)" style='CURSOR: hand' src="Images/icon_info.gif" width="13" height="13" hspace="0" align="absmiddle">			
		<font color="#ebebeb"> | </font>
		加入后台用户
	    </td>
	</tr>		
	<tr id="help_ads_open" style="display:  ">
		<td colspan="10" align=left>
		<table cellpadding="4" cellspacing="2" width="99%" height="30" align=center style='border:1px dashed #B7B7B7' >
			<tr>
				<td colspan="8" width='100%' style="line-height:150% ">
				·您只能加入您权限以下的用户类型<br>
				·用户名一栏请不要填写特殊字符！而且长度应该大于等于6位<br>
			</td>
			</tr>
		</table>
		</td>
	</tr>
	
	<tr id="basic_open" >
		<td colspan="10" align=left style='padding-bottom:5px'>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
				<td  width="25%" align=right>用户类型:</td>
				<td  width="75%" align=left>
				<select name=sort_id >
				<%
				set rs_t=conn.execute("select sort_open,sort_description,sort_id  from sys_admin_sort where sort_id in (select sort_id from sys_admin_sort where sort_grade<"&MySys.admin_grade&" ) order by sort_grade ")
				do while not rs_t.eof
					response.write "<option value="&rs_t("sort_id") 
					if rs_t("sort_id")-id=0 then response.write " selected "
					response.write " >"&rs_t("sort_description")
					if rs_t("sort_open")=0 then response.write "*"
					response.write "</option>"
					rs_t.movenext
				loop
				set rs_t=nothing
				%>
				</select> 带 * 表示此分类已经被暂时关闭
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>用户名:</td>
				<td  width="75%" align=left>
				<input name='admin_name'  value='' type=text size=45>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>密码:</td>
				<td  width="75%" align=left>
				<input name='admin_password'  value='' type=password size=52>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>确认密码:</td>
				<td  width="75%" align=left>
				<input name='admin_password_verify'  value='' type=password size=52>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>用户性别:</td>
				<td  width="75%" align=left>
				<select name=admin_sex >
				<option value=1 selected >男</option>
				<option value=0 >女</option>
				</select>
				</td>
			</tr>
		</table><br>
		
		</td>
	</tr>

	<tr>
		<td height='1' colspan="9" background='images/dot03.gif'></td>
	</tr>
	
	<tr>
	  <td height='30' colspan="8" width='100%' align=center >
	  <input type=submit value="提交设置！" >
	   <input type=reset value="重置" > 
	   <input onclick='history.back(-1)' type=button value="返回" >	  </td>
	</tr>
</table>		
<SCRIPT language=javascript>
	function opencat(cat)
	{
 	 	if(cat.style.display=="none"){
     	cat.style.display="";
  		} else {
     	cat.style.display="none"; 
  		}
	}</SCRIPT>
</form>
<!--#include file="admin_end.asp" -->