protected void Page_Load(object sender, EventArgs e)
 {
     if (!B_Admin.IsSuperManage(badmin.GetAdminLogin().AdminId))
     {
         function.WriteErrMsg("只有超级管理员才能访问该页!!");
     }
     if (function.isAjax())
     {
         //返回进度
         Response.Write(ZipClass.GetPercent(ZipClass.zipTotal, ZipClass.zipProgress));
         Response.Flush();
         Response.End();
     }
     database = StrHelper.GetAttrByStr(SqlHelper.ConnectionString, "initial catalog");
     if (!IsPostBack)
     {
         if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "DevCenter"))
         {
             function.WriteErrMsg("你没有对该模块的访问权限");
         }
         if (!badmin.CheckSPwd(Session["Spwd"] as string))
         {
             SPwd.Visible = true;
         }
         else
         {
             maindiv.Visible = true;
         }
         this.DatabasePath.Value = DateTime.Now.ToString("MMdd") + "ZoomlaCMS";
         this.SiteText.Value     = DateTime.Now.ToString("yyyyMMdd_HHmmss") + "全站备份";
         MyBind();
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='DatalistProfile.aspx'>扩展功能</a></li> <li><a href='RunSql.aspx'>开发中心</a></li><li><a href='BackupRestore.aspx'>备份与还原数据</a></li>" + Call.GetHelp(69));
     }
 }
Exemplo n.º 2
0
        public void MyBind()
        {
            string constr = SqlHelper.ConnectionString;

            TIP_T.Text     = StrHelper.GetAttrByStr(constr, "Data Source");
            TDBName_T.Text = StrHelper.GetAttrByStr(constr, "Initial Catalog");
            TUName_T.Text  = StrHelper.GetAttrByStr(constr, "User ID");
            //TPwd_T.Text = GetconAttr(constr, "Password");
        }
        private string GetDBIP()
        {
            string constr   = ZoomLa.SQLDAL.SqlHelper.ConnectionString;
            string dbip     = StrHelper.GetAttrByStr(constr, "Data Source").ToLower().TrimStart('(').TrimEnd(')');
            string serverip = Request.ServerVariables["LOCAl_ADDR"];

            switch (dbip)
            {
            case "local":
            case ".":
            case "127.0.0.1":
                dbip = serverip + "<span style='color:green;'>(本机)</span>";
                break;

            default:
                break;
            }
            return(dbip);
        }
Exemplo n.º 4
0
 public Center()
 {
     connstr = "Data Source=" + StrHelper.GetAttrByStr(SqlHelper.ConnectionString, "Data Source") + ";Initial Catalog=" + StrHelper.GetAttrByStr(SqlHelper.ConnectionString, "Initial Catalog") + ";User ID={0};Password={1}";
 }