我在这里收到此页面上的错误,我已经有一段时间没有碰它了。我今天编辑了一个页面模板,然后看到了错误,但我不明白为什么会这样。
这是代码,它是第 56 行:
<!--#include virtual="/System/Startup_Public.asp"-->
<%
'response.write request.querystring
sql = "SELECT *,dbo.RemoveNonAlphaCharacters(cn_title) AS URL FROM CommunityNews WHERE "&_
" cn_live = 1 AND cn_franchise = '{"&session("PublicFranchiseGID")&"}' "&_
"AND DATENAME(month,cn_startdate) = '"&getquery("m")&"' "&_
"AND YEAR(cn_startdate) = "&cint(getquery("y"))&" "&_
"AND dbo.RemoveNonAlphaCharacters(cn_title) = '"&getquery("a")&"';"
getrs rs,sql,""
if rs.recordcount = 0 then
response.write sql
response.write "Event not found." : response.end
end if
If Session("PublicFranchiseGID") = "" then
Response.Redirect "/"
End if
sLink = "/" & lcase(session("publicfranchisename")) & "/news/" & year(rs("cn_startdate")) & "/" & monthname(month(rs("cn_startdate"))) & "/" & lcase(rs("URL")) & ".html"
if not sLink = request.ServerVariables("HTTP_X_REWRITE_URL") then
response.status = "301 Moved Permanently"
response.addheader "Location", "http://www.inside-guides.co.uk" & sLink
response.end
end if
EnsurePageIsBasicHTTP
startdate = date()
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><%=server.HTMLEncode(""&rs("cn_title"))%> | <%=server.HTMLEncode(Session("PublicFranchiseName"))%> News, Essex</title>
<meta name="Description" content="<%=server.HTMLEncode(""&rs("cn_title"))%> | <%=server.HTMLEncode(Session("PublicFranchiseName"))%> News, Essex" />
<meta name="Keywords" content="<%=server.HTMLEncode(""&rs("cn_title"))%>, <%=server.HTMLEncode(Session("PublicFranchiseName"))%>, Submit News" />
<link rel="stylesheet" type="text/css" href="/css/hot-sneaks/jquery-ui-1.8.22.custom.css"/>
<!--#include virtual="/Assets/Templates/Public/Franchise/HeadCSS.asp"-->
<link rel="stylesheet" type="text/css" href="/css/NewsDetails.css"/>
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.22.custom.min.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$('#datepicker').datepicker({
dateFormat:'dd/mm/yy'
});
});
</script>
</head>
<body id="news">
<!--#include virtual="/Assets/Templates/Public/Franchise/News.asp"-->
<div class="middle-content-grey main-article clearfix">
<h1 class="event-title"><%=server.HTMLEncode(""&rs("cn_title"))%></h1>
<% if len(""&rs("cn_fullimage"))>0 then %>
<img src="/includes/tn.asp?src=/LiveStorage/Uploads/image/CommunityNews/<%=server.URLEncode(""&rs("cn_fullimage"))%>" class="fullimage" />
<% end if %>
<div class="event-address"><h3><img class="newsitem" src="/images/map.png" alt="event location" /> Submitted by <%=server.HTMLEncode(rs("cn_location"))%></h3></div>
<div class="event-date"><h4><img class="newsitem" src="/images/date.png" alt="event date" /> On <%=formatdatetime(rs("cn_startdate"),1)%>
<% if not rs("cn_startdate") = rs("cn_enddate") then %> - <%=formatdatetime(rs("cn_enddate"),1)%><% end if %></h4></div>
<div class="article-details"><p><%=rs("cn_article")%></p></div>
</div>
<br />
<div id="frmcomment" class="middle-content-grey">
<h2>Visitor Comments</h2>
<% getrs com,"SELECT * FROM CommunityNewsComments WHERE nc_article = "&cint(rs("cn_id"))&" AND nc_approved = 1 ORDER BY nc_datetime ASC;",""
if com.recordcount = 0 then
%><p class="comment">Be the first to comment</p><%
else
while not com.eof
%>
<div class="comment">
<div class="title"><%=formatdatetime(com("nc_datetime"),1)%> at <%=formatdatetime(com("nc_datetime"),3)%> by <%=server.HTMLEncode(""&com("nc_name"))%></div>
<p><%=server.HTMLEncode(""&com("nc_comment"))%></p>
</div>
<%
com.movenext : wend
end if
%>
<h3>Leave a Comment:</h3>
<form id="form" method="post" action=""
onsubmit="
if ($('#email').val()=='' || $('#name').val()=='' || $('#comment').val()=='') {alert('Please complete all fields');return false}
$.ajax({
type:'POST',
url:'/ajax/newsComment.asp',
data:$(this).serialize(),
success: function(data){
$('#frmcomment').html(data);
}
});return false;
"><input type="hidden" name="news" id="news" value="<%=server.HTMLEncode(""&rs("cn_id"))%>" />
<label>Email Address<span class="smaller">Required</span></label>
<input type="text" name="email" id="email" />
<label>Your Name<span class="smaller">Required</span></label>
<input type="text" name="name" id="name" />
<label>Your comment<span class="smaller">Required</span></label>
<textarea name="comment" id="comment"></textarea>
<button class="button medium news-green form" type="submit"><span>Leave Comment</span></button><br />
<textarea name="options" id="options" style="display:none;"></textarea>
</form>
</div>
<br />
<a class="button medium news-green top" href='#top'><span>Top</span></a>
<a class="button medium news-green home" href="/<%=lcase(Session("PublicFranchiseName"))%>/news/index.html"><span>News</span></a>
<!--#include virtual="/Assets/Templates/Public/Franchise/TemplateEnd.asp"-->
</body>
</html>
<!--#include virtual="/System/Shutdown.asp"-->
任何想法将不胜感激。