示例#1
0
        // Token: 0x0600007D RID: 125 RVA: 0x0000B2D8 File Offset: 0x000094D8
        protected override void View()
        {
            if (this.channelid > 0)
            {
                this.reurl = this.reurl + "?channelid=" + this.channelid;
            }
            SqlParam     sqlParam = DbHelper.MakeAndWhere("parentid", this.parentid);
            OrderByParam orderby  = DbHelper.MakeOrderBy("display", OrderBy.ASC);

            this.typelist = DbHelper.ExecuteList <TypeInfo>(orderby, new SqlParam[]
            {
                sqlParam
            });
            if (this.ispost)
            {
                int num = 0;
                foreach (TypeInfo typeInfo in this.typelist)
                {
                    this.typelist[num].display = FPRequest.GetInt("display_" + typeInfo.id);
                    DbHelper.ExecuteUpdate <TypeInfo>(this.typelist[num]);
                    num++;
                }
                CacheBll.RemoveSortCache();
                base.Response.Redirect("typedisplay.aspx?parentid=" + this.parentid);
            }
            base.SaveRightURL();
        }
示例#2
0
 // Token: 0x06000072 RID: 114 RVA: 0x0000A7CC File Offset: 0x000089CC
 protected override void View()
 {
     if (this.id > 0)
     {
         this.sortappinfo = DbHelper.ExecuteModel <SortAppInfo>(this.id);
     }
     if (this.ispost)
     {
         this.sortappinfo = FPRequest.GetModel <SortAppInfo>(this.sortappinfo);
         if (this.sortappinfo.appid > 0)
         {
             AppInfo appInfo = DbHelper.ExecuteModel <AppInfo>(this.sortappinfo.appid);
             this.sortappinfo.installpath = appInfo.installpath;
         }
         else
         {
             this.sortappinfo.installpath = "";
         }
         if (this.sortappinfo.id > 0)
         {
             DbHelper.ExecuteUpdate <SortAppInfo>(this.sortappinfo);
         }
         else
         {
             DbHelper.ExecuteInsert <SortAppInfo>(this.sortappinfo);
         }
         CacheBll.RemoveSortCache();
         base.Response.Redirect("sortappmanage.aspx");
     }
     this.applist = DbHelper.ExecuteList <AppInfo>(OrderBy.ASC);
 }
示例#3
0
 // Token: 0x06000074 RID: 116 RVA: 0x0000A8F4 File Offset: 0x00008AF4
 protected override void View()
 {
     if (this.ispost)
     {
         string @string = FPRequest.GetString("chkid");
         DbHelper.ExecuteDelete <SortAppInfo>(@string);
         CacheBll.RemoveSortCache();
     }
     this.sortapplist = DbHelper.ExecuteList <SortAppInfo>(OrderBy.ASC);
 }
示例#4
0
        // Token: 0x0600007B RID: 123 RVA: 0x0000B078 File Offset: 0x00009278
        protected override void View()
        {
            this.link = "typemanage.aspx";
            if (this.id > 0)
            {
                this.typeinfo = DbHelper.ExecuteModel <TypeInfo>(this.id);
                this.parentid = this.typeinfo.parentid;
            }
            if (this.ispost)
            {
                this.typeinfo = FPRequest.GetModel <TypeInfo>(this.typeinfo);
                if (this.typeinfo.id > 0)
                {
                    if (DbHelper.ExecuteUpdate <TypeInfo>(this.typeinfo) > 0)
                    {
                        StringBuilder stringBuilder = new StringBuilder();
                        if (this.typeinfo.parentid != this.parentid)
                        {
                            stringBuilder.AppendFormat("UPDATE [{0}WMS_TypeInfo] SET [subcounts]=[subcounts]-1 WHERE [id]={1};", DbConfigs.Prefix, this.parentid);
                            stringBuilder.AppendFormat("UPDATE [{0}WMS_TypeInfo] SET [subcounts]=[subcounts]+1 WHERE [id]={1};", DbConfigs.Prefix, this.typeinfo.parentid);
                            stringBuilder.AppendFormat("UPDATE [{0}WMS_TypeInfo] SET [subcounts]=0 WHERE [subcounts]<0", DbConfigs.Prefix);
                            DbHelper.ExecuteSql(stringBuilder.ToString());
                        }
                    }
                    base.AddMsg("更新分类成功!");
                }
                else
                {
                    this.typeinfo.display = FPUtils.StrToInt(DbHelper.ExecuteMax <TypeInfo>("display").ToString()) + 1;
                    if (DbHelper.ExecuteInsert <TypeInfo>(this.typeinfo) > 0)
                    {
                        string sqlstring = string.Format("UPDATE [{0}WMS_TypeInfo] SET [subcounts]=[subcounts]+1 WHERE [id]={1}", DbConfigs.Prefix, this.typeinfo.parentid);
                        DbHelper.ExecuteSql(sqlstring);
                    }
                    base.AddMsg("添加分类成功!");
                }
                CacheBll.RemoveSortCache();
            }
            SqlParam[] sqlparams = new SqlParam[]
            {
                DbHelper.MakeAndWhere("id", WhereType.NotEqual, this.id),
                DbHelper.MakeAndWhere("parentid", 0)
            };
            OrderByParam orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC);

            this.parenttypelist = DbHelper.ExecuteList <TypeInfo>(orderby, sqlparams);
            base.SaveRightURL();
        }
示例#5
0
 // Token: 0x06000016 RID: 22 RVA: 0x000031C4 File Offset: 0x000013C4
 protected override void View()
 {
     if (this.ispost)
     {
         string @string = FPRequest.GetString("cache");
         foreach (string a in @string.Split(new char[]
         {
             ','
         }))
         {
             if (a == "sysconfig")
             {
                 this.sysconfig.passwordkey = WMSUtils.CreateAuthStr(10);
                 SysConfigs.SaveConfig(this.sysconfig);
                 WMSCookie.WriteCookie("password", DES.Encode(this.user.password, this.sysconfig.passwordkey));
                 SysConfigs.ResetConfig();
             }
             if (a == "syssort")
             {
                 CacheBll.RemoveSortCache();
             }
             if (a == "attachtype")
             {
                 FPCache.Remove("FP_ATTACHTYPE", "image,flash,media,file");
             }
             if (a == "siteconfig")
             {
                 List <SiteConfig> siteList = SiteBll.GetSiteList();
                 foreach (SiteConfig siteConfig in siteList)
                 {
                     FPCache.Remove("FP_SITECONFIG_" + siteConfig.sitepath);
                 }
             }
         }
         base.Response.Redirect("cachemanage.aspx");
     }
     base.SaveRightURL();
 }
示例#6
0
 // Token: 0x06000057 RID: 87 RVA: 0x00007994 File Offset: 0x00005B94
 protected override void View()
 {
     this.appinfo = DbHelper.ExecuteModel <AppInfo>(this.appid);
     if (this.appinfo.id == 0)
     {
         this.ShowErr("该应用不存在或已被删除。");
     }
     else
     {
         if (this.ispost)
         {
             string mapPath  = FPUtils.GetMapPath(this.webpath + "cache");
             string fileName = Path.GetFileName(FPRequest.Files["uploadfile"].FileName);
             string a        = Path.GetExtension(fileName).ToLower();
             if (a != ".fpk" && a != ".zip")
             {
                 this.ShowErr("对不起,该文件不是方配系统应用更新文件类型。");
                 return;
             }
             if (!Directory.Exists(mapPath))
             {
                 Directory.CreateDirectory(mapPath);
             }
             if (File.Exists(mapPath + "\\" + fileName))
             {
                 File.Delete(mapPath + "\\" + fileName);
             }
             FPRequest.Files["uploadfile"].SaveAs(mapPath + "\\" + fileName);
             if (Directory.Exists(mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName)))
             {
                 Directory.Delete(mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName), true);
             }
             FPZip.UnZipFile(mapPath + "\\" + fileName, "");
             File.Delete(mapPath + "\\" + fileName);
             if (!File.Exists(mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName) + "\\app.config"))
             {
                 Directory.Delete(mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName), true);
                 this.ShowErr("应用配置文件不存在或有错误。");
                 return;
             }
             AppInfo appInfo = FPSerializer.Load <AppInfo>(mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName) + "\\app.config");
             if (this.appinfo.guid == "")
             {
                 this.ShowErr("对不起,该应用标识码错误,更新失败。");
                 return;
             }
             SqlParam sqlParam = DbHelper.MakeAndWhere("guid", this.appinfo.guid);
             this.appinfo = DbHelper.ExecuteModel <AppInfo>(new SqlParam[]
             {
                 sqlParam
             });
             if (this.appinfo.id == 0)
             {
                 this.ShowErr("对不起,该应用不存在或已被删除。");
                 return;
             }
             Version v  = new Version(FPUtils.StrToDecimal(appInfo.version).ToString("0.0"));
             Version v2 = new Version(FPUtils.StrToDecimal(this.appinfo.version).ToString("0.0"));
             if (v < v2)
             {
                 this.ShowErr("对不起,您更新的版本比安装版本还低,不能更新");
                 return;
             }
             this.appinfo.name    = appInfo.name;
             this.appinfo.version = appInfo.version;
             this.appinfo.notes   = appInfo.notes;
             this.appinfo.author  = appInfo.author;
             string mapPath2   = FPUtils.GetMapPath(this.webpath + this.appinfo.installpath);
             string sourcePath = mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName);
             this.appinfo.files = appupdate.CopyDirectory(sourcePath, mapPath2, "", this.appinfo.files);
             if (DbHelper.ExecuteUpdate <AppInfo>(this.appinfo) > 0)
             {
                 foreach (string strContent in appInfo.sortapps.Split(new char[]
                 {
                     '|'
                 }))
                 {
                     string[] array2 = FPUtils.SplitString(strContent, ",", 4);
                     if (!(array2[0] == ""))
                     {
                         SqlParam[] sqlparams = new SqlParam[]
                         {
                             DbHelper.MakeAndWhere("appid", this.appinfo.id),
                             DbHelper.MakeAndWhere("name", array2[0])
                         };
                         SortAppInfo sortAppInfo = DbHelper.ExecuteModel <SortAppInfo>(sqlparams);
                         if (sortAppInfo.id > 0)
                         {
                             sortAppInfo.name      = array2[0];
                             sortAppInfo.markup    = array2[1];
                             sortAppInfo.indexpage = array2[2];
                             sortAppInfo.viewpage  = array2[3];
                             DbHelper.ExecuteUpdate <SortAppInfo>(sortAppInfo);
                         }
                         else
                         {
                             sortAppInfo.appid     = this.appinfo.id;
                             sortAppInfo.name      = array2[0];
                             sortAppInfo.markup    = array2[1];
                             sortAppInfo.indexpage = array2[2];
                             sortAppInfo.viewpage  = array2[3];
                             DbHelper.ExecuteInsert <SortAppInfo>(sortAppInfo);
                         }
                     }
                 }
             }
             Directory.Delete(mapPath + "\\" + Path.GetFileNameWithoutExtension(fileName), true);
             CacheBll.RemoveSortCache();
             base.Response.Redirect("appmanage.aspx");
         }
         base.SaveRightURL();
     }
 }
示例#7
0
        // Token: 0x06000070 RID: 112 RVA: 0x0000A4AC File Offset: 0x000086AC
        protected override void View()
        {
            if (this.id > 0)
            {
                this.appinfo = DbHelper.ExecuteModel <AppInfo>(this.id);
            }
            SqlParam sqlParam = DbHelper.MakeAndWhere("appid", this.id);

            if (this.ispost)
            {
                if (this.action == "appupdate")
                {
                    SortAppInfo sortAppInfo = DbHelper.ExecuteModel <SortAppInfo>(this.sortappid);
                    sortAppInfo = FPRequest.GetModel <SortAppInfo>(sortAppInfo, "sort_");
                    if (sortAppInfo.name == "")
                    {
                        this.ShowErr("栏目应用名称不能为空。");
                        return;
                    }
                    DbHelper.ExecuteUpdate <SortAppInfo>(sortAppInfo);
                }
                else if (this.action == "appadd")
                {
                    SortAppInfo sortAppInfo = FPRequest.GetModel <SortAppInfo>(new SortAppInfo(), "sortadd_");
                    sortAppInfo.appid       = this.id;
                    sortAppInfo.installpath = this.appinfo.installpath;
                    if (sortAppInfo.name == "")
                    {
                        this.ShowErr("栏目应用名称不能为空。");
                        return;
                    }
                    DbHelper.ExecuteInsert <SortAppInfo>(sortAppInfo);
                }
                else if (this.action == "appdelete")
                {
                    DbHelper.ExecuteDelete <SortAppInfo>(FPRequest.GetInt("appid"));
                }
                this.sortapplist = DbHelper.ExecuteList <SortAppInfo>(OrderBy.ASC, new SqlParam[]
                {
                    sqlParam
                });
                string text = "";
                foreach (SortAppInfo sortAppInfo2 in this.sortapplist)
                {
                    if (text != "")
                    {
                        text += "|";
                    }
                    string text2 = text;
                    text = string.Concat(new string[]
                    {
                        text2,
                        sortAppInfo2.name,
                        ",",
                        sortAppInfo2.markup,
                        ",",
                        sortAppInfo2.indexpage,
                        ",",
                        sortAppInfo2.viewpage
                    });
                }
                this.appinfo.sortapps = text;
                FPSerializer.Save <AppInfo>(this.appinfo, FPUtils.GetMapPath(this.webpath + this.appinfo.installpath + "/app.config"));
                CacheBll.RemoveSortCache();
                base.Response.Redirect("appsortmanage.aspx?id=" + this.id);
            }
            this.sortapplist = DbHelper.ExecuteList <SortAppInfo>(OrderBy.ASC, new SqlParam[]
            {
                sqlParam
            });
            base.SaveRightURL();
        }
示例#8
0
 // Token: 0x06000050 RID: 80 RVA: 0x00006B80 File Offset: 0x00004D80
 protected override void View()
 {
     if (this.ispost)
     {
         string mapPath = FPUtils.GetMapPath(this.webpath + "cache");
         if (this.step == "step1")
         {
             this.filename = Path.GetFileName(FPRequest.Files["uploadfile"].FileName);
             string a = Path.GetExtension(this.filename).ToLower();
             if (a != ".fpk" && a != ".zip")
             {
                 this.ShowErr("该文件不是方配站点应用安装文件类型");
                 return;
             }
             if (!Directory.Exists(mapPath))
             {
                 Directory.CreateDirectory(mapPath);
             }
             if (File.Exists(mapPath + "\\" + this.filename))
             {
                 File.Delete(mapPath + "\\" + this.filename);
             }
             FPRequest.Files["uploadfile"].SaveAs(mapPath + "\\" + this.filename);
             if (Directory.Exists(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename)))
             {
                 Directory.Delete(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename), true);
             }
             FPZip.UnZipFile(mapPath + "\\" + this.filename, "");
             File.Delete(mapPath + "\\" + this.filename);
             if (!File.Exists(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename) + "\\app.config"))
             {
                 Directory.Delete(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename), true);
                 this.ShowErr("应用安装配置文件不存在。");
                 return;
             }
             this.appinfo = FPSerializer.Load <AppInfo>(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename) + "\\app.config");
             if (this.appinfo.guid == "")
             {
                 this.ShowErr("对不起,该应用安装标识码不能为空。");
                 return;
             }
             SqlParam sqlParam = DbHelper.MakeAndWhere("guid", this.appinfo.guid);
             if (DbHelper.ExecuteCount <AppInfo>(new SqlParam[]
             {
                 sqlParam
             }) > 0)
             {
                 this.ShowErr("对不起,该应用已安装,不能重复安装。");
                 return;
             }
         }
         else if (this.step == "step2")
         {
             this.filename = FPRequest.GetString("filename");
             this.appinfo  = FPSerializer.Load <AppInfo>(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename) + "\\app.config");
             if (this.appinfo.name == "")
             {
                 this.appinfo.name = "无应用名称";
             }
             if (FPRequest.GetString("installpath") == "")
             {
                 this.ShowErr("对不起,安装目录不能为空");
                 return;
             }
             this.appinfo.installpath = FPRequest.GetString("installpath");
             if (!Directory.Exists(FPUtils.GetMapPath(this.webpath + this.appinfo.installpath)))
             {
                 Directory.CreateDirectory(FPUtils.GetMapPath(this.webpath + this.appinfo.installpath));
             }
             string mapPath2   = FPUtils.GetMapPath(this.webpath + this.appinfo.installpath);
             string sourcePath = mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename);
             this.appinfo.files = this.CopyDirectory(sourcePath, mapPath2, "");
             this.appinfo.id    = DbHelper.ExecuteInsert <AppInfo>(this.appinfo);
             if (this.appinfo.id > 0)
             {
                 foreach (string strContent in this.appinfo.sortapps.Split(new char[]
                 {
                     '|'
                 }))
                 {
                     string[] array2 = FPUtils.SplitString(strContent, ",", 4);
                     if (!(array2[0] == ""))
                     {
                         DbHelper.ExecuteInsert <SortAppInfo>(new SortAppInfo
                         {
                             appid       = this.appinfo.id,
                             name        = array2[0],
                             markup      = array2[1],
                             indexpage   = array2[2],
                             viewpage    = array2[3],
                             installpath = this.appinfo.installpath
                         });
                     }
                 }
             }
             Directory.Delete(mapPath + "\\" + Path.GetFileNameWithoutExtension(this.filename), true);
             CacheBll.RemoveSortCache();
             base.Response.Redirect("appmanage.aspx");
         }
     }
     base.SaveRightURL();
 }