📄 musicadd.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="cook.asp"-->
<!--#include file="info.asp"-->
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.title.value=="")
{
alert("请输入音乐名称!")
document.form1.title.focus()
return false
}
else if(document.form1.author.value=="")
{
alert("请输入歌手大名!")
document.form1.author.focus()
return false
}
else if(document.form1.mcurl.value=="")
{
alert("请输入音乐地址!")
document.form1.mcurl.focus()
return false
}
}
-->
</script>
<%
if request.Form("sub")="sub" then
title=request.Form("title")
author=request.Form("author")
mcsize=request.Form("mcsize")
mcurl=request.Form("mcurl")
if title="" or author="" or mcurl="" then
response.Write"<script>alert('音乐内容不能为空!');history.go(-1)</script>"
response.End()
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from music"
rs.open sql,conn,3,3
rs.addnew
rs("title")=title
rs("author")=author
rs("mcsize")=mcsize
rs("mcurl")=mcurl
rs.update
response.Write"<script>alert('音乐添加成功!');window.location.href('music.asp')</script>"
response.End()
end if
end if
call htmltop
%>
<table width="700" height="400" border="0" align="center" cellpadding="0" cellspacing="0" class="TdStyle">
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF"><br>
<table width="600" border="0" cellpadding="5" cellspacing="1" bgcolor="#C0C0C0">
<form name="form1" method="post" action="musicadd.asp" onsubmit="return form1_onsubmit()">
<tr align="center" bgcolor="#E3E3E3">
<td height="30" colspan="2"><B>添 加 音 乐</B></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100" height="25" align="right">音乐名称:</td>
<td width="500"><input name="title" type="text" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">歌手大名:</td>
<td><input name="author" type="text" size="16"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">音乐大小:</td>
<td><input name="mcsize" type="text" size="12" readonly></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">音乐地址:</td>
<td><input name="mcurl" type="text" size="40" readonly><input type="button" name="Submit2" value="上传音乐" onClick="window.open('../upmcload.asp','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
</tr>
<tr align="center" bgcolor="#E3E3E3">
<td height="30" colspan="2">
<input type="submit" name="Submit" value=" 提交 ">
<input type="hidden" name="sub" value="sub">
<input type="reset" name="Submit2" value=" 重置 "></td>
</tr>
</form>
</table><br>
</td>
</tr>
</table>
<%
call htmlend
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -