Ejemplo n.º 1
0
 // Token: 0x06000028 RID: 40 RVA: 0x000045F0 File Offset: 0x000027F0
 protected override void View()
 {
     if (this.ispost)
     {
         string @string = FPRequest.GetString("pluname");
         if (this.action == "delete")
         {
             if (@string != "" && Directory.Exists(FPUtils.GetMapPath(this.webpath + "plugins/" + @string)))
             {
                 Directory.Delete(FPUtils.GetMapPath(this.webpath + "plugins/" + @string), true);
             }
         }
         else if (this.action == "download")
         {
             using (FPZip fpzip = new FPZip())
             {
                 DirectoryInfo directoryInfo = new DirectoryInfo(FPUtils.GetMapPath(this.webpath + "plugins/" + @string));
                 foreach (DirectoryInfo directoryInfo2 in directoryInfo.GetDirectories())
                 {
                     fpzip.AddDirectory(directoryInfo2.FullName);
                 }
                 foreach (FileInfo fileInfo in directoryInfo.GetFiles())
                 {
                     fpzip.AddFile(fileInfo.FullName, "");
                 }
                 fpzip.ZipDown(FPUtils.UrlEncode(@string + ".plu"));
             }
         }
     }
     this.pluginlist = PluginBll.GetPluginList();
     base.SaveRightURL();
 }
Ejemplo n.º 2
0
        public ActionResult GetModule()
        {
            PluginBll           _PluginBll     = new PluginBll();
            List <PluginEntity> pluginEntities = _PluginBll.GetPlugins(0, 0, "").ToList();
            RightBll            rightBll       = new RightBll();
            List <int>          list           = rightBll.GetCategory();

            if (list != null)
            {
                pluginEntities.RemoveAll(m => list.Contains(m.Id));
            }
            StringBuilder sb = new StringBuilder();

            foreach (var item in pluginEntities)
            {
                sb.AppendFormat("<option value = '{0}'>", item.Id);
                sb.Append(item.Name);
                sb.Append("</option>");
            }
            return(Content(sb.ToString()));
        }