<%@ Page Language="C#" MasterPageFile="~/v/Users.Master" AutoEventWireup="true" CodeBehind="WebsiteList.aspx.cs" Inherits="Stat.web.v.WebsiteList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
$(document).ready(function(){  
   $("a[id$='LinkButtonClearAll']").bind('click',function(){return confirm('确认要清零吗？数据将无法恢复！');}); 
   $("a[id$='LinkButtonDelete']").bind('click',function(){return confirm('确认要删除吗？数据将无法恢复！');});   
});
</script>
<style type="text/css">
.weblist a:link {
	color: #0000CC;
	text-decoration: none;
}
.weblist a:visited {
	text-decoration: none;
	color: #0000CC;

}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMain" runat="server">
    <table style="width:100%; background-color:#b6c7db;" cellpadding="1" cellspacing="1" border="0" class="weblist">
        <tr>
            <td style="height:25px; background-color:#FFFFFF; line-height:25px; padding-left:15px; padding-right:15px; font-weight:bold; font-size:14px;">
                <span style="float:left">站点列表（<img alt="" src="/images/Skin2/add_03.gif" />&nbsp;<a href="Website.aspx?ac=add">添加</a>）</span><span style="float:right"><img alt="" 
                    src="/images/Skin2/add_03.gif" />&nbsp;<a href="Website.aspx?ac=add">添加站点</a></span></td>  
        </tr>
        </table>&nbsp;
<asp:GridView ID="GvList" runat="server" AutoGenerateColumns="False" Width="100%" 
          EmptyDataText="没有找到站点，请先添加" BorderColor="#B6C7DB" BorderWidth="1px" 
          onrowcommand="GvList_RowCommand" onrowdeleting="GvList_RowDeleting" 
          onrowediting="GvList_RowEditing" CssClass="weblist" 
          onrowdatabound="GvList_RowDataBound">
    <RowStyle Font-Size="12px" />
    <Columns>
        <asp:BoundField HeaderText="站点名称" DataField="WebName" >
        <HeaderStyle BackColor="#D5E2F1" Height="24px" HorizontalAlign="Center" 
            Width="22%" BorderColor="#B6C7DB" BorderWidth="1px" />
        <ItemStyle BorderColor="#B6C7DB" BorderWidth="1px" Height="22px" 
            HorizontalAlign="Center" Width="23%" />
        </asp:BoundField>
        <asp:BoundField HeaderText="站点URL地址" DataField="WebUrl" >
        <HeaderStyle BackColor="#D5E2F1" HorizontalAlign="Center" Width="25%" 
            BorderColor="#B6C7DB" BorderWidth="1px" />
        <ItemStyle BorderColor="#B6C7DB" BorderWidth="1px" Height="22px" 
            HorizontalAlign="Center" />
        </asp:BoundField>
        <asp:TemplateField HeaderText="昨日概况（PV，IP）">
            <ItemTemplate>
              昨PV：<strong><%#Eval("YdPvCount")%></strong>&nbsp;昨IP：<strong><%#Eval("YdIpCount")%></strong>
            </ItemTemplate>
            <HeaderStyle BackColor="#D5E2F1" HorizontalAlign="Center" Width="16%" 
                BorderColor="#B6C7DB" BorderWidth="1px" />
            <ItemStyle BorderColor="#B6C7DB" BorderWidth="1px" Height="22px" 
                HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:HyperLinkField DataNavigateUrlFields="webid" 
            DataNavigateUrlFormatString="Main.aspx?wid={0}" HeaderText="查看报表" 
             Text="查看报表">
        <HeaderStyle BackColor="#D5E2F1" BorderColor="#B6C7DB" BorderWidth="1px" 
            HorizontalAlign="Center" />
        <ItemStyle BorderColor="#B6C7DB" HorizontalAlign="Center" />
        </asp:HyperLinkField>
        <asp:TemplateField HeaderText="站点设置">
            <ItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="GetCode"  CommandArgument='<%#Eval("Webid")%>'>获取统计代码</asp:LinkButton>
                <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Edit">修改</asp:LinkButton>
                <asp:LinkButton ID="lBtnContent" runat="server" CommandName="SetContent"  CommandArgument='<%#Eval("Webid")%>'>内容分类规则</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonClearAll" runat="server" CommandName="ClearAll" CommandArgument='<%#Eval("Webid")%>'>清零</asp:LinkButton>
                <asp:LinkButton ID="LinkButtonDelete" runat="server" CommandName="Delete">删除</asp:LinkButton>
            </ItemTemplate>
            <HeaderStyle BackColor="#D5E2F1" HorizontalAlign="Center" Width="27%" 
                BorderColor="#B6C7DB" BorderWidth="1px" />
            <ItemStyle BorderColor="#B6C7DB" BorderWidth="1px" Height="22px" 
                HorizontalAlign="Center" />
        </asp:TemplateField>
    </Columns>
      <HeaderStyle Font-Size="12px" />
      </asp:GridView>
      &nbsp;<table style="width:100%; background-color:#b6c7db;" cellpadding="1" cellspacing="1" border="0"> 
        <tr>
            <td style="height:22px; background-color:#FFFFFF; text-align:center; font-size:12px; line-height:22px;">
              <asp:Literal ID="LtrPageIndex" runat="server"></asp:Literal>
           </td>
</tr>
</table>        
        
<div class="box" style="margin-top:10px;"><span style="font-weight:bold">承诺：</span>保证不会向用户的统计代码里放任何广告或插件。 如遇到统计服务问题，请联系我们。</div>
</asp:Content>
