?? adminer.asp
字號:
<%@ language=VBScript %>
<!--#include file="setup.asp"-->
<%
if Request.cookies("admin") = "" then
message="*對不起,非法登陸!\n"
call error(""&message&"")
Response.end
end if
if Request("menu") = "setup" then
call setup()
else call index()
end if
sub index()
%>
<html><head><title><%=gbook_name%>--管理設置</title>
<link rel="stylesheet" href="../css/admin.css">
</head>
<body topmargin=0 >
<br>
<table width=600 height="27" border=1 bordercolor="#FFFFFF" align="center" cellpadding=0 cellspacing=1 style="border: 1px solid #CCCCCC;">
<tr>
<td width="245"><div align="right">【<a href="index.asp">查看留言</a>】 【<a href="write.asp">簽寫留言</a>】</div></td>
</tr>
</table>
<br>
<table width="600" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td height="305" width="100%">
<form name="FORM" method="POST" action="adminer.asp">
<input type=hidden name=menu value=setup>
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#999999">
<tr bgcolor="#f7f7f7">
<td width="19%" align="center" nowrap>留言本名稱:</td>
<td width="81%">
<input type="text" name="gbook_name" size="20" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=gbook_name%>>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" align="center" nowrap>管理員口令:</td>
<td width="81%">
<input type="password" name="password" size="21" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=passwords%>>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>網站名稱:</td>
<td width="81%" height="12">
<input type="text" name="name" size="20" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=name%>>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>網站地址:</td>
<td width="81%" height="12">
<input type="text" name="url" size="20" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=url%>>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>留言內容大小限制:</td>
<td width="81%" height="12">
<input type="text" name="bodymax" size="6" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=bodymax%>> 字節內
</td>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>每頁顯示的留言數:</td>
<td width="81%" height="12">
<input type="text" name="pagesize" size="4" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=pagesize%>> (默認:10條)
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>您的IP:</td>
<td width="81%" height="12"> <%=Request.ServerVariables("REMOTE_ADDR")%>
(注意:提交后,您的IP會被記錄!) </td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>上次提交IP:</td>
<td width="81%" height="12"> <%=setup_ip%> </td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="19%" height="12" align="center" nowrap>上次提交時間:</td>
<td width="81%" height="12"> <%=setup_time%> </td>
</tr>
<tr bgcolor="#f7f7f7">
<td colspan="2" align="center" nowrap>
<input type="submit" name="Submit" value="提 交" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋體; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
<input type="reset" name="Submit2" value="重 置" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋體; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
<input type="button" name="Submit3" value="退 出" onClick="window.location.href='login.asp?menu=logout';" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋體; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<%
call htmlend()
Response.End
end sub
sub setup()
gbook_name=Server.htmlencode(Request.form("gbook_name"))
password=Request.form("password")
name=Server.htmlencode(Request.form("name"))
url=Request.form("url")
bodymax=Request.form("bodymax")
pagesize=Request.form("pagesize")
setup_ip=Request.ServerVariables("REMOTE_ADDR")
if gbook_name = "" then
message="*留言本名稱不能為空!\n"
end if
if password = "" then
message=message&"管理員口令不能為空!\n"
end if
if name = "" then
message=message&"您的網站名稱必須填寫!\n"
end if
if url = "" then
message=message&"您的網站地址必須填寫!\n"
end if
if bodymax = "" then
message=message&"您不能把留言內容大小限制設置為空!\n"
end if
if pagesize = "" then
message=message&"每頁顯示的留言數必須填寫!!\n"
end if
if message<> "" then
call error(""&message&"")
Response.end
end if
sql = "select * from admin"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,3,3
Rs("gbook_name")=gbook_name
Rs("password")=password
Rs("name")=name
Rs("url")=url
Rs("bodymax")=bodymax
Rs("pagesize")=pagesize
Rs("setup_ip")=setup_ip
Rs("setup_time")=now
Rs.update
Rs.close
set Rs = nothing
conn.close
set conn = nothing
Response.redirect "adminer.asp"
Response.End
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -