songspecialedit.asp
来自「烈火之家整站程序 本程序集商业娱乐一体,本来是给自己用的但是我的国外空间支持不够」· ASP 代码 · 共 175 行
ASP
175 行
<!--#include file="admin.asp"-->
<!--#include file="conn1.asp"-->
<!--#include file="char.inc"-->
<!-- #include file="../Inc/Head.asp" -->
<%
Special_Id=request("Special_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
i=i+1
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"),",")
sql="select Special_Id,special_Name from songspecial where Class_Id="&Class_array(0)&" and Nclass_Id="&Class_array(1)
rs.open sql,conn,1,1
do while not rs.eof
if cint(Special_Id)=cint(rs("Special_Id")) then
k=" selected"
else
k=""
end if
special_Type=special_Type&"<option"&k&" value="&rs("Special_Id")&">"&rs("Special_Name")&"</option>"
rs.movenext
loop
rs.close
end if
sql="select * from songSpecial where Special_Id="&Special_Id
rs.open sql,conn,1,1
if not rs.eof then
Special_Order=rs("Special_Order")
if len(rs("image"))>0 then
picsrc=rs("image")
else
picsrc="../images/blank.gif"
end if
%>
<script Language="JavaScript">
function Form_Validator(theForm)
{
if (theForm.Class_Nclass.value == "")
{
alert("请选择所属分类");
theForm.Class_Nclass.focus();
return (false);
}
if (theForm.Special_name.value == "")
{
alert("专辑名不能为空");
theForm.Special_name.focus();
return (false);
}
if (theForm.Special_Order.value == "")
{
alert("请选择专辑索引");
theForm.Special_Order.focus();
return (false);
}
return (true);
}
</script>
<form name="Special_add" method="post" action="songSpecialsave.asp?action=edit&Special_Id=<%=Special_Id%>" onsubmit="return Form_Validator(this)">
<table width="60%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff">
<tr>
<td width="100">所属分类:</td>
<td >
<select name="Class_Nclass" size="1">
<option value="">请选择专辑分类</option>
<%=Class_Type%>
</select>
</td>
<td rowspan=6><img src="<%=picsrc%>" border="0" width="150" height="150" ></td>
</tr>
<tr>
<td >专辑名称:</td>
<td >
<input type="text" name="Special_name" size="30" maxlength="50" value="<%=rs("Special_name")%>">
</td>
</tr>
<tr>
<td >专辑索引:</td>
<td >
<select size="1" name="Special_Order">
<option value="A"<%if Special_Order="A" then response.write " selected"%>>A</option>
<option value="B"<%if Special_Order="B" then response.write " selected"%>>B</option>
<option value="C"<%if Special_Order="C" then response.write " selected"%>>C</option>
<option value="D"<%if Special_Order="D" then response.write " selected"%>>D</option>
<option value="E"<%if Special_Order="E" then response.write " selected"%>>E</option>
<option value="F"<%if Special_Order="F" then response.write " selected"%>>F</option>
<option value="G"<%if Special_Order="G" then response.write " selected"%>>G</option>
<option value="H"<%if Special_Order="H" then response.write " selected"%>>H</option>
<option value="I"<%if Special_Order="I" then response.write " selected"%>>I</option>
<option value="J"<%if Special_Order="J" then response.write " selected"%>>J</option>
<option value="K"<%if Special_Order="K" then response.write " selected"%>>K</option>
<option value="L"<%if Special_Order="L" then response.write " selected"%>>L</option>
<option value="M"<%if Special_Order="M" then response.write " selected"%>>M</option>
<option value="N"<%if Special_Order="N" then response.write " selected"%>>N</option>
<option value="O"<%if Special_Order="O" then response.write " selected"%>>O</option>
<option value="P"<%if Special_Order="P" then response.write " selected"%>>P</option>
<option value="Q"<%if Special_Order="Q" then response.write " selected"%>>Q</option>
<option value="R"<%if Special_Order="R" then response.write " selected"%>>R</option>
<option value="S"<%if Special_Order="S" then response.write " selected"%>>S</option>
<option value="T"<%if Special_Order="T" then response.write " selected"%>>T</option>
<option value="U"<%if Special_Order="U" then response.write " selected"%>>U</option>
<option value="V"<%if Special_Order="V" then response.write " selected"%>>V</option>
<option value="W"<%if Special_Order="W" then response.write " selected"%>>W</option>
<option value="X"<%if Special_Order="X" then response.write " selected"%>>X</option>
<option value="Y"<%if Special_Order="Y" then response.write " selected"%>>Y</option>
<option value="Z"<%if Special_Order="Z" then response.write " selected"%>>Z</option>
</select>
</td>
</tr>
<tr>
<td >封套图片:</td>
<td >
<input type="text" name="Special_image" size="30" maxlength="255" value="<%=rs("image")%>">
</td>
</tr>
<tr>
<td >出品公司:</td>
<td >
<input type="text" name="Special_Company" size="30" maxlength="50" value="<%=rs("Company")%>">
</td>
</tr>
<tr>
<td >出品日期:</td>
<td >
<input type="text" name="Special_time" size="30" maxlength="50" value="<%=rs("time")%>">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Submit" value="提·交">
</td>
</tr>
</table>
</form>
<%end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Inc/Foot.asp" -->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?