<%@language=vbscript codepage=936 %>
<%path="../basedata"%>
<!--#include file="../inc/function.asp"-->
<%call Loginpower%>
<%call legalpower%>
<!--#include file="../conn/conn_data.asp"-->
<!--#include file="../conn/conn_link.asp"-->
<%
dim id
id=Request.QueryString("id")
if not idboolean(id) then response.write errorback("有错，请返回刷新页面后再操作！！"):response.end
dim sql1,rs1
	sql1="select * from songs where songs_id="&cint(id)
set rs1=server.createobject("adodb.recordset")
	rs1.open sql1,conn_data,1,1
	if rs1.eof and rs1.bof then response.write errorback("有错，请返回刷新页面后再操作！！"):response.end
%>
<!-- #include file="../Inc/Head.asp" -->
<script type="text/javascript" language="javascript">
function givevalue(){document.getElementById("ClassName").value=document.getElementById("Class_id").options[document.getElementById("Class_id").selectedIndex].text;}
</script>
<script type="text/javascript" language="javascript" src="../js/Songscheck.js"></script>
<br><br><br><br>
<div style="text-align:center;">
     <table border="1" bordercolor="#A5B6D6" class="center" cellpadding="0" cellspacing="2">
   <tr style="text-align:left;">
    <td height="25px" colspan="4" style="text-align:center;" class="southidc">增加歌曲</td>
  </tr>
    <tr style="text-align:left;">
  <form name="Form1" method="post" action="Songs_modify_Save.asp?id=<%=id%>" onsubmit="return submitok()">
      <td width="80px">歌曲+歌手：</td>
    <td width="150px">
			<input type="text" value="<%=rs1("songs_label")%>" name="song_label" size="20"><span style="color: #ff0000">*</span>
   </td>
    <td width="80px" height="20px"> 所属栏目： </td>
    <td width="150px">
			<select id="Class_id" name="Class_id" onChange="givevalue()">

			<option value="" selected>选择栏目</option>
        	<%
        	set rs=server.createobject("adodb.recordset")
        	sql="select * from Class"
			rs.open sql,conn_data,1,1
			if not rs.eof and not rs.bof then
			do while not rs.eof
			if rs.eof then exit do
            %>
			<option value="<%=rs("Class_ID")%>" <%if rs1("songs_class_id")=rs("Class_ID") then%>selected<%end if%>><%=rs("Class_Name")%></option>
			<%
			rs.movenext
			loop
			end if
			rs.close
			set rs=nothing
			%>
			</select><span style="color: #ff0000">*</span>
			<input type="hidden" value="<%=rs1("songs_class_name")%>" id="ClassName" name="ClassName" size="10">
  </td>

  </tr>
   <tr style="text-align:left;">
    <td height="20px">歌曲类型：</td>
    <td>
      <select name="song_type">
      <option value="0" <%if rs1("songs_type")=0 then%>selected<%end if%>>auto</option>
      <option value="1" <%if rs1("songs_type")=1 then%>selected<%end if%>>MP3</option>
      <option value="2" <%if rs1("songs_type")=2 then%>selected<%end if%>>FLV</option>
      <option value="3" <%if rs1("songs_type")=3 then%>selected<%end if%>>WMP</option>
      <option value="4" <%if rs1("songs_type")=4 then%>selected<%end if%>>FMP4</option>
      </select>
     </td>
    <td>用户：</td>
    <td>
      <input type="text" name="song_user" value="<%=rs1("songs_user")%>" size="15" readonly=true><span style="color: #ff0000">*</span>
   </td>
  </tr>
   <tr style="text-align:left;">
     <td height="20px">远程地址1：</td>
    <td>
	<select name="song_url_type1" style="wihth:100px;">
	<option value="0">网络歌曲</option>
	<%

	set rs=server.createobject("adodb.recordset")
	sql="select * from URL"
	rs.open sql,conn_link,1,1
	if not rs.eof and not rs.bof then
	do while not rs.eof
	if rs.eof then exit do
		if cint(rs("url_id"))=cint(rs1("songs_url_type1")) then
		response.write "<option value="&rs("url_id")&" selected>"&rs("url_alias")&"</option>"
		else
		response.write "<option value="&rs("url_id")&">"&rs("url_alias")&"</option>"
		end if
	rs.movenext
	loop
	end if
	rs.close
	set rs=nothing
	%>
	</select><span style="color: #ff0000">*</span>
    </td>
     <td height="20px">远程地址2：</td>
    <td>
	<select name="song_url_type2" style="wihth:100px;">
	<option value="0">网络歌曲</option>
	<%

	set rs=server.createobject("adodb.recordset")
	sql="select * from URL"
	rs.open sql,conn_link,1,1
	if not rs.eof and not rs.bof then
	do while not rs.eof
	if rs.eof then exit do
		if cint(rs("url_id"))=cint(rs1("songs_url_type2")) then
		response.write "<option value="&rs("url_id")&" selected>"&rs("url_alias")&"</option>"
		else
		response.write "<option value="&rs("url_id")&">"&rs("url_alias")&"</option>"
		end if
	rs.movenext
	loop
	end if
	rs.close
	set rs=nothing
	conn_link.close
	set conn_link=nothing
	%>
	</select><span style="color: #ff0000">*</span>
    </td>
  </tr>
   <tr style="text-align:left;">
    <td height="20" height="30px">音乐地址1：</td>
    <td colspan="3" style="padding:0 0;">
    <input name="song_src" id="song_src" type="text" size="60" value="<%=rs1("songs_src")%>" /><span style="color: #ff0000">*</span>
    </td>
  </tr>
   <tr style="text-align:left;">
    <td height="20" height="30px">音乐地址2：</td>
    <td colspan="3" style="padding:0 0;">
    <input name="song_bak" id="song_bak" type="text" size="60" value="<%=rs1("songs_bak")%>" /><span style="color: #ff0000">*</span>
    </td>
  </tr>
   <tr style="text-align:left;">
    <td height="200px">歌词<span style="color: #ff0000">*</span>：</td>
    <td colspan="3">
      <textarea name="song_lrc" rows="13" style="width:99%;margin:0 0;border:#EF58FF 1px dotted;overflow:auto;background-color:#000000;color:#ffffff;"><%=rs1("songs_lrc")%></textarea>
    </td>
  </tr>
     <tr>
    <td colspan="4" height="25px">
      <input type="submit" name="Submit" value="提交">
    </td>
    </form>
    </tr>
</table>
</div>
<%
rs1.close
set rs1=nothing
conn_data.close
set conn_data=nothing
%>
<!-- #include file="../Inc/Foot.asp" -->
