<%@ page language="C#" autoeventwireup="true" inherits="admin_other_SetVoteLimit, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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 id="CssName" rel="stylesheet" type="text/css" runat="server" />

    <script src="../../js/Common.js" type="text/javascript"></script>
    <script src="../../js/date/date.js" type="text/javascript"></script>

    <script type="text/javascript">
        function IsClick(obj, name) {
            var TypeCount = document.getElementsByName(obj.id);
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }

            for (var i = p; i < TypeCount.length; i++) {
                if (TypeCount[i].checked) {
                    if (TypeCount[i].value == "True") {
                        switch (name) {
                            case "DivTime":
                            case "DivReset":
                                DianCMS_$(name).style.display = "";
                                break;
                            case "DivUser":
                                DianCMS_$("DivUser").style.display = "none";
                                DianCMS_$("DivAdd").style.display = "";
                                break;
                        }
                    }
                    else {
                        switch (name) {
                            case "DivTime":
                            case "DivReset":
                                DianCMS_$(name).style.display = "none";
                                break;
                            case "DivUser":
                                DianCMS_$("DivUser").style.display = "";
                                DianCMS_$("DivAdd").style.display = "none";
                                break;
                        }
                    }
                }
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="VoteLimitList.aspx">投票限制方案列表</a>
                >> 设置投票限制
            </td>
        </tr>
    </table>
    <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center">
        <tr>
            <td class="bqleft">
                方案名称：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtName" runat="server" Columns="30" CssClass="in1"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                是否启用时间限制：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="IsUnlockTime" runat="server" RepeatDirection="Horizontal"
                    onclick="IsClick(this,'DivTime')">
                    <asp:ListItem Value="True">启用</asp:ListItem>
                    <asp:ListItem Value="False" Selected="True">不启用</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tbody style="display: none" runat="server" id="DivTime">
            <tr>
                <td class="bqleft">
                    开始时间：
                </td>
                <td class="bqright">
                    <asp:TextBox ID="txtStartTime" runat="server" Columns="20" CssClass="in1" onClick="date({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="bqleft">
                    结束时间：
                </td>
                <td class="bqright">
                    <asp:TextBox ID="txtEndTime" runat="server" Columns="20" CssClass="in1" onClick="date({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})"></asp:TextBox>
                </td>
            </tr>
        </tbody>
        <tr>
            <td class="bqleft">
                是否允许匿名投票：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="IsGuest" runat="server" RepeatDirection="Horizontal" onclick="IsClick(this,'DivUser')">
                    <asp:ListItem Value="True" Selected="True">是</asp:ListItem>
                    <asp:ListItem Value="False">否</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tbody style="display: none" id="DivUser" runat="server">
            <tr>
                <td class="bqleft">
                    指定用户组提交：
                </td>
                <td class="bqright">
                    <asp:CheckBoxList ID="CheckUserGroup" runat="server" RepeatDirection="Horizontal" RepeatColumns="5">
                    </asp:CheckBoxList>
                </td>
            </tr>
        </tbody>
        <tbody runat="server" id="DivAdd">
        <tr>
            <td class="bqleft">
                记录用户投票：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="IsAdd" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="1" Selected="True">客户端记录</asp:ListItem>
                    <asp:ListItem Value="2">服务器IP记录</asp:ListItem>
                    <asp:ListItem Value="3">客户端和服务器Ip同时记录</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        </tbody>
        <tr>
            <td class="bqleft">
                是否允许重复投票：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="IsReset" runat="server" RepeatDirection="Horizontal" onclick="IsClick(this,'DivReset')">
                    <asp:ListItem Value="True">是</asp:ListItem>
                    <asp:ListItem Value="False" Selected="True">否</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tbody style="display: none" runat="server" id="DivReset">
            <tr>
                <td class="bqleft">
                    重复投票时间间隔：
                </td>
                <td class="bqright">
                    <asp:TextBox ID="txtMinutes" runat="server" Columns="10" CssClass="in1" Text="60"></asp:TextBox> 分钟
                </td>
            </tr>
        </tbody>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="40">
                <asp:Button ID="Button1" runat="server" Text=" 确认 " CssClass="btn radius30 pad_0_30" 
                    onclick="Button1_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
