Example #1
0
        public Apps_Development GetSignleDevelopmentData(string App_ID)
        {
            Apps_Development design = new Apps_Development();
            SqlDataReader    dr     = __Check.SqlDataReader("select * from System_Apps where App_Id=" + App_ID);

            while (dr.Read())
            {
                design = new Apps_Development()
                {
                    Antiinjection     = dr["Antiinjection"].ToString(),
                    App_Category_Id   = dr["App_Category_Id"].ToString(),
                    aid               = dr["aid"].ToString(),
                    App_Id            = dr["App_Id"].ToString(),
                    EditAccess        = dr["EditAccess"].ToString().ToLower() == "true" ? true : false,
                    CategoryName      = dr["CategoryName"].ToString(),
                    SEO               = dr["SEO"].ToString().ToLower() == "true" ? true : false,
                    SpeedOptimization = dr["SpeedOptimization"].ToString().ToLower() == "true" ? true : false,
                    DatabaseOwn       = dr["DatabaseOwn"].ToString(),
                    Support           = dr["Support"].ToString().ToLower() == "true" ? true : false,
                    imgaePath         = dr["imgaePath"].ToString(),
                    imageSize         = Convert.ToDouble(dr["imageSize"].ToString()),
                    DB_ID             = dr["DB_ID"].ToString(),
                    Discription       = dr["Discription"].ToString(),
                    EncryptionEnable  = dr["EncryptionEnable"].ToString().ToLower() == "true" ? true : false,
                    EncryptionKey     = dr["EncryptionKey"].ToString(),
                    //Offset = dr["Offset"].ToString(),
                    OpenDate           = dr["OpenDate"].ToString(),
                    Price              = Convert.ToDouble(dr["Price"].ToString()),
                    PublicMode         = dr["PublicMode"].ToString().ToLower() == "true" ? true : false,
                    PublishDate        = dr["PublishDate"].ToString(),
                    Published          = dr["Published"].ToString().ToLower() == "true" ? true : false,
                    RegID              = dr["RegID"].ToString(),
                    Tag                = dr["Tag"].ToString(),
                    Template_Id        = dr["Template_Id"].ToString(),
                    Testing            = dr["Testing"].ToString().ToLower() == "true" ? true : false,
                    Title              = dr["Title"].ToString(),
                    version            = dr["version"].ToString(),
                    versionDetails     = dr["versionDetails"].ToString(),
                    VersionUpgrade     = dr["VersionUpgrade"].ToString().ToLower() == "true" ? true : false,
                    YoutubeVideoEnable = dr["YoutubeVideoEnable"].ToString().ToLower() == "true" ? true : false,
                    YoutubeVideoLink   = dr["YoutubeVideoLink"].ToString()
                };
                break;
            }

            return(design);
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int _index = 0; string[] Value = new string[((CMSmaster)this.Master).Cookies.CookiesName.Length];

            foreach (var Name in ((CMSmaster)this.Master).Cookies.CookiesName)
            {
                if (Session[Name] != null || Request.Cookies[Name] != null)
                {
                    Value[_index] = Session[Name] == null ? Request.Cookies[Name].Value : Session[Name].ToString(); _index++;
                }
                else
                {
                    Response.Redirect("~/login");
                }
            }
            ((CMSmaster)this.Master).AllPageGetData(Value);

            if (Request.Cookies["_temp_id"] != null)
            {
                var Cookies          = Request.Cookies["_temp_id"].Value;
                ECMS.Design.Design d = new ECMS.Design.Design();
                if (d.AvaiableTemplate(Cookies, ((CMSmaster)this.Master).RegID))
                {
                    TemplateID          = Cookies;
                    template.TemplateID = TemplateID;
                    lblPath.Text        = template.TemplateId_to_RegID(TemplateID);
                    //Response.Write(template.TemplateId_to_RegID(TemplateID));
                    if (!IsPostBack)
                    {
                        PanelShow(panel.FileUpload);
                        showFils_and_Folders();
                    }


                    if (Request.QueryString["fu_id"] != null)
                    {
                        string ID   = Request.QueryString["fu_id"].ToString();
                        string path = template.DeleteFileUpload(ID, ((CMSmaster)this.Master).RegID);
                        if (path != "File is Not Found.")
                        {
                            File.Delete(Server.MapPath("~/" + path));
                            lblResult.Text = "<div class='alert alert-success'> Delete " + template.ErrorMessege + ". " + GetFileName(path) + " </div>";
                            showFils_and_Folders();
                            Response.Redirect(Request.RawUrl.Replace(Request.Url.Query, ""));
                        }
                        else
                        {
                            Response.Redirect("~/500");
                        }
                    }
                }
                else
                {
                    HttpCookie myCookie = new HttpCookie("_temp_id");
                    myCookie.Expires = DateTime.Now.AddDays(-7d);
                    Response.Cookies.Add(myCookie);
                    Response.Redirect("~/CMS/Design");
                }
            }
            else
            {
                Response.Redirect("~/CMS/Design");
            }
        }