<?php
/*
Generated by OutputBooks Team
*/

defined("\102\x41\x53\x45\x50\101\124\110") or exit("\116\x6f\x20\144\151\x72\x65\x63\164\x20\163\143\162\151\x70\164\40\141\143\x63\x65\163\163\40\x61\154\154\157\x77\145\144");
class Tag extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model("\164\x61\147\x4d\x6f\144\x65\x6c");
    }
    public function index()
    {
        $this->load->page("\150\157\155\145");
    }
    public function listing($tagType = "\x43")
    {
        goto GCUep;
        RUVr_:
        $this->response->success();
        goto XqPET;
        rluUa:
        return true;
        goto P1mrS;
        XWpDZ:
        $this->response->write();
        goto rluUa;
        GCUep:
        $tages = $this->tagModel->get_list($tagType);
        goto RUVr_;
        XqPET:
        if (!empty($tages)) {
            $this->response->set_data("\151\x74\x65\x6d\x73", $tages);
        }
        goto XWpDZ;
        P1mrS:
    }
    public function details($tagId = 0)
    {
        goto FGRiJ;
        x1wuF:
        $this->response->write();
        goto azM2w;
        rJA_b:
        $tagDetails = $this->tagModel->get_details($tagId);
        goto DvB12;
        p0Vsw:
        if (!empty($tagDetails)) {
            $this->response->set_data($tagDetails);
        }
        goto x1wuF;
        DvB12:
        $this->response->success();
        goto p0Vsw;
        FGRiJ:
        if (empty($tagId)) {
            goto pQOFf;
            WcKnt:
            $this->response->write();
            goto I3sAD;
            I3sAD:
            return false;
            goto VD2gc;
            pQOFf:
            $this->response->error("\x54\x61\147\x20\111\x44\40\x6d\x69\x73\x73\151\156\x67");
            goto WcKnt;
            VD2gc:
        }
        goto rJA_b;
        azM2w:
        return true;
        goto uPqm2;
        uPqm2:
    }
    public function save()
    {
        goto qrabt;
        Pwmxk:
        $this->response->set_data("\151\x64", $tagId);
        goto YmSFa;
        jT_dw:
        $this->response->success('');
        goto Pwmxk;
        GPwFu:
        $tagId = $this->tagModel->save($postData);
        goto jT_dw;
        YmSFa:
        $this->response->write();
        goto rcAyv;
        HQRpF:
        if (empty($postData)) {
            goto KDIVw;
            mumfb:
            return false;
            goto A6U1s;
            KDIVw:
            $this->response->error("\x52\145\x71\x75\151\162\145\144\x20\x66\151\x65\x6c\144\40\155\x69\163\x73\151\156\x67");
            goto WwZCB;
            WwZCB:
            $this->response->write();
            goto mumfb;
            A6U1s:
        }
        goto GPwFu;
        rcAyv:
        return true;
        goto mYbyy;
        qrabt:
        $postData = $this->request->post();
        goto HQRpF;
        mYbyy:
    }
    public function deleteitem($id = '', $tagType = "\x43", $linkedTag = false)
    {
        goto p3VAa;
        L3rfE:
        return true;
        goto drY20;
        p3VAa:
        if (empty($id)) {
            goto L02UI;
            L02UI:
            $this->response->error("\x49\104\x20\x6d\151\x73\x73\x69\156\x67");
            goto sDrol;
            sDrol:
            $this->response->write();
            goto M_tA8;
            M_tA8:
            return false;
            goto MCYrG;
            MCYrG:
        }
        goto Bv8hE;
        Bv8hE:
        if ($this->tagModel->deleteItem($id, $tagType, $linkedTag)) {
            $this->response->success("\x44\x45\x4c\x45\x54\105\137\123\x55\x43\103\x45\123\x53");
        } else {
            $this->response->error($this->tagModel->message);
        }
        goto II_th;
        II_th:
        $this->response->write();
        goto L3rfE;
        drY20:
    }
}
