<%@ page language="VB" title="我的文章" masterpagefile="~/page.master" autoeventwireup="false" inherits="WebExam.Web.cms_admin_myArticle, App_Web_ayyvfveb" %>
<%@ MasterType VirtualPath="~/page.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHead" Runat="Server">
<script type="text/javascript">
    function creatEx() {
        var t = window.showModalDialog("/secure/subjectTree/rootForModal.htm");
        if (t != null) {
            var url = "editonline.aspx?catalogId="+t;
            self.location=url;
        }

    };
    function CheckAll() {
        $("input[name='select']").attr("checked", true);


    };
    function unCheck() {
        $("input[name='select']").each(function (i) {
            this.checked = !this.checked;
        });
    };
    function unCheckAll() {
        $("input[name='select']").each(function (i) {
            this.checked = false;
        });
    }
    function checkWait() {
        $("input[name='select']").each(function (i) {
            var u = $(this).parent().next().next().children().attr("src");
            this.checked = (u.indexOf("/waiting.gif") != -1)
        });
    };
    function checkDeny() {
        $("input[name='select']").each(function (i) {
            var u = $(this).parent().next().next().children().attr("src");
            this.checked = (u.indexOf("/standard_msg_error.gif") != -1)
        });
    };
    function checkAllow() {
        $("input[name='select']").each(function (i) {
            var u = $(this).parent().next().next().children().attr("src");
            this.checked = (u.indexOf("/standard_msg_ok.gif") != -1)
        });
    };
    function checkSelect() {
        var c = false;
        $("input[name='select']").each(function (i) {
            if (this.checked) c = true;
        });
        if (!c) { alert("请至少选择一项！") }
        return c;
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainCopy" Runat="Server">
<div style="margin:0 auto;width:500px;text-align:center;">
<h3>我的文章</h3>
 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                ForeColor="#333333" GridLines="None" 
        DataKeyNames="id" Width="100%">
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#EFF3FB" />
                                <Columns>
                                  <asp:TemplateField ItemStyle-Width="30px" HeaderText="选择">
                <ItemTemplate>
                    <input type="checkbox" value='<%# DataBinder.Eval(Container.DataItem, "id") %>' name="select"
                         />
                </ItemTemplate>
            </asp:TemplateField>  
                                    <asp:TemplateField ItemStyle-Width="0px">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "status") %>' Visible="False"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:ImageField HeaderText="状态" ReadOnly="True" DataImageUrlFormatString="~/images/waiting.gif"
                DataImageUrlField="status" ItemStyle-Width="30px">
            </asp:ImageField>
                                    <asp:BoundField DataField="topic" HeaderText="标题" />
 
                                    <asp:BoundField ItemStyle-Width="60px" DataField="updateTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="发布时间"
                                        ReadOnly="True"></asp:BoundField>
 <asp:HyperLinkField Text="编辑" DataNavigateUrlFormatString="editonline.aspx?id={0}" DataNavigateUrlFields="id" ItemStyle-Width="30px" Target="_parent" />
                                    <asp:HyperLinkField ItemStyle-Width="30px" Text="打开" DataNavigateUrlFields="path,defaultFile" DataNavigateUrlFormatString="{0}{1}"
                                        Target="_blank" />
                                  
                                </Columns>
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#2461BF" />
                                <AlternatingRowStyle BackColor="White" />
                                <EmptyDataTemplate>无数据</EmptyDataTemplate>
                            </asp:GridView>
                            <pagers:PageNumbersPager ID="PageNumbersPager1" runat="server" />
                            <p  style="text-align:left;">
    选择:
<a href="javascript:checkWait()">等待</a>
<a href="javascript:checkDeny()">拒绝</a>
<a href="javascript:checkAllow()">许可</a>
    <a href="javascript:CheckAll()">全选</a>
    <a href="javascript:unCheck()">反选</a>
     <a href="javascript:unCheckAll()">不选</a>
    </p>
         <p><asp:Button ID="Btn_Delete" runat="server" Text="删除所选" 
            OnClientClick="if(checkSelect())return confirm('确定要删除吗？');else return false;" UseSubmitBehavior="True" TabIndex="2" />
<input type="button" onclick ="JavaScript:creatEx()" value ="新建文章" />

</p> 
<ul style=" list-style-type:none">


            <li style="float:left;width:100px"><img src="/images/waiting.gif" />等待审核</li><li style="float:left;;width:100px"><img src="/images/standard_msg_ok.gif" />审核通过</li><li style="float:left;width:100px"><img
                src="/images/standard_msg_error.gif" />被拒绝</li></ul>                  
</div>
</asp:Content>

