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

📄 admin_daily.asp

📁 小说站源代码文件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
if request.form("name")="" then
	ErrCodes = ErrCodes & "<li>网站名称不能为空!</li><br>"
	FoundErr=True
end if
if request.form("link_class")="" then
	ErrCodes = ErrCodes & "<li>连接分类不能为空!</li><br>"
	FoundErr=True
end if
if request.form("web")="" or request.form("web")="http://" then
	ErrCodes = ErrCodes & "<li>  网址不能为空!</li><br>"
	FoundErr=True
end if
if request.form("radio")="1" then 
	if request.form("logo")="" or request.form("web")="http://" then
		ErrCodes = ErrCodes & "<li>网站LOGO不能为空!</li><br>"
		FoundErr=True
	end if
end if
if request.form("content")="" 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 link"
rs.open sql,conn,1,3
rs.addnew
rs("link_class")=trim(request.form("link_class"))
rs("class_link")=trim(request.form("radio"))
rs("name_link")=GetTextFromHtml(trim(request.form("name")))
rs("web_link")=GetTextFromHtml(trim(request.form("web")))
rs("logo_link")=GetTextFromHtml(trim(request.form("logo")))
rs("content_link")=GetTextFHtml(trim(request.form("content")))
rs("good_link")=trim(request.form("good"))
rs("ok_link")=trim(request.form("ok"))
rs.update
rs.close
set rs=nothing
if makeJS=1 then
temtxtlink(TXTNum)
temlogolink(LOGONum)
temtxt_link(TXTNum)
temlogo_link(LOGONum)
end if
call connclose() 
Call ShowAdminSuccessMsg("连接添加成功!","admin_links.asp?info=list&cndb=all")
end if
end sub
'——————————
sub links_edit()
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
if request.form("name")="" then
	ErrCodes = ErrCodes & "<li>网站名称不能为空!</li><br>"
	FoundErr=True
end if
if request.form("link_class")="" then
	ErrCodes = ErrCodes & "<li>连接分类不能为空!</li><br>"
	FoundErr=True
end if
if request.form("web")="" or request.form("web")="http://" then
	ErrCodes = ErrCodes & "<li>  网址不能为空!</li><br>"
	FoundErr=True
end if
if request.form("radio")="1" then
	if request.form("logo")="" or request.form("web")="http://" then
		ErrCodes = ErrCodes & "<li>网站LOGO不能为空!</li><br>"
		FoundErr=True
	end if
end if
if request.form("content")="" 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 link  set "&_
	"link_class="&request.form("link_class")&","&_
	"class_link="&request.form("radio")&","&_
	"name_link='"&GetTextFromHtml(trim(request.form("name")))&"',"&_
	"web_link='"&GetTextFromHtml(trim(request.form("web")))&"',"&_
	"logo_link='"&GetTextFromHtml(trim(request.form("logo")))&"',"&_
	"content_link='"&GetTextFHtml(trim(request.form("content")))&"',"&_
	"good_link="&request.form("good")&","&_
	"ok_link="&request.form("ok")&""&_
	" where id_link="&id)
if makeJS=1 then
temtxtlink(TXTNum)
temlogolink(LOGONum)
temtxt_link(TXTNum)
temlogo_link(LOGONum)
end if
call connclose() 
Call ShowAdminSuccessMsg("连接修改成功!","admin_links.asp?info=list&cndb=all")
end if
end sub
'——————————
sub links_del()
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
cndb=request.querystring("cndb") 
page=replace(trim(request("page")),"'","")
conn.execute"delete from link where id_link = "&id&""
if makeJS=1 then
temtxtlink(TXTNum)
temlogolink(LOGONum)
temtxt_link(TXTNum)
temlogo_link(LOGONum)
end if
call connclose() 
Call ShowAdminSuccessMsg("连接删除成功!","admin_links.asp?info=list&cndb="&cndb&"&page="&page&"")
end sub
'——————————
sub vote_add()
dim title
title=request.form("title")
cndb=request.form("cndb")
if request.form("id")<>"" then
	id=request.form("id")
else
	id=0
end if
if cndb="site" then
	vclass=0
elseif cndb="bclass" then
	vclass=1
elseif cndb="aclass" then
	vclass=2
elseif cndb="book" then
	vclass=3
elseif cndb="article" then
	vclass=4
elseif cndb="author" then
	vclass=5
elseif cndb="user" then
	vclass=6
else
	vclass=0
end if
if title=""then
	ErrCodes = ErrCodes & "<li>调查项目名不能为空!</li><br>"
	FoundErr=True 
end if
if len(title) > 200 then
	ErrCodes = ErrCodes & "<li>调查内容大于指定字数!</li><br>"
	FoundErr=True
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
title=ScriptHtml(title,"Object",2)

set rs=server.createobject("adodb.recordset")
sql="select title,choice,class,typeid from vote_class"
rs.open sql,conn,1,3
rs.addnew
rs("title")=ScriptHtml(title,"script",2)
rs("choice")=trim(request.form("choice"))
rs("class")=vclass
rs("typeid")=id
rs.update
rs.close
set rs=nothing
call connclose() 
Call ShowAdminSuccessMsg("项目添加成功!","admin_vote.asp?info=list&id="&id&"&cndb="&cndb&"") 
end if
end sub
'——————————
sub vote_edit()
cndb=request.querystring("cndb")
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
if request.querystring("typeid")<>"" then
	typeid=request.querystring("typeid")
else
	typeid=0
end if
title=request.form("title")
if title=""then
	ErrCodes = ErrCodes & "<li>调查项目名不能为空!</li><br>"
	FoundErr=True 
end if
if len(title) > 200 then
	ErrCodes = ErrCodes & "<li>调查内容大于指定字数!</li><br>"
	FoundErr=True
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
	title=ScriptHtml(title,"Object",2)
	title=ScriptHtml(title,"script",2)
	conn.execute ("update vote_class set title='"&title&"',choice="&request.form("choice")&" where id="&id)
call connclose() 
Call ShowAdminSuccessMsg("项目修改成功!","admin_vote.asp?info=list&id="&typeid&"&cndb="&cndb&"")
end if
end sub
'——————————
sub vote_del()
cndb=request.querystring("cndb")
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
	conn.execute"delete from vote_class where id = "&id&""
	conn.execute"delete from vote where vote_title = "&id&""
call connclose() 
Call ShowAdminSuccessMsg("调查删除成功!","admin_vote.asp?info=list&cndb="&cndb&"")
end sub
'——————————
sub add_choice()
name=trim(request("name"))
ids=request("ids")
cndb=request.form("cndb")
if name="" then
	ErrCodes = ErrCodes & "<li>  名称不能为空</li><br>"
	FoundErr=True
end if

if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
set rs1=server.createobject("adodb.recordset")
sql1="select vote_name,vote_title from vote"
rs1.open sql1,conn,1,3
rs1.addnew
rs1("vote_name")=GetTextFromHtml(name)
rs1("vote_title")=ids
rs1.update
rs1.close
set rs1=nothing
call connclose() 
Call ShowAdminSuccessMsg("选项添加成功!","admin_vote.asp?info=add_choice&id="&ids&"&cndb="&cndb&"")
end if
end sub
'——————————
sub edit_choice()
cndb=request.form("cndb")
id=request.querystring("id")
cid=CheckSql(request.querystring("cid"))
CheckSqlnum(cid)
cid=int(cid)
dim title
title=request.form("title")
if title="" 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 vote set vote_name='"&GetTextFromHtml(title)&"' where id="&cid)
call connclose() 
Call ShowAdminSuccessMsg("选项修改成功!","admin_vote.asp?info=add_choice&id="&id&"&cndb="&cndb&"")
end if
end sub
'——————————
sub del_choice()
cndb=request.querystring("cndb")
id=request.querystring("id")
cid=CheckSql(request.querystring("cid"))
CheckSqlnum(cid)
cid=int(cid)
	conn.execute"delete from vote where id = "&cid&""
call connclose() 
Call ShowAdminSuccessMsg("选项删除成功!","admin_vote.asp?info=add_choice&id="&id&"&cndb="&cndb&"")
end sub
'——————————
sub gbook_del()
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
cndb=request.querystring("cndb")
page=trim(request("page"))
	conn.execute "delete from guest where id = "&id&""
call connclose() 
Call ShowAdminSuccessMsg("留言删除成功!","admin_gbook.asp?info=list&cndb="&cndb&"&page="&page&"")
FoundErr=True
end sub
'——————————
sub gbook_listdel()
id=trim(request("checked"))
If ID="" Then
	ErrCodes = ErrCodes & "<li>您至少需要选择一个</li><br>"
	FoundErr=True
End If
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
viewArray=Split(ID, ",")
Num = UBound(viewArray)
For i=0 To Num
	conn.execute "delete from guest where id = "&viewArray(i)&""
Next
call connclose() 
response.write ("<script>opener.location.reload();</script>")
Call ShowAdminSuccessMsg("留言删除成功!","javascript:window.close()")
end if
end sub
'——————————
sub gbook_reply()
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
cndb=request.querystring("cndb")
page=trim(request("page"))
if request.form("reply")="" 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 reply from guest where id="&id
	rs.open sql,conn,1,1
	if rs.bof and rs.eof then
		ErrCodes = ErrCodes & "<li>留言不存在!</li><br>"
		FoundErr=True
	else
		conn.execute ("update guest set reply='"&request.form("reply")&"' where id="&id)
	end if
	rs.close
	set rs=nothing
	call connclose() 
	if FoundErr=True then
		Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
	else
		Call ShowAdminSuccessMsg("留言回复成功!","admin_gbook.asp?info=list&cndb="&cndb&"&page="&page&"")
	end if
end if
end sub
'——————————
sub duanxin_del()
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
cndb=request.querystring("cndb")
page=trim(request("page"))
conn.execute "delete from Siti_duanxin where id = "&id&""
call connclose() 
Call ShowAdminSuccessMsg("短信删除成功!","admin_duanxin.asp?info="&cndb&"&page="&page&"")
FoundErr=True
end sub
'——————————
sub duanxin_listdel()
id=trim(request("checked"))
If ID="" Then
	ErrCodes = ErrCodes & "<li>您至少需要选择一个</li><br>"
	FoundErr=True
End If
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:window.close()")
else
viewArray=Split(ID, ",")
Num = UBound(viewArray)
For i=0 To Num
	conn.execute "delete from Siti_duanxin where id = "&viewArray(i)&""
Next
call connclose() 
response.write ("<script>opener.location.reload();</script>")
Call ShowAdminSuccessMsg("短信删除成功!","javascript:window.close()")
end if
end sub
'——————————
%>
</body>

</html>

⌨️ 快捷键说明

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