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

📄 sk_class.asp

📁 清风信息自动采集生成系统 很好用的大家试试看
💻 ASP
字号:
<%
option explicit
response.buffer=true
%>
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/cj_cls.asp"-->
<%
'----是否登陆---------------------
Call Skcj.Admin()
If Skcj.IsAdmin=False Then
	response.Redirect("sk_login.asp")
	response.End()
End If
'-------------------------------------
Dim Rs,Sql,action
dim ChannelID,channelname,channelshortname,id,i,ParentID,depth,classID,Colleclx,href
Colleclx=request("Colleclx")
if Colleclx="" then Colleclx=0
Dim CjName : CjName=Skcj.GetItemConfig("CjName",Colleclx)
Call Skcj.Show_Top()
%>
<html>
<head>
<title>采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/Admin_Style.css">
<style type="text/css">
.ButtonList {
	BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #ffffff 2px solid; BORDER-LEFT: #ffffff 2px solid; CURSOR: default; BORDER-BOTTOM: #999999 2px solid; BACKGROUND-COLOR: #e6e6e6
}
</style>
<SCRIPT language=javascript>
    function unselectall(thisform){
        if(thisform.chkAll.checked){
            thisform.chkAll.checked = thisform.chkAll.checked&0;
        }   
    }
    function CheckAll(thisform){
        for (var i=0;i<thisform.elements.length-6;i++){
            var e = thisform.elements[i];
            if (e.Name !="chkAll"&&e.disabled!=true)
                e.checked = thisform.chkAll.checked;
        }
    }
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr class="tdbg"> 
    <td width="65" height="30"><strong>管理导航:</strong></td>
    <td height="30"><a href="sk_class.asp?action=add&Colleclx=<%=Colleclx%>">添加新主栏目</a></td>
  </tr>
</table>
<% 
action =request("action")
select case action
case "del"
		classID=request("classID")
	if classid <> "" then
		sql = "delete from SK_Class where classID=" & classID 
		ConnItem.execute(sql)
		response.redirect("sk_class.asp?Colleclx="&Colleclx)
		response.end
	end if	
case "edit"
	if request("edit_ok")<>"" and request("edit_ok")<>0 then
		ErrMsg=SK_Class_Channel_edit(request.form("className"),request.form("ParentPath"),request.form("classID"))
		call edit()
	else
		call edit()
	end if
case "add"
	if request("add_ok")<>"" and request("add_ok")<>0 then
		ErrMsg=SK_Class_Channel_add(request.form("className"),request.form("ParentPath"))
		call add()
	else
		call add()
	end if
case "classadd"
	if request("classadd_ok")<>"" and request("classadd_ok")<>0 then
		ErrMsg=SK_Class_small_add(request.form("className"),request.form("ParentPath"),Trim(Request.Form("ParentID")))
		call classadd()
	else
		call classadd()
	end if
case else
	call main()
end select

sub main()
 %>

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
    <tr> 
      <th height="22" colspan="2" class="title"> <div align="center"><b><% =ErrMsg_lx %>分类&nbsp;管&nbsp;理</b></div></th>
    </tr>
    <tr>
      <td height="22" colspan="2" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
        <TR>
          <TD width="20%" height=22  align=center bgcolor="#CAD7F7"> 编号
            </DIV></TD>
          <TD width="30%" height=22  align=center bgcolor="#CAD7F7"> 栏目分类名称</TD>
          <TD width="40%" height=22  align=center bgcolor="#CAD7F7">管理选项</TD>
          <TD width="10%" height=22  align=center bgcolor="#CAD7F7"> 操作</TD>
        </TR>
        <%
		
IF Colleclx = 0 then
	Call CloseConnItem
	Response.end
Else
	Sql="select * from SK_class where ChannelID="& Colleclx &" order by OrderID" 	
End if
set Rs=server.createobject("adodb.recordset")         
Rs.open Sql,ConnItem,1,1
do while not rs.eof
%>
        <TR class="tdbg">
          <TD width="20%" height=22  align=center bgcolor="#F2F2F2" class=tdbg><%=rs("classID")%>
          </DIV></TD>
          <TD width="30%" height=22  align=left bgcolor="#F2F2F2" class=tdbg>
		    <%
		  If Rs("depth") = 1 Then Response.Write "&nbsp;&nbsp;<font color=""#666666"">├</font>"
		  If Rs("depth") > 1 Then
			For i = 2 To Rs("depth")
				Response.Write "&nbsp;&nbsp;<font color=""#666666"">│</font>"
			Next
			Response.Write "&nbsp;&nbsp;<font color=""#666666"">├</font> "
		  End If
		  If Rs("depth") = 0 Then Response.Write ("<b>")
		  Response.Write rs("className")
		  If Rs("depth")  = 0 Then Response.Write ("</b>")
		  %>
          </DIV></TD>
          <TD width="40%" height=22  align=center bgcolor="#F2F2F2" class=tdbg><a  href=sk_class.asp?action=classadd&classID=<%=rs("classID")%>&Colleclx=<% =Colleclx %>>添加下级栏目</a></TD>
          <TD width="10%" height=22  align=center bgcolor="#F2F2F2" class=tdbg><a href=sk_class.asp?action=edit&classID=<%=rs("classID")%>&Colleclx=<% =Colleclx %>>修改</a> <a href=SK_class.asp?action=del&classID=<%=rs("classID")%>&Colleclx=<% =Colleclx %>>删除</a></TD>
        </TR>
        <%
rs.movenext
loop
rs.close
set rs=nothing
%>
      </TABLE></td>
    </tr>
</table>
<% end sub %>
<% sub add() %>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><b></b></div></td>
    </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
    <TR> 
      <TD height=22  align=center >请输入以下项目</TD>
    </TR>
</TABLE>
  <form name="myform" method="POST" action="?action=add&add_ok=1&Colleclx=<%=Colleclx%>">
<div align="center"> <%=ErrMsg%>
  <p>栏目名称:<strong>
    <input name="className" type="text" size="50" maxlength="50">
    </strong></p>
  <p>栏目目录: 
    <input name="ParentPath" type="text" size="50" maxlength="250">
  </p>
  <p> 
    <input name="action" type="submit" id="action" value="添加">&nbsp;&nbsp;
    <input name="action" type="reset" id="action" onClick="location.href='sk_class.asp?Colleclx=<%=Colleclx%>'" value="返回">
  </p>
</div>
  </form>
<% end sub %>
<% sub edit
		set Rs=server.createobject("adodb.recordset")         
		Sql="select * from sk_class where classID=" & request("classID") 
		Rs.open Sql,ConnItem,1,1
		ChannelID= request("classID")  
		channelname=rs("className")
		channelshortname=rs("ParentPath")
		rs.close
		set rs=nothing
%>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><b></b></div></td>
    </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
    <TR> 
      <TD height=22  align=center>请修改以下项目</TD>
    </TR>
</TABLE>
  <form name="myform" method="POST" action="?action=edit&edit_ok=1&Colleclx=<%=Colleclx%>">
<div align="center"> <%=ErrMsg%>
	<input name="classID" type="hidden" size="50" maxlength="50" value="<%=ChannelID%>">
  <p>栏目名称:<strong>
    <input name="className" type="text" size="50" maxlength="50" value="<%=channelname%>">
    </strong></p>
  <p>栏目目录: 
    <input name="ParentPath" type="text" size="50" maxlength="250" value="<%=channelshortname%>">
  </p>
  <p> 
    <input name="action" type="submit" id="action" value="确认修改">&nbsp;&nbsp;
    <input name="action" type="submit" id="action" onClick="location.href='sk_class.asp?Colleclx=<%=Colleclx%>'" value="返回">
  </p>
</div>
  </form>
<% end sub %>
<% sub classadd() 
 ParentID=request("classid")
 %>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><b></b></div></td>
    </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
    <TR> 
      <TD height=22  align=center >请输入以下项目</TD>
    </TR>
</TABLE>
  <form name="myform" method="POST" action="?action=classadd&classadd_ok=1&Colleclx=<%=Colleclx%>">
<div align="center"> <%=ErrMsg%>
  <p>栏目名称:<strong>
    <input name="className" type="text" size="50" maxlength="50">
    </strong></p>
  <p>栏目目录: 
    <input name="ParentPath" type="text" size="50" maxlength="250">
	<input name="ParentID" type="hidden" id="Action" value="<%= ParentID %>">
	
  </p>
  <p> 
    <input name="action" type="submit" id="action" value="添加">&nbsp;&nbsp;
    <input name="action" type="reset" id="action" onClick="location.href='sk_class.asp?Colleclx=<%=Colleclx%>'" value="返回">
  </p>
</div>
  </form>
<% end sub %>


<!--#include file="Admin_ItemFoot.asp"-->
</body>
</html>
<%
Call CloseConnItem()
%>

⌨️ 快捷键说明

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