{layout:default} {class:Shop.Admin.promotion.EmailTask}
<lbhead>
    <title><%=Tag("群发邮件")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
        <ul>
            <%if (PageReturnMsg == ""){%>
            <li class="add"><a href="javascript:void(0);" onclick="Editobj();"><b></b><span><%=Tag("添加")%></span></a></li>
            <li class="del"><a href="javascript:void(0);" onclick="Del();"><b></b><span><%=Tag("删除")%></span></a></li>
            <%}%>
            <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <%=Tag("群发邮件")%></span>  
            </li>
        </ul>
    </div>
</lbpath>
<lbbody>
    <table class="datalist">
        <tr class="title">
           <th style="width: 40px" class="selectAll">
                <a href="javascript:void(0);" onclick="$('input[name=\'id\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a>
            </th>
            <th >
                <%=Tag("主题")%>
            </th>
            <th width="200px">
                <%=Tag("发送对象")%>
            </th>
            <th width="100px">
                <%=Tag("状态")%>
            </th>
            <th width="130px">
                <%=Tag("添加时间")%>
            </th>
            <th width="120px">
                <%=Tag("管理员")%>
            </th>
            <th width="100px">
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (DB.LebiShop.Lebi_EmailTask model in models)
          {%>
        <tr class="list" ondblclick="Editobj(<%=model.id %>);">
            <td style="text-align:center">
                <input type="checkbox" name="id" value="<%=model.id %>" del="true" />
            </td>
            <td>
                <%=Lang(model.EmailTitle) %>
            </td>
            <td>
                <%=userlevel(model.UserLevel_ids)%>
            </td>
            <td>
                <%=model.IsSubmit==1?Tag("已提交"):Tag("未提交") %>
            </td>
           
            <td>
                <%=FormatTime(model.Time_add) %>
            </td>
            <td>
                <%=model.Admin_UserName%>
            </td>
            <td>
                <a href="javascript:Editobj(<%=model.id %>);"><%=model.IsSubmit==1?Tag("查看"):Tag("编辑") %></a> 
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function Editobj(id) {
            window.location = "emailtask_edit.aspx?id=" + id;
        }
        function Del(id) {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_sale.aspx?__Action=EmailTask_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
    </script>
</lbbody>
<lbbottom>
    <div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>