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

📄 admin_daily.asp

📁 功能介绍: 一、会员功能模块 1、站内短信发布(设计中) 2、书架收藏夹 3、发表评论(功能不完善) 4、申请作家(与添书员整合) 5、申请添书员(与作家整合) 6、申请更新员
💻 ASP
📖 第 1 页 / 共 2 页
字号:
else
	conn.execute ("update [link] set link_class="&newclass&" where link_class="&oldclass)
if makeJS=1 then
temtxtlink(TXTNum)
temlogolink(LOGONum)
temtxt_link(TXTNum)
temlogo_link(LOGONum)
end if
call connclose() 
Call ShowAdminSuccessMsg("<li> 合并连接分类 操作完成!</li><br>","admin_links.asp?info=classaclass")
end if

end sub
'——————————
sub links_add()
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
set rs=server.createobject("adodb.recordset")
sql="select * from [link] where id_link="&id
rs.open sql,conn,1,3
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_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 in ("&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 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 * from [vote_class]"
rs.open sql,conn,1,3
rs.addnew
rs("title")=ScriptHtml(title,"script",2)
rs("choice")=trim(request.form("choice"))
rs.update
rs.close
set rs=nothing
call connclose() 
Call ShowAdminSuccessMsg("项目添加成功!","admin_vote.asp?info=list&cndb="&cndb&"") 
end if
end sub
'——————————
sub vote_edit()
cndb=request.querystring("cndb")
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
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)

set rs=server.CreateObject("adodb.recordset")
sql="select * from [vote_class] where id="&id
rs.open sql,conn,1,3
rs("title")=ScriptHtml(title,"script",2)
rs("choice")=trim(request.form("choice"))
rs.update
rs.close
set rs=nothing
call connclose() 
Call ShowAdminSuccessMsg("项目修改成功!","admin_vote.asp?info=list&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 in ("&id&") "
conn.execute"delete from [vote] where vote_title in ("&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 * 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
set rs1=server.createobject("adodb.recordset")
sql1="select * from [vote] where id="&cid
rs1.open sql1,conn,1,3
rs1("vote_name")=GetTextFromHtml(title)
rs1.update
rs1.close
set rs1=nothing
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 in ("&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 in ("&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 in ("&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 * from [guest] where id="&id
rs.open sql,conn,1,3
if rs.bof and rs.eof then
	ErrCodes = ErrCodes & "<li>留言不存在!</li><br>"
	FoundErr=True
end if
if FoundErr=True then
	Call ShowAdminErrMsg(ErrCodes,"javascript:history.go(-1)")
else
	rs("reply")=trim(request.form("reply"))
	rs.update
	rs.close
	set rs=nothing
Call ShowAdminSuccessMsg("留言回复成功!","admin_gbook.asp?info=list&cndb="&cndb&"&page="&page&"")
end if
call connclose() 
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 in ("&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 in ("&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 + -