<!--#include file="../../lib/base.asp"-->
<!--#include file="../../theme/admin_leo/config.asp"-->
<!--#include file="../../lib/cmd.asp"-->
<%
''' EYCMS 蜘蛛来访插件
''' ==================================================================

	'注释：插件是否安装
	is_plug_install "eycms.plug.spider"
	
	'注释：管理权限检查
	is_plug_login
	
	'注释：定义插件模板路径
	dim plug_theme,plug_theme_call
	plug_theme="module/plug_spider/list.html"
	plug_theme_call="module/plug_spider/call.html"
	
	'注释：删除
	sub deldb()
		dim id:id=eycms.getint(eycms.fget("id",0),0)
		eycms.db.dbdel "ey_plug_spider","id="&id
		eycms.echo "1"
	end sub
	
	'注释：批量删除
	sub delsome()
		dim id:id=eycms.enhtml(eycms.fget("id",0))
		dim idarr:idarr=split(id,",")
		dim data
		if ubound(idarr)<0 then
			eycms.echo "0&#33267;&#23569;&#36873;&#25321;&#19968;&#26465;&#20449;&#24687;"
		else
			dim i
			for i=0 to ubound(idarr)
				if not isnumeric(idarr(i)) then
					eycms.echo "0&#21442;&#25968;&#65306;"&id(i)&"&#19981;&#27491;&#30830;&#65292;&#35831;&#30830;&#35748;&#21518;&#20877;&#25805;&#20316;"
					exit sub
				else
					eycms.db.dbdel "ey_plug_spider","id="&idarr(i)
				end if
			next
			eycms.echo "1"
		end if
	end sub
	
	'注释：清空
	sub clearall()
		eycms.db.dbdel "ey_plug_spider",""
		eycms.echo "1"
	end sub
	
	dim act:act=lcase(eycms.fget("act",0))
	select case act
		case "del":deldb
		case "delsome":delsome
		case "clearall":clearall
		case "call":load plug_theme_call
		case else:load plug_theme
	end select
	eycms.db.dbclose
%>
