<?php
/*
Generated by OutputBooks Team
*/

defined("\x42\101\x53\x45\120\101\x54\110") or exit("\x4e\x6f\40\144\x69\162\x65\143\164\x20\163\143\162\x69\160\x74\x20\141\143\143\145\163\163\x20\x61\x6c\x6c\157\167\x65\144");
class Attributes extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model("\x61\164\164\x72\x69\142\165\164\x65\115\x6f\144\145\x6c");
    }
    public function index()
    {
        $this->load->page("\x68\157\x6d\x65");
    }
    public function listing($page = 1)
    {
        goto Zh9zu;
        I0XBe:
        $this->response->set_data("\x69\164\145\x6d\x73", $result, true);
        goto l__DY;
        l__DY:
        $this->response->write();
        goto Iwb5G;
        Zh9zu:
        $result = $this->attributeModel->get_list(array("\x70\x61\147\145" => $page));
        goto suuA7;
        Iwb5G:
        return true;
        goto JJ5YN;
        suuA7:
        $this->response->success();
        goto I0XBe;
        JJ5YN:
    }
    public function details($attrGrpId = 0)
    {
        goto GgjVR;
        vFhU6:
        if (isset($result["\146\154\x64\x4f\160\164\x69\157\x6e\163"])) {
            $this->response->set_data("\146\x6c\x64\117\x70\x74\x69\157\x6e\163", $result["\x66\x6c\144\x4f\160\x74\151\x6f\x6e\163"], true);
            unset($result["\x66\154\x64\x4f\x70\x74\x69\x6f\156\163"]);
        }
        goto P8HzV;
        U3u47:
        $this->response->success();
        goto vFhU6;
        P8HzV:
        if (isset($result["\x63\141\164\145\147\x6f\162\x69\145\163"])) {
            $this->response->set_data("\143\141\164\145\x67\x6f\162\151\145\163", $result["\143\141\164\145\x67\x6f\x72\151\x65\163"]);
            unset($result["\x63\141\x74\x65\x67\157\x72\151\x65\163"]);
        }
        goto FnVMS;
        GgjVR:
        if (empty($attrGrpId)) {
            goto UC3Q4;
            UC3Q4:
            $this->response->error("\111\x4e\126\101\x4c\x49\x44\x5f\122\105\x51\125\x45\x53\124");
            goto ntoU5;
            ntoU5:
            $this->response->write();
            goto jsSON;
            jsSON:
            return false;
            goto ViWpX;
            ViWpX:
        }
        goto X8kT1;
        veFpP:
        return true;
        goto UCMwl;
        X8kT1:
        $result = $this->attributeModel->get_details($attrGrpId);
        goto U3u47;
        FnVMS:
        $this->response->write();
        goto veFpP;
        UCMwl:
    }
    public function save()
    {
        goto q5USj;
        xu6in:
        if (empty($attrGrpId)) {
            goto bgEIQ;
            bgEIQ:
            if (empty($this->attributeModel->message)) {
                $this->response->error("\x41\164\164\162\151\142\x75\x74\145\x20\x6e\157\164\x20\x73\x61\x76\x65\x64");
            } else {
                $this->response->error($this->attributeModel->message);
            }
            goto eExdj;
            eExdj:
            $this->response->write();
            goto jZOC7;
            jZOC7:
            return false;
            goto QRqSt;
            QRqSt:
        }
        goto Hibsf;
        reFGU:
        $attrGrpId = $this->attributeModel->save($postData);
        goto xu6in;
        q5USj:
        $postData = $this->request->post();
        goto i_5j9;
        Hibsf:
        $this->response->success('');
        goto fWzzV;
        zjTsf:
        $this->response->write();
        goto tkCyM;
        tkCyM:
        return true;
        goto zVAhC;
        i_5j9:
        if (empty($postData)) {
            goto QFRtM;
            pOdq5:
            $this->response->write();
            goto Rryi6;
            QFRtM:
            $this->response->error("\111\x4e\x56\101\x4c\111\x44\137\122\x45\121\x55\105\x53\x54");
            goto pOdq5;
            Rryi6:
            return false;
            goto hMlmW;
            hMlmW:
        }
        goto reFGU;
        fWzzV:
        $this->response->set_data("\x69\x64", $attrGrpId);
        goto zjTsf;
        zVAhC:
    }
    public function saveorder()
    {
        goto VNxeg;
        QAPwq:
        $this->response->write();
        goto SUgfD;
        xs1Ln:
        $this->response->success("\117\162\x64\x65\162\x20\x73\x61\x76\x65\x64\x20\163\165\x63\143\145\163\x73\x66\x75\154\154\171");
        goto QAPwq;
        CAScB:
        $attrGrpId = $this->attributeModel->saveorder($postData);
        goto xs1Ln;
        zPLiy:
        if (empty($postData)) {
            goto D8FCc;
            D8FCc:
            $this->response->error("\x49\x4e\x56\x41\x4c\111\x44\x5f\x52\x45\121\x55\x45\123\124");
            goto tQ0Ea;
            PjoFJ:
            return false;
            goto DFZY7;
            tQ0Ea:
            $this->response->write();
            goto PjoFJ;
            DFZY7:
        }
        goto CAScB;
        SUgfD:
        return true;
        goto fbak1;
        VNxeg:
        $postData = $this->request->post();
        goto zPLiy;
        fbak1:
    }
    public function delete($attrGrpId = '')
    {
        goto tAaaT;
        tAaaT:
        if (empty($attrGrpId)) {
            goto LrCUm;
            rY5DK:
            $this->response->write();
            goto IZMc1;
            LrCUm:
            $this->response->error("\x44\x45\x4c\x45\x54\105\x5f\x45\x52\122\117\122");
            goto rY5DK;
            IZMc1:
            return false;
            goto nQLO6;
            nQLO6:
        }
        goto sEyTS;
        gnAOx:
        $this->response->write();
        goto ga38X;
        sEyTS:
        if ($this->attributeModel->delete($attrGrpId)) {
            $this->response->success("\x44\105\114\x45\x54\105\137\x53\125\x43\x43\x45\123\x53");
        } else {
            $this->response->error($this->attributeModel->message);
        }
        goto gnAOx;
        ga38X:
        return true;
        goto QpLEn;
        QpLEn:
    }
    public function resetserial()
    {
        goto tTzHh;
        tTzHh:
        $postData = $this->request->post();
        goto k7nyN;
        zC6yn:
        $this->response->success("\103\157\155\160\x6c\x65\x74\x65\144");
        goto bL5xL;
        bL5xL:
        $this->response->write();
        goto n9nwN;
        n9nwN:
        return true;
        goto YMad1;
        VIXfE:
        $this->attributeModel->resetserial($postData);
        goto zC6yn;
        k7nyN:
        if (empty($postData)) {
            goto kPI_J;
            GNDCD:
            return false;
            goto CsVBm;
            Gyx3r:
            $this->response->write();
            goto GNDCD;
            kPI_J:
            $this->response->error("\111\116\x56\x41\114\x49\104\x5f\122\105\x51\x55\x45\123\x54");
            goto Gyx3r;
            CsVBm:
        }
        goto VIXfE;
        YMad1:
    }
    public function traceserial()
    {
        goto rdtXq;
        hpfUa:
        if (empty($postData)) {
            goto zBK9v;
            SOkzy:
            $this->response->write();
            goto IuFpl;
            zBK9v:
            $this->response->error("\x49\x4e\126\x41\114\111\x44\x5f\x52\105\121\125\105\123\124");
            goto SOkzy;
            IuFpl:
            return false;
            goto Q3Vip;
            Q3Vip:
        }
        goto M5s_g;
        S0ZIv:
        return true;
        goto o8A_g;
        pJeoL:
        $this->response->success("\x43\157\155\x70\154\x65\x74\145\x64");
        goto cKmcU;
        auo8Y:
        $this->response->write();
        goto S0ZIv;
        M5s_g:
        $items = $this->attributeModel->traceserial($postData);
        goto pJeoL;
        cKmcU:
        $this->response->set_data("\151\164\145\155\x73", $items);
        goto auo8Y;
        rdtXq:
        $postData = $this->request->post();
        goto hpfUa;
        o8A_g:
    }
}
