⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 music.asp

📁 Etp Flash 留言板西乡香草天空美化版
💻 ASP
字号:
<!--#include file="conn.asp" -->
<%

mode=request("mode")
if mode="flash" then
  read()
end if
if session("admin")<>"true" then
   response.write "你还未登陆管理,请在留言板上登陆管理!!!"
   response.end
end if

select case mode
    case "add"
        add()
    case "del"
        del()
    case "save"
        save()
end select	


sub read()
set rs=server.CreateObject("adodb.recordset")
sql="select * from music"
rs.open sql,conn,1,1
i=1
do while(not rs.eof)
		music=rs("music")
		url=rs("url")
		out=out&"&musicname"&i&"="&music&"&music"&i&"="&url		
		rs.movenext
		i=i+1
loop
rs.close
set rs=nothing
out="&num="&i-1&out
message("yes"+out)
end sub

sub save()
	id=request.Form("id")
	music=request.form("music")
	url=request.Form("url")

	if id="" then
		sql="insert into music (music,url) values ('"&music&"','"&url&"')"
		conn.Execute(sql)		
	else
		conn.Execute"Update music set music='"&music&"',url='"&url&"' where id="&id
	end if
end sub

function del()
	id=request("id")
	sql="delete from music where id="&id
	conn.execute(sql)
end function

set rs=server.CreateObject("adodb.recordset")
sql="select * from music"
rs.open sql,conn,1,1
i=1
%>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	table-layout:fixed;
	word-wrap:break-word;
	word-break:break-all;
}
.unnamed1 {
	border: thin solid #B9AA93;
}
input,td {
	border-bottom-width: 1px;
	border-bottom-style: dashed;
	border-bottom-color: #CFC6B8;
	height: 16px;
	border-top-style: none;
	border-right-style: none;
	border-left-style: none;
}
.unnamed2 {
	background-color: #B9AA93;
	border: 1px solid #CFC6B8;
}
a:link {
	color: #7C6856;
}
a:visited {
	color: #7C6856;
}
a:active {
	color: #B9AA93;
}
-->
</style>
<title>EtpFlash播放器列表管理 </title><table width="323"  border="0" align="center" cellpadding="0" cellspacing="0" class="unnamed1">
  <tr>
    <td width="319" height="174" valign="middle" bgcolor="#CFC6B8"><span class="body"> &nbsp;●
        EtpFlash播放器列表管理 </span></td>
  </tr>
  <tr><form name="form1" id="form1" method="post" action="music.asp?mode=save">
    <td height="78" valign="top">
      &nbsp;歌曲
      <input name="music" type="text" class="unnamed2" id="music" size="21">
&nbsp;&nbsp;      
&nbsp;&nbsp;&nbsp;
<input name="Submit" id="an" type="submit" class="unnamed2" value="保存">
      <input name="id" type="hidden" id="id">
      <br>
      &nbsp;地址
      <input name="url" type="text" class="unnamed2" id="url" size="35">      </td></form>
  </tr>
  <tr>
    <td valign="top">
<%if rs.eof then%>
	没有音乐!
<%else%>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
    <tr valign="middle" bgcolor=#CFC6B8>
      <td height="16" align="center">序号</td>
      <td>曲名</td>
      <td align="center">管理</td>
    </tr>
<%
i=1
do while(not rs.eof)
	music=rs("music")
	url=rs("url")
	id=rs("id")
%>	
    <tr>
        <td width="38" align="center"><%= i %></td>
        <td width="201"><a target=_blank href="<%=url %>"><%= music %></a></td>
		<td width="80" align="center"><a href="JavaScript:edit('<%= music %>','<%= url %>',<%= id %>)">编辑</a> <a href="music.asp?mode=del&id=<%=id%>">删除</a></td>
    </tr>
<% 
i=i+1
rs.movenext
loop
end if
%>
    </table>	</td>
  </tr>
</table>
<script language="JavaScript">
<!--
function edit(music,url,id)
	{
	document.form1.music.value=music;
	document.form1.url.value=url;
	document.form1.id.value=id;
	document.form1.an.value="修改";
	}
//-->
</script>
<br>
<table width="323"  border="0" align="center" cellpadding="0" cellspacing="0" class="unnamed1">
  <tr>
    <td width="319" height="35" bgcolor="#CFC6B8"><span class="body"> &nbsp;●
        版权所有</span></td>
  </tr>
  <tr>
    <td height="20" bgcolor="#FFFFFF"><p><strong>&nbsp;Etp工作室-Etp21</strong><br>
        &nbsp;<a href="http://www.etp21.com">http://www.etp21.com</a><br>
      &nbsp;E-mail:<a href="mailto:Etp21@163.com">Etp21@163.com</a><br>
      &nbsp;QQ:69483
    </p>      </td>
  </tr>
</table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -