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

📄 vote.asp

📁 wap系统程序源码 用户名密码:admin
💻 ASP
字号:
<!--#include file="const.asp"-->


<%Function main
if session("name")="yh" or xy="null"  then%>
<card id="index" title="出错啦"><p>对不起,你还没有登陆,请先登陆!<br/>
		<a href="login.asp">马上登陆</a><br/>
<%
else


	Set Rs7 = Server.CreateObject("Adodb.Recordset")
	Sql7 = "SELECT * FROM bbs_user where id= "&session("nid")&" and (noall<>true or noadd<>true)" 
	Rs7.Open Sql7,conn,1,1
	if not (rs7.bof and rs7.eof)  then 

			call save

	else%>

		<card id='index' title='回复帖子'><p>
		对不起,你已被禁止回复帖子,有什么问题请联系版主!<br/>
		<anchor>返回上一页<prev/></anchor><br/><a href="index.asp?xy=<%=xy%>">论坛首页</a>
	<%end if
	Rs7.close
	set rs7=nothing

end if
end Function



Function save
	voteid=Trim(Request("voteid"))
	id=TRim(Request("id"))
	lid=TRim(Request("lid"))
	bid=TRim(Request("bid"))
	if not isnumeric(id) then id=""
	if not isnumeric(bid) then bid=""
	if not isnumeric(lid) then lid=""

	if session("name")="yh"  or xy="null" then%>

		<card id="index" title="出错啦"><p>对不起,你还没有登陆,请先登陆!<br/>
		<a href="login.asp">马上登陆</a><br/>
		<%
	elseif id="" or lid="" or bid="" or voteid=""  then%>

		<card id="index" title="出错啦"><p>出错啦!请不要非法提交参数.<br/>
	<%else


	Set Rs3 = Server.CreateObject("Adodb.Recordset")
	Sql3 = "SELECT * FROM bbs_config "
	Rs3.Open Sql3,conn,1,1
	if not (rs3.bof and rs3.eof)  then 
			
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "SELECT * FROM bbs_list where id="&id
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof)  then 
			if rs("addvote")<>"" then addvote=split(utf8(rs("addvote")),"##")

				vote=""

				if rs("voteid")<>"" then
				 	votei=split(utf8(rs("voteid")),"##")
				
					for i=0 to ubound(votei)
						if votei(i)<>"" then
							if cint(votei(i))=cint(session("nid")) then
								novote="true"
							end if
						end if
					next
				end if


				if novote<>"true" then
					for i=0 to ubound(addvote)
						if addvote(i)<>"" then

							if cint(i)=cint(voteid) then
								
								vote=vote&cint(addvote(i))+1&"##"
							else
								vote=vote&addvote(i)&"##"
							end if
						end if
					next

					rs("addvote")=vote
					rs("voteid")=rs("voteid")&session("nid")&"##"
					rs.update
				end if
			end if
		Rs.close
		set rs=nothing%>
		<card id="index" title="投票"><p>投票成功!<br/>
		<a href="view.asp?bid=<%=bid%>&amp;lid=<%=lid%>&amp;id=<%=id%>&amp;xy=<%=xy%>">返回主帖</a><br/>
		<a href="list.asp?Action=list&amp;bid=<%=bid%>&amp;lid=<%=lid%>&amp;xy=<%=xy%>">帖子列表</a><br/>
	<%else%>
		<card id="index" title="出错啦"><p>出错啦!系统资料没配置.
	<%end if
	Rs3.close
	set rs3=nothing

	end if

end Function%>
</p></card>
</wml>

⌨️ 快捷键说明

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