当前位置:首页 > 代码 > 正文

asp简单投票代码(投票程序c语言代码)

admin 发布:2022-12-19 22:06 81


今天给各位分享asp简单投票代码的知识,其中也会对投票程序c语言代码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

高分求投票asp 代码修改

把下面的if语句换成elseif

if cbool(Request.form("p1"))=true then

sql="update vote set p1=p1+1 where infoid='"infoid"'"

elseif cbool(Request.form("p2"))=true then

sql="update vote set p2=p2+1 where infoid ='"infoid"'"

。。。。。。

end if

下面代码是ASP投票系统的代码,这是同一IP只能投一票,帮我改成同一IP20分钟内只能能投1票,谢谢

我不知道你用的什么数据库如果是sqlserver的话把

sql语句修改成

加上了 datediff(mi,AddTime,GETDATE()) 20 这个条件

access数据库

datediff(‘n‘,AddTime,now()) 20

sql="Select * from zhi_rui_v_Vo where Voteid="vid" and Hostip='"ip"' and datediff(mi,AddTime,GETDATE()) 20 "

就可以了

ASP投票代码

%@ language="vbscript"%

%response.Expires = 0%

!--#include file="conn.asp"--

%

id=request.querystring("id")

call isid(id)

set rs=conn.execute("select * from [VoteTitle] where id="id)

%

html

head

title%=rs("votetitle")%--------在线投票代码/title

meta http-equiv="Content-Type" content="text/html; charset=gb2312"

style

td,input{

font-size: 12px;

}

.table {

border: 1px solid #eeeeee;

font-family: "宋体", Tahoma;

}

/style

/head

body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="parent.window.document.all.dd.height=document.body.scrollHeight"

form name="form1" method="post" action=" " target="_blank"

table width="800" border="0" cellspacing="0" cellpadding="3" align="center" class="table"

tr bgcolor="#efefef"

td height="30" class="26"font color="#43379D"主题:/font%=rs("votetitle")%/td

/tr

tr

td table width="100%" border="0" cellspacing="0" cellpadding="0"

tr

%

set rs1=conn.execute("select * from [VoteSelect] where titleid="id)

do while not rs1.eof%

td width="800" height="30" nowrap %if rs("votetype")=1 then%

input type="radio" name="options" value="%=rs1("id")%"

%else%

input type="checkbox" name="options2" value="%=rs1("id")%"

%end if%

%=rs1("selectitem")%

%rs1.movenext

loop%

/tr/table/td

/tr

tr

td height="40" align="right" div align="left"

input name="titleid" type="hidden" id="titleid" value="%=rs("id")%"

input name="iptype" type="hidden" id="iptype" value="%=rs("iptype")%"

input name="votetype" type="hidden" value="%=rs("votetype")%"

input type="submit" name="Submit2" value="投票"

input type="button" name="Button" value="查看结果" onClick="window.open(';%=id%')"

/div/td

/tr

/table

/form

/body

/html

关于asp简单投票代码和投票程序c语言代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/26694.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载