设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 76|回复: 2
打印 上一主题 下一主题

关于缺少"end"的问题?

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-8 05:00:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在框架中嵌入一个留言板,但是提示缺少end
<%Admin="board"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/format1.asp"-->
<%
if bq<>"Hxcms" then
Response.Write("<script language=javascript>alert('非法操作!');this.top.location.href='admin.asp';</script>")
response.end
end if
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
response.end
else
if Request.form("MM_insert") then
if request.Form("action")="board" then
sql="select * from boardmsg"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%>
<!--#include file="settings.txt"-->
<!--#include file="function_list.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理中心</title>
<style type="text/css">
A:link,A:active,A:visited{TEXT-DECORATION:none ;Color:#3C2F1D}
A:hover{TEXT-DECORATION: underline;Color:#4455aa}
BODY{
FONT-SIZE: 13px;
COLOR: #000000;
FONT-FAMILY: 宋体;
background-color: #ECF5FF;

background-image: url(<%=bg%>);
}
font{line-height : normal ;}
td { table-layout:fixed;
word-break :break-all;
font-family:"宋体";
font-size: 12px;
line-height: 15px;
}
th
{
background-color: #877C59;
COLOR: #F4F2EC;
font-size: 12px;
font-weight:bold;
}
.style1 {color: #FFFFFF}
</style>
<SCRIPT language=JavaScript1.2>
function high(x2){
obj=x2
highlighting=setInterval("highlightit(obj)",80)
}
function highlightit(x){
if (x.filters.alpha.opacity<98)
x.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
</SCRIPT>

<script language="vbscript">
<!--deletion message
sub Deletion(x)
C="management_operate.asp?action=delete&NO="
ra=confirm("确实要删除这条留言吗?")
if ra=true then
window.navigate(c&x)
exit sub
end if
end sub
-->
</script>
</head>
<!--<body bgproperties="fixed">-->
<body>
<%
if session("adminlogin")=sessionvar then
if x0=empty or not isNUMERIC(x0) then
x0=0
elseif x0>30 then
x0=30
elseif x0<-30 then
x0=-30
end if
if x0<>0 then
rs.open "select * from boardmsg order by id desc "&list(x0),conn,1
maxX=1
maxY=abs(x0)
elseif x0=0 then
response.write(licence)
response.end
end if
rs.pagesize=maxX*maxY '设置和计算每页的记录数,即每页共多少图片
dim everypagesize,rscount,curpage,pgcount '每页记录数,总记录数,当前页数,总页数
everypagesize=rs.pagesize
rscount=rs.recordcount
pgcount=rs.pagecount
if request.form("page")=empty or not isNumeric(request.form("page")) then
if isNumeric(request.querystring("page")) then
curpage=cint(request.querystring("page"))
else curpage=1
end if
else
curpage=cint(request.form("page"))
end if
if curpage=empty or curpage<1 then
curpage=1
elseif curpage>pgcount then
curpage=pgcount
end if
if not rs.eof=true and not rs.bof=true then
rs.absolutepage=curpage '设置当前页数
end if
%>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="763" height="25">
<center>
</center>
</td>
</tr>
</table>
<p><strong><a name="latest" id="latest"></a></strong>
<%
IF rs.eof=true and rs.bof=true THEN
%>
<center>
<table width="630" height="60" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#E8F2FF">
<tr>
<td height="25" colspan="2" background="img_board/bg3.gif"><table width=550><tr><td width=440>  </td><td></td></tr></table></td>
</tr>
<tr>
<td height=60 bgcolor=white style="FILTER: alpha(opacity=80)"><p align=center>还没有任何留言<br>There are not any messages ! </p></td>
</tr>
</table>
</center>
<%
ELSE

i=1
While not rs.eof and i<=maxY

response.write("<table width=630 border=""1"" align=""center"" cellpadding=""0"" cellspacing=""0"" bordercolor=""#E8F2FF"">")
response.write("<tr>")
response.write("<td style=""FILTER: alpha(opacity=95)"" height=""30"" background=""img_board/title_blue.gif"" width=100><strong>"&rs("id")&"楼</strong></td>")
IF rs("shield").value=true then '检查shield是否为TRUE以判断此记录是否已被屏蔽
response.write("<td style=""FILTER: alpha(opacity=95)"" height=""30"" background=""img_board/title_blue.gif""><table><tr><td width=282><div align=""left"">标题: <a title=""不显示"">不显示</a></div></td><td><div align=""right""><img src=img_board/email.gif> <img src=img_board/reply.gif alt=""reply"" border=0></div></TD></tr></table></td>")
ELSE '否则正常显示标题
if lenB(rs("title").value)>abs(lt)*2 then
response.write("<td style=""FILTER: alpha(opacity=95)"" height=""30"" background=""img_board/title_blue.gif""><table><tr><td width=282><div align=""left"">标题: <a title="""&rs("title").value&""">"&mid(rs("title").value,1,abs(lt))&"...</a></div></td><td><div align=""right""><img src=img_board/email.gif alt="&rs("email").value&" onclick=lem('"&rs("email").value&"')> <a href=#pencil onclick=reply('"&rs("name").value&"',"""&replace(mid(rs("title").value,1,15)," ","")&"..."")><img src=img_board/reply.gif alt=""reply"" border=0></a></div></TD></tr></table></td>")
else
response.write("<td style=""FILTER: alpha(opacity=95)"" height=""30"" background=""img_board/title_blue.gif""><table><tr><td width=282><div align=""left"">标题: <a title="""&rs("title").value&""">"&rs("title").value&"</a></div></td><td><div align=""right""><img src=img_board/email.gif alt="&rs("email").value&" onclick=lem('"&rs("email").value&"')> <a href=#pencil onclick=reply('"&rs("name").value&"',"""&replace(mid(rs("title").value,1,15)," ","")&""")><img src=img_board/reply.gif alt=""reply"" border=0></a></div></TD></tr></table></td>")
end if
END IF '检查SHIELD完毕
response.write("</tr>")
response.write("<tr>")
response.write("<td colspan=2 bgcolor=white style=""FILTER: alpha(opacity=80)"" onmouseover=high(this) height=150 valign=top background=img_board/mbg.png>")
IF rs("shield").value=true then '检查shield是否为TRUE以判断此记录是否已被屏蔽
response.write("<table width=590 height=35><tr><td width=300>【作者】不显示</td><td width=290>【发表时间】"&rs("date").value&"</tr></table>")
'如果是则不显示留言
response.write("<div align=left><table width=100% ><tr><td>【留言内容】</td></tr><tr><td><p>  此留言已被管理员屏蔽!</p></td></tr></table></div>")
ELSE '否则正常显示
if len(rs("name").value)<=25 then
response.write("<table width=590 height=35><tr><td width=300>【作者】"&rs("name").value&"</td><td width=290>【发表时间】"&rs("date").value&"</tr></table>")
else
response.write("<table width=100% height=35><tr><td width=300>【作者】"&mid(rs("name").value,1,25)&"...</td><td width=290>【发表时间】"&rs("date").value&"</tr></table>")
end if
response.write("<div align=left><table width=100% ><tr><td>【留言内容】</td></tr><tr><td><p>  "&rs("content").value&"</p></td></tr></table></div>")
END IF '检查SHIELD完毕
IF rs("reply")<>empty THEN' 查看有没有管理员回复,有则显示回复
response.write("<br><div align=left><table width=100% ><tr><td>-------------------------</td></tr><tr><td><font color="&rs("color_reply").value&">【管理员回复】</font></td></tr><tr><td><p><font color="&rs("color_reply").value&">  "&rs("reply").value&"</font></p></td></tr></table></div>")
END IF
response.write("</tr>")
IF session("postboard_admin")=true and session("postboard_admin_name")<>"" then '最近的更新方向为管理员管理,及根限设定
response.write("<tr><td height=""5"" bgcolor=#E8F2FF>管理操作</td><td bgcolor=#E8F2FF>|<img src=img_board/reply_admin.gif border=0 title=reply><a href=management_change.asp?action=reply&NO="&rs("id").value&" title=reply>回复留言</a> | <img src=img_board/delete.gif border=0 title=delete><a href=javascript:Deletion("&rs("id").value&") title=delete>删除留言</a> | <img src=img_board/shield.gif border=0 title=delete>")
if rs("shield").value=true then
response.write("<a href=management_operate.asp?action=notshield&NO="&rs("id").value&" title=shield>解除屏蔽</a></td></tr>")
else
response.write("<a href=management_operate.asp?action=shield&NO="&rs("id").value&" title=shield>屏蔽留言</a></td></tr>")
end if
END IF
response.write("</table>")
response.write("<table><tr><td></td></tr></table>")

i=i+1
rs.movenext
wend
End if
END IF
%>
<br>
<br>
<BR>
<%
response.write("<table align=""center"" width=600 border=""0"" align=""left"" cellpadding=""0"" cellspacing=""0"">")
if curpage>1 then
response.write("<tr>"&chr(13)&"<td valign=baseline><a href=board.asp?page="&curpage-1&"><img src=img_board/previous.gif border=0> 上一页</a>  ")
else
response.write("<tr>"&chr(13)&"<td valign=baseline> ")
end if
IF curpage<10 THEN '如果当前页少于10
If pgcount>10 Then '又如果总页数大于10
for k=1 to 10 '则显示可连页数为1到10
if k<>curpage then
response.write("<a href=board.asp?page="&k&">["&k&"]</a> ")
else
response.write("<strong><font color=orange>["&k&"]</font></strong> ")
end if
next '<当前页少于10且总页数大于10>情况处理完毕
Else '否则,即总页数小于等于10
for k=1 to pgcount '则显示可连页数为1到总页数
if k<>curpage then
response.write("<a href=board.asp?page="&k&">["&k&"]</a> ")
else
response.write("<strong><font color=orange>["&k&"]</font></strong> ")
end if
next '<当前页少于10且总页数小于等于10>情况处理完毕
End if '<如果当前页数少于10>的情况处理完毕
ELSEIF curpage>=10 then '如果当前页数大于等于10
If curpage+5<pgcount Then '又如果当前页数加5后仍小于总页数
for k=curpage-5 to curpage+5 '则显示可连页数为当前页减5到加5
if k<>curpage then
response.write("<a href=board.asp?page="&k&">["&k&"]</a> ")
else
response.write("<strong><font color=orange>["&k&"]</font></strong> ")
end if
next
Elseif curpage+5>=pgcount then '但如果当前页加5后大于等于总页数
for k=curpage-5 to pgcount '则显示可连页为当前页减5到总页
if k<>curpage then
response.write("<a href=board.asp?page="&k&">["&k&"]</a> ")
else
response.write("<strong><font color=orange>["&k&"]</font></strong> ")
end if
next
End if '<当前页大于等于10>情况处理完毕
END IF
if curpage<pgcount then
response.write("  <a href=board.asp?page="&curpage+1&">下一页 <img src=img_board/next.gif border=0></a></td>"&chr(13)&"</tr>")
else
response.write("  </td>"&chr(13)&"</tr>")
end if
response.write("<tr><td><br>共<font color=darkorange>"&pgcount&"</font>页 当前第<font color=darkorange>"&curpage&"</font>页   <form name=selectpage method=post action=board.asp> | page <input type=text name=page size=2 maxlength="&len(pgcount)&"> <input type=submit name=submit value=go> | <a href=?page=1>首页</a> | <a href=?page="&pgcount&">未页</a> | ")
IF latest=true THEN
if x0<0 then
response.write("<a href=?page=1#latest>最新留言</a> | ")
elseif x0>0 then
response.write("<a href=?page="&pgcount&"#latest>最新留言</a> | ")
end if
END IF
response.write("</form></td></tr>"&chr(13)&"")
End If -------就是这里提示缺少end
%>

</table>
请大家帮帮忙!!!!
2#
发表于 2010-2-21 06:05:04 | 只看该作者
平淡中显示出不凡的文学功底,可谓是字字珠玑,句句经典
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-18 08:36 , Processed in 0.115948 second(s), 8 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表