<%@ page language="C#" autoeventwireup="true" inherits="admin_other_SetPlanAssignment, 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 type="text/javascript" src="../../js/date/date.js"></script>
    <script type="text/javascript">
        function SelPlanType(Name, Name1) {
            var TypeCount = document.getElementsByName(Name);
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }

            for (var i = p; i < TypeCount.length; i++) {
                var DivType = eval(Name1 + TypeCount[i].value);

                if (TypeCount[i].checked) {
                    DivType.style.display = "";
                }
                else {
                    DivType.style.display = "none";
                }
            }
        }
    </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="PlanAssignmentList.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="40" CssClass="in1"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="bqleft">计划任务：
                </td>
                <td class="bqright">
                    <asp:RadioButtonList ID="RadPlanType" runat="server" RepeatDirection="Horizontal"
                        RepeatColumns="5" onclick="SelPlanType('RadPlanType','ExecContent_')">
                        <asp:ListItem Value="1" Selected="True">生成首页</asp:ListItem>
                        <asp:ListItem Value="2">生成模型页</asp:ListItem>
                        <asp:ListItem Value="3">生成栏目页</asp:ListItem>
                        <asp:ListItem Value="9">按模型生成内容页</asp:ListItem>
                        <asp:ListItem Value="10">按栏目生成内容页</asp:ListItem>
                        <asp:ListItem Value="6">生成单页</asp:ListItem>
                        <asp:ListItem Value="7">标签生成文件</asp:ListItem>
                        <asp:ListItem Value="4">采集</asp:ListItem>
                        <asp:ListItem Value="13">列表采集</asp:ListItem>
                        <asp:ListItem Value="5">备份数据库</asp:ListItem>
                        <asp:ListItem Value="11">删除备份文件</asp:ListItem>
                        <asp:ListItem Value="12">URL地址</asp:ListItem>
                        <asp:ListItem Value="14">备份文件</asp:ListItem>
                        <asp:ListItem Value="20">自定义</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tbody id="ExecContent_1">
                <tr>
                    <td class="bqleft">生成方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radCreateMobile1" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">生成电脑端</asp:ListItem>
                            <asp:ListItem Value="2">生成手机端</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_2" style="display: none">
                <tr>
                    <td class="bqleft">选择模型：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="CheckInfoModel" runat="server" RepeatColumns="6" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">生成方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radCreateMobile2" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">生成电脑端</asp:ListItem>
                            <asp:ListItem Value="2">生成手机端</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_3" style="display: none">
                <tr>
                    <td class="bqleft">选择栏目：
                    </td>
                    <td class="bqright">
                        <table align="center" cellpadding="2" cellspacing="1" width="99%" class="border">
                            <tr class="title">
                                <td>模型名称
                                </td>
                                <td>是否生成
                                </td>
                                <td>选择栏目
                                </td>
                            </tr>
                            <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                                <ItemTemplate>
                                    <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                                        <td width="20%">
                                            <asp:TextBox ID="txtModelId" runat="server" Style="display: none" Text='<%#Eval("ModelId") %>'></asp:TextBox><%#Eval("ModelName") %>
                                        </td>
                                        <td width="20%">
                                            <asp:RadioButtonList ID="RadioCreate" runat="server" RepeatDirection="Horizontal">
                                                <asp:ListItem Value="0" Selected="True">不生成</asp:ListItem>
                                                <asp:ListItem Value="1">生成</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                        <td width="60%">
                                            <asp:CheckBoxList ID="CheckColumn" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
                                            </asp:CheckBoxList>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">生成方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radCreateMobile3" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">生成电脑端</asp:ListItem>
                            <asp:ListItem Value="2">生成手机端</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_6" style="display: none">
                <tr>
                    <td class="bqleft">选择单页内容：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="CheckSinglepage" runat="server" RepeatColumns="6" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">生成方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radCreateMobile6" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">生成电脑端</asp:ListItem>
                            <asp:ListItem Value="2">生成手机端</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_4" style="display: none">
                <tr>
                    <td class="bqleft">选择采集项目：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="CheckCollection" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_13" style="display: none">
                <tr>
                    <td class="bqleft">选择采集列表项目：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="CheckCollectionListData" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_5" style="display: none">
            </tbody>
            <tbody id="ExecContent_7" style="display: none">
                <tr>
                    <td class="bqleft">选择需要生成的文件：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="CheckLabelFile" runat="server" RepeatColumns="4" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_8" style="display: none">
                <tr>
                    <td class="bqleft">查询文件：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="CheckSearch" runat="server" RepeatColumns="4" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_9" style="display: none">
                <tr>
                    <td class="bqleft">按模型生成内容页：
                    </td>
                    <td class="bqright">
                        <table align="center" cellpadding="2" cellspacing="1" width="99%" class="border">
                            <tr class="title">
                                <td>模型名称
                                </td>
                                <td>生成规则（0为不生成 -1为生成所有）
                                </td>
                            </tr>
                            <asp:Repeater ID="RepModelInfo" runat="server">
                                <ItemTemplate>
                                    <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                                        <td align="center">
                                            <asp:TextBox ID="txtModelId" runat="server" Text='<%#Eval("ModelId") %>' Style="display: none"></asp:TextBox><%#Eval("ModelName") %>
                                        </td>
                                        <td>生成最新：<asp:TextBox ID="txtNum" runat="server" CssClass="in1" Columns="10" Text="0"></asp:TextBox>
                                            条
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">生成方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radCreateMobile9" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">生成电脑端</asp:ListItem>
                            <asp:ListItem Value="2">生成手机端</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_10" style="display: none">
                <tr>
                    <td class="bqleft">按栏目生成内容页：
                    </td>
                    <td class="bqright">
                        <table align="center" cellpadding="2" cellspacing="1" width="99%" class="border">
                            <tr class="title">
                                <td>模型名称
                                </td>
                                <td>生成规则（0为不生成 -1为生成所有）
                                </td>
                            </tr>
                            <asp:Repeater ID="RepColumnInfo" runat="server" OnItemDataBound="RepModelColumn_ItemDataBound">
                                <ItemTemplate>
                                    <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                                        <td align="center">
                                            <asp:TextBox ID="txtModelId" runat="server" Text='<%#Eval("ModelId") %>' Style="display: none"></asp:TextBox><%#Eval("ModelName") %>
                                        </td>
                                        <td>
                                            <table cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="150">
                                                        <asp:CheckBoxList ID="CheckColumn" runat="server" RepeatColumns="1" RepeatDirection="Horizontal">
                                                        </asp:CheckBoxList>
                                                    </td>
                                                    <td>生成最新：<asp:TextBox ID="txtNum" runat="server" CssClass="in1" Columns="10" Text="0"></asp:TextBox>
                                                        条
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">生成方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="radCreateMobile10" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">生成电脑端</asp:ListItem>
                            <asp:ListItem Value="2">生成手机端</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_11" style="display: none">
                <tr>
                    <td class="bqleft">指定日期：
                    </td>
                    <td class="bqright">删除<asp:TextBox ID="txtDelDate" runat="server" Columns="10" Text="10" CssClass="in1"></asp:TextBox>天以前的备份文件。
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_12" style="display: none">
                <tr>
                    <td class="bqleft">URL地址：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtUrl" runat="server" Columns="60" CssClass="in1"></asp:TextBox><br />
                        站内地址请以"/"开始(不包含虚拟目录)，外部地址以"http://"、"https://"开始
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_14" style="display: none">
                <tr>
                    <td class="bqleft">备份文件夹：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtFolder" runat="server" TextMode="MultiLine" Rows="4" Columns="50"></asp:TextBox><br />
                        多个文件夹用“,”隔开。以站点根目录开始的路径，后不带“/”。如：image,style/css
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">备份文件：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtFile" runat="server" TextMode="MultiLine" Columns="50" Rows="6"></asp:TextBox><br />
                        一行一个文件,以站点根目录开始的路径。如：/images/logo.gif
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">同时删除：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtbackdays" runat="server" CssClass="in1" Columns="20" Text="10"></asp:TextBox> 天前的备份。-1为不删除。
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">注意事项：
                    </td>
                    <td class="bqright"><font color="red">备份的文件保存在App_Data/site，需要通过FTP下载。</font>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecContent_20" style="display: none">
                <tr>
                    <td class="bqleft">自定义任务：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtSql" runat="server" TextMode="MultiLine" Width="99%" Rows="8"></asp:TextBox><br />
                        请输入一条可正常执行的SQL语句
                    </td>
                </tr>
            </tbody>
            <tr>
                <td class="bqleft">执行这个任务：
                </td>
                <td class="bqright">
                    <asp:RadioButtonList ID="RadExecPlan" runat="server" RepeatDirection="Horizontal"
                        onclick="SelPlanType('RadExecPlan','ExecPlan_')">
                        <asp:ListItem Value="6">每分钟</asp:ListItem>
                        <asp:ListItem Value="5">每小时</asp:ListItem>
                        <asp:ListItem Value="1" Selected="True">每天</asp:ListItem>
                        <asp:ListItem Value="2">每周</asp:ListItem>
                        <asp:ListItem Value="3">每月</asp:ListItem>
                        <asp:ListItem Value="4">一次性</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="bqleft">起始日期：
                </td>
                <td class="bqright">
                    <asp:TextBox ID="txtStartTime" runat="server" CssClass="in1" onClick="date({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})"
                        Columns="15"></asp:TextBox>
                </td>
            </tr>
            <tbody id="ExecPlan_6" style="display: none">
                <tr>
                    <td class="bqleft">运行这个任务：
                    </td>
                    <td class="bqright">每
                    <asp:TextBox ID="txtTimePlan6" runat="server" CssClass="in1" Columns="10" Text="30"></asp:TextBox>分钟
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecPlan_5" style="display: none">
                <tr>
                    <td class="bqleft">运行这个任务：
                    </td>
                    <td class="bqright">每
                    <asp:TextBox ID="txtTimePlan5" runat="server" CssClass="in1" Columns="10" Text="1"></asp:TextBox>小时
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecPlan_1">
                <tr>
                    <td class="bqleft">运行这个任务：
                    </td>
                    <td class="bqright">
                        <table>
                            <tr>
                                <td>
                                    <asp:RadioButton ID="RadDayRunPlan1" runat="server" Checked="true" GroupName="DayRunPlan"
                                        Text="每天" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:RadioButton ID="RadDayRunPlan2" runat="server" GroupName="DayRunPlan" Text="每周工作日" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:RadioButton ID="RadDayRunPlan3" runat="server" GroupName="DayRunPlan" Text="每" /><asp:TextBox
                                        ID="txtDay" runat="server" CssClass="in1" Columns="4" Text="1"></asp:TextBox>天
                                如每两天执行一次，则输入2
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecPlan_2" style="display: none">
                <tr>
                    <td class="bqleft">运行这个任务：
                    </td>
                    <td class="bqright">
                        <table cellpadding="2" cellspacing="0" border="0">
                            <tr>
                                <td>每<asp:TextBox ID="txtWeekNum" runat="server" CssClass="in1" Columns="4" Text="1"></asp:TextBox>周
                                </td>
                            </tr>
                            <tr>
                                <td height="30">请选择下面日期
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBoxList ID="CheckWeek" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Value="1">星期一</asp:ListItem>
                                        <asp:ListItem Value="2">星期二</asp:ListItem>
                                        <asp:ListItem Value="3">星期三</asp:ListItem>
                                        <asp:ListItem Value="4">星期四</asp:ListItem>
                                        <asp:ListItem Value="5">星期五</asp:ListItem>
                                        <asp:ListItem Value="6">星期六</asp:ListItem>
                                        <asp:ListItem Value="7">星期日</asp:ListItem>
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecPlan_3" style="display: none">
                <tr>
                    <td class="bqleft">运行这个任务：
                    </td>
                    <td class="bqright">
                        <table cellpadding="2" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <asp:RadioButton ID="RadPlan31" runat="server" Text="天" GroupName="PlanMonty" Checked="true" />
                                    选中月份的第<asp:TextBox ID="TextBox3" runat="server" CssClass="in1" Text="1" Columns="5"></asp:TextBox>天
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:RadioButton ID="RadPlan32" runat="server" Text="星期" GroupName="PlanMonty" />
                                    <asp:DropDownList ID="DropDownList1" runat="server">
                                        <asp:ListItem Value="1">第一个</asp:ListItem>
                                        <asp:ListItem Value="2">第二个</asp:ListItem>
                                        <asp:ListItem Value="3">第三个</asp:ListItem>
                                        <asp:ListItem Value="4">第四个</asp:ListItem>
                                        <asp:ListItem Value="5">最后一个</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="DropDownList2" runat="server">
                                        <asp:ListItem Value="1">星期一</asp:ListItem>
                                        <asp:ListItem Value="2">星期二</asp:ListItem>
                                        <asp:ListItem Value="3">星期三</asp:ListItem>
                                        <asp:ListItem Value="4">星期四</asp:ListItem>
                                        <asp:ListItem Value="5">星期五</asp:ListItem>
                                        <asp:ListItem Value="6">星期六</asp:ListItem>
                                        <asp:ListItem Value="7">星期日</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td height="25">选择执行月份：
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBoxList ID="CheckMonth" runat="server" RepeatColumns="6" RepeatDirection="Horizontal">
                                        <asp:ListItem Value="1">一月</asp:ListItem>
                                        <asp:ListItem Value="2">二月</asp:ListItem>
                                        <asp:ListItem Value="3">三月</asp:ListItem>
                                        <asp:ListItem Value="4">四月</asp:ListItem>
                                        <asp:ListItem Value="5">五月</asp:ListItem>
                                        <asp:ListItem Value="6">六月</asp:ListItem>
                                        <asp:ListItem Value="7">七月</asp:ListItem>
                                        <asp:ListItem Value="8">八月</asp:ListItem>
                                        <asp:ListItem Value="9">九月</asp:ListItem>
                                        <asp:ListItem Value="10">十月</asp:ListItem>
                                        <asp:ListItem Value="11">十一月</asp:ListItem>
                                        <asp:ListItem Value="12">十二月</asp:ListItem>
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
            <tbody id="ExecPlan_4" style="display: none">
            </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>
        <asp:Literal ID="LitMsg" runat="server"></asp:Literal>
    </form>
</body>
</html>
