?? adminadmin_body.asp
字號:
<%sub adminadmin_body()
%>
<!--#include file="admintop.asp"-->
<table width="<%=tablewidth%>" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="205" bgcolor="#FFFFFF" valign="top" class="line">
<%call adminmenu()%>
</td>
<td width="565" bgcolor="#FFFFFF" valign="top" align="center" class="linee">
<table width="98%" border="0" cellspacing="1" cellpadding="0" height="25" background="images/dh.gif" class="linee">
<tr align="center">
<td height="25"><a href="admin_admin.asp?action=modpass">修改管理員密碼</a></td>
<td><a href="admin_admin.asp?action=admin">新增管理員</a></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6"></td>
</tr>
</table>
<%
sql="select * from admin"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bgcolor="#F5F5F5" style="border-collapse: collapse" bordercolor="#09DD77">
<tr>
<td colspan="3" background="images/dh.gif"><B>管理員列表</B></td>
</tr>
<tr bgcolor="#FFFFFF" align="center">
<td width="60%">管理員名稱</td>
<td width="40%">操作</td>
</tr>
<%do while not rs.eof%>
<%if rs("issuper")<>1 then%>
<tr bgcolor="#FFFFFF">
<td><%=rs("admin_name")%> </td>
<td align="center" bgcolor="#FFFFFF">
<%if rs("issuper")<>2 then%>
<a href="admin_admin.asp?id=<%=rs("admin_id")%>&action=editadmin">edit</a>
<a href="admin_admin.asp?id=<%=rs("admin_id")%>&action=deladmin">del</a>
<%else%>
<font color="#ff0000">鎖 定</font>
<%end if%>
</td>
</tr>
<%else%>
<%end if%>
<%rs.movenext
loop%>
</table><br>
<%if request.querystring("action")="modpass" then%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#09DD77">
<form name="form1" method="post" action="admin_admin.asp">
<tr>
<td background="images/dh.gif">
<font color="#333333">修改管理員密碼</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">管理員名稱-
<input name="adminname" type="text" class="input" size="20" maxlength="30">
舊密碼-
<input name="oldpwd" type="password" class="input" size="20" maxlength="20">
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">新密碼-
<input name="adminpwd" type="password" class="input" size="20" maxlength="20">
確認新密碼-
<input name="confirm" type="password" class="input" size="20" maxlength="20">
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" align="center">
<input type="submit" name="Submit" value="確定修改" class="button">
<input type="reset" name="Reset" value="清空重寫" class="button">
</td>
</tr>
<input type="hidden" name="action" value="modpass">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.querystring("action")="admin" then
%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#09DD77" style="border-collapse: collapse">
<form name="form2" method="post" action="">
<tr>
<td background="images/dh.gif">
<font color="#333333">新增管理員</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">名稱-
<input name="adminname" type="text" class="input" size="30" maxlength="30">
<br>
密碼-
<input name="adminpwd" type="password" class="input" size="20" maxlength="20">
確認密碼-
<input name="confirm" type="password" class="input" size="20" maxlength="20">
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" align="center">
<input type="submit" name="Submit" value="確定新增" class="button">
<input type="reset" name="Reset" value="清空重填" class="button">
</td>
</tr>
<input type="hidden" name="action" value="newadmin">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if
if request.querystring("action")="editadmin" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>請指定操作的對象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的管理員ID參數!"
call diserror()
response.end
end if
end if
sql="select * from admin where admin_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#09DD77" style="border-collapse: collapse">
<form name="form2" method="post" action="">
<tr>
<td background="images/dh.gif">
<font color="#333333">編輯管理員</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">名稱-
<input name="adminname" type="text" class="input" value="<%=rs("admin_name")%>" size="30" maxlength="30">
<br>
密碼-
<input name="adminpwd" type="password" class="input" value="" size="20" maxlength="20">
確認密碼-
<input name="confirm" type="password" class="input" value="" size="20" maxlength="20">
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" align="center">
<input type="submit" name="Submit" value="確定修改" class="button">
<input type="reset" name="Reset" value="清空重填" class="button">
</td>
</tr>
<input type="hidden" name="id" value="<%=rs("admin_id")%>">
<input type="hidden" name="action" value="editadmin">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%rs.close
set rs=nothing
end if
if request.querystring("action")="deladmin" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>請指定操作的對象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的管理員ID參數!"
call diserror()
response.end
end if
end if
sql="select * from admin where admin_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs("admin_name")="ps" then
errmsg=errmsg+"<br>"+"<li>不要刪除這個管理員吧!"
call diserror()
response.end
end if
%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" bordercolor="#09DD77" style="border-collapse: collapse">
<form name="form2" method="post" action="">
<tr>
<td background="images/dh.gif">
<font color="#333333">刪除管理員</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">管理員名稱- <%=rs("admin_name")%>
</td>
</tr>
<tr>
<td bgcolor="#F5F5F5" height="30" align="center">
<input type="submit" name="Submit" value="確定刪除" class="button">
[<a href="admin_admin.asp?action=admin">返回</a>] </td>
</tr>
<input type="hidden" name="id" value="<%=rs("admin_id")%>">
<input type="hidden" name="action" value="deladmin">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%rs.close
set rs=nothing
end if%>
<br>
</td>
</tr>
</table>
<%
end sub%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -