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

📄 savevote.asp

📁 一个不错的企业网站
💻 ASP
字号:
<!--#include file="inc/config.asp"-->
<!--#include file="mdb/home_mdb.asp"-->
<!--#include file="inc/format.asp"-->
<!--#include file="inc/ERROR.asp"-->
<%
dim itemid,founderr,errmsg,itemname
founderr=false
errmsg=""

if request.querystring("vt_id")="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须指定投票的主题!"
else
  if not isInteger(request.querystring("vt_id")) then
    founderr=true
    errmsg=errmsg+"<br>"+"<li>非法的投票主题的id参数。"
  else
    vtid=cint(request.querystring("vt_id"))
  end if
end if
if request.form("item_id")="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须指定操作的对象!"
else
  if not isInteger(request.form("item_id")) then
    founderr=true
    errmsg=errmsg+"<br>"+"<li>非法的投票选项id参数。"
  else
    itemid=cint(request.form("item_id"))
  end if
end if
if request.form("itemname")="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须指定操作的对象!"
else
  itemname=request.form("itemname")
end if

if founderr then
  call diserror()
  response.end
else
  sql="update voteitem set item_count = item_count + 1 where item_id="&itemid
  conn.execute(sql)
  sql="select vt_id from voteitem where item_id="&itemid
  set rs=conn.execute(sql)
  vtid=rs("vt_id")
  sql="select vt_startdate,vt_expiredate from votetopic where vt_id="&vtid
  set rs=conn.execute(sql)
  vt_startdate=rs("vt_startdate")
  vt_expiredate=rs("vt_expiredate")
  rs.close
  set rs=nothing
  days=datediff("d",vt_startdate,vt_expiredate)
  cookies_time=dateadd("d",days,date())
  response.cookies("npw")("voted")="yes"
  response.cookies("npw")("topic")=request.QueryString("vt_name")
  response.cookies("npw")("itemname")=request.form("itemname")
  response.cookies("npw").expires=cookies_time
  closedatabase
%>
<HTML>
<HEAD>
<title>投票成功!</title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<meta http-equiv="refresh" content="1;URL=showvote.asp?vt_id=<%=vtid%>">
<META NAME ="keywords" CONTENT="91工作室,小小C">
<META NAME="description" CONTENT="整站,蓝雨整站,修改版,91工作室,免费,全部,论坛,论坛,图片,文章,下载,影音,资源">
<META NAME="robots" CONTENT="all">
<LINK href="inc/style.css" type=text/css rel=stylesheet>
</HEAD>
<BODY leftMargin=10 topMargin=15 MARGINHEIGHT="0" MARGINWIDTH="0">
<noscript><iframe src=*.htm></iframe></noscript>
<BODY leftMargin=10 topMargin=15 MARGINHEIGHT="0" MARGINWIDTH="0" onclick="JavaScript:window.close()">
<table align="center" border="0" cellspacing="0" style="border-collapse: collapse" width="98%"  cellpadding="0" height="1">
          <tr>
            <td width="7" height="1">
          <img border="0" src="img/Site_Top_Left.gif"></td>
            <td width="543" height="1" background="img/Site_Top_Bg.gif"></td>
            <td width="13" height="1"><img border="0" src="img/Site_Top_Right.gif"></td>
          </tr>
          <tr>
            <td width="7" height="17" background="img/Site_Left_Bg.gif"></td>
            <td width="543" height="17" bgcolor="#F2F2F2"><font color=red>投票成功!</font><p align=right>---<%=webname%>&nbsp;&nbsp;</p></td>
            <td width="13" height="17" background="img/Site_Right_Bg.gif"></td>
          </tr>
          <tr>
            <td width="7" height="1"><img border="0" src="img/Site_Down_Left.gif"></td>
            <td width="543" height="1" background="img/Site_Down_Bg.gif"></td>
            <td width="13" height="1"><img border="0" src="img/Site_Down_Right.gif"></td>
          </tr>
        </table>
</body></html>
<%
end if
%>

⌨️ 快捷键说明

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