<!--#include file="conn.asp"-->
<%if request.cookies("admin")("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if request.cookies("admin")("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../image/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table class="tableBorder" width="90%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr> 
<td colspan="4" class="managetop">后台管理员设置</td>
</tr>
<tr class="tdcolor"> 
<td align="center">管理员</td>
<td align="center">密 码</td>
<td align="center">权 限</td>
<td align="center">操 作</td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_admin order by flag",conn,1,1
do while not rs.EOF%>
<form name="form1" method="post" action="saveadmin.asp?action=edit&id=<%=int(rs("adminid"))%>">
<tr class="tdcolor"> 
<td align="center" valign="top"><input name="admin" type="text" size="16" value="<%=trim(rs("admin"))%>" style="border-color:#7B9AE7;background:#E7E3DE;border:double 1px"></td>
<td align="center" valign="top"><input name="password" type="text" size="16" style="border-color:#7B9AE7;background:#E7E3DE;border:double 1px"></td>
<td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><%select case rs("flag")
case "1"
response.Write "<input type=radio name=flag value=1 checked>管理<input name=flag type=radio value=2 >添加<input type=radio name=flag value=3>查看"
case "2"
response.Write "<input type=radio name=flag value=1>管理<input name=flag type=radio value=2 checked>添加<input type=radio name=flag value=3>查看"
case "3"
response.Write "<input type=radio name=flag value=1>管理<input name=flag type=radio value=2>添加<input type=radio name=flag value=3  checked>查看"
end select%></td>
  </tr>
  <tr>
    <td><%if rs("flag")>3 then
set rs1=server.CreateObject("adodb.recordset")
rs1.open"select * from bbs1 where boardid="&rs("flag")&" ",conn,1,1
if rs.eof then
else%><input type=radio name=flag value="<%=rs1("boardid")%>" checked><%=rs1("topic")%><%end if
rs1.close
set rs1=nothing
end if%></td>
  </tr>
</table>
  </td>
<td><input type="submit" name="Submit" value="修 改"><a href="saveadmin.asp?id=<%=int(rs("adminid"))%>&action=del" onClick="return confirm('您确定要删除此用户吗？')"><font color=red>删除</font></a></td>
</tr>
</form>
<%rs.movenext
loop
rs.close
set rs=nothing%>
<form  name="form1" method="post" action="saveadmin.asp?action=add">
<tr>
  <td colspan="4" class="managetop">添加管理员</td>
</tr>
<tr class="tdcolor">
  <td align="center">管理员</td>
  <td align="center">密 码</td>
  <td align="center">权 限</td>
  <td align="center">操 作</td>
</tr>
<tr class="tdcolor">
  <td align="center" valign="top"><input name="admin2" type="text" size="16" style="border-color:#7B9AE7;background:#E7E3DE;border:double 1px"></td>
  <td align="center" valign="top"><input name="password2" type="text" size="16" style="border-color:#7B9AE7;background:#E7E3DE;border:double 1px"></td>
  <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><input type="radio" name="flag2" value="1">管理
<input name="flag2" type="radio" value="2" checked>添加
<input type="radio" name="flag2" value="3">查看</td>
    </tr>
    <tr>
<td><%set rs1=server.CreateObject("adodb.recordset")
rs1.open"select * from bbs1",conn,1,1
while not rs1.eof%>
<input type="radio" name="flag2" value="<%=rs1("boardid")%>"><%=rs1("topic")%>
<%rs1.movenext
wend
rs1.close
set rs1=nothing%></td></tr></table></td>
  <td><input type="submit" name="Submit2" value="添加管理员"></td>
</tr>
</form>
</table>
<br>
<!--#include file="copyright.asp"-->
</body>
</html>