📄 const.asp
字号:
<!--#include file="conn.asp"-->
<%
'****************************************************************
dim ipsql
dim rs
dim websql
dim webrs
dim time1
dim showIP
dim bodywidth
dim titlewidty
dim maxsize
dim webadmin
dim homepage
dim email
dim webname
dim kenanbooktime
dim time2
dim Version
dim contextmemu
dim download
dim maxcontent
dim gonggao
dim weblogo
dim webbanner
dim fso
dim path
dim showbanner
'******************封IP***************************************
ipsql="select IP from iplock where IP='"&Request.servervariables("REMOTE_ADDR")&"'"
set rs=conn.execute(ipsql)
If not rs.BOF Then
Response.Redirect("error.asp?err=100")
End If
'*****************代码结束**************************************
websql="select * from config"
set webrs=conn.execute(websql)
time1=timer()
maxcontent = 500 '留言最大字符数 单位:byte
contextmenu = false '---------是否屏蔽右键菜单
downloas = true '--------->是否防止下载
showIP = false '--------->是否显示留言作者的IP地址
bodywidth = "680" '--------->留言本主体表格宽度
titlewidth = "680" '--------->留言本标题菜单表格宽度
maxsize = webrs("maxsize") '-------->每页显示留言数
webadmin = webrs("username") '-------->网站站长姓名
homepage = webrs("url") '-------->网站首页url
email = webrs("mail") '-------->站长的电子信箱
webname = webrs("userweb") '--------->网站名称
kenanbooktime = webrs("booktime") '--------->发贴间隔时间
showbanner = true '--------->是否显示banner和logo
weblogo ="<img src=http://weihai365.com/xxg/xxgbbs/images/lyblogo.jpg>"
webbanner ="<img src=http://www.weihai365.com/xxg/xxgbbs/images/kenan.jpg>"
'**********************************************************
on error resume next
set fso = Server.Createobject("Scripting.FileSystemObject")
path = server.MapPath("text.txt")
Set fin = fso.OpenTextFile(Path, , True)
gonggao=fin.readall
set fso = nothing
'***************************************************************
webrs.close
set webrs=nothing
Sub header()
Response.Write("<BODY onmousemove=HideMenu() leftMargin=6 topMargin=6>")
Response.Write("<DIV id=menuDiv style=""Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8""></DIV>")
Response.Write("<table width="""&titlewidth&""" cellspacing=""0"" cellpadding=""0"" align=""center"" height=""16"" class=table001 >")
Response.Write("<tr>")
Response.Write("<td height=""22"" align=""center"">")
Response.Write("[<a href=""write.asp"">我要留言</a>] [<a href=""mailto:"&email&""">联系站长</a>] [<a href=""adminindex.asp"">超级管理</a>] [<a href=""index.asp"">返回首页</a>] [<a href="""&homepage&""">网站首页</a>] [<a href=""search.asp"">留言搜索</a>] ")
If session("kenanbook")<>"" Then Response.Write(" [<a href=""loginout.asp"">退出管理</a>]")
Response.Write("</td>")
Response.Write("</tr>")
Response.Write("</table>")
End Sub
Version="<a href=http://kenannet.yeah.net target=_blank>留言本1.1版</a>"
Sub footer()
time2=timer()
Response.Write("<table width=""760"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">")
Response.Write("<tr>")
Response.Write("<td align=""center"">版权所有:" &webname& " 本站站长:" &webadmin& "<br><br>")
Response.Write("Copyright ©2006 页面执行时间:"&FormatNumber((time2-time1)*1000,3)&"毫秒<br>")
Response.Write("</td>")
Response.Write("</tr>")
Response.Write("</table>")
End Sub
If Request.Cookies("kenan")("style") = "" Then
Response.Cookies("kenan")("style")="1"
Response.Cookies("kenan").expires=now()+100 '---------->Cookies值设为100天
End If
Sub banner()
%>
<table width="694" height="72" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle" background="images/title.jpg">
<td width="800" height="72"> <font size="+3"> </font></td>
<td width="90%" background="images/1.gif">
<td width="10%" background="images/title.jpg">
<script language=JavaScript>
function Year_Month(){
var now = new Date();
var yy = now.getYear();
var mm = now.getMonth()+1;
var cl = '<font color="#0000df">';
if (now.getDay() == 0) cl = '<font color="#c00000">';
if (now.getDay() == 6) cl = '<font color="#00c000">';
return(cl + yy + '年' + mm + '月</font>'); }
function Date_of_Today(){
var now = new Date();
var cl = '<font color="#ff0000">';
if (now.getDay() == 0) cl = '<font color="#c00000">';
if (now.getDay() == 6) cl = '<font color="#00c000">';
return(cl + now.getDate() + '</font>'); }
function Day_of_Today(){
var day = new Array();
day[0] = "星期日";
day[1] = "星期一";
day[2] = "星期二";
day[3] = "星期三";
day[4] = "星期四";
day[5] = "星期五";
day[6] = "星期六";
var now = new Date();
var cl = '<font color="#0000df">';
if (now.getDay() == 0) cl = '<font color="#c00000">';
if (now.getDay() == 6) cl = '<font color="#00c000">';
return(cl + day[now.getDay()] + '</font>'); }
function CurentTime(){
var now = new Date();
var hh = now.getHours();
var mm = now.getMinutes();
var ss = now.getTime() % 60000;
ss = (ss - (ss % 1000)) / 1000;
var clock = hh+':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
clock += ss;
return(clock); }
function refreshCalendarClock(){
document.all.calendarClock1.innerHTML = Year_Month();
document.all.calendarClock2.innerHTML = Date_of_Today();
document.all.calendarClock3.innerHTML = Day_of_Today();
document.all.calendarClock4.innerHTML = CurentTime(); }
var webUrl = webUrl;
document.write('<table boārder="0" cellpadding="0" cellspacing="0"><tr><td>');
document.write('<table id="CalendarClockFreeCode" border="0" cellpadding="0" cellspacing="0" width="60" height="80" ');
document.write('style="position:absolute;visibility:hidden" bgcolor="#eeeeee">');
document.write('<tr><td align="center"><font ');
document.write('style="cursor:hand;color:#ff0000;font-family:宋体;font-size:14pt;line-height:120%" ');
if (webUrl != 'netflower'){
document.write('</td></tr><tr><td align="center"><font ');
document.write('style="cursor:hand;color:#2000ff;font-family:宋体;font-size:9pt;line-height:110%" ');
}
document.write('</td></tr></table>');
document.write('<tr><td valign="top" width="100%" height="100%">');
document.write('<table border="1" cellpadding="0" cellspacing="0" width="65" bgcolor="#FEFEEF" height="80">');
document.write('<tr><td align="center" width="100%" height="100%" >');
document.write('<font id="calendarClock1" style="font-family:宋体;font-size:9pt;line-height:120%"> </font><br>');
document.write('<font id="calendarClock2" style="color:#ff0000;font-family:Arial;font-size:14pt;line-height:120%"> </font><br>');
document.write('<font id="calendarClock3" style="font-family:宋体;font-size:9pt;line-height:120%"> </font><br>');
document.write('<font id="calendarClock4" style="color:#100080;font-family:宋体;font-size:9pt;line-height:120%"><b> </b></font>');
document.write('</td></tr></table>');
document.write('</td></tr></table>');
document.write('</td></tr></table>');
setInterval('refreshCalendarClock()',1000);
</script>
</tr>
</table>
<br>
<% End Sub %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="留言本">
<meta name="description" content="留言本">
<link rel="stylesheet" href="style/<%=Request.Cookies("kenan")("style")%>.css" type="text/css">
<script language="JavaScript">
var h;
var w;
var l;
var t;
var topMar = 1;
var leftMar = -2;
var space = 1;
var isvisible;
var MENU_SHADOW_COLOR='#999999';//定义下拉菜单阴影色
var global = window.document
global.fo_currentMenu = null
global.fo_shadows = new Array
function HideMenu()
{
var mX;
var mY;
var vDiv;
var mDiv;
if (isvisible == true)
{
vDiv = document.all("menuDiv");
mX = window.event.clientX + document.body.scrollLeft;
mY = window.event.clientY + document.body.scrollTop;
if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
vDiv.style.visibility = "hidden";
isvisible = false;
}
}
}
function ShowMenu(vMnuCode,tWidth) {
vSrc = window.event.srcElement;
vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1>" + vMnuCode + "</td></tr></table>";
h = vSrc.offsetHeight;
w = vSrc.offsetWidth;
l = vSrc.offsetLeft + leftMar+4;
t = vSrc.offsetTop + topMar + h + space-2;
vParent = vSrc.offsetParent;
while (vParent.tagName.toUpperCase() != "BODY")
{
l += vParent.offsetLeft;
t += vParent.offsetTop;
vParent = vParent.offsetParent;
}
menuDiv.innerHTML = vMnuCode;
menuDiv.style.top = t;
menuDiv.style.left = l;
menuDiv.style.visibility = "visible";
isvisible = true;
makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}
function makeRectangularDropShadow(el, color, size)
{
var i;
for (i=size; i>0; i--)
{
var rect = document.createElement('div');
var rs = rect.style
rs.position = 'absolute';
rs.left = (el.style.posLeft + i) + 'px';
rs.top = (el.style.posTop + i) + 'px';
rs.width = el.offsetWidth + 'px';
rs.height = el.offsetHeight + 'px';
rs.zIndex = el.style.zIndex - i;
rs.backgroundColor = color;
var opacity = 1 - i / (i + 1);
rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
el.insertAdjacentElement('afterEnd', rect);
global.fo_shadows[global.fo_shadows.length] = rect;
}
}
var stylelist = '<a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=1\">默认设置</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=2\">橘子红了</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=3\">天蓝色</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=4\">淡黄</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=5\">蓝灰</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=6\">粉色回忆</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=7\">黑白世界</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=8\">土黄色</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=9\">蓝色</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=10\">灰绿</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=11\">清新淡绿</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=12\">兰色记忆</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=13\">深蓝色</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=14\">星夜传说</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=15\">心情灰色</a><br><a style=font-size:9pt;line-height:12pt; href=\"change.asp?style=16\">真实的虚幻</a><br>'
</script>
<%
If contextmenu=true Then
Response.Write("<BODY oncontextmenu=""return false;"">")
End If
If download=true Then
Response.Write("<noscript><iframe src=*.html></iframe></noscript>")
End If %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -