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

📄 admin_soft_list.asp

📁 动感系统XP Access版,服务器需要安装Jmail 组件 配置SendMessages.asp 最后部分的参数
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/function.asp" -->
<HTML><HEAD><TITLE>后台管理 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="admin.css" type=text/css rel=stylesheet>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<!-- #include file="admin_header.asp" -->
<table width="100%" border="0" cellspacing="2">
  <tr>
    <td width="20%" align="center" valign="top" class="tdbgleft"><!-- #include file="Admin_Left.asp" --></td> 
    <td  class="b1" valign="top">
<% 
if cUserName="" then
	msgtitle="非法操作"
	msginfo="<li>你没有登录系统。<li><a href=""User.Asp"">点此登录系统</a></li>"
	call Sysmsg(msgtitle,msginfo)  
else
	set rs=server.createobject("adodb.recordset")
	dim isMaster,selSoftID
	isMaster=false
	selSoftID=Trim(Request.Form("selSoftID"))
	if chkMaster(cUserName) then isMaster=true
	select case Trim(Request("action"))
	case "s"
		call Search_Soft()
	case "l"
		call Search_Soft()
	case "batch_isDel"
		call batch_isDel()
	case "batch_isTop"
		call batch_isTop()
	case "batch_noTop"
		call batch_noTop()
	case "batch_isHot"
		call batch_isHot()
	case "batch_noHot"
		call batch_noHot()
	case "batch_isMov"
		call batch_isMov()
	case else
		call main()
	end select
	set rs=nothing
end if
sub batch_isDel()
	msgtitle="批量删除"
	if selSoftID<>"" then
		conn.execute("delete from SoftDown_SoftInfo where SoftID in ("&selSoftID&")")
		conn.execute("delete from SoftDown_SoftEssay where SoftID in ("&selSoftID&")")
		conn.execute("delete from SoftDown_SoftLink where SoftID in ("&selSoftID&")")
		msginfo="操作成功!"
	else
		msginfo="没有选择任何软件,本次操作取消!"
	end if
	call Sysmsg(msgtitle,msginfo)
end sub
sub batch_isTop()
	msgtitle="批量置顶"
	if selSoftID<>"" then
		conn.execute("update SoftDown_SoftInfo set isTop=1 where SoftID in ("&selSoftID&")")
		msginfo="操作成功!"
	else
		msginfo="没有选择任何软件,本次操作取消!"
	end if
	call Sysmsg(msgtitle,msginfo)
end sub 
sub batch_noTop()
	msgtitle="批量取消置顶"
	if selSoftID<>"" then
		conn.execute("update SoftDown_SoftInfo set isTop=0 where SoftID in ("&selSoftID&")")
		msginfo="操作成功!"
	else
		msginfo="没有选择任何软件,本次操作取消!"
	end if
	call Sysmsg(msgtitle,msginfo)
end sub
sub batch_isHot()
	msgtitle="批量推荐"
	if selSoftID<>"" then
		conn.execute("update SoftDown_SoftInfo set isCommend=1 where SoftID in ("&selSoftID&")")
		msginfo="操作成功!"
	else
		msginfo="没有选择任何软件,本次操作取消!"
	end if
	call Sysmsg(msgtitle,msginfo)
end sub
sub batch_noHot()
	msgtitle="批量取消推荐"
	if selSoftID<>"" then
		conn.execute("update SoftDown_SoftInfo set isCommend=0 where SoftID in ("&selSoftID&")")
		msginfo="操作成功!"
	else
		msginfo="没有选择任何软件,本次操作取消!"
	end if
	call Sysmsg(msgtitle,msginfo)
end sub
sub batch_isMov()
	msgtitle="批量移动"
	if selSoftID<>"" then
		if Trim(Request.Form("catalog"))<>"" then
			dim splCatalog
			splCatalog=split(Trim(Request.Form("catalog")),",")
			if splCatalog(2)>0 then
				conn.execute("update SoftDown_SoftInfo set RootID="&splCatalog(0)&",CatalogID="&splCatalog(1)&",CatalogName='"&splCatalog(3)&"',isCreate=0 where SoftID in ("&selSoftID&")")
				msginfo="操作成功!"
			else
				msginfo="不能转移到一级分类下,本次操作取消。"
			end if			
		else
			msginfo="没有选择软件分类,本次操作取消。"
		end if
	else
		msginfo="没有选择任何软件,本次操作取消!"
	end if
	call Sysmsg(msgtitle,msginfo)
end sub

sub Search_Soft()
dim q,keyword,sqlKeyword,splCatalog,sqlSoftType,sqlLicenceType,sqlLanguage,sqlSystem,sqlSoftFrom,sqlEmail,sqlDateTime,sqlisIn,sqlisUser
keyword=checkStr(Trim(Request("keyword")))
    dim currentpage,page_count,Pcount
    dim totalrec,endpage	
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if	
if Request("action")="s" then
	if Trim(Request.Form("MaxPerPage"))<>"" then session("MaxPerPage")=Trim(Request.Form("MaxPerPage"))
	if isnull(session("MaxPerPage")) or session("MaxPerPage")="" then session("MaxPerPage")=50
	MaxPerPage=cint(session("MaxPerPage"))
	q="&action=s&keyword="&keyword&"&selby="&Trim(Request("selby"))&"&catalog="&Request("catalog")&""	
	
	if Trim(Request("catalog"))="" then
		sqlCatalog=""
		if Request("selby")=1 then
			sqlKeyword=" (" & translate(keyword,"SoftName") & ") "
		elseif Request("selby")=2 then
			sqlKeyword=" (" & translate(keyword,"Content") & ") "
		elseif Request("selby")=0 then
			sqlKeyword=" (" & translate(keyword,"SoftName") & " or " & translate(keyword,"Content") & ") "
		end if
	else
		splCatalog=split(Request("catalog"),",")
		if cint(splCatalog(2))=0 then
			sqlCatalog=" RootID="&splCatalog(1)&""
		else
			sqlCatalog=" CatalogID="&splCatalog(1)&""
		end if
	'Response.Write(sqlCatalog)
	
		if Request("selby")=1 then
			sqlKeyword=" and (" & translate(keyword,"SoftName") & ") "
		elseif Request("selby")=2 then
			sqlKeyword=" and (" & translate(keyword,"Content") & ") "
		elseif Request("selby")=0 then
			sqlKeyword=" and (" & translate(keyword,"SoftName") & " or " & translate(keyword,"Content") & ") "
		end if
	'Response.Write(sqlKeyword)
	end if

	if Request("SoftType")<>""  then
		sqlSoftType=" and SoftType='"&Trim(Request("SoftType"))&"'"
		q=q&"&softtype="&Trim(Request("SoftType"))&""
	else
 	   sqlSofttype=""
	end if
'Response.Write(sqlSofttype)

	if Request("LicenceType")<>""  then
		sqlLicenceType=" and LicenceType='"&Trim(Request("LicenceType"))&"'"
		q=q&"&LicenceType="&Trim(Request("LicenceType"))&""
	else
  	  sqlLicenceType=""
	end if

	if Request("Language")<>""  then
		sqlLanguage=" and Language='"&Trim(Request("Language"))&"'"
		q=q&"&Language="&Trim(Request("Language"))&""
	else
  	  sqlLanguage=""
	end if

	if Request("System")<>""  then
		sqlSystem=" and System like '%"&Trim(Request("System"))&"%'"
		q=q&"&System="&Trim(Request("System"))&""
	else
		sqlSystem=""
	end if

	if Request("SoftFrom")<>""  then
		sqlSoftFrom=" and SoftFrom like '%"&checkStr(Trim(Request("SoftFrom")))&"%'"
		q=q&"&SoftFrom="&Trim(Request("SoftFrom"))&""
	else
    	sqlSoftFrom=""
	end if

	if Request("Email")<>""  then
		sqlEmail=" and Email like '%"&checkStr(Trim(Request("Email")))&"%'"
		q=q&"&Email="&Trim(Request("Email"))&""
	else
    	sqlEmail=""
	end if
	
	if Request("DateTime")<>"" then
		sqlDateTime=" and datediff('d',SoftTime,date())<"&datediff("d",Request("DateTime"),Now())&""
		q=q&"&DateTime="&Trim(Request("DateTime"))&""
	else
    	sqlDateTime=""
	end if
	
	if cint(Request("isIn"))=1  then
		sqlisIn=" and images<>''"
		q=q&"&isIn="&Trim(Request("isIn"))&""
	elseif cint(Request("isIn"))=2  then
		sqlisIn=" and isCommend=1"
		q=q&"&isIn="&Trim(Request("isIn"))&""
	else
    	sqlisIn=""
	end if
	
	if Request("isUser")="yes"  then
		sqlisUser=" and UserName='"&cUserName&"'"
		q=q&"&isUser="&Trim(Request("isUser"))&""
	else
		if Request("username")<>"" then
			sqlisUser=" and UserName='"&Trim(Request("username"))&"'"
			q=q&"&username="&Trim(Request("username"))&""
		else
			sqlisUser=""
		end if
	end if
	
	sql="select SoftID,SoftName,SoftVer,CatalogID,CatalogName,SoftTime,isTop,isCommend,UserName from SoftDown_SoftInfo Where "& sqlCatalog & sqlKeyword & sqlSoftType & sqlLicenceType & sqlLanguage & sqlSystem & sqlSoftFrom & sqlEmail & sqlDateTime & sqlisIn & sqlisUser& " order by isTop desc,SoftTime Desc"
	'Response.Write(sql)	
elseif Request("action")="l" then
	MaxPerPage=30
	q="&action=l"
	sql="select SoftID,SoftName,SoftVer,CatalogID,CatalogName,SoftTime,isTop,isCommend,UserName from SoftDown_SoftInfo order by isTop desc,SoftTime Desc"
end if	
%>
      <table width="100%" border="0" cellspacing="1" cellpadding="3">
        <COLGROUP>
			  <COL width=24>
              <COL width=*>
              <COL width=40>
              <COL width=65>
              <COL width=50>
        <tr> 
          <td align="center" class="tdbg1"><a href="javascript:SelectAll()">选择</a></td>
          <td class="tdbg1">分类和软件名称</td>
          <td align="center" class="tdbg1">编辑</td>
          <td align="center" class="tdbg1">日期</td>
          <td align="center" class="tdbg1">用户</td>
        </tr>
<SCRIPT language = "JavaScript">

⌨️ 快捷键说明

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