songclass.asp

来自「烈火之家整站程序 本程序集商业娱乐一体,本来是给自己用的但是我的国外空间支持不够」· ASP 代码 · 共 204 行

ASP
204
字号
<!--#include file="admin.asp"-->
<!--#include file="conn1.asp"-->
<!--#include file="char.inc"-->
<!-- #include file="../Inc/Head.asp" -->
<%mClass_Id=request("Class_Id")%>

<script language="javascript">
<!--
   function test() {
      return confirm("警告!\n将同时删除该栏目下的所有专辑以及歌曲!是否继续?");
    }
//-->
</script>


<table width="60%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
  <%
set rs=server.createobject("adodb.recordset")
sql="select Class_Name,Class_Id from songClass"
rs.open sql,conn,1,1
if rs.eof then
response.write "<form name=form method=post action=songClasssave.asp?action=add>"&_
          "<tr  align=center> "&_
            "<td colspan=3>一级栏目管理</td>"&_
          "</tr>"&_
          "<tr> "&_
            "<td width=113 align=right nowrap ><font color=#663333>增加栏目:</font></td>"&_
            "<td width=272>"&_
            "  <input type=text name=NewClass_Name size=30>"&_
            "</td>"&_
           " <td width=127 align=center> "&_
           "   <input type=submit name=add value=增 加>"&_
           " </td>"&_
         " </tr>"&_
       " </form>"&_
	   "</table>"&_
	   "</td></tr></table>"
response.end
else
if mClass_Id="" then
mClass_Id=rs("Class_Id")
end if
%>
        <form name="form" method="post" action="songClassSave.asp?action=add">
          <tr  align="center" > 
            <td colspan="3" bgcolor="#F0F0F0">一级栏目管理</td>
          </tr>
          <tr> 
            <td width="113" align="right" nowrap><font color="#663333">增加栏目:</font></td>
            <td width="272"> 
              <input type="text" name="NewClass_Name" size="30">
            </td>
            <td width="127" align="center"> 
              <input type="submit" name="add" value="增 加">
            </td>
          </tr>
        </form>
        <form name="form" method="post" action="songClassSave.asp?action=edit">
          <tr> 
            <td width="113" align="right" nowrap><font color="#663333">修改栏目:</font></td>
            <td width="272"> 
              <input type="text" name="NewClass_Name" size="20">
              <select name="Class_Id">
                <% do while not rs.eof
			   response.write"<option value="&rs("Class_Id")&">"&rs("Class_Name")&"</option>"
			   rs.movenext
			   loop
			  %>
              </select>
            </td>
            <td width="127" align="center"> 
              <input type="submit" name="edit" value="修 改">
            </td>
          </tr>
        </form>
        <%rs.MoveFirst%>
        <form name="form" method="post" action="songClassSave.asp?action=del" onSubmit="return test();">
          <tr bgcolor="#FFE8DF"> 
            <td width="113" align="right" nowrap bgcolor="#FFFFFF"><font color="#663333">删除栏目:</font></td>
            <td width="272" bgcolor="#FFFFFF"> 
              <select name="Class_Id">
                <% do while not rs.eof
			   response.write"<option value="&rs("Class_Id")&">"&rs("Class_Name")&"</option>"
			   rs.movenext
			   loop
			  %>
              </select>
            </td>
            <td width="127" align="center" bgcolor="#FFFFFF"> 
              <input type="submit" name="del" value="删 除">
            </td>
          </tr>
        </form>
      </table>
      <br>
      
<table width="60%" border="0" align="center" cellpadding="1" cellspacing="1"  bgcolor="#FFFFFF">
  <tr> 
          <td colspan="3" align="center" bgcolor="#F0F0F0">二级栏目管理</td>
        </tr>
        <form name="form" method="post" action="songclass2save.asp?action=add&Class_Id=<%=mClass_Id%>">
          <tr> 
            <td align="right"><font color="#663333">选择一级栏目:</font></td>
            <td colspan="2"> 
              <select name="Class_Id" size="1" onChange="window.open('songClass.asp?Class_Id='+this.options[this.selectedIndex].value,'_self')">
                <%
rs.MoveFirst
do while not rs.eof
response.write "<option"
if cstr(request("Class_Id"))=cstr(rs("Class_Id")) and request("Class_Id")<>"" then
mClass_Id=request("Class_Id")
response.write " selected"
end if
response.write" value="&CStr(rs("Class_Id"))&" name=Class_Id>"&rs("Class_Name")&"</option>"
rs.movenext
loop
%>
              </select>
              (请先选择栏目再进行下面的相应操作!) </td> 
          </tr> 
          <%end if 
rs.close%> 
          <tr >  
            <td width="113" align="right" nowrap ><font color="#663333">增加栏目:</font></td> 
            <td width="272">  
              <input type="text" name="NewNClass_Name" size="30"> 
            </td> 
            <td width="127" align="center">  
              <input type="submit" name="add" value="增 加"> 
            </td> 
          </tr> 
        </form> 
        <form name="form" method="post" action="songclass2save.asp?action=edit&Class_Id=<%=mClass_Id%>"> 
          <tr>  
            <td width="113" align="right" nowrap><font color="#663333">修改栏目:</font></td> 
            <td width="272">  
              <input type="text" name="NewNClass_Name" size="20"> 
              <select name="NClass_Id"> 
                <% 
sql="select Nclass_Id,Nclass_Name from songclass2 where Class_Id="&mClass_Id 
rs.open sql,conn,1,1 
if not rs.eof then 
do while not rs.eof 
	 response.write"<option value="&rs("NClass_Id")&">"&rs("NClass_Name")&"</option>" 
rs.movenext 
loop 
%> 
              </select> 
            </td> 
            <td width="127" align="center">  
              <input type="submit" name="edit" value="修 改"> 
            </td> 
          </tr> 
        </form> 
        <%rs.MoveFirst%> 
        <form name="form" method="post" action="songclass2save.asp?action=del&Class_Id=<%=mClass_Id%>" onSubmit="return test();"> 
          <tr>  
            <td width="113" align="right" nowrap><font color="#663333">删除栏目:</font></td> 
            <td width="272">  
              <select name="NClass_Id"> 
                <% 
		do while not rs.eof 
			   response.write"<option value="&rs("NClass_Id")&">"&rs("NClass_Name")&"</option>" 
			   rs.movenext 
		loop 
%> 
              </select> 
            </td> 
            <td width="127" align="center">  
              <input type="submit" name="del" value="删 除"> 
            </td> 
          </tr> 
        </form> 
        <%else 
	response.write"<option>暂无栏目</option>"&_ 
			  "</select>"&_ 
            "</td>"&_ 
            "<td width=127 align=center> "&_ 
             " <input type=submit name=edit value=修 改 disabled>"&_ 
            "</td>"&_ 
          "</tr>"&_ 
        "</form>"&_ 
          "<tr bgcolor=#FFE8DF>"&_ 
            "<td width=113 align=right nowrap><font color=#663333>删除栏目:</font></td>"&_ 
           "<td width=272> "&_ 
              "<select name=NClass_Id>"&_ 
			  "<option>暂无栏目</option>"&_ 
			  "</select>"&_ 
            "</td>"&_ 
            "<td width=127 align=center>"&_ 
              "<input type=submit name=del value=删 除 disabled>"&_ 
            "</td>"&_ 
          "</tr>" 
end if 
rs.close 
set rs=nothing 
conn.close 
set conn=nothing 
%> 
      </table> 
    </td> 
  </tr> 
</table> 
<!-- #include file="../Inc/Foot.asp" -->

⌨️ 快捷键说明

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