📄 pollticket.jsp
字号:
<%
if(cookiemode.equals("1")) {
errorinfo="用户没有登录!访客不可以投票!";
}
else {
rs=connect.executeQuery("select titlelock from posts where groupid="+topic+" and db="+db+" and parentid=0");
if(rs.next()) {
titlelock=rs.getString(1);
if(titlelock.equals("1")) {
errorinfo="投票错误!此投票项目已经被关闭!";
}
else {
voteok=connect.executeUpdate("update vote set votenumber=votenumber+1 where id="+myChoice);
connect.executeUpdate("insert into voterecord (postsid,voteid,votename) values ("+postid+","+myChoice+",'"+cookiename+"')");
}
}
}
%>
<br>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebordercolor%> align=center>
<tr>
<td>
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor=<%=miscbacktwo%> align=center>
<font color=<%=fontcolormisc%>><b><%if(voteok) out.println("谢谢!您参与投票成功!");else out.println("对不起!您参与投票失败!");%></b></font>
</td>
</tr>
<tr>
<td bgcolor=<%=miscbackone%>>
<font color=<%=fontcolormisc%>>
<%
if(voteok) {
%>
如果浏览器没有自动返回,请点击下面的链接!
<ul>
<li><a href="topic.jsp?db=<%=db%>&topic=<%=topic%>">返回此投票贴</a>
<li><a href="db.jsp?db=<%=db%>">返回论坛</a>
<li><a href="index.jsp">返回论坛首页</a>
</ul>
<meta http-equiv="refresh" content="3; url=topic.jsp?db=<%=db%>&topic=<%=topic%>">
<%
}
else {
%>
关于投票错误的详细原因:
<ul>
<li><b><%=errorinfo%> </b>
<li>您是否需要查看<a href="javascript:openScript('help.jsp',500,400)">帮助文件</a>?
</ul>
<%
}
%>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -