📄 txlfun.asp
字号:
<%
Dim conn,TempStr,connstr,DEF_PageExeTime1
DEF_PageExeTime1=Timer * 1000
TempStr=""
Dim UserAgent
UserAgent=Trim(lcase(Request.Servervariables("HTTP_USER_AGENT")))
If Instr(UserAgent,"teleport")>0 or Instr(UserAgent,"webzip")>0 or Instr(UserAgent,"flashget")>0 or Instr(UserAgent,"offline")>0 Then
response.write "非法浏览操作,请不要使用Teleport、WebZip这类软件下载本站,也不要使用googlebot这类浏览器浏览本站。"
response.end
end if
Sub OpenDatabase
set conn = Server.CreateObject("ADODB.Connection")
connstr="DBQ="+Server.MapPath(const_txl_HomeUrl&const_AccessDatabase)+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
'connstr="Provider=SQLOLEDB.1;User ID=sa;Password=walkman1234;Data Source=localhost;Initial Catalog=walk_txl"
conn.open connstr
if Err Then
err.Clear
Set Conn = Nothing
TempStr = TempStr & "数据连接错误!"
Response.Write TempStr
End If
End Sub
Sub CloseDatabase
if isobject(Conn) then
Conn.close
Set conn = Nothing
end if
End Sub
Function htmlEncode(str)
If len(str)>0 Then
htmlEncode=Replace(Replace(Replace(str,">",">"),"<","<"),"""",""")
Else
htmlEncode=str
End If
End Function
Function HtmlEncode_walk(str)
If Trim(Str)="" Or IsNull(str) Then Exit Function
str=Replace(str,">",">")
str=Replace(str,"<","<")
str=Replace(str,Chr(32)," ")
str=Replace(str,Chr(9)," ")
str=Replace(str,Chr(34),""")
str=Replace(str,Chr(39),"'")
str=Replace(str,Chr(13),"")
str=Replace(str,Chr(10) & Chr(10), "<p></p>")
str=Replace(str,Chr(10),"<br>")
HtmlEncode_walk=str
End Function
Function txl_SiteHead(headString)
SiteHead(headString)
End Function
function SiteHead2(headString)
%>
<html>
<head>
<title>
<%=headString%>
</title>
<script language="javascript">
function rightStr(str,n)
{
if(str.length<=n)
{
return(str);
}
{
return(str.substr(str.length-n,n));
}
}
function winsteps_open_window(url,width,height,openname)
{
var Win = window.open(url,openname,'width=' + width + ',height=' + height +',left=10,top=10,resizable=1,scrollbars=yes,menubar=no,status=no' );
Win.focus();
}
</script>
<link rel="stylesheet" type="text/css" href="<%=const_txl_HomeUrl%>style/style.css">
<script src="<%=const_txl_HomeUrl%>js/js.js"></script>
<style type="text/css">
<!--
body,table,td,p
{
font-size:12px;
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#000000;
}
input {height:20px;}
p {text-indent:18px;}
-->
</style>
<script language="VBScript">
<!--
Dim Bar, Line, SP
Bar = 0
Line = "|"
SP = 100
Function Window_onLoad()
Bar = 95
SP = 10
End Function
Function Count()
If Bar < 100 Then
Bar = Bar + 1
Window.Status = "页面载入状态:" & Bar & "%" & " " & String(Bar, Line)
setTimeout "Count()", SP
Else
Window.Status = "Welcome to 葛洲坝高级中学2003届2班!"
Document.Body.Style.Display = ""
End If
End Function
Call Count()
-->
</script>
</head>
<body style="margin:0px;">
<%
End Function
function SiteHead(headString)
SiteHead2(headString)
%>
<table width="779" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-top:#FF0000 3px solid;">
<tbody>
<tr>
<td width="214"><img src="<%=const_txl_HomeUrl&const_txllogourl%>"></td>
<td align="center"><%=const_banner%></td>
<td width="80" style="line-height:1.6;text-align:center;">·<a class="top" href="javascript:;" onClick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('<%=const_homepageurl%>');">设为首页</a><br>
·<a class="top" href="javascript:;" onclick="javascript:window.external.AddFavorite('<%=const_homepageurl%>','<%=const_homepagename%>')">加入收藏</a><br>
·<a href="mailto:<%=const_adminemail%>" class="top">联系我们</a> </td>
</tr>
</tbody>
</table>
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF" style="text-align:center;line-height:1.5;border:#CCCCCC 1px solid;background-color:#F1F1F1;">
<tr>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>index.asp">班级首页</a></td>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>message/showmessage.asp">班级留言</a></td>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>photo/showphoto.asp">班级相册</a></td>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>bbs/index.asp">班级论坛</a></td>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>user/classmateinfo.asp">同学资料</a></td>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>play/showordersong.asp">娱乐前沿</a></td>
<td style="padding-top:3px;"><a class="top" href="<%=const_txl_homeurl%>help.asp">同学录帮助</a></td>
<td width="35"><img src="<%= const_txl_HomeUrl %>images/nev_t.jpg" width="35" height="26"></td>
<td style="padding-top:3px;color:#FFFFFF;" width="150" bgcolor="#CCCCCC">
<%if session("username")="" Then
Response.write "<a class=""too"" href='"&const_txl_HomeUrl&"user/login.asp' title='点击登录同学录' style='cursor:hand'>登录</font></a> |"
Response.write "<a class=""too"" href='"&const_txl_HomeUrl&"user/register.asp' title='点击注册同学录' style='cursor:hand'>注册</font></a> |"
Response.Write "<font style='cursor:hand;color:gray' title='登录之后更精彩!'>我的信箱 </font>"
Else
Response.write "<a class=""too"" href='"&const_txl_HomeUrl&"logout.asp' title='退出登录'>退出</font></a> "
Response.write "<a class=""too"" href='"&const_txl_HomeUrl&"user/edituserinfo.asp' title='修改资料'>资料</a> "
Dim usermsgnum
usermsgnum=getmsgnum(Trim(session("username")))
if usermsgnum>0 Then
Response.Write "<a class=""too"" style='cursor:hand' href=javacript:; onclick=""javascript:winsteps_open_window('"&const_txl_HomeUrl&"user/showpermsg.asp?username="&session("username")&"',520,300,'msg');return false"" title='点击查看详情!'>我的信箱(<font color=red>"&usermsgnum&"</font>新</a>)"
Response.Write "<bgsound balance=0 src='"&const_txl_HomeUrl&"sound/mail.wav' loop=1> "
Else
Response.Write "<a class=""too"" style='cursor:hand' href=javacript:; onclick=""javascript:winsteps_open_window('"&const_txl_HomeUrl&"user/showpermsg.asp?username="&session("username")&"',520,300,'msg');return false"" title='暂时没有短信'>我的信箱(0新</a>)"
End if
End If
%>
</td>
</tr>
</table>
<%
end function
function SiteBottom
Response.Write "<a name=bottom></a>"&vbcrlf
Response.Write "<table width=""779"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"&vbcrlf
Response.Write " <tr>"&vbcrlf
Response.Write " <td style='font-family:verdana;border-bottom:#FF0000 3px solid;line-height:1.8;text-align:center;padding:8px;'>Copyright © 2003 -2004 <a href=http://99167.jahee.com/class2 target=_blank title='葛洲坝高级中学2003届2班'><font color=gray style='text-DECORATION: none'></font></a>版权所有 <br>Powered by:<a href='http://99167.jahee.com' target='_blank'></a> All rights reserved 页面执行时间:" & fix(abs(CDBL(Timer)*1000 - DEF_PageExeTime1)) & "ms</td>"&vbcrlf
Response.Write " </tr>"&vbcrlf
Response.Write "</table>"&vbcrlf
Response.Write "</BODY>"&vbcrlf
Response.Write "</HTML>"&vbcrlf
end function
function printerror(errtitle,errstr,width)
Response.write "<br><table width='"&width&"' border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" bgcolor=""#666666"">"&Vbcrlf
Response.write " <tr>"&Vbcrlf
Response.write " <td height=20 class='title'><font color='#FFFFFF'><b>"&errtitle&"</b></font></td>"&Vbcrlf
Response.write " </tr>"&Vbcrlf
Response.write " <tr>" &Vbcrlf
Response.write " <td bgcolor=""#FFFFFF"" class='content' style='line-height:1.8;'><b>产生错误的可能原因:</b><br>"&errstr&"</td>"&Vbcrlf
Response.write " </tr>"&Vbcrlf
Response.write " <tr>" &Vbcrlf
Response.write " <td align=""center"" height=30 bgcolor=""#FFFFFF""><< <a href=""javascript:history.back()"">返回上一页</a></td>"&Vbcrlf
Response.write " </tr>"&Vbcrlf
Response.write "</table><br>"&Vbcrlf
end function
function printsuc(suctitle,sucstr,width)
Response.write "<br><table width='"&width&"' border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" bgcolor=""#666666"">"&Vbcrlf
Response.write " <tr>"&Vbcrlf
Response.write " <td height=20 class='title'><font color='#FFFFFF'><b>"&suctitle&"</b></font></td>"&Vbcrlf
Response.write " </tr>"&Vbcrlf
Response.write " <tr>" &Vbcrlf
Response.write " <td bgcolor=""#FFFFFF"" class='content' style='line-height:1.8;'><b>您可以选择以下操作:</b><br><li><a href='"&const_txl_homeurl&"index.asp'>返回首页</a></li>"&sucstr&"</td>"&Vbcrlf
Response.write " </tr>"&Vbcrlf
Response.write " <tr>" &Vbcrlf
Response.write " <td align=""center"" height=30 bgcolor=""#FFFFFF""><< <a href=""javascript:history.back()"">返回上一页</a></td>"&Vbcrlf
Response.write " </tr>"&Vbcrlf
Response.write "</table><br>"&Vbcrlf
end function
function online
dim user_ip,rs
user_ip=Session("user_ip")
If user_ip="" Then
session("user_ip")=getuserip
user_ip=Session("user_ip")
End If
set rs=conn.execute ("select * from online where ip='"&user_ip&"'")
if rs.eof Then
conn.execute ("insert into online(ip,sname,entertime,newtime) values ('"&user_ip&"',null,'"&now()&"','"&now()&"')")
Else
conn.execute ("update online set newtime='"&now()&"' where ip='"&user_ip&"'")
End If
rs.close
set rs=nothing
'conn.execute ("delete from online where datediff('s',newtime,now())>"&const_UserOnlineTimeOut)
conn.execute ("delete from online where datediff('s',newtime,now())>"&const_UserOnlineTimeOut)
'conn.execute ("delete from online where datediff(""s"",newtime,getdate())>"&const_UserOnlineTimeOut)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -