<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Stat.aspx.cs" Inherits="Web.Customize.zjjyedu.Stat" %>

<!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>
    <title></title>    
    <script language="javascript" type="text/javascript" >
        function SelectResult(callback, result, isValidResult) {
            showModalDialog("Select.html?callback=" + callback + "&result=" + result + "&isvalidresult=" + isValidResult, window, "dialogWidth:500px;dialogHeight:425px;help:no;scroll:no;status:no");
        }

        function IsValidResult(result) {
            var v = document.getElementById(result).value.split(",");
            if (v[0].length == 0) {
                return "对不起,您至少需要选择一项!";
            }
            else {
                return true;
            }
        }

        function InfoSearchRequest(result) {
            var s = document.getElementById("Result");
            if (s) {
                eval(s.getAttribute("href"));
            }
        }
    
    </script>
    <script type="text/javascript" src="WebCalendar.js"></script>
    <style type="text/css">
        body
        {
           font-size:12px; 
        }
        #table1
        {
            width: 560px;
        }
    </style>
</head>

<body>
    <form id="form1" runat="server">
    <div>    
        <table id="table1" cellspacing="1" border="0" width="560px">
            <tr>
            <td>时间范围&nbsp;<asp:TextBox ID="txtStartDate" runat="server" 
                    Width="70px" onclick="new Calendar().show(this);" Height="15"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtStartDate"
                                ErrorMessage="起始日期格式不正确！" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$">*</asp:RegularExpressionValidator> 到<asp:TextBox ID="txtEndDate" runat="server" Width="70" Height="15"
                    onclick="new Calendar().show(this);"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEndDate"
                                ErrorMessage="截止日期格式不正确！" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$">*</asp:RegularExpressionValidator>
                                <asp:Button ID="ResultClientButton" runat="server" 
                    OnClientClick="SelectResult('InfoSearchRequest','ResultValueList', 'IsValidResult')" 
                    Text="栏目选择" Width="86px" Visible="False" />
                 单位名称&nbsp;<asp:TextBox ID="Username"  runat="server" Height="15px" 
                    Width="98px"></asp:TextBox><asp:Button ID="Button2" runat="server" OnClick="Search_Click" Text="查询" />
                </td>
            </tr>
            
            <tr>
                <td height="25" align="center">各单位发表文章情况统计</td>
            </tr>
            
            <tr>
                <td valign="top">
                    <asp:DataGrid runat="server" PageSize="6" 
                        AutoGenerateColumns="False" id="dg" CellPadding="1" 
                        BorderStyle="Solid" BorderWidth="0.5pt" Width="540px">
                    <PagerStyle NextPageText="上一页" PageButtonCount="100" PrevPageText="" 
                            Visible="False" Mode="NumericPages" />
                    <Columns>
                         <asp:TemplateColumn HeaderText="排序"> 
                         <ItemTemplate> 
                         <%# dg.Items.Count + 1 + (currentPageIndex-1)*PageSize%> 
                         </ItemTemplate> 
                             <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                 Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Height="25" Width="50" />
                         </asp:TemplateColumn> 
                        <asp:BoundColumn HeaderText="单位名称" DataField="fullname">
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Height="25" Width="250"/>
                         </asp:BoundColumn>
                        <asp:BoundColumn HeaderText="总共文章数量" DataField="Total" ><ItemStyle Height="25" 
                                Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Width="130"/></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="已审核文章数量" DataField="Passed" ><ItemStyle Height="25" 
                                Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Width="130"/></asp:BoundColumn>
                    </Columns>
                    <HeaderStyle HorizontalAlign="Center" 
                        VerticalAlign="Middle" Height="25" />
                    </asp:DataGrid>
                    
                    <asp:Label ID="showPage" runat="server" Text="Label"></asp:Label>
                    <asp:Label ID="Showmessage" runat="server" ForeColor="Red"></asp:Label>
                 </td>
            </tr>
            
            <tr>
                <td height="30">总计：用户数：<asp:Label ID="user_count" runat="server" 
                        ForeColor="#FF3300"></asp:Label>
                总共文章数量：<asp:Label ID="news_count" runat="server" 
                    ForeColor="#FF3300"></asp:Label>
                已审核文章数量：<asp:Label ID="passed_count" runat="server" ForeColor="Red"></asp:Label>
                </td>
           </tr>
           <tr id="ResultBox" style="display: none">
                <td style="padding: 0px; width: 100%; text-align: center; padding-top: 20px">
                    <asp:ListBox ID="SelectSourceList" runat="server" SelectionMode="Multiple" Height="200">
                    </asp:ListBox>
                    <asp:ListBox ID="SelectDestinationList" runat="server" SelectionMode="Multiple" Height="200">
                    </asp:ListBox>
                    <asp:TextBox ID="ResultValueList" runat="server"></asp:TextBox>
                </td>
          </tr>
        </table>
  
    </div>
    </form>
</body>
</html>
