<%'guidedisplay=1%>
<!--#include file="admin_start.asp" -->
<%
id=request("id")
if not MySys.check.isInteger(id) then
   MySys.Error.info = "请提交合法的栏目id！"
   MySys.Error.location = "back"
   MySys.Error.err()
End If

id=int(id)

rs.open"select * from sys_admin_list where admin_id="&id&" ",conn,1,1
if rs.eof then
   MySys.Error.info = "您请求的用户不存在！"
   MySys.Error.location = "back"
   MySys.Error.err()
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=edit&id=<%=id%>" 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>
				·通过更改登陆ip锁定可以解除用户错误的操作造成的无法登陆！<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>
				  <%=rs("admin_name")%>
				</td>
			</tr>
			<%
			if rs("admin_name")<>MySys.admin_name then
			%>
			<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 order by sort_grade ")
				do while not rs_t.eof
					response.write "<option value="&rs_t("sort_id") 
					if rs("sort_id")=rs_t("sort_id") 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>
				<select name=admin_open >
				<option value=1 <%if rs("admin_open")=1 then response.write "selected"%> >打开</option>
				<option value=0 <%if rs("admin_open")=0 then response.write "selected"%> >关闭</option>
				</select>
				</td>
			</tr>
			<%else%>			
			<tr>
				<td  width="25%" align=right>用户类型:</td>
				<td  width="75%" align=left>
				<input name='sort_id'  value='<%=MySys.admin_sort_id%>' type=hidden >
				<%=MySys.admin_sort_description%>
				</td>
			</tr>
			<%end if%>			
			<tr>
				<td  width="25%" align=right>用户性别:</td>
				<td  width="75%" align=left>
			<%
			if rs("admin_name")=MySys.admin_name then
			%>
				<select name=admin_sex >
				<option value=1 <%if MySys.admin_sex=1 then response.write "selected"%> >男</option>
				<option value=0 <%if MySys.admin_sex=0 then response.write "selected"%> >女</option>
				</select>
			<%
			else
			%>
			<%if rs("admin_sex")=1 then response.write "男" else response.write "女" %>
			<%
			end if
			%>
				</td>
			</tr>
		</table><br>

		<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>
				<%=rs("admin_login_time")%>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>最后登录时间:</td>
				<td  width="75%" align=left>
				<%=rs("admin_login_date_last")%>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>最后登录 IP :</td>
				<td  width="75%" align=left>
				<%=rs("admin_login_ip_last")%>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>登陆 IP 锁定:</td>
				<td  width="75%" align=left>
				<select name=admin_login_ip_lock >
				<option value=1 <%if rs("admin_login_ip_lock")=1 then response.write "selected"%> >已锁定</option>
				<option value=0 <%if rs("admin_login_ip_lock")=0 then response.write "selected"%> >未锁定</option>
				</select>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>登陆锁定 IP :</td>
				<td  width="75%" align=left>
				<%
				if rs("admin_name")<>MySys.admin_name then
				%>
				
				<%=rs("admin_login_ip_locked")%>
				
				<%
				else
				%>
				
				<input name='admin_login_ip_locked'  value='<%=rs("admin_login_ip_locked")%>' type=text size=30>
				
				<%
				end if
				%>
				</td>
			</tr>
		</table><br>
		
		<%
		if rs("admin_name")=MySys.admin_name then
		%>

		<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>
				<input name='admin_password_o'  value='' type=password size=30>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>新密码:</td>
				<td  width="75%" align=left>
				<input name='admin_password_n'  value='' type=password size=30>
				</td>
			</tr>
			<tr>
				<td  width="25%" align=right>确认新密码:</td>
				<td  width="75%" align=left>
				<input name='admin_password_n_verify'  value='' type=password size=30>
				</td>
			</tr>
		</table><br>
		
		<%end if%>
		
		</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>
<%
rs.close
%>
<!--#include file="admin_end.asp" -->