<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "../admin/tuzh_pri.asp"-->
<!--#include file="conn.asp"-->
<%
id=request("id")
if request("doact")="del" then
conn.execute("delete from vname where id="&cint(id))
conn.execute("delete from vitem where vid="&cint(id))
end if%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../img/css.css"><meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=site_name%></title>
<script language=javascript>
function SureDel(id)
{
    if ( confirm("警告!你是否真的要删除？"))
        {
            window.location.href = "viewvote.asp?doact=del&id=" + id
        }
}
</script>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>
</head>
<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr> 
    <td height="540" 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>
      <center>
        <br />
      </center>
      <table width="98%" border="3" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
        <tr> 
          <td width="46">序号</td>
          <td width="105">投票标题</td>
          <td width="42">&nbsp;</td>
          <td width="50">&nbsp;</td>
          <td width="169">是否可重复投票&nbsp;</td>
          <td width="80">投票类型&nbsp;</td>
          <td width="46">&nbsp;</td>
          <td width="57">&nbsp;</td>
        </tr>
        <%set rs=server.createobject("ADODB.recordset")
sql="select * from vname "
rs.open sql,conn,1,1
	do while not rs.eof %>
        <tr> 
          <td><%=rs("id")%>&nbsp;</td>
          <td><%=rs("title")%></td>
          <td><a href="toupiao.asp?vid=<%=rs("id")%>" target="_blank">投票</a></td>
          <td><a href="view.asp?vid=<%=rs("id")%>" target="_blank">结果</a></td>
          <td> 
            <%if rs("cf")="y" then response.Write("可以") else response.Write("不可以") end if%>
            &nbsp;</td>
          <td> 
            <%if rs("kind")="1" then response.Write("单选") else response.Write("多选") end if%>
            &nbsp;</td>
          <td><input type="button" name="modi" value="修改"  onclick="window.location.href='voteitem.asp?vid=<%=rs("id")%>'" /></td>
          <td><input type="button" name="modi2" value="删除"  onclick="SureDel(<%=rs("id")%>);" /></td>
        </tr>
        <%rs.movenext
	loop
	rs.close
	conn.close
	%>
      </table>
      <br />
      把如下代码插入到新闻网页中即可：<br /> &lt;script language=&quot;javascript&quot; src=&quot;vote/votescript.asp?vid=<span class="style1">7</span>&quot;&gt;&lt;/script&gt; 
      <br />
      数字“7 ”为该投票的 序号。将其替换为你要进行的投票的数字即可。 </td>
  </tr>
</table>
</body>
</html>
