<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_News_SetVote, QianboCMS" EnableEventValidation="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>投票管理</title>
<link href="../Css/layout.css" rel="Stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../../Js/DatePicker/WdatePicker.js"></script>
<script src="../../Js/Common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function CheckInput()
{
    if($("txtStartTime").value=="" || $("txtEndTime").value=="")
    {
        alert("请输入起始日期！");
        return false;
    }
    if($("txtDescription").value=="")
    {
        alert("投票说明不能为空！");
        return false;
    }
}
function showup(num)
{
    for(var i=0;i<3;i++)
    {
        var obj=$("Tbody"+i);
        obj.style.display='none';
    }
    for( var m=0;m<num;m++)
    {
        var tgt=$("Tbody"+m);
        tgt.style.display='';
    }
}
function display()
{
    var ddl=$("ddlVoteNum");
    if(ddl.value > 0)
    {
        for(var i=0;i<ddl.value;i++)
        {
            var obj=$("Tbody"+i);
            obj.style.display='';
        }
    }
}
</script>
</head>

<body onload="display();">
<form id="form1" runat="server">
  <table border="0" cellpadding="0" cellspacing="0" class="wzdh" align="center" width="99%">
    <tr>
      <td style="padding-left: 10px;"><img src="../Images/Skin/Default/you.gif" align="absmiddle" /> 您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; <a href="Vote.aspx">投票系统</a> &gt;&gt; 设置投票</td>
    </tr>
  </table>
  <table width="99%" cellspacing="1" cellpadding="0" class="border" align="center">
    <tr class="wzlist">
      <td><a href="Vote.aspx">所有投票</a> | <a href="VoteCategory.aspx">新建分类</a> | <a href="VoteCategory.aspx">分类列表</a></td>
    </tr>
  </table>
  <table width="99%" cellspacing="1" cellpadding="0" class="border" align="center">
    <tr>
      <td class="bqleft">投票主题：</td>
      <td class="bqright"><asp:TextBox ID="txtDescription" runat="server" Width="288px"></asp:TextBox></td>
    </tr>
    <tr>
      <td class="bqleft">所属分类：</td>
      <td class="bqright"><asp:DropDownList ID="ddlCategory" runat="server"></asp:DropDownList></td>
    </tr>
    <tr>
      <td class="bqleft">开始日期：</td>
      <td class="bqright"><asp:TextBox ID="txtStartTime" runat="server" onClick="WdatePicker()"></asp:TextBox></td>
    </tr>
    <tr>
      <td class="bqleft">结束日期：</td>
      <td class="bqright"><asp:TextBox ID="txtEndTime" runat="server" onClick="WdatePicker()"></asp:TextBox></td>
    </tr>
    <tr>
      <td class="bqleft">需要登录后投票：</td>
      <td class="bqright"><asp:CheckBox ID="chkIsLogin" runat="server" Text="是" /></td>
    </tr>
    <tr>
      <td class="bqleft">投票项数：</td>
      <td class="bqright"><asp:DropDownList ID="ddlVoteNum" runat="server" onchange="showup(this.options[this.selectedIndex].value);">
          <asp:ListItem>1</asp:ListItem>
          <asp:ListItem>2</asp:ListItem>
          <asp:ListItem>3</asp:ListItem>
        </asp:DropDownList>
        <span class="tips" id="lbInfo" runat="server">选择后将不可修改</span></td>
    </tr>
    <tbody id="Tbody0">
      <tr>
        <td class="bqleft"><asp:Literal ID="LitVoteId1" runat="server" Visible="False"></asp:Literal>
          投票项一：</td>
        <td class="bqright"><asp:TextBox ID="txtTitle1" runat="server" Width="288px"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选择类型：</td>
        <td class="bqright"><asp:RadioButtonList ID="rblType1" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Selected="True" Value="0">单选</asp:ListItem>
            <asp:ListItem Value="1">多选</asp:ListItem>
          </asp:RadioButtonList></td>
      </tr>
      <tr>
        <td class="bqleft">选项一：</td>
        <td class="bqright"><asp:TextBox ID="txtItem11" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum11" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项二：</td>
        <td class="bqright"><asp:TextBox ID="txtItem12" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum12" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项三：</td>
        <td class="bqright"><asp:TextBox ID="txtItem13" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum13" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项四：</td>
        <td class="bqright"><asp:TextBox ID="txtItem14" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum14" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项五：</td>
        <td class="bqright"><asp:TextBox ID="txtItem15" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum15" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项六：</td>
        <td class="bqright"><asp:TextBox ID="txtItem16" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum16" runat="server">0</asp:TextBox></td>
      </tr>
    </tbody>
    <tbody id="Tbody1" style="display: none;">
      <tr>
        <td class="bqleft"><asp:Literal ID="LitVoteId2" runat="server" Visible="False"></asp:Literal>
          投票项二：</td>
        <td class="bqright"><asp:TextBox ID="txtTitle2" runat="server" Width="288px"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选择类型：</td>
        <td class="bqright"><asp:RadioButtonList ID="rblType2" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Selected="True" Value="0">单选</asp:ListItem>
            <asp:ListItem Value="1">多选</asp:ListItem>
          </asp:RadioButtonList></td>
      </tr>
      <tr>
        <td class="bqleft">选项一：</td>
        <td class="bqright"><asp:TextBox ID="txtItem21" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum21" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项二：</td>
        <td class="bqright"><asp:TextBox ID="txtItem22" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum22" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项三：</td>
        <td class="bqright"><asp:TextBox ID="txtItem23" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum23" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项四：</td>
        <td class="bqright"><asp:TextBox ID="txtItem24" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum24" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项五：</td>
        <td class="bqright"><asp:TextBox ID="txtItem25" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum25" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项六：</td>
        <td class="bqright"><asp:TextBox ID="txtItem26" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum26" runat="server">0</asp:TextBox></td>
      </tr>
    </tbody>
    <tbody id="Tbody2" style="display: none;">
      <tr>
        <td class="bqleft"><asp:Literal ID="LitVoteId3" runat="server" Visible="False"></asp:Literal>
          投票项三：</td>
        <td class="bqright"><asp:TextBox ID="txtTitle3" runat="server" Width="288px"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选择类型：</td>
        <td class="bqright"><asp:RadioButtonList ID="rblType3" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Selected="True" Value="0">单选</asp:ListItem>
            <asp:ListItem Value="1">多选</asp:ListItem>
          </asp:RadioButtonList></td>
      </tr>
      <tr>
        <td class="bqleft">选项一：</td>
        <td class="bqright"><asp:TextBox ID="txtItem31" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum31" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项二：</td>
        <td class="bqright"><asp:TextBox ID="txtItem32" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum32" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项三：</td>
        <td class="bqright"><asp:TextBox ID="txtItem33" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum33" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项四：</td>
        <td class="bqright"><asp:TextBox ID="txtItem34" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum34" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项五：</td>
        <td class="bqright"><asp:TextBox ID="txtItem35" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum35" runat="server">0</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">选项六：</td>
        <td class="bqright"><asp:TextBox ID="txtItem36" runat="server" Width="203px"></asp:TextBox>
          票数：
          <asp:TextBox ID="txtItemNum36" runat="server">0</asp:TextBox></td>
      </tr>
    </tbody>
    <tr>
      <td class="bqleft"></td>
      <td class="bqright"><asp:Button ID="btnAdd" runat="server" CssClass="btn" Text="添加" OnClientClick="return CheckInput();" OnClick="btnAdd_Click" />
        <input id="Reset1" class="btn" type="reset" value="重置" /></td>
    </tr>
  </table>
</form>
<asp:Literal ID="LitAction" runat="server" Visible="False"></asp:Literal>
<br />
</body>
</html>