songadd0.asp
来自「烈火之家整站程序 本程序集商业娱乐一体,本来是给自己用的但是我的国外空间支持不够」· ASP 代码 · 共 150 行
ASP
150 行
<!--#include file="admin.asp"-->
<!--#include file="conn1.asp"-->
<!-- #include file="../Inc/Head.asp" -->
<body bgcolor="#c0dcff">
<% Specail_id=request("Specail_id")
set rs1=server.createobject("adodb.recordset")
set rs=server.createobject("adodb.recordset")
Sql="select * from songclass"
Rs.open Sql,conn,1,1
Do while not Rs.eof
Class_Name=Rs("Class_Name")
Class_id=Rs("Class_id")
Sql1="select * from songclass2 where class_id="&class_id
Rs1.open Sql1,conn,1,1
Do while not Rs1.eof
Nclass_id=Rs1("Nclass_id")
NClass_Name=Rs1("NClass_name")
if request("Class_Nclass")=Class_id&","&NClass_id then
k=" selected"
else
k=""
end if
Class_Type=Class_Type&"<option "&k&" value="&Class_id&","&NClass_id&">"&Class_Name&"──→"&NClass_Name&"</option>"
Rs1.movenext
loop
Rs1.close
Rs.movenext
loop
Rs.close
if request("Class_Nclass")<>"" then
Class_array=split(request("Class_Nclass"),",")
Sql1="select Special_Id,Special_Name from songSpecial where Class_Id="&Class_array(0)&" and Nclass_Id="&Class_array(1)
Rs1.open Sql1,conn,1,1
Do while not Rs1.eof
Special_id=Rs1("Special_id")
Special_Name=Rs1("Special_name")
if request("Special_id")="&Special_id&" then
k=" selected"
else
k=""
end if
Special_Type=Special_Type&"<option "&k&" value="&Special_id&">"&Special_Name&"</option>"
Rs1.movenext
loop
Rs1.close
end if
%>
<script Language="JavaScript">
function Form_Validator(theForm)
{
if (theForm.Class_Nclass.value == "")
{
alert("请选择所属分类");
theForm.Class_Nclass.focus();
return (false);
}
if (theForm.Special_Id.value == "")
{
alert("专辑必须选择");
theForm.Special_Id.focus();
return (false);
}
if (theForm.Song_Name.value == "")
{
alert("歌曲名称必须填写");
theForm.Song_Name.focus();
return (false);
}
return (true);
}
</script>
</head>
<form method="POST" action="SongSave.asp?action=add&Special_Id="&Special_Id&"" onsubmit="return Form_Validator(this)">
<table width="60%" border="0" cellspacing="1" cellpadding="2" bgcolor="#ffffff" align="center">
<tr>
<td nowrap height="22"> 所属分类:</td>
<td colspan="3" height="22" >
<select name="Class_Nclass" size="1" onChange="window.open('Songadd.asp?Class_Nclass='+Class_Nclass.options[Class_Nclass.selectedIndex].value+'&Special_Id='+Special_Id.options[Special_Id.selectedIndex].value,'_self')">
<option>请选择类别</option>
<%=Class_Type%>
</select>
</td>
</tr>
<tr>
<td>所属专辑:</td>
<td>
<select name="Special_Id" size="1">
<option value="" selected>请选择专辑</option>
<%=Special_Type%> </td></tr>
<tr>
<td>歌曲名字:</td>
<td>
<input type="text" name="Song_Name" size="20" class="smallinput" maxlength="50">
演唱:
<input type="text" name="Song_singer" size="10">
</td>
</tr>
<tr>
<td> 试听地址:</td>
<td colspan="3">
<input type="text" name="Song_rm" size="50">
</td>
</tr>
<tr>
<td>MP3下载:</td>
<td colspan="3">
<input type="text" name="Song_mp3" size="50">
</td>
</tr>
<tr>
<td>MTV地址:</td>
<td colspan="3">
<input type="text" name="Song_mv" size="50">
</td>
</tr>
<tr>
<td>SWF地址:</td>
<td colspan="3">
<input type="text" name="Song_swf" size="50">
</td>
</tr>
<tr>
<td colspan=4 align=center>
<input type="submit" value=" 确 定 ">
</td>
</tr>
</form>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?