懂ASP的大哥进来帮忙吓
日期:2004-12-09 15时
我修改了我网站inc目录下的FUNCTION.ASP,我网站是下载系统
然后进首页出现 Microsoft VBScript 编译器错误 错误 '800a03f4'
缺少 'If'
/inc/function.asp,行225
end function
----^
下面是221-277行的代码 大家帮我看下:
</td>
</tr>
</table>
<%
end function
function browser(info)
if Instr(info,"NetCaptor 6.5.0")>0 then
browser="NetCaptor 6.5.0"
elseif Instr(info,"MyIe 3.1")>0 then
browser="MyIe 3.1"
elseif Instr(info,"NetCaptor 6.5.0RC1")>0 then
browser="NetCaptor 6.5.0RC1"
elseif Instr(info,"NetCaptor 6.5.PB1")>0 then
browser="NetCaptor 6.5.PB1"
elseif Instr(info,"MSIE 5.5")>0 then
browser="Internet Explorer 5.5"
elseif Instr(info,"MSIE 6.0")>0 then
browser="Internet Explorer 6.0"
elseif Instr(info,"MSIE 6.0b")>0 then
browser="Internet Explorer 6.0b"
elseif Instr(info,"MSIE 5.01")>0 then
browser="Internet Explorer 5.01"
elseif Instr(info,"MSIE 5.0")>0 then
browser="Internet Explorer 5.00"
elseif Instr(info,"MSIE 4.0")>0 then
browser="Internet Explorer 4.01"
else
browser="其它"
end if
end function
function system(info)
if Instr(info,"NT 5.1")>0 then
system=system "Windows XP"
elseif Instr(info,"Tel")>0 then
system=system "Telport"
elseif Instr(info,"webzip")>0 then
system=system "webzip"
elseif Instr(info,"flashget")>0 then
system=system "flashget"
elseif Instr(info,"offline")>0 then
system=system "offline"
elseif Instr(info,"NT 5")>0 then
system=system "Windows 2000"
elseif Instr(info,"NT 4")>0 then
system=system "Windows NT4"
elseif Instr(info,"98")>0 then
system=system "Windows 98"
elseif Instr(info,"95")>0 then
system=system "Windows 95"
elseif instr(info,"unix") or instr(info,"linux") or instr(info,"SunOS") or instr(info,"BSD") then
system=system "类Unix"
elseif instr(thesoft,"Mac") then
system=system "Mac"
else
system=system "其它"
end if
end function
[ Last edited by 萧秋水 on 2004-12-9 at 15:32 ]
<%
dim Stats,topinfo
dim endtime,i
'==================================================
function CloseDatabase
Conn.close
Set conn = Nothing
End Function
sub CloseConn()
conn.close
set conn=nothing
end sub
'************************************************
function cutStr(str,strlen)
dim l,t,c
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t 2
else
t=t 1
end if
if t>=strlen then
cutStr=left(str,i)&".."
exit for
else
cutStr=str
end if
next
cutStr=replace(cutStr,chr(10),"")
end function
'*******************************************
Rem 判定数字是否整形
function isInteger(para)
on error resume next
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
end function
'************************************************************
'非法字符过滤函数
function checkStr(str)
if isnull(str) then
checkStr = ""
exit function
end if
checkStr=replace(str,"'","''")
end function
'******************************************************************
sub top(topinfo)
%>
<table width="96%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="28"><img src="<%=Dvasp_pic(9)%>" width="28" height="28"></td>
<td width="100%" background="<%=Dvasp_pic(10)%>"><font COLOR=#FFFFFF><strong><%=topinfo%></strong></font></td>
<td width="19"><img src="<%=Dvasp_pic(11)%>" width="19" height="28"></td>
<td width="296"><img src="<%=Dvasp_pic(12)%>" width="296" height="28"></td>
</tr>
</table>
<%
end sub
sub bottom()
%>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100"><img src="<%=Dvasp_pic(13)%>" width="100" height="23"></td>
<td width="100%" background="<%=Dvasp_pic(14)%>"> </td>
<td width="100">
<div align="right"><img src="<%=Dvasp_pic(15)%>" width="100" height="23"></div></td>
</tr>
</table>
<BR>
<%
end sub
sub Dvhead()
%>
<html>
<head>
<title><%=webname%>-<%=Stats%>-传奇外挂、传奇私服、奇迹私服、A3私服、电脑单机游戏、外挂下载、源码程序、免费电影、虚拟主机、域名注册、ASP、CGI、PHP、ASP.NET、ASP免费空间</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=keywords content="一起网游外挂网,外挂下载,系统开发,电影下载,源码下载,域名主机,flash欣赏,外挂论坛,17160.com">
<!-- #include file="Dvasp_css.asp" -->
<map name="Map">
<area shape="rect" coords="36,3,74,18" href="http://www.17160.com" target="_blank" alt="一起网游网">
<area shape="rect" coords="81,3,123,18" alt="一起网游论坛即将开放!">
</map>
</head>
<script language=JavaScript src="inc/meun.asp"></script>
<body <%=dvbody%> onmousemove="HideMenu()">
<div id=menuDiv style='Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8'></div>
<div align="center">
<table width="770" border="0" cellspacing="0" cellpadding="0" class="PageBorder">
<tr>
<td valign="top" align="center">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="180" height="30"><img src="<%=Dvasp_pic(1)%>" width="180" height="30"></td>
<td width="100%" align="center" background="<%=Dvasp_pic(2)%>"><a href=<%=url%>>本站提供最新传奇外挂.传奇私服.泡泡堂.冒险岛等热门网络游戏外挂下载,老鼠爱大米,孤单北半球等经典歌曲火爆登场!</a>
</td>
<td width="180"><img src="<%=Dvasp_pic(3)%>" width="180" height="30"></td>
</tr>
</table>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="180"><a href="<%=url%>"><img src="<%=Dvasp_pic(0)%>" width="180" height="60" border="0" alt="<%=Webname%>"></a></td>
<td width="100%" align="center">
<蔿l topads(0)%></td>
<td align="center"><p align="center"><font face=Wingdings color=#3366CC>y</font> <a href="javascript:window.external.AddFavorite(location.href,document.title)" title=将本站加入到你的收藏夹>收藏本站</a><br>
<font face=Wingdings color=#3366CC>y</font> <a onclick="this.style.behavior='url(#default#homepage)';this.sethomepage('<%=Url%>');return false;" href="<%=Url%>" title=将本站设为你的首页>设为首页</a><br>
<font face=Wingdings color=#3366CC>y</font> <a href="mailto:<%=E_mail%>" target="_blank" title=如有什么问题请与我们联系>联系我们</a></p></td>
</tr>
<tr>
<td height="19" align="center"><script language=JavaScript>
<!--
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i )
this[i 1]=initArray.arguments[i] }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"<font color=#111111 style='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"年",
today.getMonth() 1,"月",
today.getDate(),"日",
"</font>",
"<font color=#ff0000 style='font-size:9pt;font-family: 宋体'> ",
d[today.getDay() 1],
"</font>" );
//--></script> </td>
<td width="100%" align="center"></td>
<td width="149"><img src="<%=Dvasp_pic(4)%>" width="128" height="20" border="0" usemap="#Map"></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="0.1%" height="30" background="<%=Dvasp_pic(5)%>"> </td>
<td width="99.8%" align="center" background="<%=Dvasp_pic(6)%>"><!-- #include file="SoftMenu.htm" --></td>
<td width="0.1%" background="<%=Dvasp_pic(5)%>"> </td>
</tr>
</table>
<%
end sub
sub Search()
%>
<table width="100%" align="center" height="18" border="0" cellpadding="0" cellspacing="1" class="TdBorder">
<tr valign="bottom">
<script language=Javascript>
<!--
function urlencode(str) {
var ns = (navigator.appName=="Netscape") ? 1 : 0;
if (ns) { return escape(str); }
var ms = "%#23 20 2B?3F<3C>3E{7B}7D[5B]5D|7C^5E~7E`60";
var msi = 0;
var i,c,rs,ts ;
while (msi < ms.length) {
c = ms.charAt(msi);
rs = ms.substring( msi, msi 2);
msi = 2;
i = 0;
while (true) {
i = str.indexOf(c, i);
if (i == -1) break;
ts = str.substring(0, i);
str = ts "%" rs str.substring( i, str.length);
}
}
return str;
}
//-->
</script>
<form method=post name=form onsubmit="window.open(this.kt.options[this.kt.selectedIndex].value urlencode(this.keyword.value)); return false;">
<td width="55%"><b>搜索:</b><input name="keyword" type="text" size="25" class="kuang" onblur='if (value ==""){value="请输要查询的要害字"}' onfocus='if (value =="请输要查询的要害字"){value =""}' size=12 value=请输要查询的要害字>
<select size="1" name="kt" class="kuang">
<option value="Search.ASP?action=soft&keyword=">外挂下载</option>
<option value="Search.ASP?action=info&keyword="">文章教程</option>
<option value="search.asp?keyword=">网页搜索</option>
</select>
<input name="Submit" type="Submit" value="开始搜索..." class="kuang"></td></form>
<td width="45%" align="right"> <%if session("Chkuser")="" then%>|<a href=./ShowCate.Asp>外挂分类</a>|<a href=./Commend.asp>下载推荐</a>|<a href=./newsoft.asp>最近更新</a>|
<script src="online.asp"></script> </td>
</tr>
</table>
<table width="770" height="22" border="0" align="center" cellpadding="1" cellspacing="0" background="images/head.gif">
<tr>
<td width="80" align="center" bgcolor="#c7dec0" style="BORDER-bottom: #99cc99 1px solid;"><IMG height=11
src="images/000shi.GIF" width=17
border=0> <font color="#ff0000">本站公告</font></td>
<td align="center" class="bottomindex">
<MARQUEE scrollAmount=7 width=600 height=15><font color="#FF0000">本站将在近期更换下载服务器!新服务器将采用HTML版本以提高访问速度!</font></MARQUEE>
</td>
</tr>
</table>
<%
end function
function browser(info)
if Instr(info,"NetCaptor 6.5.0")>0 then
browser="NetCaptor 6.5.0"
elseif Instr(info,"MyIe 3.1")>0 then
browser="MyIe 3.1"
elseif Instr(info,"NetCaptor 6.5.0RC1")>0 then
browser="NetCaptor 6.5.0RC1"
elseif Instr(info,"NetCaptor 6.5.PB1")>0 then
browser="NetCaptor 6.5.PB1"
elseif Instr(info,"MSIE 5.5")>0 then
browser="Internet Explorer 5.5"
elseif Instr(info,"MSIE 6.0")>0 then
browser="Internet Explorer 6.0"
elseif Instr(info,"MSIE 6.0b")>0 then
browser="Internet Explorer 6.0b"
elseif Instr(info,"MSIE 5.01")>0 then
browser="Internet Explorer 5.01"
elseif Instr(info,"MSIE 5.0")>0 then
browser="Internet Explorer 5.00"
elseif Instr(info,"MSIE 4.0")>0 then
browser="Internet Explorer 4.01"
else
browser="其它"
end if
end function
function system(info)
if Instr(info,"NT 5.1")>0 then
system=system "Windows XP"
elseif Instr(info,"Tel")>0 then
system=system "Telport"
elseif Instr(info,"webzip")>0 then
system=system "webzip"
elseif Instr(info,"flashget")>0 then
system=system "flashget"
elseif Instr(info,"offline")>0 then
system=system "offline"
elseif Instr(info,"NT 5")>0 then
system=system "Windows 2000"
elseif Instr(info,"NT 4")>0 then
system=system "Windows NT4"
elseif Instr(info,"98")>0 then
system=system "Windows 98"
elseif Instr(info,"95")>0 then
system=system "Windows 95"
elseif instr(info,"unix") or instr(info,"linux") or instr(info,"SunOS") or instr(info,"BSD") then
system=system "类Unix"
elseif instr(thesoft,"Mac") then
system=system "Mac"
else
system=system "其它"
end if
end function
sub Footer()
%>
<%=Version%><BR><蔿l RunTime()%>
</td>
</tr>
<tr>
<td>
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32"><img src="<%=Dvasp_pic(7)%>" width="32" height="28"></td>
<td width="100%" align="center" background="<%=Dvasp_pic(8)%>"> <%=Copyrights%> <a href=help.asp?action=anent>关于本站</a>-<a href=help.asp?action=statement>下载声明</a>-<a href=help.asp?action=put>发布软件</a>-<a href=help.asp>下载帮助</a></td>
<td width="32" align="right">
<img src="<%=Dvasp_pic(7)%>" width="32" height="28"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%
end sub
'************************************************
'日期格式转换函数
function DateTimeFormat(DateTime,Format)
select case Format
case "1"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日"
case "2"
DateTimeFormat=""&month(DateTime)&"月"&day(DateTime)&"日"
case "3"
DateTimeFormat=""&year(DateTime)&"/"&month(DateTime)&"/"&day(DateTime)&""
case "4"
DateTimeFormat=""&month(DateTime)&"/"&day(DateTime)&""
case "5"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日<font color=red> "&FormatDateTime(DateTime,4)&"</font>"
case "6"
temp="星期日,星期一,星期二,星期三,星期四,星期五,星期六"
temp=split(temp,",")
DateTimeFormat=temp(Weekday(DateTime)-1)
case else
DateTimeFormat=DateTime
end select
end function
Rem 判定发言是否来自外部
function ChkPost()
dim server_v1,server_v2
chkpost=false
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
chkpost=false
else
chkpost=true
end if
end function
%>