⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 man_sub_class.asp

📁 党委网站 党委网站党委网站党委网站党委网站党委网站
💻 ASP
字号:
<%
if session("username")="" or session("usertype")="" then
response.Write"<script>"
response.Write"parent.location.href='default.asp';"
response.Write"</script>"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("act")="add" then
set rsd=server.CreateObject("adodb.recordset")
dsql="select * from net_sml_class order by id desc"
rsd.open dsql,conn,3,2
rsd.addnew
rsd("title")=request("smlname")
rsd("tobig")=request("tobig")
rsd("urlfile")=request("urlfile")
rsd("type")=request("totype")
rsd.update
rsd.close
response.Redirect("man_sub_class.asp")
response.End()
end if
%>
<%
if request("act")="edit" then
set rst=server.CreateObject("adodb.recordset")
strsql="select * from net_sml_class where id="&request("id")&""
rst.open strsql,conn,3,2
rst("title")=request("title")
rst("tobig")=request("bigname")
rst("urlfile")=request("urlfile")
rst("type")=request("typename")
rst.update
rst.close
response.Redirect("man_sub_class.asp")
response.End()
end if
%>
<%
if request("act")="del" then
conn.execute "delete * from net_sml_class where id="&request("id")&""
response.Redirect("man_sub_class.asp")
response.End()
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>类别管理</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<TABLE cellSpacing=0 cellPadding=0 width=99% align=center border=0>
  <TR> 
    <TD height="25" style="HEIGHT: 16px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="77%"><SPAN class=heading>查看小类内容</SPAN> </td>
        </tr>
      </table></TD>
  </TR>
  <TR> 
    <TD height=12 colSpan=2><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td bgcolor="#CCCCCC" height="1"></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></TD>
  </TR>
  <TR> 
    <TD height="140" colSpan=2 vAlign=top> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td> <table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr> 
                <td height="52" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td height="25"><font color="#0066CC">*</font>管理小类</td>
                          </tr>
                          <tr> 
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td bgcolor="#CCCCCC"> <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                      <%
							  set rs=server.CreateObject("adodb.recordset")
			                  sql="select * from net_sml_class order by id asc"
                              rs.open sql,conn,1,1
							  if rs.eof then
							  response.Write("<tr>")
							  response.Write("</td>")
							  response.Write("<div align='center'>没有内容!</div>")
							  response.Write("</td>")
							  response.Write("</tr>")
							  rs.close
							  else
							  i=1
							  do while not rs.eof
							  
				    		  %>
                                      <form action="man_sub_class.asp?act=edit&id=<%=rs("id")%>" name="post<%=i%>" id="post<%=i%>" method="post">
                                        <tr> 
                                          <td width="11%" height="25" bgcolor="#FFFFFF"> 
                                            <div align="center">小类(<font color="#FF0000"><%=rs("id")%></font>):</div></td>
                                          <td width="10%" bgcolor="#FFFFFF"> <div align="center"> 
                                              <input name="title" type="text"  class="input_main" value="<%=rs("title")%>" size="10">
                                            </div></td>
                                          <td width="8%" bgcolor="#FFFFFF"> <div align="center">大类:</div></td>
                                          <td width="15%" bgcolor="#FFFFFF"> 
                                            <div align="center"> 
                                              <select name="bigname"  style="clip:rect(1 84 19 1);magin:-2;width:90;backgroud:#fffff9">
                                                <%
											  set rsb=server.CreateObject("adodb.recordset")
			                                  bsql="select * from net_big_class order by id desc"
                                              rsb.open bsql,conn,1,1
											  if rsb.eof then
											  rsb.close
											  %>
                                                <option value="1" selected>没有大类</option>
                                                <%
											  else
											  do while not rsb.eof
											  %>
                                                <option value="<%=rsb("id")%>" <%if rsb("id")=rs("tobig") then%>selected<%end if%>><%= rsb("title")%></option>
                                                <%
											  rsb.movenext
											  if rsb.eof then exit do
											  loop
											  end if
											  %>
                                              </select>
                                            </div></td>
                                          <td width="8%" align="center" bgcolor="#FFFFFF">类型:</td>
                                          <td width="6%" bgcolor="#FFFFFF"><select name="typename" id="typename">
                                              <option value="1" <%if rs("type")=1 then%>selected<%end if%>>信息</option>
                                              <option value="2" <%if rs("type")=2 then%>selected<%end if%>>下载</option>
                                            </select>
                                          </td>
                                          <td width="8%" bgcolor="#FFFFFF"> 
                                            <div align="center">脚本:</div></td>
                                          <td width="10%" bgcolor="#FFFFFF"> <div align="center"> 
                                              <input name="urlfile" type="text" class="input_main" id="urlfile" size="15" value="<%=rs("urlfile")%>">
                                            </div></td>
                                          <td width="16%" bgcolor="#FFFFFF"> 
                                            <div align="center"> 
                                              <input name="edit" type="submit"  class="sub" id="edit" value="修改">
                                              <input name="del" type="button" id="del" value="删除" class="sub" onClick="javascript:window.location.href='man_sub_class.asp?id=<%=rs("id")%>&act=del';">
                                            </div></td>
                                        </tr>
                                      </form>
                                      <%
							i=i+1
							rs.movenext
							if rs.eof then exit do
							loop
							rs.close
							end if
							%>
                                    </table></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td height="25" align="left" valign="top"> <div align="left"><font color="#0066CC"> 
                          </font> 
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td><div align="center"> 
                                  <table width="100%" border="0" cellspacing="2" cellpadding="2">
                                    <tr> 
                                      <td><div align="center"> 
                                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr> 
                                              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                  <tr> 
                                                    <td><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
                                                        <tr> 
                                                          <td bgcolor="#CCCCCC" height="1"></td>
                                                        </tr>
                                                      </table></td>
                                                  </tr>
                                                </table></td>
                                            </tr>
                                          </table>
                                        </div></td>
                                    </tr>
                                  </table>
                                </div></td>
                            </tr>
                            <tr> 
                              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td height="25"><font color="#0066CC">*</font>添加小类</td>
                                  </tr>
                                  <tr> 
                                    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr> 
                                          <td bgcolor="#CCCCCC"><table width="100%" border="0" cellpadding="0" cellspacing="1">
                                              <form name="addclass" id="addclass" method="post" action="man_sub_class.asp?act=add">
                                                <tr> 
                                                  <td width="11%" bgcolor="#FFFFFF"> 
                                                    <div align="center">小类:</div></td>
                                                  <td width="10%" bgcolor="#FFFFFF"> 
                                                    <div align="center"> 
                                                      <input name="smlname" type="text" class="input_main" id="smlname" size="10">
                                                    </div></td>
                                                  <td width="8%" bgcolor="#FFFFFF"> 
                                                    <div align="center">大类:</div></td>
                                                  <td width="15%" bgcolor="#FFFFFF"> 
                                                    <div align="center"> 
                                                      <select name="tobig" style="clip:rect(1 84 19 1);magin:-2;width:90;backgroud:#fffff9">
                                                        <%
											  set rsd=server.CreateObject("adodb.recordset")
			                                  dsql="select * from net_big_class order by id desc"
                                              rsd.open dsql,conn,1,1
											  if rsd.eof then
											  rsd.close
											  %>
                                                        <option selected>没有大类</option>
                                                        <%
											  else
											  %>
                                                        <option selected>请选择</option>
                                                        <%
											  do while not rsd.eof
											  %>
                                                        <option value="<%=rsd("id")%>" ><%= rsd("title")%></option>
                                                        <%
											  rsd.movenext
											  if rsd.eof then exit do
											  loop
											  end if
											  %>
                                                      </select>
                                                    </div></td>
                                                  <td width="8%" align="center" bgcolor="#FFFFFF">类型:</td>
                                                  <td width="6%" bgcolor="#FFFFFF"><select name="totype" id="totype">
                                                      <option value="1" selected>信息</option>
                                                      <option value="2">下载</option>
                                                    </select></td>
                                                  <td width="8%" bgcolor="#FFFFFF"> 
                                                    <div align="center">脚本:</div></td>
                                                  <td width="10%" bgcolor="#FFFFFF"> 
                                                    <div align="center"> 
                                                      <input name="urlfile" type="text" class="input_main" id="urlfile" size="15">
                                                    </div></td>
                                                  <td width="16%" bgcolor="#FFFFFF"> 
                                                    <div align="center"> 
                                                      <input type="submit" name="Submit" value="提交" class="sub" onClick="return subclick();">
                                                    </div></td>
                                                </tr>
                                              </form>
                                            </table></td>
                                        </tr>
                                      </table></td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                        </div></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></TD>
  </TR>
</TABLE>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--

 function subclick()
 {
  if (addclass.smlname.value =="")
  {
    alert("类型名称不能为空!");
    addclass.smlname.focus();
    return (false);
	}
 if (addclass.tobig.options[addclass.tobig.selectedIndex].value<1 )
 {
  alert("!!请选择大类");
  addclass.tobig.focus();
 return (false);
}

 }
//-->
</SCRIPT>


⌨️ 快捷键说明

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