【JSP开源代码栏目提醒】:本文主要为网学会员提供voteAction.jsp,希望对需要voteAction.jsp网友有所帮助,学习一下!
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/vote.jsp" %>
<%
String voteshow__url_vote_id = "1";
if (request.getParameter("vote_id") !=null) {voteshow__url_vote_id = (String)request.getParameter("vote_id");}
%>
<%
Driver Drivervoteshow = (Driver)Class.forName(MM_vote_DRIVER).newInstance();
Connection Connvoteshow = DriverManager.getConnection(MM_vote_STRING,MM_vote_USERNAME,MM_vote_PASSWORD);
PreparedStatement Statementvoteshow = Connvoteshow.prepareStatement("SELECT vote.votemain.vote_id,vote.votemain.vote_name,vote.voteitem.voteitem_id,vote.voteitem.vote_item,vote.voteitem.vote_count FROM vote.voteitem,vote.votemain WHERE vote.voteitem.vote_id=" + voteshow__url_vote_id + " and vote.voteitem.vote_id=vote.votemain.vote_id ORDER BY vote.voteitem.vote_count ASC");
ResultSet voteshow = Statementvoteshow.executeQuery();
boolean voteshow_isEmpty = !voteshow.next();
boolean voteshow_hasData = !voteshow_isEmpty;
Object voteshow_data;
int voteshow_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
voteshow_numRows += Repeat1__numRows;
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>绝对冻选投票系统</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<body>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12"><img name="vote_r1_c1" src="images/vote_r1_c1.gif" width="12" height="62" border="0" alt=""></td>
<td width="124" align="right" valign="bottom" bgcolor="#3399FF"><img name="vote_r2_c4" src="images/vote_r2_c4.gif" width="102" height="56" border="0" alt=""></td>
<td align="center" bgcolor="#3399FF"><img src="images/vote_r3_c7.gif" width="219" height="35"></td>
<td width="12"><img name="vote_r1_c13" src="images/vote_r1_c13.gif" width="12" height="62" border="0" alt=""></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" bgcolor="#3399FF"><img src="images/spacer.gif" width="1" height="9"></td>
<td width="14"><img name="vote_r5_c3" src="images/vote_r5_c3.gif" width="14" height="9" border="0" alt=""></td>
<td width="102"><img name="vote_r5_c4" src="images/vote_r5_c4.gif" width="102" height="9" border="0" alt=""></td>
<td background="images/vote_r5_c5.gif"><img src="images/spacer.gif" width="1" height="9"></td>
<td width="20" bgcolor="#3399FF"><img src="images/spacer.gif" width="1" height="9"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="20" bgcolor="#3399FF"></td>
<td width="14" background="images/vote_r6_c3.gif"></td>
<td style="background-attachment: fixed;background-image: url('images/vote_r9_c8_1.gif');background-repeat: no-repeat;background-position: right bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="102" valign="top"><img name="vote_r6_c4" src="images/vote_r6_c4.gif" width="102" height="40" border="0" alt=""></td>
<td align="center"><font color="#000099" size="2"><strong><font color="#990000" size="3"><%=(((voteshow_data = voteshow.getObject("vote_name"))==null || voteshow.wasNull())?"":voteshow_data)%></font></strong></font>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td align="center" valign="top">
<form name="form1" style="margin:0px" action="voteCount.jsp">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<% while ((voteshow_hasData)&&(Repeat1__numRows-- != 0)) { %>
<tr valign="baseline">
<td width="10" height="25"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input name="voteitem_id" type="radio" value="<%=(((voteshow_data = voteshow.getObject("voteitem_id"))==null || voteshow.wasNull())?"":voteshow_data)%>" checked>
</font></td>
<td height="25"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=(((voteshow_data = voteshow.getObject("vote_item"))==null || voteshow.wasNull())?"":voteshow_data)%></font></td>
</tr>
<%
Repeat1__index++;
voteshow_hasData = voteshow.next();
}
%>
</table>
<input name="vote_id" type="hidden" id="vote_id" value="<%= ((request.getParameter("vote_id")!=null)?request.getParameter("vote_id"):"") %>">
<input type="submit" name="Submit" value="我要投票">
<input type="reset" name="Submit2" value="重新投票">
</form>
</td>
</tr>
</table></td>
<td width="20" bgcolor="#3399FF"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img name="vote_r11_c1" src="images/vote_r11_c1.gif" width="20" height="15" border="0" alt=""></td>
<td bgcolor="#3399FF"><img src="images/spacer.gif" width="1" height="15"></td>
<td width="201"><img name="vote_r11_c8" src="images/vote_r11_c8_1.gif" width="201" height="15" border="0" alt=""></td>
<td width="20"><img name="vote_r11_c12" src="images/vote_r11_c12.gif" width="20" height="15" border="0" alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
voteshow.close();
Statementvoteshow.close();
Connvoteshow.close();
%>
上一篇:
vote.jsp
下一篇:
那些令你为之触动的好句子,感慨万分