Example #1
0
        public void Edit(int id)
        {
            target(Update, id);
            FooterMenu data = FooterMenu.GetById(id);

            if (data == null)
            {
                echoRedirect(lang("exDataNotFound"));
                return;
            }
            bind("data", data);
        }
Example #2
0
        public void Delete(int id)
        {
            FooterMenu data = FooterMenu.GetById(id);

            if (data == null)
            {
                echoRedirect(lang("exDataNotFound"));
                return;
            }

            data.delete();
            log(SiteLogString.DeleteFooterMenu(), data);

            echoAjaxOk();
        }
Example #3
0
        public void Update(int id)
        {
            FooterMenu data = FooterMenu.GetById(id);

            if (data == null)
            {
                echoRedirect(lang("exDataNotFound"));
                return;
            }
            data = validate(data);

            if (ctx.HasErrors)
            {
                run(Edit, id);
                return;
            }

            data.update();
            log(SiteLogString.UpdateFooterMenu(), data);

            echoToParentPart(lang("opok"));
        }