📄 bbselse.asp
字号:
<!--#include file="inc.asp"-->
<%
menu=request.querystring("menu")
select case menu
case"vote"%><%
function laiyuan()
laiyuan=false
come=Request.ServerVariables("HTTP_REFERER")
here=Request.ServerVariables("SERVER_NAME")
if mid(come,8,len(here))<>here then
laiyuan=false
else
laiyuan=true
end if
end function
laiyuan()
if laiyuan=false then
response.redirect"index.asp"
end if
comeurl=Request.ServerVariables("HTTP_REFERER")
type1=request.querystring("type")
id=check2(request.querystring("id"))
set hhh=myconn.execute("select*from vote where id="&id&"")
outtime=hhh("outtime")
ddd=hhh("vote")
nno=hhh("votenum")
ddd=split(ddd,"|")
nno=split(nno,"|")
nnn=ubound(ddd)
if type1=1 then
xuan1=request.form("xuan")
for i=1 to nnn
if i=cint(xuan1) then
nno(i)=nno(i)+1
end if
num=num&"|"&nno(i)
next
else
dim xuan(10)
dim num1(10)
for i=1 to nnn
xuan(i)=request.form("xuan_"&i&"")
xuan1=xuan(i)&xuan1
next
for j=1 to nnn
if xuan(j)="" then num1(j)=nno(j)
if cint(xuan(j))=j then
num1(j)=nno(j)+1
end if
num=num&"|"&num1(j)
next
end if
canvote="yes"
if xuan1="" then canvote="no"
if lgname="" then
canvote="no"
else
set uss=myconn.execute("select name from [user] where name='"&lgname&"' and password='"&lgpwd&"'")
if uss.eof then
canvote="no"
end if
set uss=nothing
set had=myconn.execute("select user from voted where user='"&lgname&"' and id="&id&"")
if not had.eof then
canvote="no"
end if
set had=nothing
end if
if now>outtime then
canvote="no"
end if
if canvote="yes" then
riqi=now+timeset/24
myconn.execute("update vote set votenum='"&num&"' where id="&id&"")
myconn.execute("update bbstl set orders='"&riqi&"' where id="&id&"")
myconn.execute("update bbs"&totable&" set orders='"&riqi&"' where id="&id&"")
myconn.execute("insert into voted(id,user,votenum)values("&id&",'"&lgname&"','"&xuan1&"')")
end if
response.redirect""&comeurl&""
%>
<%
case"lgtype"
comeurl=Request.ServerVariables("HTTP_REFERER")
if lgtype="s" then Response.Cookies(cn)("lgtype")="y"
if lgtype="y" then Response.Cookies(cn)("lgtype")="s"
lgcook=check2(request.querystring("lgcook"))
if lgcook="" then lgcook=0
if int(lgcook)<>0 then
Response.Cookies(cn).Expires=date+int(lgcook)
end if
myconn.execute("delete*from [online] where name='"&lgname&"'")
response.redirect""&comeurl&""
%><%
case""%><!--#include file="up.asp"--><br><!--#include file="md5.asp"--><%
comeurl=Replace(Request.Form("comeurl"),"'","''")
if comeurl="" then
comeurl=Request.ServerVariables("HTTP_REFERER")
end if
lgname=check2(Request.Form("lgname"))
lgpwd=check2(Request.Form("lgpwd"))
lgtype=check2(Request.Form("lgtype"))
lgpwd=md5(lgpwd)
if lgtype="" then lgtype="s"
cook=int(Request.Form("cook"))
Response.Cookies(cn)("lgname")=lgname
Response.Cookies(cn)("lgpwd")=lgpwd
Response.Cookies(cn)("lgtype")=lgtype
Response.Cookies(cn)("lgcook")=cook
if int(cook)<>0 then
Response.Cookies(cn).Expires=date+int(cook)
end if
set lg=myconn.execute("select top 1 userid from [user] where name='"&lgname&"' and password='"&lgpwd&"'")
if lg.eof and lg.bof then
Response.Cookies(cn)("lgname")=""
Response.Cookies(cn)("lgpwd")=""
Response.Cookies(cn)("lgtype")=""
response.cookies(cn&"2")("admin")=1
infotl="登 陆 失 败"
mes="·你的用户名或密码错误<br>·<a href='javascript:history.go(-1)'>返回重新登陆</a>"
smes()
else
myconn.execute("update [user] set qian=qian+50,meili=meili+8,jingyan=jingyan+8 WHERE name='"&lgname&"'")
call getadmin()
infotl="登 陆 成 功"
mes="·<a href='index.asp'>进入论坛首页</a><br>·<a href='"&kbbs(comeurl)&"'>"&kbbs(comeurl)&"</a>"
smes()
end if%><br><!--#include file="down.asp"--><%end select%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -