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

📄 postvote.asp

📁 一个不错的论坛原代码
💻 ASP
字号:
<!--#include file="Connections.asp" -->
<!--#include file="conn.asp" -->

<%cpbusername=Request.Cookies(l_url&"feiyue")("Username")
if cpbusername="" then
response.redirect"index.asp"
end if
T_id=request("t_id")
l_id=request("l_id")
v_id=request.form("v_id")
sqlv1="select top 1 * from vote where v_num="&t_id&" order by v_num desc"
      set rs1=conn.execute(sqlv1)
               v_user=rs1("v_user")
               v_count1=rs1("v_count")                         
    if IsNull(v_user) then v_user=","    
      v_user=split(v_user,",")
if not (cpbusername)="" then
		 for i=ubound(v_user) to 0 step -1
		if cpbusername=v_user(i) then response.redirect"index.asp"
				next
	else
		response.redirect"index.asp"

end if
username=cpbusername
if  rs1("v_type")=1 then
for i=1 to request.form("v_id").count
sql= "UPDATE vote Set v_count = v_count + 1 ,v_user=v_user&'"&","&username&"'  where v_num = "&t_id&" and v_id="&request.form("v_id")(i)&""
conn.Execute(sql)
next
b=request.form("v_id").count
sql1= "UPDATE vote Set v_count = v_count + "&b&" ,v_user=v_user&'"&","&username&"' where v_num = "&t_ID&" and v_title='"&rs1("v_title")&"'"
conn.Execute(sql1)
else
sql= "UPDATE vote Set v_count = v_count + 1 ,v_user=v_user&'"&","&username&"' where v_ID = "&v_ID&""
conn.Execute(sql)
sql1= "UPDATE vote Set v_count = v_count + 1 ,v_user=v_user&'"&","&username&"' where v_num = "&t_ID&" and v_title='"&rs1("v_title")&"'"
conn.Execute(sql1)
end if
url="topic.asp?t_id="&t_id&"&l_id="&l_id
Response.Redirect(url)
%>

⌨️ 快捷键说明

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