| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 900 人关注过本帖
标题:关于缺少"end"的问题?
只看楼主 加入收藏
airfei
Rank: 1
等 级:新手上路
帖 子:137
专家分:0
注 册:2007-4-12
收藏
 问题点数:0 回复次数:8 
关于缺少"end"的问题?

我在框架中嵌入一个留言板,但是提示缺少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>

请大家帮帮忙!!!!

搜索更多相关主题的帖子: end 
2007-08-22 12:24
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 
在哪里缺少end 就在那里多加个end if 就是了,这个常识性问题也要问吗?

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-08-22 12:27
airfei
Rank: 1
等 级:新手上路
帖 子:137
专家分:0
注 册:2007-4-12
收藏
得分:0 
回复:(airfei)关于缺少
我加了end if
是不报错了,但是我的页面什么都不显示,只是一片空白,连表格都没有显示
2007-08-22 13:03
Kettyjin1983
Rank: 1
等 级:新手上路
帖 子:303
专家分:0
注 册:2007-8-17
收藏
得分:0 
<%
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
%>---这段代码感觉有问题,少了end if
2007-08-24 15:48
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 
这么多,一个一个查,还不累死啊

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-08-24 15:54
fengmumei
Rank: 2
等 级:论坛游民
威 望:2
帖 子:298
专家分:14
注 册:2006-9-16
收藏
得分:0 
建议你使用dw8,有折叠标签的那种就方便查找了哦,呵呵

随缘不变,不变随缘
2007-08-25 10:12
天涯听雨
Rank: 2
来 自:东莞
等 级:论坛游民
威 望:4
帖 子:497
专家分:64
注 册:2007-8-25
收藏
得分:0 
写代码不规范,你自己慢慢找

不要帖代码让回答者来给你看代码,一般回者只会在方法进行引导式回答,这样的细节问题自己处理

很明显的错误也需要别人来回答,而且要看那么多代码,我是晕了……

从明天起做幸福的人,喂马劈柴周游世界!
2007-08-25 13:26
大年初四
Rank: 1
等 级:新手上路
帖 子:641
专家分:2
注 册:2007-2-21
收藏
得分:0 
看见这么长的代码就头晕,没有几个小时研究不透

大年初三可怜怜,初四晚上饭一碗
2007-08-25 14:59
zhongx
Rank: 2
等 级:论坛游民
威 望:1
帖 子:370
专家分:42
注 册:2007-8-16
收藏
得分:0 

感动常在,每天进步一点点,开心学习在编程论坛。
http://www.
2007-08-26 22:29
快速回复:关于缺少"end"的问题?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026234 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved