asp问题 管理后台出现了问题
添加不了歌曲了下面的代码那里出错了,那位大虾帮帮我..先谢谢了
<%
act=cstr(trim(request("act")))
Classid=cstr(trim(request.QueryString("classid")))
SClassid=cstr(trim(request.QueryString("sclassid")))
NClassid=cstr(trim(request.QueryString("Nclassid")))
Specialid=cstr(request.QueryString("Specialid"))
if act="add" then title="添 加 歌 曲"
if act="edit" then title="编 辑 歌 曲"
if act="" then title="添 加 歌 曲 快 捷 方 式"
%><!--#include file="inc.asp"-->
<!--#include file="check.asp"-->
<meta http-equiv="Content-Type" c>
<link rel="stylesheet" href="images/Admin_Style.css">
<head>
<title>音乐视听网 管理中心</title>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
dim i
set rs=server.createobject("adodb.recordset")
set rs2=server.createobject("adodb.recordset")
sql="select * from class order by classid"
rs.open sql,conn,1,1
i=request("id")
if i="" then i=rs("Classid")
%>
<%do while not rs.eof
%>
<%rs.movenext
loop
rs.close
%>
<%sql="select * from class where classid="&i
rs.open sql,conn,1,1
if rs.eof then%>
<%
else
%>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" style="border-collapse:collapse;">
<tr>
<td width="100%" height="22" align=center class="topbg"><strong>添 加 编 辑 歌 曲</strong></td>
</tr><tr>
<td width="100%" height="22" class="tdbg" align=center>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" bordercolordark="#FFFFFF">
<tr>
<td width="140"> <b>→选择分类(第一步):</b></td>
<td height="22" align=center>
<%
sql2="select * from SClass where Classid="&rs("Classid")&" order by Sclassid"
rs2.open sql2,conn,1,1
if rs2.eof then
%>
<%
else
j=0
do while not rs2.eof
j=j+1
%>
<a href='0hao_Geshou.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs2("SClassid")%>'><%=rs2("SClass")%></a>
<%
rs2.movenext
loop
end if
rs2.close
%></td>
<%
end if
rs.close
%>
</tr>
</table>
</div>
</td>
</tr>
<tr><td height=10></td></tr></table>
<table width="100%" border="1" cellpadding="2" cellspacing="0" class="border" style="border-collapse:collapse;">
<form method="POST" action="0hao_Song_Save.asp?Specialid=<%=Specialid%>" name="myform">
<tr>
<td width="100%" height="22" colspan=2 align=center><b><%=title%></b></td>
</tr>
<tr>
<td align="right">类型:</td>
<td>一级:
<select name="classid" size="1" style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
<option value="" <%if request("classid")="" then%> selected<%end if%> style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
选择栏目</option>
<%
set rs=server.createobject("adodb.recordset")
if act="edit" then
sql="select * from class where classid="&classid
else
sql="select * from class"
end if
rs.open sql,conn,1,1
do while not rs.eof
%>
<option<%if cstr(request("classid"))=cstr(rs("classid")) and request("classid")<>"" then
classn=rs("class")
response.write " selected"
end if%> value="<%=CStr(rs("classID"))%>" name=classid><%=left(rs("class"),5)%>..</option>
<%
rs.movenext
loop
rs.close
%>
</select>
二级:
<%if request("classid")<>"" then%>
<select name="sclassid" size="1" style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
<option value="" <%if request("sclassid")="" then%> selected<%end if%>>选择栏目</option>
<%
if act="edit" then
sql="select * from sclass where sclassid="&request("sclassid")
else
sql="select * from sclass where classid="&request("classid")
end if
rs.open sql,conn,1,1
Do while not rs.eof
%>
<option<%if cstr(request("sclassid"))=cstr(rs("sclassid")) and request("sclassid")<>"" then
sclassn=rs("sclass")
response.write " selected"
end if%> value="<%=CStr(rs("sclassid"))%>" name=sclassid><%=rs("sclass")%></option>
<%
rs.MoveNext
Loop
rs.close
%>
<%else%>
<select name="sclassid" size="1">
<option value="" selected style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
选择栏目</option>
<%end if%>
</select>
歌手:
<%if request("Sclassid")<>"" then%>
<select name="Nclassid" size="1" style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
<option value="" <%if request("Nclassid")="" then%> selected<%end if%>>选择栏目</option>
<%
'if act="edit" then
'sql="select * from Nclass where Nclassid="&Nclassid
'else
sql="select * from Nclass where Sclassid="&request("Sclassid")
'end if
rs.open sql,conn,1,1
Do while not rs.eof
%>
<option<%if cstr(request("Nclassid"))=cstr(rs("Nclassid")) and request("Nclassid")<>"" then
nclassn=rs("Nclass")
response.write " selected"
end if%> value="<%=CStr(rs("Nclassid"))%>" name=Nclassid><%=rs("Nclass")%></option>
<%
rs.MoveNext
Loop
rs.close
%>
<%else%>
<select name="Nclassid" size="1">
<option value="" selected style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
选择栏目</option>
<%end if%>
</select>
专集:
<%if request("Nclassid")<>"" then%>
<select name="specialid" size="1" style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
<option value="" <%if request("Specialid")="" then%> selected<%end if%>>选择栏目</option>
<%
if act="edit" then
sql="select * from Special where Specialid="&request("Specialid")
else
sql="select * from Special where Nclassid="&request("Nclassid")
end if
rs.open sql,conn,1,1
Do while not rs.eof
%>
<option<%if cstr(request("Specialid"))=cstr(rs("Specialid")) and request("Specialid")<>"" then
SpecialName=rs("name")
response.write " selected"
end if%> value="<%=CStr(rs("Specialid"))%>" name=Specialid><%=rs("name")%></option>
<%
rs.MoveNext
Loop
rs.close
%>
<%else%>
<select name="Specialid" size="1">
<option value="" selected style="color:#000000; background-color:#E1F4EE; border-width:1px; border-color:#39867B; border-style:solid;">
选择栏目</option>
<%end if%>
</select>
</td>
</tr>
还有代码,困为太长了,没法发上去
|