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

📄 admin_works.asp

📁 小说站源代码文件
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="../conn.asp" -->
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/GetFunction.asp"-->
<!--#include file="../inc/upfile.asp"-->
<!--#include file="session.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body>
<%
if htmlphem=1 then
htmlphe="htm"
elseif htmlphem=2 then
htmlphe="html"
elseif htmlphem=3 then
htmlphe="shtml"
elseif htmlphem=4 then
htmlphe="asp"
else
htmlphe="html"
end if

Select Case request.querystring("info")
	Case "nsort_add"
		Call nsort_add()
	Case "nsort_edit"
		Call nsort_edit()
	Case "nsort_del"
		Call nsort_del()
	Case "bclass_add"
		Call bclass_add()
	Case "bclass_edit"
		Call bclass_edit()
	Case "bclass_del"
		Call bclass_del()
	Case "bclass"
		Call bclass()
	Case "ar_class"
		Call ar_class()
	Case "ar_class_edit"
		Call ar_class_edit()
	Case "ar_class_del"
		Call ar_class_del()
	Case "aclass"
		Call aclass()
	Case "article_add"
		Call article_add()
	Case "article_edit"
		Call article_edit()
	Case "article_del"
		Call article_del()
	Case "article_list"
		Call article_list()
	Case "book_add"
		Call book_add()
	Case "book_edit"
		Call book_edit()
	Case "book_del"
		Call book_del()
	Case "book_zhang_add"
		Call book_zhang_add()
	Case "book_zhang_edit"
		Call book_zhang_edit()
	Case "book_zhang_del"
		Call book_zhang_del()
	Case "book_zhang_list"
		Call book_zhang_list()
	Case "book_zhang_listdel"
		Call book_zhang_listdel()
	Case "book_jie_add"
		Call book_jie_add()
	Case "book_jie_edit"
		Call book_jie_edit()
	Case "book_jie_del"
		Call book_jie_del()
	Case "book_jie_list"
		Call book_jie_list()
	Case "book_jie_listdel"
		Call book_jie_listdel()
	Case "viewgocook"
		Call viewgocook()
end select 

Sub nsort_add()
list_tpye=GetTextFromHtml(trim(request.form("list_tpye")))
classinfo=GetTextFrHtml(htmlencode(request.form("classinfo")))
if request.form("list_tpye")="" then
	ErrCodes = ErrCodes & "<li>请添加分类名称!</li><br>"
	FoundErr=True
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
	Conn.Execute("InSert Into list_type (list_tpye,classinfo) Values ('"&list_tpye&"','"&classinfo&"')")
	if makeJS=1 then
		temclass()
		temclass1()
		temclass2()
		temvipclass()
		temvipclass1()
		temvipclass2()
	end if
Call connclose() 
Call ShowAdminSuccessMsg("<li>成功添加长篇分类“"&list_tpye&"”!","admin_bookclass.asp?info=listnsort")
end if
end sub
'——————————
sub nsort_edit()
classid=CheckSql(request.querystring("classid"))
CheckSqlnum(classid)
classid=int(classid)
list_tpye=GetTextFromHtml(trim(request.form("list_tpye")))
classinfo=GetTextFrHtml(htmlencode(request.form("classinfo")))
if list_tpye="" then
	ErrCodes = ErrCodes & "<li>分类名不能为空!</li><br>"
	FoundErr=True
end if
if classid="" or classid=null then
	ErrCodes = ErrCodes & "<li>参数传递错误,请返回!</li><br>"
	FoundErr=True
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
conn.execute ("update list_type set list_tpye='"&list_tpye&"',classinfo='"&classinfo&"' where typeid="&classid)
if makeJS=1 then
temclass()
temclass1()
temclass2()
temvipclass()
temvipclass1()
temvipclass2()
end if
call connclose() 
Call ShowAdminSuccessMsg("<li>长篇作品分类修改成功!</li><br>","admin_bookclass.asp?info=listnsort")
end if
end sub
'——————————
sub nsort_del()
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
conn.execute "delete from list_class where list_typeID = "&id&""
set rscob=server.createobject("adodb.recordset")
sql="select id,list_class,list_lei from list_book where list_class="&id&""
rscob.open sql,conn,1,1
if rscob.eof and rscob.bof then
else
do while not rscob.eof
	b_id=rscob("id")
	list_class=rscob("list_class")
	list_lei=rscob("list_lei")

	set rsfile=server.createobject("adodb.recordset") 
	strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=3 and fileurl_fileID ="&b_id&""
	rsfile.open strSQL,conn,1,1
	if not(rsfile.eof and rsfile.bof) then
	do while not rsfile.eof
		file1=rsfile("fileurl_path")&rsfile("fileurl_name")
		FSOFiledel(file1)
	rsfile.movenext
    loop
	end if
	rsfile.close
	set rsfile=nothing
	conn.execute"delete from filetest where ID ="&b_id&""
	
	viewFolder = SiteSystemPath&"HTML/"&id&"/"
	set rsco=server.createobject("adodb.recordset")
	sql="select id,view_id from list_view where view_id="&b_id&""
	rsco.open sql,conn,1,1
	if rsco.eof and rsco.bof then
	else
	do while not rsco.eof
		id1=rsco("id")

		set rsfile=server.createobject("adodb.recordset") 
		strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=1 and fileurl_fileID ="&id1&""
		rsfile.open strSQL,conn,1,1
		if not(rsfile.eof and rsfile.bof) then
		do while not rsfile.eof
			file1=rsfile("fileurl_path")&rsfile("fileurl_name")
			FSOFiledel(file1)
		rsfile.movenext
	    loop
		end if
		rsfile.close
		set rsfile=nothing
		conn.execute"delete from filetest where ID ="&id1&""
	
		file2=viewFolder&id1&"."&htmlphe&""
		file1=viewFolder&id1&".TXT"
		FSOFiledel(file1)
		FSOFiledel(file2)
	rsco.movenext
    loop
	end if
	rsco.close
	set rsco=nothing
	conn.execute "delete from list_view where view_id = "&b_id&""
	set rscco=server.createobject("adodb.recordset")
	sql="select list_cookid from list_cook where list_bookid="&b_id&""
	rscco.open sql,conn,1,1
	if rscco.eof and rscco.bof then
	else
	do while not rscco.eof
		file3=viewFolder&"Z"&rscco("list_cookid")&"."&htmlphe&""
		FSOFiledel(file3)
		conn.execute "delete from list_cook where list_bookid = "&b_id&""
	rscco.movenext
    loop
	end if
	rscco.close
	set rscco=nothing
	file4=SiteSystemPath&id&"."&htmlphe&""
	file5=viewFolder&"ALLbook"&id&"."&htmlphe&""
	file6=viewFolder&"index."&htmlphe&""
	FSOFiledel(file4)
	FSOFiledel(file5)
	FSOFiledel(file6)
rscob.movenext
loop
conn.execute "delete from list_book where list_class ="&id&""
end if
rscob.close
set rscob=nothing
conn.execute "delete from list_type where typeid = "&id&""
if makeJS=1 then
makeshowhots()
makeshowhits()
end if
call connclose() 
Call ShowAdminSuccessMsg(Success & "<li>长篇作品分类删除成功!</li><br>","admin_bookclass.asp?info=listnsort")
FoundErr=True 
end sub
'——————————
sub bclass_add()
list_classname=GetTextFromHtml(trim(request.form("list_classname")))
classinfo=GetTextFrHtml(htmlencode(request.form("classinfo")))
classid=request.QueryString("classid")
if list_classname="" then
	ErrCodes = ErrCodes & "<li>分类名称不能为空!</li><br>"
	FoundErr=True
end if
if classid="" or classid=null then
	ErrCodes = ErrCodes & "<li>参数传递错误,请返回!</li><br>"
	FoundErr=True
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
	Conn.Execute("InSert Into list_class (list_classname,classinfo,list_typeid) Values ('"&list_classname&"','"&classinfo&"',"&classid&")")
call connclose() 
Call ShowAdminSuccessMsg("<li>成功添加长篇作品小类“"&list_classname&"”!</li><br>","admin_bookclass.asp?info=listnsort")
end if
end sub
'——————————
sub bclass_edit()
id=request.QueryString("id")
list_classid=CheckSql(request.querystring("list_classid"))
CheckSqlnum(list_classid)
list_classid=int(list_classid)
list_classname=GetTextFromHtml(trim(request.form("list_classname")))
classinfo=GetTextFrHtml(htmlencode(request.form("classinfo")))
if list_classname="" then
	ErrCodes = ErrCodes & "<li>分类名称不能为空!</li><br>"
	FoundErr=True 
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
	conn.execute ("update list_class set list_classname='"&list_classname&"',classinfo='"&classinfo&"' where list_classID="&list_Classid)
call connclose() 
Call ShowAdminSuccessMsg("<li>长篇作品小类修改操作完成!</li><br>","admin_bookclass.asp?info=listbclass&id="&id&"")
end if
end sub
'——————————
sub bclass_del()
id=request("id")
list_classid=CheckSql(request.querystring("list_classid"))
CheckSqlnum(list_classid)
list_classid=int(list_classid)
conn.execute"delete from list_class where list_classid="&list_Classid&""
set rscob=server.createobject("adodb.recordset")
sql="select id from list_book where list_lei="&list_Classid&""
rscob.open sql,conn,1,1
if rscob.eof and rscob.bof then
else
do while not rscob.eof
	b_id=rscob("id")

	set rsfile=server.createobject("adodb.recordset") 
	strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=3 and fileurl_fileID ="&b_id&""
	rsfile.open strSQL,conn,1,1
	if not(rsfile.eof and rsfile.bof) then
	do while not rsfile.eof
		file1=rsfile("fileurl_path")&rsfile("fileurl_name")
		FSOFiledel(file1)
	rsfile.movenext
    loop
	end if
	rsfile.close
	set rsfile=nothing
	conn.execute"delete from filetest where ID ="&b_id&""
	
	viewFolder = SiteSystemPath&"HTML/"&b_id&"/"
	set rsco=server.createobject("adodb.recordset")
	sql="select id from list_view where view_id="&b_id&""
	rsco.open sql,conn,1,1
	if rsco.eof and rsco.bof then
	else
	do while not rsco.eof
		id1=rsco("id")

	set rsfile=server.createobject("adodb.recordset") 
	strSQL ="select fileurl_name,fileurl_path from filetest where fileurl_class=1 and fileurl_fileID ="&id1&""
	rsfile.open strSQL,conn,1,1
	if not(rsfile.eof and rsfile.bof) then
	do while not rsfile.eof
		file1=rsfile("fileurl_path")&rsfile("fileurl_name")
		FSOFiledel(file1)
	rsfile.movenext
    loop
	end if
	rsfile.close
	set rsfile=nothing
	conn.execute"delete from filetest where ID ="&id1&""
	
		file2=viewFolder&id1&"."&htmlphe&""
		file1=viewFolder&id1&".TXT"
		FSOFiledel(file1)
		FSOFiledel(file2)
		rsco.movenext
    	loop
	end if
	rsco.close
	set rsco=nothing
	conn.execute "delete from list_view where view_id = "&b_id&""
	set rscco=server.createobject("adodb.recordset")
	sql="select list_cookid from list_cook where list_bookid="&b_id&""
	rscco.open sql,conn,1,1
	if rscco.eof and rscco.bof then
	else
		do while not rscco.eof
		file3=viewFolder&"Z"&rscco("list_cookid")&"."&htmlphe&""
		FSOFiledel(file3)
		conn.execute "delete from list_cook where list_bookid = "&b_id&""
		rscco.movenext
    	loop
	end if
	rscco.close
	set rscco=nothing
		file4=SiteSystemPath&b_id&"."&htmlphe&""
		file5=viewFolder&"ALLbook"&b_id&"."&htmlphe&""
		file6=viewFolder&"index."&htmlphe&""
		FSOFiledel(file1)
		FSOFiledel(file1)
		FSOFiledel(file1)
	rscob.movenext
	loop
	conn.execute "delete from list_book where list_lei = "&list_Classid&""
end if
rscob.close
set rscob=nothing
if makeJS=1 then
makeshowhots()
makeshowhits()
end if
call connclose() 
Call ShowAdminSuccessMsg(Success & "<li> 长篇作品小类删除操作完成!</li><br>","admin_bookclass.asp?info=listbclass&id="&id&"")
FoundErr=True

end sub
'——————————

⌨️ 快捷键说明

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