<%
'------------------------
'编辑歌曲
'------------------------
sub editnews
if request("edit")<>"yes" and Request("id")<>"" then
dim sql
dim id
id=Request("id")
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from HN_down where id="&id
rs.open sql,conn,1,1
%>
<table width="650" height="278" border="0" align="center" cellpadding="3" cellspacing="1" class="a2" >
<tr>
<td height="29" align="center" valign="middle" class="a1">歌曲<span class="style1">编辑</span></td>
</tr>
<tr>
<td width="100%" height="237">
<table width="100%" height="267" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e4e4e4" class="a2">
<form method="POST" name="add" action="?work=editnews&id=<%=id%>">
<tr class="a3">
<td width="13%" height="31" align="center">文件标题</td>
<td height="31">
<input type="text" name="title" size="50" value="<%=rs("title")%>">
* </td>
</tr>
<input type="hidden" name="auth" size="50" value="<%=rs("auth")%>">
<tr class="a3">
<td width="13%" height="27" align="center">文件地址</td>
<td height="27">
<input type="text" name="come" size="50" value="<%=rs("come")%>">
*</td>
</tr>
<tr class="a3">
<td width="13%" height="27" align="center">文件类别</td>
<td height="27">
<%
set rss=server.createobject("adodb.recordset")
sql="select * from HN_downcla where MidCls='' or Clid=0 order by descs ASC"
rss.open sql,conn,1,1
%>
<select name="clas">
<%do while not rss.eof%>
<option value="<%=rss("id")%>" <%if rs("class")=rss("id") then %>selected<%end if%>><%=rss("class")%></option>
<%
set rs1=server.createobject("adodb.recordset")
sql="select * from HN_downcla where MidCls<>'' and Clid="&rss("id")
rs1.open sql,conn,1,1
do while Not rs1.eof
%>
<option value="<%=rs1("id")%>" <%if rs("class")=rs1("id") then %>selected<%end if%>>├<%=rs1("MidCls")%></option>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
<%
rss.movenext
loop
rss.close
set rss=nothing%>
</select></td>
</tr>
<tr class="a3">
<td width="11%" height="25" align="center">服务器地址</td>
<td height="25">
<select name="song_path" size="1">
<option value="1"<%if song_path=1 Then response.write(" selected") End If%>>根路径(一)</option>
<option value="2"<%if song_path=2 Then response.write(" selected") End If%> >根路径(二)</option>
<option value="3"<%if song_path=3 Then response.write(" selected") End If%> >根路径(三)</option>
<option value="4"<%if song_path=4 Then response.write(" selected") End If%> >根路径(四)</option>
<option value="5"<%if song_path=5 Then response.write(" selected") End If%> >根路径(五)</option>
</select>
</td></tr>
<tr class="a3">
<td height="31" align="center">是否显示</td>
<td height="31"><input name="kinds" type="checkbox" value="yes" <%if rs("kinds") then%> checked <%end if%>></td>
</tr>
<tr class="a3">
<td colspan="2" align="center" valign="middle">
<INPUT TYPE="hidden" name="edit" value="yes">
<input type="submit" value="确定修改"> <input type="button" name="Submit" onclick=history.go(-1) value="返回">
</td>
</tr></form>
</table>
</td>
</tr>
</table>
</center>
</div>
<%rs.close
set rs=nothing
else
id=Request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from HN_down where id="&id
rs.open sql,conn,3,3
title=request("title")
auth=request("auth")
come=request("come")
song_path=request("song_path")
clas=request("clas")
kinds=request("kinds")
rs("title")=title
rs("auth")=auth
rs("come")=come
rs("song_path")=song_path
rs("class")=clas '更新歌曲类别
IF kinds="yes" Then
RS("kinds")=true
Else
RS("kinds")=false
End IF
rs.update
rs.close
set rs=nothing
Response.Write "<br>更新成功!<meta http-equiv=refresh content=""1;URL=?work=palynews&cla="&clas&""">"
end if
end sub
%>
---------------------------------------------------------------------------------------------------------
<select name="song_path" size="1">
<option value="1"<%if song_path=1 Then response.write(" selected") End If%>>根路径(一)</option>
<option value="2"<%if song_path=2 Then response.write(" selected") End If%> >根路径(二)</option>
<option value="3"<%if song_path=3 Then response.write(" selected") End If%> >根路径(三)</option>
<option value="4"<%if song_path=4 Then response.write(" selected") End If%> >根路径(四)</option>
<option value="5"<%if song_path=5 Then response.write(" selected") End If%> >根路径(五)</option>
</select>
这段代码为什么实现不了,但可以选择里面的东西.不知道大家看不能得懂,我想要说的,因为菜所以不能用专业的语来表达.知道的请告诉一下小弟,小弟在此谢过了!!可以通过QQ:79711219 或者邮件告诉我
直接回帖都行啊!!!!!!!!!!!!!
谁告诉我,我就管谁叫爷了....
[此贴子已经被作者于2007-8-23 0:47:00编辑过]