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

📄 save.asp

📁 小说站源代码文件
💻 ASP
字号:
<!--
'----------------------------------------------------------------------
'转发时请保留此声明信息,这段声明不并会影响你的速度!
'*******************     終點小说连载系统   ***************************
'程序设计:终点
'电子邮件:liuyanhaoxin@163.com;liuyanhaoxin@126.com
'网站支持:http://www.cnend.net/;http://www.zdian.net/
'Q Q 支持:46653654
'版权所有:终点.
'版权声明:
'1、未经授权许可,不得将本程序用于盈利或非盈利性的商业用途。
'2、为适应实际的计算机应用环境或者改进其功能、性能,可以进行必要的修改,但不得去除终点的(CnEndWeb)版权标示;未经终点书面授权许可,不得向任何第三方提供修改后的程序。
'3、使用本程序必须保留终点的版权声明,将本程序从原有自然语言文字转换成另一自然语言文字的,仍应注明出处。
'**********************************************************************
'----------------------------------------------------------------------
--><!-- #include file="conn.asp" --><!--#include file="inc/config.asp"-->
<%
Select Case request.querystring("info")
	Case "links"
		Call links()
	Case "gbook"
		Call gbook()
	Case "vote"
		Call vote()
end select 

sub links()
if request.form("name")="" then
	response.write "<script language=javascript>alert('网站名称不能为空!');history.back(-1);</script>"
	response.end
	end if
if request.form("link_class")="" then
	response.write "<script language=javascript>alert('连接分类不能为空!');history.back(-1);</script>"
	response.end
end if
if request.form("web")="" then
	response.write "<script language=javascript>alert('网址不能为空!');history.back(-1);</script>"
	response.end
end if
if request.form("radio")="1" and request.form("logo")="" then
	response.write "<script language=javascript>alert('网站LOGO不能为空!');history.back(-1);</script>"
	response.end
end if
if request.form("content")="" then
	response.write "<script language=javascript>alert('介绍不能为空!');history.back(-1);</script>"
	response.end
end if
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")=trim(request.form("name"))
rs("web_link")=trim(request.form("web"))
rs("logo_link")=trim(request.form("logo"))
rs("content_link")=trim(request.form("content"))
rs.update
rs.close
set rs=nothing
response.write ("<script language=javascript>window.alert('连接添加成功!');location.href='index.asp';</script>")
end sub

sub gbook()

dim UserID,UserName
UserID=CheckSql(request.cookies("CnEndWeb_User")("log_UserID"))
UserName=CheckSql(request.cookies("CnEndWeb_User")("log_UserName"))
If UserName="" or UserID="" or IsNull(userID) Then
	Response.Write ("<script>alert(' 操作错误 \n\n 可能您还没有登陆或者登陆超时 \n\n 如果您没有成为会员请先进行会员注册 \n\n 如果您已经是注册会员请重新登陆 ');location.href='user_log.asp?info=log';</script>")
	Response.End
End If
set rs=server.createobject("adodb.recordset")
sql="select * from User where ID="&UserID&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	Response.Write ("<script>alert('   操作错误!\n\n 用户不存在。');history.back();</script>")
	Response.end
End If
if rs("LockUser")=1 then
	Response.Write ("<script>alert('   操作错误!\n\n 用户被锁定。');history.back();</script>")
	Response.end
End If
rs.close
set rs=nothing

if request.form("title")="" then
	response.write "<script language=javascript>alert('主题不能为空!');history.back(-1);</script>"
	response.end
end if
if request.form("content")="" then
	response.write "<script language=javascript>alert('内容不能为空!');history.back(-1);</script>"
	response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from guest"
rs.open sql,conn,1,3
rs.addnew
rs("userid")=UserID
rs("classid")=trim(request.form("guest_class"))
rs("title")=trim(request.form("title"))
rs("content")=trim(request.form("content"))
rs.update
rs.close
set rs=nothing
	response.write ("<script language=javascript>window.alert('留言添加成功!');location.href='kfindex.asp';</script>")
end sub

sub vote()

if isempty(session("go")) then
	choice=CheckSql(request("choice"))
	if isempty(choice) then
		response.write "<script language=javascript>alert('您没有选择投票内容!');history.back(-1);</script>"
	else
		conn.execute ("update vote set num=num+1 where id="&choice)
		session("go")=1
		response.write "<script language=javascript>alert('投票成功!');history.back(-1);</script>"
		end if
	else
		response.write "<script language=javascript>alert('您已经投票了!');history.back(-1);</script>"
	end if
end sub

%>

⌨️ 快捷键说明

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