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

📄 admin_works.asp

📁 功能强大 首发! 演示地址:http://jsice.com QQ:3300828 运行环境: Internet Information Server 5.x or 6.0 (ii
💻 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()
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
	set rs=server.createobject("adodb.recordset")
	sql="select * from [list_type]"
	rs.open sql,conn,1,3
		rs.addnew
		rs("list_tpye")=GetTextFromHtml(trim(request.form("list_tpye")))
		rs("classinfo")=GetTextFrHtml(htmlencode(request.form("classinfo")))
		rs.update
	rs.close
	set rs=nothing
	if makeJS=1 then
		temclass()
		temclass1()
		temclass2()
		temvipclass()
		temvipclass1()
		temvipclass2()
	end if
call connclose() 
Call ShowAdminSuccessMsg("<li>添加分类成功!","admin_bookclass.asp?info=listnsort")
end if
end sub
'——————————
sub nsort_edit()
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
classid=CheckSql(request.querystring("classid"))
CheckSqlnum(classid)
classid=int(classid)
set rs=server.createobject("adodb.recordset")
sql="select * from [list_type] where typeid="&classid
rs.open sql,conn,1,3
rs("list_tpye")=GetTextFromHtml(trim(request.form("list_tpye")))
rs("classinfo")=GetTextFrHtml(htmlencode(request.form("classinfo")))
rs.update
rs.close
set rs=nothing
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 in ("&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 in ("&b_id&") "
		Success = Success & "<li> 作品章节附件已全部清理!</li><br>"
		Success = Success & "<li> 作品章节静态页面已全部清理!</li><br>"
	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 in ("&b_id&") "
	rscco.movenext
    loop
	end if
	rscco.close
	set rscco=nothing
	Success = Success & "<li> 作品分卷静态页面已全部清理!</li><br>"
	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 in ("&id&") "
end if
rscob.close
set rscob=nothing
		Success = Success & "<li> 作品资料静态页面已清理!</li><br>"
		Success = Success & "<li> 作品全文静态页面已清理!</li><br>"
		Success = Success & "<li> 作品目录静态页面已清理!</li><br>"
conn.execute "delete from [list_type] where typeid in ("&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")))
classid=request.QueryString("classid")
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
	set rs=server.createobject("adodb.recordset")
	sql = "SELECT * FROM [list_class] where (list_classid IS NULL)"
	rs.Open sql,conn, 1, 3
		rs.AddNew
		rs("list_classname") = list_classname
		rs("classinfo")=GetTextFrHtml(htmlencode(request.form("classinfo")))
		rs("list_typeid") = classid
		rs.Update
	rs.Close
	set rs=nothing
call connclose() 
Call ShowAdminSuccessMsg("<li>添加长篇作品小类成功!</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")))
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
	set rs=server.createobject("adodb.recordset")
	sql = "SELECT list_classname,classinfo FROM [list_class] where list_classid=" & list_Classid
	rs.Open sql,conn, 1, 3
	if rs.eof and rs.bof then
		ErrCodes = ErrCodes & "<li>操作错误!请联系管理员!</li><br>"
		FoundErr=True
	else
		rs("list_classname") = list_classname
		rs("classinfo")=GetTextFrHtml(htmlencode(request.form("classinfo")))
		rs.Update
	end if
	rs.Close
	set rs=nothing
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)
sql="delete from [list_class] where list_classid=" & list_Classid
conn.execute sql
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 in ("&b_id&") "
		Success = Success & "<li> 作品章节附件已全部清理!</li><br>"
		Success = Success & "<li> 作品章节静态页面已全部清理!</li><br>"
	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 in ("&b_id&") "
		rscco.movenext
    	loop
	end if
	rscco.close
	set rscco=nothing
		Success = Success & "<li> 作品分卷静态页面已全部清理!</li><br>"
		file4=SiteSystemPath&b_id&"."&htmlphe&""
		file5=viewFolder&"ALLbook"&b_id&"."&htmlphe&""
		file6=viewFolder&"index."&htmlphe&""
		FSOFiledel(file1)
		FSOFiledel(file1)
		FSOFiledel(file1)
	rscob.movenext
	loop

⌨️ 快捷键说明

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