?? addadmin.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="conn.asp" -->
<%
if (session("username")="") then
response.Redirect("index.asp")
end if
%>
<html>
<head>
<title>管理員管理</title>
<link rel="stylesheet" href="css/admin.css" type="text/css">
</head>
<body>
<script language="JavaScript">
<!--
function CheckForm()
{
if(document.addadmin.username.value=="")
{
alert("請輸入用戶名!");
return false;
}
if(document.addadmin.password.value=="")
{
alert("請輸入用戶的密碼!");
return false;
}
return true;
}
-->
</script>
<br>
<table width="650" height="2%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="26" align="center"><font color="#FFFFFF"><strong>管理員信息管理</strong></font></td>
</tr>
</table>
<%
Dim rs , strSQL,username,aid
%>
<table width="650" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr valign="middle" bgcolor="#799ae1">
<td width="289" height="29" align="center"><font color="#FFFFFF">用戶名</font></td>
<td width="127" align="center"><font color="#FFFFFF">刪除</font></td>
</tr>
<%
strSQL="SELECT * FROM admin"
set rs=server.createobject("adodb.recordset")
rs.open strSQL,db,1,1
do while not rs.eof
username=rs("admin")
aid=rs("id")
%>
<tr>
<td height="30" align="center"> <%=rs("admin")%></td>
<td align="center"><a href="deladmin.asp?aid=<%=aid%> "onclick="{if(confirm('確定刪除該用戶嗎?')){return true;}return false;}"><img src="images/admin/del.gif" alt="刪除欄目" width="16" height="16" border="0"></a></td>
</tr>
<%
rs.movenext
loop
if rs.RecordCount<1 then
%>
<tr align="center">
<td height="35" colspan="3" align="center" class="title">Sorry! 還沒有管理員,請先添加!</td>
</tr>
<%
end if
%>
</table>
<br>
<br>
<table width="650" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td height="36" bordercolor="#FFFFFF">
<table width="102%" border="0" cellspacing="0" cellpadding="0">
<form action="addadmingo.asp" method="post" name="addadmin" onsubmit="javascript: return CheckForm();">
<tr>
<td width="12%" height="24" align="right"><strong><font color="#FFFFFF">添加管理員:</font></strong></td>
<td width="79%" align="center">請輸入用戶名:
<input type="text" size="10" name="username">
用戶密碼:
<input type="text" size="10" name="password">
</td>
<td width="9%"><input type="submit" value="添加"> </td>
</tr>
</form>
</table></td>
</tr>
</table>
<p> </p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -