📄 inc_common.asp
字号:
<!--#include file="Inc_connect.asp"-->
<!--#include file="Inc_css.asp"-->
<%
'**************************************
'** Inc_common.asp
'**
'** 文件说明:公用函数
'** 修改日期:2004-9-22
'** 作者:Howlion
'** Email:howlion@163.com
'**************************************
'---------------HTML代码过滤-----------
function HTMLEncode(fString)
if not isnull(fString) then
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
end if
end function
'----------------SQL过滤---------------
function filter(text)
if isnull(text) then
filter=""
exit function
end if
filter=replace(text,"'","''")
end function
'----------------错误信息--------------
function error(errinfo)
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" align="center" width="60%" height="390"><tr><td width="100%">
<table border="0" cellpadding="0" cellspacing="1" class="table1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"><tr><td class="tablebody1" width="100%" height="16">
<p align="center"><br><img border="0" src="images/error.gif">
<p align="center"><%=errinfo%><br>
<br>
<a href="javascript:history.back(1)">《《 <B>返回</B></a><p>
</td></tr></table></td></tr></table>
<%
end function
'----------------页面头部信息--------------
sub pageinfo()
%>
<html>
<head>
<meta name="description" content="旋木留言本ASP程序的官方主页">
<meta name="keywords" content="旋木留言本,ASP,留言本,Xuanmu,留言,留言板,旋木,Guestbook">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=pagename%>__旋木留言本</title>
</head>
<script language="javascript">
function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>
<%
end sub
'----------------通用界面前半部分--------------
Sub skin1()
%>
<body TOPMARGIN="0" LEFTMARGIN="0">
<!--#include file="Inc_top.asp"-->
<!--#include file="inc_login.asp"-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td valign="top" width="100" bgcolor="#F1F1F1" style="border-right: 1px solid #969696">
<!--#include file="Inc_menu.asp"-->
</td>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="400" bgcolor="<%=maincolor%>"><IMG SRC="images/<%=mainpic%>" WIDTH="400" HEIGHT="46"></td>
<td width="100%" bgcolor="<%=maincolor%>"> </td>
<td width="185" bgcolor="<%=maincolor%>"><IMG SRC="images/pagetitle2_.gif" WIDTH="185" HEIGHT="46"></td>
</tr>
<tr>
<td width="100%" colspan="3">
<%
end sub
'----------------通用界面后半部分--------------
Sub skin2()
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<!--#include file="Inc_foot.asp"-->
</tr>
</table>
</body>
</html>
<%
end sub
dim pagename,maincolor
maincolor="#5581D2" '留言本的主色调
'----------------访问统计--------------
if not Session("inthesite") = "true" then
conn.execute("update admin set stat=stat+1 where id=1")
end if
Session("inthesite") = "true"
'-----------------常用数据提取----------
dim name,password,perpage,site,url,adminmail,maxnum,notice,stat,lock,needcheck
sql="Select * from admin where id=1"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
name=rs("name")
password=rs("password")
perpage=rs("perpage")
site=rs("site")
url=rs("url")
adminmail=rs("adminmail")
maxnum=rs("maxnum")
notice=rs("notice")
stat=rs("stat")
lock=rs("lock")
needcheck=rs("needcheck")
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -