简单asp投票系统源码

本文章 一款简单asp教程投票系统源码,同时可以判断用户是否是当天第一次投票,如果不是就提示感谢您的支持,您已经投过票了,谢谢,否则就增加投票资料,并且把用户的ip地址保存到cookies里面,这样可以判断用户是否投票了。

<%dim options,total,sql,i,answer
if request.querystring("stype")="" then
 if request.servervariables("remote_addr")=request.cookies("ipaddress") then
  response.write"<script language=网页特效>alert('感谢您的支持,您已经投过票了,谢谢!');"
  response.write"javascript:window.close();</script>"
 else
  options=request.form("options")
  response.cookies("ipaddress")=request.servervariables("remote_addr")
  conn.execute("update vote set answer"&options&"=answer"&options&"+1 where ischecked=1")
 end if
end if
%><head><title>投票结果</title>
<link href=images/css教程.css rel=stylesheet>
</head>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td height="29">
        <table width=170 height="20" align="center" cellpadding=0 cellspacing=0>
          <tr>
            <td width=5>&nbsp;</td>
            <td width=28>
              <div align="center"></div>
            </td>
            <td class=hg12 valign=bottom width="123">&nbsp;<font color="#000000"><b>投票结果</b></font></td>
            <td width=12>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="29">
      <table border="0" cellpadding="0" cellspacing="0" width="95%" height="48" style="border-collaps教程e: collapse" align="center">
        <%
total=0
set rs=server.createobject("adodb.recordset")
sql="select * from vote where ischecked=1"
rs.open sql,conn,3,3
%>
        <tr>
          <td height="48" valign="top" colspan="3" align=left><font color="#000000"><br>
            ==================www.111cn.net=======================<br>
          </font> <font color="#000073"> <%=rs("title")%></font> </td>
        </tr>
        <tr>
          <td valign="top">序号</td>
          <td valign="top">百比分</td>
          <td valign="top">人数</td>
        </tr>
        <%
for i=1 to 8
 if rs("select"&i)<>"" then
  total=total+rs("answer"&i)
 end if
next
%>
        <%for i=1 to 8
 if rs("select"&i)<>"" then
  if total=0 then
   answer=0
  else
   answer=(rs("answer"&i)/total)*100
  end if
%>
        <tr>
          <td valign="top"><%=i%>.<%=rs("select"&i)%>:</td>
          <td valign="top"><img src=images/rscount.gif width=<%=int(answer*2)%> height=8>
            <%=round(answer,3)%>%</td>
          <td valign="top"><%=rs("answer"&i)%>人</td>
          <%
 end if
next
%>
        <tr>
          <td colspan="3"> 共有【<%=total%>】人参加投票<br>
            =======================================================</td>
        </tr>
      </table>
      <div align="center"></div>
      <p align="center">【<a href="javascript:window.close()">关闭窗口</a>】
        <% rs.close    
set rs=nothing    
conn.close    
set conn=nothing %>
    </td>
  </tr>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="23">
      <div align="center"></div>
      </td>
  </tr>
</table>

时间: 2024-07-29 05:32:00

简单asp投票系统源码的相关文章

php简单 在线投票系统 源码下载,

php简单 在线投票系统 源码下载,上次要和你一家公合作他们说要我写一个简单的投票系统,但是每一个IP只能投一次,好了下面就是我写的一个最最简单的投票系统了,是用php实现的. 先来创建数据库.有两个一个记录投票次数与相关信息一个是记录IP. CREATE TABLE IF NOT EXISTS `lj_vote` (   `id` int(8) NOT NULL auto_increment,   `v_type` int(4) default '1',   `v_caption` varch

简单ajax+asp投票系统源码

/*  *--------------------------------------------------------------------  *  *创建一个XMLHttp实例  *return object 成功创建返回一个XMLHttp对象实例,否则返回false  *  *--------------------------------------------------------------------  */  function CreateAjax()  {     var

php 网上在线调查投票系统源码实例

今天我们要为php教程学者提供一款php 网上在线调查系统源码教程,这是一款从html到php的简单的应用实例,就是关于在线投票系统代码. html代码 <html> <head> <title>调查表</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgc

谢谢了-简单的ss2h汽车售票系统源码

问题描述 简单的ss2h汽车售票系统源码 谁能给我一个简单的ss2h汽车售票系统源码,我参考参考,想做一个售票系统,没思路 解决方案 你好 我最近做了一个火车票售票系统 ,和汽车差不多 ,你可以看看 ,也是struts2 框架的 ,只不过我写的是sshhttp://download.csdn.net/detail/qq_26431469/9475728

asp.net有没有类似于PHP的ecshop的商城系统源码,付费的都行。

问题描述 asp.net有没有类似于PHP的ecshop的商城系统源码,付费的都行.麻烦大家推荐下. 解决方案 解决方案二: 解决方案三:有没有人推荐下!!解决方案四:nopcommerce解决方案五:51ASPX解决方案六:写的一样好的没有见过,差不多的好像不少,你可以上网找找看,应该能够找到不少.解决方案七:petshop

团购网站系统源码

问题描述 团购网站系统源码仿美团.拉手等知名的团购网站.不是新开发,而是找之前做过类似项目的源码.要求使用c#,asp.net,sqlserver开发的.需要成熟稳定的,性能方面要有所保障,属于公司商业运做的更好.目前看中了一家:http://sohoai.com/index.html自己网上找了一下,没找到,所以到这里来找一下.有货的赶紧放出来吧.lcskey[at]qq.com 解决方案 解决方案二:你有没有啊?解决方案三:外包开发解决方案四:你看看这个网站希望对你有帮助解决方案五:楼主,你

求一个java的人脸识别系统源码

问题描述 求一个java的人脸识别系统源码 用java语言开发,可以进行人脸识别的程序,算法不要太复杂,能进行简单的人脸识别就行了 解决方案 求人脸识别系统源代码!!! 解决方案二: 一个完整的项目demo http://download.csdn.net/detail/apbbbbb/9525308

跪求C#公交查询系统源码

问题描述 跪求C#公交查询系统源码(极其简单即可) 解决方案 解决方案二:http://www.51asx.com解决方案三:跪求?怎么又跪求?呜呜解决方案四:就知道跪,是奴才啊???解决方案五:giveme?解决方案六:跪求是没用的,要设计这个应该不会是很难的吧!解决方案七:hehe解决方案八:爱死你了,这么好的帖子要顶的

asp.net mvc源码分析-DefaultModelBinder 自定义的普通数据类型的绑定和验证

原文:asp.net mvc源码分析-DefaultModelBinder 自定义的普通数据类型的绑定和验证 在前面的文章中我们曾经涉及到ControllerActionInvoker类GetParameterValue方法中有这么一句代码:    ModelBindingContext bindingContext = new ModelBindingContext() {                 FallbackToEmptyPrefix = (parameterDescriptor