Ejemplo n.º 1
0
        // Token: 0x06000003 RID: 3 RVA: 0x0000223C File Offset: 0x0000043C
        public DataTable GetDbFileList()
        {
            DataTable dataTable = this.CreateDataTable();

            if (Directory.Exists(dbbackup.backuppath))
            {
                DirectoryInfo directoryInfo = new DirectoryInfo(dbbackup.backuppath);
                int           num           = 1;
                foreach (FileInfo fileInfo in directoryInfo.GetFiles())
                {
                    if (fileInfo.Extension == ".config" || fileInfo.Extension == ".zip")
                    {
                        DataRow dataRow = dataTable.NewRow();
                        dataRow["id"]         = num;
                        dataRow["filename"]   = fileInfo.Name;
                        dataRow["size"]       = FPUtils.FormatBytesStr(fileInfo.Length);
                        dataRow["createtime"] = fileInfo.CreationTime.ToString();
                        dataRow["fullname"]   = "backup/datas/" + fileInfo.Name;
                        dataTable.Rows.Add(dataRow);
                        num++;
                    }
                }
            }
            return(dataTable);
        }
Ejemplo n.º 2
0
        // Token: 0x06000065 RID: 101 RVA: 0x00008D78 File Offset: 0x00006F78
        private DataTable GetFileList(string m_path, string m_dirPath)
        {
            string mapPath = FPUtils.GetMapPath(string.Concat(new string[]
            {
                WebConfig.WebPath,
                "sites/",
                m_path,
                "/",
                m_dirPath
            }));
            DataTable result;

            if (!Directory.Exists(mapPath))
            {
                this.ShowErr("文件夹:/" + m_path + ((m_dirPath == "") ? "" : ("/" + m_dirPath)) + "已不存在或被删除。");
                result = new DataTable();
            }
            else
            {
                DataTable     dataTable     = this.CreateDataTable();
                DirectoryInfo directoryInfo = new DirectoryInfo(mapPath);
                int           num           = 1;
                foreach (DirectoryInfo directoryInfo2 in directoryInfo.GetDirectories())
                {
                    if (directoryInfo2 != null)
                    {
                        DataRow dataRow = dataTable.NewRow();
                        dataRow["id"]         = num;
                        dataRow["icon"]       = this.GetFileTypeIco("");
                        dataRow["name"]       = directoryInfo2.Name;
                        dataRow["path"]       = directoryInfo2.FullName;
                        dataRow["updatetime"] = directoryInfo2.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
                        dataRow["type"]       = "文件夹";
                        dataRow["size"]       = "";
                        dataTable.Rows.Add(dataRow);
                        num++;
                    }
                }
                foreach (FileInfo fileInfo in directoryInfo.GetFiles())
                {
                    if (fileInfo != null)
                    {
                        DataRow dataRow = dataTable.NewRow();
                        dataRow["id"]         = num;
                        dataRow["icon"]       = this.GetFileTypeIco(fileInfo.Extension);
                        dataRow["name"]       = fileInfo.Name;
                        dataRow["path"]       = fileInfo.FullName;
                        dataRow["updatetime"] = fileInfo.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
                        dataRow["type"]       = fileInfo.Extension.Substring(1, fileInfo.Extension.Length - 1);
                        dataRow["size"]       = FPUtils.FormatBytesStr(fileInfo.Length);
                        dataTable.Rows.Add(dataRow);
                        num++;
                    }
                }
                result = dataTable;
            }
            return(result);
        }
Ejemplo n.º 3
0
 // Token: 0x06000009 RID: 9 RVA: 0x000028D0 File Offset: 0x00000AD0
 protected override void View()
 {
     this.dbconfig = DbConfigs.GetDbConfig();
     this.dbsize   = FPUtils.FormatBytesStr(DbBll.GetDbSize());
     if (this.ispost)
     {
         DbBll.ShrinkDatabase();
     }
     base.SaveRightURL();
 }
Ejemplo n.º 4
0
        // Token: 0x0600004E RID: 78 RVA: 0x00006AA4 File Offset: 0x00004CA4
        protected override void View()
        {
            long sysSize = SysBll.GetSysSize();

            this.websize  = FPUtils.FormatBytesStr(sysSize);
            this.dbconfig = DbConfigs.GetDbConfig();
            this.dbsize   = FPUtils.FormatBytesStr(DbBll.GetDbSize());
            if (this.role.desktop == "")
            {
                this.role.desktop = "0";
            }
            SqlParam sqlParam = DbHelper.MakeAndWhere(string.Format("([hidden]=0 AND [uid]={0}) OR ([hidden]=0 AND [system]=1 AND [id] IN({1}))", this.userid, this.role.desktop), WhereType.Custom, "");

            this.desktoplist = DbHelper.ExecuteList <DesktopInfo>(OrderBy.ASC, new SqlParam[]
            {
                sqlParam
            });
            base.SaveRightURL(this.pagename);
        }
Ejemplo n.º 5
0
 // Token: 0x06000012 RID: 18 RVA: 0x00003034 File Offset: 0x00001234
 protected string FormatSize(long filesize)
 {
     return(FPUtils.FormatBytesStr(filesize));
 }