protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!VisitService.CheckTable(DataHelper.Encrypt(HttpUtility.UrlDecode(Request.Cookies["nick"].Value)))) { Response.Redirect("CreateCode.aspx"); } else { DateTime now = DateTime.Now; if (!string.IsNullOrEmpty(Request.QueryString["day"])) { string date = Request.QueryString["day"]; if (now.ToString("yyyyMMdd") != date) { date = date.Substring(0, 4) + "-" + date.Substring(4, 2) + "-" + date.Substring(6); now = DateTime.Parse(date); } ; } ShowChart(now); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //int day = 1; //try //{ // if (Request.QueryString["days"] != null) // { // day = int.Parse(Request.QueryString["days"]); // } //} //catch { } if (!VisitService.CheckTable(DataHelper.Encrypt(HttpUtility.UrlDecode(Request.Cookies["nick"].Value)))) { Response.Redirect("CreateCode.aspx"); //Response.Write("<script>alert('抱歉,您还没有添加统计代码!');</script>"); //Response.End(); } else { ShowChart(DateTime.Now); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //int day = 1; //try //{ // if (Request.QueryString["days"] != null) // { // day = int.Parse(Request.QueryString["days"]); // } //} //catch { } if (!VisitService.CheckTable(Encrypt(HttpUtility.UrlDecode(Request.Cookies["nick"].Value)))) { //Response.Redirect("CreateCode.aspx"); Response.Write("暂时没有人访问!"); Response.End(); } else { DateTime now = DateTime.Now; if (!string.IsNullOrEmpty(Request.QueryString["day"])) { string date = Request.QueryString["day"]; if (now.ToString("yyyyMMdd") != date) { date = date.Substring(0, 4) + "-" + date.Substring(4, 2) + "-" + date.Substring(6); now = DateTime.Parse(date); } } ShowChart(now); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (!VisitService.CheckTable(DataHelper.Encrypt(HttpUtility.UrlDecode(Request.Cookies["nick"].Value)))) { Response.Redirect("CreateCode.aspx"); //Response.Write("<script>alert('抱歉,您还没有添加统计代码!');</script>"); //Response.End(); } else { DateTime[] darray = DataHelper.GetDateTime(DateTime.Now, 1); try { string start = HttpUtility.UrlDecode(Request.QueryString["start"]); string end = HttpUtility.UrlDecode(Request.QueryString["end"]); darray[0] = DateTime.Parse(start.Substring(0, start.LastIndexOf('-')) + " " + start.Substring(start.LastIndexOf('-') + 1, 2) + ":0:0"); darray[1] = DateTime.Parse(end.Substring(0, end.LastIndexOf('-')) + " " + end.Substring(end.LastIndexOf('-') + 1, 2) + ":0:0"); } catch { } Bind(darray[0], darray[1]); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!VisitService.CheckTable(DataHelper.Encrypt(HttpUtility.UrlDecode(Request.Cookies["nick"].Value)))) { Response.Redirect("CreateCode.aspx"); //Response.Write("<script>alert('抱歉,您还没有添加统计代码!');</script>"); //Response.End(); } else { ShowChart(DateTime.Now.AddDays(-7), DateTime.Now); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (!VisitService.CheckTable(DataHelper.Encrypt(HttpUtility.UrlDecode(Request.Cookies["nick"].Value)))) { Response.Redirect("CreateCode.aspx"); //Response.Write("<script>alert('抱歉,您还没有添加统计代码!');</script>"); //Response.End(); } else { DateTime[] darray = DataHelper.GetDateTime(DateTime.Now, 1); try { darray[0] = DateTime.Parse(Request.QueryString["start"]); darray[1] = DateTime.Parse(Request.QueryString["end"]); } catch { } if (!string.IsNullOrEmpty(Request.QueryString["day"])) { string date = Request.QueryString["day"]; date = date.Substring(0, 4) + "-" + date.Substring(4, 2) + "-" + date.Substring(6); darray[0] = DateTime.Parse(date); darray[1] = DateTime.Parse(date).AddDays(1); } string nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); string session = Request.Cookies["nicksession"].Value; ViewState["count"] = taoGoodsService.GetTopGoodsCount(DataHelper.Encrypt(nick), darray[0], darray[1]); Bind(nick, session, darray[0], darray[1], int.Parse(ViewState["count"].ToString()), 9); } } }