主题:[求助]请各位帮我看看代码为什么出错了?
总是提示缺少语句的错误
<!--#include file="articleconn.asp"--> 连接数据库
<!--#include file="gl.asp"--> 身份验证
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Style.css" rel="stylesheet" type="text/css">
<title><%=website%>后台管理</title>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
</head>
<body bgcolor="#CED7F7">
<%
sql="select * from public_news where newsid="&request("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<form method="POST" name="myform" action="saveedit.asp?id=<%=request("id")%>&action=edit">
<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" style="border-collapse: collapse">
<TR>
<th height=25 colspan="3" background="Images/admin_bg_1.gif" class="th">
修改新闻信息</th>
</TR>
<TR>
<TD width="204" align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息标题:</b></TD>
<TD width="721" height="15" colspan="2" bgcolor="#FFFFFF" class="Forumrow">
<font color="#F4FAFF">
<input name="title" type="text" class="smallInput" size="50" maxlength="50" value="<%=rs("title")%>">
</font> <font color='#FF0000'>*</font> </TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息类别:</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"><font color="#F4FAFF">
<%
response.write rs("BigClassName") & "<input name='BigClassName' type='hidden' value='" & rs("BigClassName") & "'>>>"
sql = "select * from BigClass where BigClassName='" & rs("BigClassName") & "'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<%
do while not rs.eof
%>
<option <% if rs("BigClassName")=rs("BigClassName") then response.Write("selected") end if%> value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<select name="SmallClassName">
<option value="" <%if rs("SmallClassName")="" then response.write "selected"%>>不指定小类</option>
<%
response.write rs("SmallClassName") & "<input name='SmallClassName' type='hidden' value='" & rs("SmallClassName") & "'>"
sql="select * from SmallClass where BigClassName='" & rs("BigClassName") & "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof %>
<option <% if rs("SmallClassName")=rs("SmallClassName") then response.Write("selected") end if%> value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
</font></TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息属性: </b></TD>
<TD colspan="2" bgcolor="#FFFFFF" class="Forumrow"> <input type="checkbox" name="commend" value="1">
推荐<br /> <input type="checkbox" name="top" value="1">
置顶 <div align="center"> </div>
</TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>新闻关键字:</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"> <input name="keywords" type="text" id="keywords" size="30" maxlength="100" value="<%=rs("keywords")%>"></TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>作 者:
</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"> <input name="writer" type="text" id="writer" size="30" maxlength="100" value="<%=rs("writer")%>"></TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息来源:</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"><font color="#F4FAFF">
<input name="nfrom" type="text" class="smallInput" size="50" maxlength="50" value="<%=rs("nfrom")%>">
</font></TD>
</TR>
<TR>
<td align="right" bgcolor="#FFFFFF" class="Forumrow"><b>新闻内容:</b></td>
<td align="left"><iframe ID="edit" src="../edit/ewebeditor.asp?id=content&style=news" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe>
<textarea name="Content" style="display:none">
<%
content=replace(rs("content"),"<br>",chr(13))
content=replace(content," "," ")
response.write content
%></textarea></td>
</TR>
<TR height="40">
<TD height="40" colspan="3" align="center" bgcolor="#FFFFFF" class="Forumrow">
<input type="Submit" name="cmdok" value=" 修 改 " class="buttonface">
<input type="reset" name="cmdcancel" value=" 还 原 " class="buttonface"></TR>
</TABLE>
</form>
</body>
</html>
<!--#include file="articleconn.asp"--> 连接数据库
<!--#include file="gl.asp"--> 身份验证
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Style.css" rel="stylesheet" type="text/css">
<title><%=website%>后台管理</title>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
</head>
<body bgcolor="#CED7F7">
<%
sql="select * from public_news where newsid="&request("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<form method="POST" name="myform" action="saveedit.asp?id=<%=request("id")%>&action=edit">
<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" style="border-collapse: collapse">
<TR>
<th height=25 colspan="3" background="Images/admin_bg_1.gif" class="th">
修改新闻信息</th>
</TR>
<TR>
<TD width="204" align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息标题:</b></TD>
<TD width="721" height="15" colspan="2" bgcolor="#FFFFFF" class="Forumrow">
<font color="#F4FAFF">
<input name="title" type="text" class="smallInput" size="50" maxlength="50" value="<%=rs("title")%>">
</font> <font color='#FF0000'>*</font> </TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息类别:</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"><font color="#F4FAFF">
<%
response.write rs("BigClassName") & "<input name='BigClassName' type='hidden' value='" & rs("BigClassName") & "'>>>"
sql = "select * from BigClass where BigClassName='" & rs("BigClassName") & "'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<%
do while not rs.eof
%>
<option <% if rs("BigClassName")=rs("BigClassName") then response.Write("selected") end if%> value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<select name="SmallClassName">
<option value="" <%if rs("SmallClassName")="" then response.write "selected"%>>不指定小类</option>
<%
response.write rs("SmallClassName") & "<input name='SmallClassName' type='hidden' value='" & rs("SmallClassName") & "'>"
sql="select * from SmallClass where BigClassName='" & rs("BigClassName") & "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof %>
<option <% if rs("SmallClassName")=rs("SmallClassName") then response.Write("selected") end if%> value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
</font></TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息属性: </b></TD>
<TD colspan="2" bgcolor="#FFFFFF" class="Forumrow"> <input type="checkbox" name="commend" value="1">
推荐<br /> <input type="checkbox" name="top" value="1">
置顶 <div align="center"> </div>
</TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>新闻关键字:</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"> <input name="keywords" type="text" id="keywords" size="30" maxlength="100" value="<%=rs("keywords")%>"></TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>作 者:
</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"> <input name="writer" type="text" id="writer" size="30" maxlength="100" value="<%=rs("writer")%>"></TD>
</TR>
<TR>
<TD align="right" bgcolor="#FFFFFF" class="Forumrow"><b>信息来源:</b></td>
<TD colspan="2" valign="middle" bgcolor="#FFFFFF" class="Forumrow"><font color="#F4FAFF">
<input name="nfrom" type="text" class="smallInput" size="50" maxlength="50" value="<%=rs("nfrom")%>">
</font></TD>
</TR>
<TR>
<td align="right" bgcolor="#FFFFFF" class="Forumrow"><b>新闻内容:</b></td>
<td align="left"><iframe ID="edit" src="../edit/ewebeditor.asp?id=content&style=news" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe>
<textarea name="Content" style="display:none">
<%
content=replace(rs("content"),"<br>",chr(13))
content=replace(content," "," ")
response.write content
%></textarea></td>
</TR>
<TR height="40">
<TD height="40" colspan="3" align="center" bgcolor="#FFFFFF" class="Forumrow">
<input type="Submit" name="cmdok" value=" 修 改 " class="buttonface">
<input type="reset" name="cmdcancel" value=" 还 原 " class="buttonface"></TR>
</TABLE>
</form>
</body>
</html>