<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="java.sql.*"%> 
<%@ page import="java.util.*"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>
<%@ include file="../inc/conn.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/xmwuye.css">
<%
String str,tptype,pollid,tpnl,Vote_Count_Total,sql,Vote_count,tpnum,per;
ResultSet rs,rs1,rs2;
String lookpollid=request.getParameter("lookpollid");
if (lookpollid==null){

}
else
{
tptype=request.getParameter("tptype");
pollid=request.getParameter("pollid");
tpnl=request.getParameter("tp");
if (tptype!=null"" && tpnl!=null){
 if (tptype.equals("1")){
   sql="update BBS_Poll set 票数=票数+1 where ID="+tpnl+" ";
   stmt.executeUpdate(sql);
    out.print("<script language='javascript'>");
    out.print("alert('投票成功！');");
    out.print("history.go(-1);");
    out.print("</script>");
    out.close();
  }
 else{
   sql="update BBS_Poll set 票数=票数+1 where pid="+pollid+" ";
   stmt.executeUpdate(sql);
   out.print("<script language='javascript'>");
   out.print("alert('投票成功！');");
   out.print("history.go(-1);");
   out.print("</script>");
   out.close();
   }
  }
}
%>
