<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "../admin/tuzh_pri.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="../img/css.css">
<title></title>
</head>
<%
title=request.form("title")
kind=request.form("kind")
cf=request.form("cf")
act=request.form("act")
if act="add" then 
set rs=server.createobject("ADODB.recordset")
sql="select * from vname"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("cf")=cf
rs("kind")=kind
rs.update
voteid=rs("id")
rs.close
set rs=nothing
response.Redirect("voteitem.asp?vid="&cstr(voteid))
end if
%>
<body>
<form id="form1" name="form1" method="post" action="">
  <table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
      <td height="443" align="center" valign="top" class="bg_low"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>添加投票|修改投票</b></font> </td>
          </tr>
        </table>
        <table width="358" border="1" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
            <td>投票类型</td>
            <td><label>
              <select name="kind" id="kind">
                <option selected="selected" value="1">单选</option>
                <option value="2">多选</option>
              </select>
            </label></td>
          </tr>
          <tr>
            <td>投票标题</td>
            <td><label>
              <input name="title" type="text" id="title" size="30" />
            </label></td>
          </tr>
          <tr>
            <td>是否可以重复投票</td>
            <td><label>
              <select name="cf" id="cf">
                <option selected="selected" value="n">否</option>
                <option value="y">是</option>
              </select>
            </label></td>
          </tr>
          <tr>
            <td align="right"><label>
              <input type="submit" name="Submit" value="提交" />
            </label></td>
            <td><label>
              <input type="reset" name="Submit2" value="重置" />
              <input type="hidden" name="act" value="add" />
            </label></td>
          </tr>
        </table>                </td>
    </tr>
  </table>
</form>
</body>
</html>
