📄 addmusic.asp
字号:
<HTML><HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
set conn=server.createobject("ADODB.Connection")
filepath=server.mappath("db.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & filepath
if Request("name")="" then
Set RS = SERVER.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM music where id="&CInt(Request("id"))
RS.Open strSQL,conn,1,1
name=RS("name")
RS.close
Set RS=nothing
else
name=Request("name")
end if
if Request.ServerVariables("Request_Method")="POST" then
name=trim(request.Form("name"))
song=trim(Request.Form("song"))
url=trim(Request.Form("url"))
Set RS1 = SERVER.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM music where name='" & name & "' and song='"& song & "'"
RS1.Open strSQL,conn,1,1
if RS1.EOF or RS1.BOF then
sql = "Insert Into music (name,song,url) Values('"& name & "', '" & song & "', '"& url &"')"
conn.Execute sql
else
response.write ("<center><table><tr><td>该歌曲已经存在</td></tr></table></center>")
end if
RS1.close
Set RS1=nothing
conn.close
Set conn=nothing
end if
%>
<title>千千阙歌:http://MMP3.KU.NET</title>
</HEAD>
<BODY leftMargin=0 topMargin=0 link="#000000">
<br>
<center>
<form method="POST">
<table border="0" width="400" cellpadding="0" cellspacing="0">
<tr>
<td>歌手名</td>
<td width="300">
<input type="text" name="name" size="40" value="<%=name%>"></td>
</tr>
<tr>
<td>歌曲名</td>
<td>
<input type="text" name="song" size="40"></td>
</tr>
<tr>
<td>歌曲地址</td>
<td><input type="text" name="url" size="40"></td>
</tr>
<tr>
<td><a href="http://mp3.baidu.com/m?tn=baidump3&ct=134217728&rn=&word=<%=name%>&lm=0" target="baidu">[MP3地址]</a> </td>
<td><input type="submit" name="Submit1" value="提交"> <input type="reset" name="Submit2" value="重 置"> </td>
</tr>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -