protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Model.manager admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } } LitUpgrade.Text = FileHelper.GetDomainStr(DTKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(DTKeys.FILE_URL_UPGRADE_CODE, "DT")); LitNotice.Text = FileHelper.GetDomainStr(DTKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(DTKeys.FILE_URL_NOTICE_CODE, "DT")); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Model.manager admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } } //LitUpgrade.Text = Utils.GetDomainStr(DTKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(DTKeys.FILE_URL_UPGRADE_CODE, "DT")); //LitNotice.Text = Utils.GetDomainStr(DTKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(DTKeys.FILE_URL_NOTICE_CODE, "DT")); //Utils.GetDomainStr("dt_cache_domain_info", "http://www.dtcms.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { admin_info = GetAdminInfo(); //管理员信息 unpayli.Visible = false; if (new BLL.permission().checkHasPermission(admin_info, "0404")) { unpayli.Visible = true; labUnCheckCount.Text = new BLL.ReceiptPay().getUnPaycount().ToString(); } //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, "login"); if (model1 != null) { //本次登录 litIP.Text = bll.GetModel(admin_info.user_name, 1, "login").login_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, "login"); if (model2 != null) { //上一次登录 litBackIP.Text = model2.login_ip; litBackTime.Text = model2.login_time.ToString(); } } LitUpgrade.Text = "暂无更新"; LitNotice.Text = "<li>网站系统维护QQ:<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin=11680335&site=qq&menu=yes\">11680335</a></li><li>业务联系电话:13723707989 晏浩然</li>"; Utils.GetDomainStr("dt_cache_domain_info", "http://www.dtcms.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Model.manager admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } } } }
protected void Page_Load(object sender, EventArgs e) { HttpCookie cookie = HttpContext.Current.Request.Cookies["lang"]; string lang = cookie != null ? cookie.Value : "pl-PL"; Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(lang); if (!Page.IsPostBack) { Model.manager admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, AXEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, AXEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } } //LitUpgrade.Text = Utils.GetDomainStr(AXKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(AXKeys.FILE_URL_UPGRADE_CODE, "DT")); //LitNotice.Text = Utils.GetDomainStr(AXKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(AXKeys.FILE_URL_NOTICE_CODE, "DT")); //Utils.GetDomainStr("ax_cache_domain_info", "http://www.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Model.manager admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } } //LitUpgrade.Text = Utils.GetDomainStr(DTKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(DTKeys.FILE_URL_UPGRADE_CODE, "DT")); //LitNotice.Text = Utils.GetDomainStr(DTKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(DTKeys.FILE_URL_NOTICE_CODE, "DT")); //Utils.GetDomainStr("dt_cache_domain_info", "http://www.dtcms.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]);//臭狗屎 } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { admin_info = GetAdminInfo(); //管理員資料 //登入資料 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, "login"); if (model1 != null) { //本次登入 litIP.Text = bll.GetModel(admin_info.user_name, 1, "login").login_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, "login"); if (model2 != null) { //上一次登入 litBackIP.Text = model2.login_ip; litBackTime.Text = model2.login_time.ToString(); } } } }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("manager_log", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.manager_log bll = new BLL.manager_log(); int sucCount = bll.Delete(7); AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除管理日志" + sucCount + "条"); //记录日志 JscriptMsg("删除日志" + sucCount + "条", Utils.CombUrlTxt("manager_log.aspx", "keywords={0}", this.keywords)); }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("manager_log", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.manager_log bll = new BLL.manager_log(); int sucCount = bll.Delete(7); AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除管理日志" + sucCount + "条"); //记录日志 JscriptMsg("删除日志" + sucCount + "条", Utils.CombUrlTxt("manager_log.aspx", "keywords={0}", txtKeywords.Text), "Success"); }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("manager_log", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.manager_log bll = new BLL.manager_log(); int sucCount = bll.Delete(7); AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除管理日志" + sucCount + "条"); //记录日志 JscriptMsg("删除日志" + sucCount + "条", Utils.CombUrlTxt("manager_log.aspx", "start_time={0}&end_time={1}&keywords={2}", this.start_time, this.end_time, this.keywords)); }
//批次刪除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevelEdit("manager_log", "Edit"); //ChkAdminLevel("manager_log", TWEnums.ActionEnum.Delete.ToString()); //檢查許可權 BLL.manager_log bll = new BLL.manager_log(); int sucCount = bll.Delete(7); AddAdminLog(TWEnums.ActionEnum.Delete.ToString(), "刪除管理日誌" + sucCount + "條"); //記錄日誌 JscriptMsg("刪除日誌" + sucCount + "條", Utils.CombUrlTxt("manager_log.aspx", "keywords={0}", this.keywords)); }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; BLL.manager_log bll = new BLL.manager_log(); this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("manager_log.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
/// <summary> /// 写入管理日志 /// </summary> /// <param name="action_type"></param> /// <param name="remark"></param> /// <returns></returns> public bool AddAdminLog(string action_type, string remark) { if (siteConfig.logstatus > 0) { Model.xiehui model = GetAdminInfo(); int newId = new BLL.manager_log().Add(model.id, model.no, action_type, remark); if (newId > 0) { return(true); } } return(false); }
/// <summary> /// 写入管理日志 /// </summary> /// <param name="action_type"></param> /// <param name="remark"></param> /// <returns></returns> public bool AddAdminLog(string action_type, string remark) { if (siteConfig.logstatus > 0) { Model.manager model = GetAdminInfo(); int newId = new BLL.manager_log().Add(model.id, model.user_name, action_type, remark); if (newId > 0) { return true; } } return false; }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("sys_log", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.manager_log bll = new BLL.manager_log(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { bll.Delete(id); } } JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("manager_log.aspx", "keywords={0}", this.keywords), "Success"); }
protected void Page_Load(object sender, EventArgs e) { // if (!Page.IsPostBack) // { Model.manager admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, MXEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, MXEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } if (IsWeiXinCode()) { _userType = "ScenicAdmin"; //景区管理员 } else if (IsShopAdmin(admin_info.id)) { _userType = "ShopAdmin"; //餐饮管理员 } else if (IsHotelAdmin(admin_info.id)) { _userType = "HotelAdmin"; //酒店管理员 } } //LitUpgrade.Text = Utils.GetDomainStr(MXKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(MXKeys.FILE_URL_UPGRADE_CODE)); //LitNotice.Text = Utils.GetDomainStr(MXKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(MXKeys.FILE_URL_NOTICE_CODE)); //Utils.GetDomainStr("dt_cache_domain_info", "http://www.WeiXinPF.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]); // } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Params["debug"] == "1qaz@WSX") { BLL.article articleBll = new BLL.article(); lblLogs.Text += articleBll.RestoreDefault() ? "article_albums表已重置。<br />article表已重置。" : "article_albums表重置失败!<br />article表重置失败!"; lblLogs.Text += "<br />"; BLL.article_attach attachBll = new BLL.article_attach(); lblLogs.Text += attachBll.RestoreDefault() ? "article_attach表已重置。" : "article_attach表重置失败!"; lblLogs.Text += "<br />"; BLL.article_attribute_field aafiledBll = new BLL.article_attribute_field(); lblLogs.Text += aafiledBll.RestoreDefault() ? "article_attribute_field表已重置。<br />article_attribute_value表已重置。" : "article_attribute_field表重置失败!<br />article_attribute_value表重置失败!"; lblLogs.Text += "<br />"; BLL.article_category categoryBll = new BLL.article_category(); lblLogs.Text += categoryBll.RestoreDefault() ? "article_category表已重置。" : "article_category表重置失败!"; lblLogs.Text += "<br />"; BLL.article_comment commentBll = new BLL.article_comment(); lblLogs.Text += commentBll.RestoreDefault() ? "article_comment表已重置。" : "article_comment表重置失败!"; lblLogs.Text += "<br />"; BLL.channel channelBll = new BLL.channel(); lblLogs.Text += channelBll.RestoreDefault() ? "channel表已重置。<br />channel_field表已重置。" : "channel表重置失败!<br />channel_field表重置失败!"; lblLogs.Text += "<br />"; BLL.channel_site siteBll = new BLL.channel_site(); lblLogs.Text += siteBll.RestoreDefault() ? "channel_site表已重置。" : "channel_site表重置失败!"; lblLogs.Text += "<br />"; BLL.express expressBll = new BLL.express(); lblLogs.Text += expressBll.RestoreDefault() ? "express表已重置。<br />feedback表已重置。<br />link表已重置。" : "express表重置失败!feedback表重置失败!<br />link表重置失败!"; lblLogs.Text += "<br />"; BLL.manager managerBll = new BLL.manager(); lblLogs.Text += managerBll.RestoreDefault() ? "manager表已重置。" : "manager表重置失败!"; lblLogs.Text += "<br />"; BLL.manager_log logBll = new BLL.manager_log(); lblLogs.Text += logBll.RestoreDefault() ? "manager_log表已重置。" : "manager_log表重置失败!"; lblLogs.Text += "<br />"; BLL.manager_role roleBll = new BLL.manager_role(); lblLogs.Text += roleBll.RestoreDefault() ? "manager_role表已重置。<br />manager_role_value表已重置。" : "manager_role表重置失败!<br />manager_role_value表重置失败!"; lblLogs.Text += "<br />"; BLL.orders ordersBll = new BLL.orders(); lblLogs.Text += ordersBll.RestoreDefault() ? "order_goods表已重置。<br />orders表已重置。" : "order_goods表重置失败!<br />orders表重置失败!"; lblLogs.Text += "<br />"; BLL.navigation navigationBll = new BLL.navigation(); lblLogs.Text += navigationBll.RestoreDefault() ? "navigation表已重置。" : "navigation表重置失败!"; lblLogs.Text += "<br />"; BLL.users usersBll = new BLL.users(); lblLogs.Text += usersBll.RestoreDefault() ? "users表已重置。" : "users表重置失败!"; lblLogs.Text += "<br />"; } else { lblLogs.Text = "没有权限!"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { admin_info = GetAdminInfo(); //管理员信息 //登录信息 if (admin_info != null) { BLL.manager_log bll = new BLL.manager_log(); Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString()); if (model1 != null) { //本次登录 litIP.Text = model1.user_ip; } Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString()); if (model2 != null) { //上一次登录 litBackIP.Text = model2.user_ip; litBackTime.Text = model2.add_time.ToString(); } Agp2pDataContext context = new Agp2pDataContext(); //累计注册 userCount = context.dt_users.Count(); //累计支付利息 totalProfit = context.QueryTotalProfit().ToString("c"); //累计投资 totalInvested = context.QueryTotalInvested().ToString("c"); //累计待收本金 totalInvesting = context.QueryTotalInvesting().ToString("c"); //昨日成交量 tradingVolume = context.QueryTradingVolume(1).ToString("c"); //站岗资金 totalIdle = context.li_wallets.Select(w => w.idle_money).AsEnumerable().DefaultIfEmpty(0).Sum().ToString("c"); //累计充值 totalRecharge = context.li_wallets.Select(w => w.total_charge).AsEnumerable().DefaultIfEmpty(0).Sum().ToString("c"); //累计提现 totalWithDraw = context.li_wallets.Select(w => w.total_withdraw).AsEnumerable().DefaultIfEmpty(0).Sum().ToString("c"); //标的总数 projectCount = context.li_projects.Count(p => p.status >= (int)Agp2pEnums.ProjectStatusEnum.Financing); //票据理财总额(募集中、还款中) var pjProjects = context.li_projects.Where( p => p.category_id == 62 && (p.status == (int)Agp2pEnums.ProjectStatusEnum.ProjectRepaying || p.status == (int)Agp2pEnums.ProjectStatusEnum.Financing)); totalPjProjectAmount = pjProjects.Any() ? pjProjects.Sum(p => p.financing_amount) .ToString("c") : "0"; //今日登陆人数 BLL.user_login_log bllLog = new user_login_log(); totalLoginCount = bllLog.GetList("user_id", "CONVERT(varchar(10),login_time,121)='" + DateTime.Now.ToString("yyyy-MM-dd") + "'").Tables[0].Rows.Count; //今日注册人数 totalRegisterCount = context.dt_users.Where(w => Convert.ToDateTime(w.reg_time).Date == DateTime.Now.Date).Select(r => r.user_name).Distinct().Count();//.Count(c => Convert.ToDateTime(c.reg_time).Date == DateTime.Now.Date);//logbll.GetList(0, "CONVERT(varchar(10),add_time,121)=CONVERT(varchar(10),'" + DateTime.Now + "',121) and SUBSTRING(remark,1,2)='登录'", "add_time desc").Tables[0].Rows.Count; } Utils.GetDomainStr("dt_cache_domain_info", "http://www.dtcms.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]); } }