918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/cae6aa2e/15328683/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/cae6aa2e/15328683/App_Web_y3cbw3qs.3.cs
?#pragma checksum "D:\wwwroot\anlian2025\wwwroot\qzkeyadmin\report\report.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "929E9C1F66566975CD294D60A2841ED3BB7B254F"

#line 1 "D:\wwwroot\anlian2025\wwwroot\qzkeyadmin\report\report.aspx.cs"
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using WebApp.Components;
using basic;
using System.Web.Services;

public partial class report : Basic.ManagerPage
{
    WebSite website = new WebSite();
    protected void Page_Load(object sender, EventArgs e)
    {
        getjinripv();
        getzuoripv();
        getrukou();
    }
    basic.BasicPage bp = new basic.BasicPage();
    public string getip(string putdate)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(DISTINCT ip) from Tbreport_ip where putdate='" + putdate + "'");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }
    public string getnum(string putdate)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select num from Tbreport_num where putdate='" + putdate + "'");
        if (myread.Read())
        {
            num = myread["num"].ToString();
            if (string.IsNullOrEmpty(num))
            {
                num = "0";
            }
        }
        myread.Close();
        return num;
    }
    public string getpv(string putdate)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(id) from Tbreport_ip where putdate='" + putdate + "'");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }

    public string getip_yue(string putdate)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(DISTINCT ip) from Tbreport_ip where putdate like '%" + putdate + "%'");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }
    public string getnum_yue(string putdate)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select sum(num) from Tbreport_num where putdate like '%" + putdate + "%'");
        if (myread.Read())
        {
            num = myread[0].ToString();
            if(string.IsNullOrEmpty(num))
            {
                num = "0";
            }
        }
        myread.Close();
        return num;
    }
    public string getpv_yue(string putdate)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(id) from Tbreport_ip where putdate like '%" + putdate + "%'");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }

    public string getip_z()
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(DISTINCT ip) from Tbreport_ip ");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }
    public string getnum_z()
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select sum(num) from Tbreport_num ");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }
    public string getpv_z()
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(id) from Tbreport_ip");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }

    public string getip_zz(string type)
    {
        string num = "0";
        SqlDataReader myread = bp.getRead("select count(id) from Tbreport_ip where type='"+type+"'");
        if (myread.Read())
        {
            num = myread[0].ToString();
        }
        myread.Close();
        return num;
    }
    public int newpv = 0;
    public int newpv_zuori = 0;
    public int oldpv = 0;
    public int oldpv_zuori = 0;
    public void getjinripv()
    {
        DataTable dtpv = bp.SelectDataBase("Tbreport_ip", "select * from Tbreport_ip where putdate='" + DateTime.Now.ToString("yyyy-MM-dd") + "'").Tables[0];
        int intpv = dtpv.Rows.Count;
        for(int i=0;i<intpv;i++)
        {
            string ip = dtpv.Rows[i]["ip"].ToString();
            string mac = dtpv.Rows[i]["mac"].ToString();
            SqlDataReader myreader = bp.getRead("select id from Tbreport_ip where ip='" + ip + "' and Mac='" + mac + "' and putdate <'"+ DateTime.Now.ToString("yyyy-MM-dd") + "'");
            if (myreader.Read())
            {
                oldpv++;
            }
            else
            {
                newpv++;
            }
            myreader.Close();
        }
    }
    public void getzuoripv()
    {
        DataTable dtpv = bp.SelectDataBase("Tbreport_ip", "select * from Tbreport_ip where putdate='" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "'").Tables[0];
        int intpv = dtpv.Rows.Count;
        for (int i = 0; i < intpv; i++)
        {
            string ip = dtpv.Rows[i]["ip"].ToString();
            string mac = dtpv.Rows[i]["mac"].ToString();
            SqlDataReader myreader = bp.getRead("select id from Tbreport_ip where ip='" + ip + "' and Mac='" + mac + "' and putdate <'" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "'");
            if (myreader.Read())
            {
                oldpv_zuori++;
            }
            else
            {
                newpv_zuori++;
            }
            myreader.Close();
        }
    }
    public DataTable dtrukou;
    public int intrukou;
    public void getrukou()
    {
        dtrukou = bp.SelectDataBase("tbreport_ip", "select Urlbeizhu,count(Urlbeizhu) as num from tbreport_ip where urlbeizhu is not null group by urlbeizhu order by num desc ").Tables[0];
        intrukou = dtrukou.Rows.Count;
    }
}


#line default
#line hidden