<?php
/*
Generated by OutputBooks Team
*/

defined("\x42\101\123\x45\x50\x41\124\x48") or exit("\x4e\x6f\x20\144\151\x72\145\143\x74\x20\x73\x63\x72\151\x70\x74\x20\141\x63\x63\145\163\x73\40\x61\154\154\157\x77\x65\x64");
class Ecommerce extends MY_Controller
{
    public function __construct()
    {
        goto fYYIA;
        IcB2L:
        if (!in_array("\x45\103", $salModCodes)) {
            show_404();
            return;
        }
        goto GWNGh;
        QkudD:
        $this->cId = get_company("\x69\x64");
        goto HAuS_;
        fYYIA:
        parent::__construct();
        goto Gnm2r;
        dlYci:
        $salModCodes = explode("\x2c", $strSalModCodes);
        goto zqkEJ;
        j4A9c:
        $this->load->model("\145\143\157\155\155\x65\x72\143\145\x4d\157\144\145\x6c");
        goto QkudD;
        GWNGh:
        if (is_readable(OB_ECOM_PATH . "\57\166\145\x72\163\151\x6f\156\56\x70\x68\x70")) {
            include_once OB_ECOM_PATH . "\57\166\x65\x72\x73\x69\157\156\x2e\160\x68\x70";
        } else {
            goto mEMjN;
            s4mAc:
            $this->response->write();
            goto y1mvP;
            mEMjN:
            $this->response->error("\126\145\x72\163\151\157\156\x20\146\151\x6c\145\40\155\151\163\x73\x69\156\x67");
            goto s4mAc;
            y1mvP:
            exit;
            goto jqrBe;
            jqrBe:
        }
        goto j4A9c;
        Gnm2r:
        $strSalModCodes = get_company("\x73\141\154\x4d\x6f\x64\103\x6f\144\145\x73");
        goto dlYci;
        zqkEJ:
        valid_permission("\x45\x43\117", 1);
        goto IcB2L;
        HAuS_:
    }
    public function save_ecom_config($type = "\x73\164\x6f\x72\x65")
    {
        goto GeIjP;
        EYUN2:
        $retData = $this->ecommerceModel->save_ecom_config($postData, $type, $content);
        goto jkEyR;
        GeIjP:
        $postData = $this->request->post();
        goto iK9_h;
        DlHPC:
        if ($type == "\x74\x68\x65\155\x65") {
            $a_css["\141\137\x74\x68\145\x6d\145\123\145\x74\164\x69\x6e\147"] = !empty($postData["\164\150\x65\x6d\145"]) ? json_decode($postData["\164\x68\x65\x6d\145"], true) : array();
            $content = $this->load->view("\143\163\x73", $a_css, true);
        }
        goto EYUN2;
        Ifzmv:
        $this->response->write();
        goto ne1QW;
        xshRN:
        $this->response->success("\x53\125\103\103\105\x53\x53\137\123\x41\126\105");
        goto Ifzmv;
        iK9_h:
        $content = '';
        goto DlHPC;
        jkEyR:
        if ($retData !== true && !empty($retData)) {
            $this->response->set_data($retData);
        }
        goto xshRN;
        ne1QW:
    }
    public function get_ecom_config($type = "\x73\164\x6f\x72\x65")
    {
        goto D8kWB;
        jTC25:
        $this->response->set_data("\145\x63\x6f\155\x56\145\162\x73\151\x6f\x6e", OB_ECOM_VERSION);
        goto niqvw;
        CBdy2:
        $this->response->set_data("\x69\164\145\x6d\163", $result);
        goto jTC25;
        D8kWB:
        $result = $this->ecommerceModel->get_ecom_config($type);
        goto CBdy2;
        Vch1J:
        return true;
        goto j2hpp;
        niqvw:
        $this->response->write();
        goto Vch1J;
        j2hpp:
    }
    public function get_page_list($page = 1)
    {
        goto jPxdJ;
        jPxdJ:
        $result = $this->ecommerceModel->get_page_list($page);
        goto fvkpV;
        zQjNA:
        $this->response->write();
        goto v5lvy;
        v5lvy:
        return true;
        goto lzlcU;
        fvkpV:
        $this->response->set_data("\x69\x74\145\x6d\x73", $result);
        goto zQjNA;
        lzlcU:
    }
    public function get_page_config($id)
    {
        goto BmhVV;
        BmhVV:
        $result = $this->ecommerceModel->get_page_config($id);
        goto c2ADZ;
        aWBZc:
        return true;
        goto Jl7s3;
        c2ADZ:
        $this->response->set_data("\151\x74\145\x6d\x73", $result);
        goto hZ1za;
        hZ1za:
        $this->response->write();
        goto aWBZc;
        Jl7s3:
    }
    public function save_page_config()
    {
        goto VjMdT;
        zDwkO:
        $result = $this->ecommerceModel->save_page_config($data);
        goto A341b;
        VjMdT:
        $data = $this->request->post();
        goto zDwkO;
        A341b:
        if ($result) {
            goto j1rfK;
            RkjYP:
            $this->response->success("\123\125\x43\x43\105\123\x53\x5f\x53\101\x56\105");
            goto j4eE1;
            j1rfK:
            $this->response->set_data("\151\144", $result);
            goto RkjYP;
            j4eE1:
            $this->response->write();
            goto nmaE0;
            nmaE0:
        } else {
            $this->response->success("\123\101\x56\x45\x5f\x45\x52\x52\117\x52");
            $this->response->write();
        }
        goto qn1TU;
        qn1TU:
    }
    public function delete_page_config($id = 0)
    {
        $result = $this->ecommerceModel->delete_page_config($id);
        if ($result) {
            $this->response->success("\x44\x45\114\x45\124\x45\x5f\123\x55\x43\x43\105\x53\x53");
            $this->response->write();
        } else {
            $this->response->success("\x44\105\114\x45\x54\x45\x5f\x45\x52\122\117\122");
            $this->response->write();
        }
    }
    public function get_ecom_modules($moduleType)
    {
        goto T0KZb;
        DRXcs:
        return true;
        goto kUR1k;
        BLEmM:
        $this->response->write();
        goto DRXcs;
        ugaNQ:
        $this->response->set_data("\151\x74\145\x6d\163", $result, true);
        goto BLEmM;
        T0KZb:
        $result = $this->ecommerceModel->get_ecom_modules($moduleType);
        goto ugaNQ;
        kUR1k:
    }
    public function ecom_product_module()
    {
        goto OvJsW;
        FX1uG:
        $this->response->write();
        goto ffY62;
        kPvEG:
        $this->response->set_data("\x69\164\145\x6d\x73", $result, true);
        goto FX1uG;
        OvJsW:
        $result = $this->ecommerceModel->product_module_listing();
        goto kPvEG;
        ffY62:
        return true;
        goto ZtY_u;
        ZtY_u:
    }
    public function get_home_module($id = 0)
    {
        goto BN6ea;
        jjTnH:
        if (!empty($result["\160\162\157\x64\x75\143\x74\x73"])) {
            $this->response->set_data("\160\162\x6f\144\165\x63\x74\x73", $result["\x70\162\x6f\x64\x75\143\164\163"]);
        }
        goto d8xC4;
        d8xC4:
        if (!empty($result["\163\164\141\143\153\163\x74\x79\x6c\x65\x73"])) {
            $this->response->set_data("\x73\x74\x61\143\153\x73\x74\x79\154\x65\163", $result["\x73\x74\x61\x63\153\x73\164\171\154\145\163"]);
        }
        goto oiUmy;
        IoPy4:
        $this->response->set_data("\151\x74\x65\x6d\x73", $result["\151\x74\145\155\163"]);
        goto LUJ5r;
        BN6ea:
        if (empty($id)) {
            return;
        }
        goto hMLuO;
        S4HMC:
        return true;
        goto JJpFz;
        oiUmy:
        $this->response->write();
        goto S4HMC;
        LUJ5r:
        if (!empty($result["\x63\141\164\x73"])) {
            $this->response->set_data("\143\141\x74\163", $result["\143\141\x74\163"]);
        }
        goto jjTnH;
        hMLuO:
        $result = $this->ecommerceModel->get_home_module($id);
        goto IoPy4;
        JJpFz:
    }
    public function delete_module($id = 0)
    {
        goto ej2w0;
        XL1vM:
        $result = $this->ecommerceModel->delete_home_module($id);
        goto V7691;
        ej2w0:
        if (empty($id)) {
            return;
        }
        goto XL1vM;
        V7691:
        if ($result) {
            $this->response->success("\104\x45\x4c\105\x54\105\137\123\125\103\103\105\123\123");
            $this->response->write();
        } else {
            $this->response->success("\104\x45\114\x45\x54\x45\x5f\x45\x52\122\x4f\122");
            $this->response->write();
        }
        goto bUkVt;
        bUkVt:
    }
    public function get_template_images($module = "\151\x6d\147\x5f\x73\164\x61\143\x6b")
    {
        goto vEOWq;
        aa5wO:
        return true;
        goto g70R3;
        n5i6r:
        $this->response->write();
        goto aa5wO;
        uD28o:
        $this->response->set_data("\x69\x74\x65\155\163", $result);
        goto n5i6r;
        vEOWq:
        $result = $this->ecommerceModel->get_template_images($module);
        goto uD28o;
        g70R3:
    }
    public function save_module_order()
    {
        goto OnX6_;
        OnX6_:
        $data = $this->request->post();
        goto B9cYV;
        b8bnM:
        return false;
        goto Fd7Ex;
        B9cYV:
        if (!empty($data)) {
            goto h0xoT;
            H62mq:
            $this->response->write();
            goto INZdD;
            E9RP8:
            $this->response->success("\117\x72\x64\145\x72\40\163\141\x76\145\x64\x20\163\x75\143\x63\x65\x73\163\146\165\x6c\x6c\171");
            goto H62mq;
            INZdD:
            return true;
            goto AWKbC;
            h0xoT:
            $this->ecommerceModel->save_home_modules_order($data);
            goto E9RP8;
            AWKbC:
        }
        goto b8bnM;
        Fd7Ex:
    }
    public function save_ecom_module()
    {
        goto Jr1tg;
        PY63r:
        return false;
        goto v19LQ;
        Jr1tg:
        $data = $this->request->post();
        goto eE9C6;
        eE9C6:
        if (!empty($data)) {
            goto ozEM3;
            prVFI:
            $this->response->write("\x69\x64", $id);
            goto WR1Rn;
            WR1Rn:
            return true;
            goto Djmy4;
            iEtd_:
            $this->response->success("\x53\x55\103\103\105\123\x53\137\123\x41\x56\x45");
            goto prVFI;
            ozEM3:
            $id = $this->ecommerceModel->save_ecom_module($data);
            goto iEtd_;
            Djmy4:
        }
        goto PY63r;
        v19LQ:
    }
    public function product_listing($page = 1)
    {
        goto hzYga;
        KIeh8:
        $result = $this->ecommerceModel->product_listing($data, $page);
        goto Y9Zkc;
        hzYga:
        $data = $this->request->post();
        goto KIeh8;
        RLBYH:
        $this->response->write();
        goto la7WN;
        la7WN:
        return true;
        goto Rafz6;
        Y9Zkc:
        $this->response->set_data("\x69\164\145\x6d\163", $result, true);
        goto RLBYH;
        Rafz6:
    }
    public function categories_listing($type = "\102")
    {
        goto qWLDx;
        Y5W4T:
        $this->response->write();
        goto HKVYv;
        HKVYv:
        return true;
        goto FUSAk;
        oRLOG:
        $this->response->set_data("\x69\164\x65\155\x73", $result, true);
        goto Y5W4T;
        qWLDx:
        $result = $this->ecommerceModel->categories_listing($type);
        goto oRLOG;
        FUSAk:
    }
    public function module_listing($pageCode = "\x48\117\115")
    {
        goto rV_Xm;
        HtO95:
        $result = $this->ecommerceModel->module_listing($pageCode);
        goto C4_bi;
        eZpNO:
        $this->response->write();
        goto eVjNS;
        rV_Xm:
        $pageCode = explode("\54", $pageCode);
        goto HtO95;
        C4_bi:
        $this->response->set_data("\151\164\x65\x6d\163", $result, true);
        goto eZpNO;
        eVjNS:
        return true;
        goto SKnEQ;
        SKnEQ:
    }
    public function shipping_details_list($type = "\123")
    {
        goto xZV04;
        wCZzd:
        $this->response->write();
        goto NTqMG;
        xZV04:
        $result = $this->ecommerceModel->shipping_details_list($type);
        goto kPtue;
        NTqMG:
        return true;
        goto vf5bU;
        kPtue:
        $this->response->set_data("\x69\x74\x65\x6d\x73", $result, true);
        goto wCZzd;
        vf5bU:
    }
    public function save_shipping_details()
    {
        goto NQACC;
        NQACC:
        $data = $this->request->post();
        goto jFDrc;
        A0Xwe:
        $this->response->success("\123\x55\x43\103\x45\x53\123\x5f\123\101\x56\105");
        goto BCtVU;
        XWyzM:
        return true;
        goto BG_2K;
        BCtVU:
        $this->response->write("\151\x64", $id);
        goto XWyzM;
        jFDrc:
        $id = $this->ecommerceModel->save_shipping_details($data);
        goto A0Xwe;
        BG_2K:
    }
    public function shipping_detail($id = 0)
    {
        goto rzf0q;
        I00g5:
        return true;
        goto cAD12;
        BNs1C:
        if (!empty($result["\172\x6f\x6e\x65\x73"])) {
            $this->response->set_data("\172\157\x6e\145\x73", $result["\172\157\x6e\145\x73"]);
        }
        goto uS6TZ;
        iGGvP:
        if (!empty($result["\x69\164\x65\x6d\x73"])) {
            $this->response->set_data("\151\x74\x65\155\163", $result["\151\x74\x65\155\163"]);
        }
        goto CKQmw;
        rzf0q:
        $result = $this->ecommerceModel->shipping_detail($id);
        goto iGGvP;
        qWse3:
        $this->response->write();
        goto I00g5;
        CKQmw:
        if (!empty($result["\167\145\151\147\x68\164\x73"])) {
            $this->response->set_data("\x77\x65\x69\147\x68\x74\163", $result["\x77\145\x69\x67\x68\x74\x73"], true);
        }
        goto BNs1C;
        cAD12:
        return;
        goto SRWi7;
        uS6TZ:
        if (!empty($result["\x65\x78\143\x6c\165\x64\x65\x64\x5a\x6f\156\145\x73"])) {
            $this->response->set_data("\x65\170\x63\154\165\144\x65\x64\x5a\157\156\145\163", $result["\x65\x78\143\154\165\144\x65\x64\132\157\x6e\x65\163"]);
        }
        goto qWse3;
        SRWi7:
    }
    public function delete_shipping($type, $id, $sortNo)
    {
        $result = $this->ecommerceModel->delete_shipping($type, $id, $sortNo);
        if ($result) {
            $this->response->success("\104\105\114\x45\124\105\x5f\123\125\x43\103\x45\123\x53");
            $this->response->write();
        } else {
            $this->response->success("\x44\105\114\x45\124\x45\137\x45\122\122\x4f\x52");
            $this->response->write();
        }
    }
    public function get_banks()
    {
        goto GiqwS;
        GiqwS:
        $result = $this->ecommerceModel->get_bank_list();
        goto ab1iN;
        ab1iN:
        if (!empty($result)) {
            $this->response->set_data("\x69\164\x65\x6d\x73", $result);
        }
        goto kYbtZ;
        X2EaR:
        return true;
        goto V8C3R;
        kYbtZ:
        $this->response->write();
        goto X2EaR;
        V8C3R:
    }
    public function save_sort_order($type = "\x6d\157\144\x75\154\145")
    {
        goto AkkAE;
        b1NAK:
        if (!empty($data)) {
            goto UHZ2L;
            BRt9y:
            return true;
            goto mbPzb;
            W1FNp:
            $this->response->success("\117\x72\144\145\162\x20\163\x61\x76\145\144\40\x73\165\143\x63\145\x73\x73\x66\x75\154\154\x79");
            goto znNrw;
            znNrw:
            $this->response->write();
            goto BRt9y;
            UHZ2L:
            $this->ecommerceModel->save_sort_order($type, $data);
            goto W1FNp;
            mbPzb:
        }
        goto P4TLS;
        P4TLS:
        return false;
        goto kONNV;
        AkkAE:
        $data = $this->request->post();
        goto b1NAK;
        kONNV:
    }
    public function get_item_attributes($itemid, $itemAttrId = 0)
    {
        $result = $this->ecommerceModel->get_item_attributes($itemid, $itemAttrId);
        print_r($result);
    }
    public function get_image($imageid = 0, $image_name = '', $type = "\x69", $img_type = "\x64\145\x66\141\165\x6c\164")
    {
        goto B9lY1;
        B9lY1:
        $result = $this->ecommerceModel->get_image($imageid, $image_name, $type, $img_type);
        goto AdOTX;
        AdOTX:
        header("\103\157\x6e\x74\145\156\x74\55\164\x79\x70\x65\72\40" . $result["\x74\171\x70\x65"]);
        goto aHH7a;
        PQ11u:
        echo $result["\x69\x6d\141\x67\145"];
        goto b9jIZ;
        aHH7a:
        header("\103\x6f\x6e\x74\x65\x6e\164\x2d\114\x65\156\147\x74\x68\72\40" . $result["\x6c\x65\x6e\x67\164\150"]);
        goto PQ11u;
        b9jIZ:
    }
    public function parent_pages()
    {
        goto IkcTI;
        IkcTI:
        $result = $this->ecommerceModel->get_parent_pages();
        goto wOK3e;
        pLRSK:
        $this->response->write();
        goto XQvvz;
        XQvvz:
        return true;
        goto brZjs;
        wOK3e:
        if (!empty($result)) {
            $this->response->set_data("\x69\164\145\x6d\163", $result);
        }
        goto pLRSK;
        brZjs:
    }
    public function save_page_order()
    {
        goto V8Icc;
        ee5gs:
        return false;
        goto vPBEO;
        V8Icc:
        $data = $this->request->post();
        goto KHhFG;
        KHhFG:
        if (!empty($data)) {
            goto Kilip;
            xhjRZ:
            $this->response->write();
            goto b3bzL;
            b3bzL:
            return true;
            goto wz6Zk;
            EwPO3:
            $this->response->set_data("\151\x74\145\x6d\x73", $result);
            goto xhjRZ;
            seb_z:
            $this->response->success("\117\x72\144\145\x72\x20\163\141\166\145\x64\40\163\165\x63\143\x65\163\163\146\x75\x6c\154\x79");
            goto EwPO3;
            Kilip:
            $result = $this->ecommerceModel->save_page_order($data);
            goto seb_z;
            wz6Zk:
        }
        goto ee5gs;
        vPBEO:
    }
    public function media_list($page = 1, $is_image = false)
    {
        goto SMXkV;
        odiyq:
        $result = $this->ecommerceModel->get_media_list($page, $is_image);
        goto WYdPD;
        nQExv:
        return true;
        goto fkOlh;
        WYdPD:
        if ($result) {
            goto c0mgG;
            mfZYm:
            $this->response->set_data("\x70\x61\164\x68", $result["\160\x61\x74\150"]);
            goto R8w4C;
            R8w4C:
            $this->response->set_data("\146\151\154\x65\x5f\x69\x63\x6f\x6e\x5f\x70\x61\164\150", $result["\146\151\x6c\x65\137\x69\x63\x6f\156\x5f\x70\x61\x74\x68"]);
            goto u0JQV;
            c0mgG:
            $this->response->set_data("\151\x74\x65\x6d\163", $result["\x69\x74\145\155\x73"]);
            goto mfZYm;
            u0JQV:
            $this->response->write();
            goto ygA6m;
            ygA6m:
        }
        goto nQExv;
        SMXkV:
        $page = empty($page) ? 1 : $page;
        goto odiyq;
        fkOlh:
    }
    public function review_list()
    {
        goto oJjgU;
        cY9YY:
        $this->response->set_data("\151\164\x65\x6d\x73", $result["\x72\145\x76\x69\145\x77\163"], true);
        goto YeyHh;
        oJjgU:
        $data = $this->request->post();
        goto ybnEC;
        sIqgp:
        $result = $this->ecommerceModel->get_review_list($data);
        goto cY9YY;
        ybnEC:
        $data["\160\x61\147\145"] = empty($data["\160\x61\147\x65"]) ? 1 : $data["\x70\141\x67\145"];
        goto sIqgp;
        tpYda:
        $this->response->write();
        goto lfvt2;
        lfvt2:
        return true;
        goto ABsAY;
        YeyHh:
        $this->response->set_data("\x74\x6f\164\x61\154\163", $result["\x74\157\164\x61\x6c\x5f\x72\145\x76\x69\x65\167"]);
        goto tpYda;
        ABsAY:
    }
    public function delete_review($reviewId = '')
    {
        if ($this->ecommerceModel->delete_review($reviewId)) {
            goto nnXq2;
            hQtzU:
            $this->response->write();
            goto f58mX;
            nnXq2:
            $this->response->success("\122\x65\166\151\x65\167\40\x44\145\154\x65\x74\145\144\40\x53\x75\143\x63\x65\x73\x73\146\165\x6c\x6c\x79");
            goto hQtzU;
            f58mX:
            return true;
            goto bHFR2;
            bHFR2:
        }
        return false;
    }
    public function approve_review($reviewId = '')
    {
        if ($this->ecommerceModel->approve_review($reviewId)) {
            goto FPS_3;
            bpm7r:
            return true;
            goto xT6hA;
            yHmXm:
            $this->response->write();
            goto bpm7r;
            FPS_3:
            $this->response->success("\122\x65\166\x69\145\x77\40\101\160\160\x72\157\x76\145\144\40\123\x75\x63\x63\x65\x73\x73\146\x75\x6c\x6c\x79");
            goto yHmXm;
            xT6hA:
        }
        return false;
    }
    public function update_review()
    {
        goto J_2TL;
        CYfw0:
        if (!empty($data)) {
            goto YUoer;
            YUoer:
            $this->ecommerceModel->update_review($data);
            goto oEdpk;
            dawoO:
            return true;
            goto KOSFi;
            oEdpk:
            $this->response->success("\x52\145\x76\151\145\167\40\165\160\144\141\x74\x65\144\x20\163\165\143\143\x65\x73\x73\x66\x75\x6c\x6c\171");
            goto FZZ_X;
            FZZ_X:
            $this->response->write();
            goto dawoO;
            KOSFi:
        }
        goto ioYzG;
        ioYzG:
        return false;
        goto Pbp55;
        J_2TL:
        $data = $this->request->post();
        goto CYfw0;
        Pbp55:
    }
    public function cancel_review()
    {
        goto Ld1qP;
        hhVsY:
        if (!empty($data)) {
            goto ZPJzv;
            Fb4LD:
            return true;
            goto T4Dji;
            y6K2L:
            $this->response->success("\x52\x65\166\151\x65\167\40\x63\x61\x6e\143\145\x6c\145\144\x20\163\x75\x63\143\145\163\163\x66\165\154\154\171");
            goto y3q9Q;
            y3q9Q:
            $this->response->write();
            goto Fb4LD;
            ZPJzv:
            $this->ecommerceModel->cancel_review($data);
            goto y6K2L;
            T4Dji:
        }
        goto q0Jtk;
        q0Jtk:
        return false;
        goto MtQpF;
        Ld1qP:
        $data = $this->request->post();
        goto hhVsY;
        MtQpF:
    }
    public function delete_media($filename = '')
    {
        goto hgw8Z;
        roxyL:
        return false;
        goto sCx6b;
        XV7q5:
        if ($this->ecommerceModel->delete_media($filename)) {
            goto zis7u;
            TbEch:
            return true;
            goto QNlQY;
            zis7u:
            $this->response->success("\106\x69\x6c\x65\x20\104\x65\x6c\145\x74\x65\x64\40\123\x75\143\143\145\163\163\x66\165\154\x6c\x79");
            goto rdH31;
            rdH31:
            $this->response->write();
            goto TbEch;
            QNlQY:
        }
        goto roxyL;
        hgw8Z:
        if (empty($filename)) {
            return false;
        }
        goto XV7q5;
        sCx6b:
    }
    public function upload_media_files()
    {
        goto qiLSw;
        GY59D:
        if ($file_data) {
            $this->response->success($this->attachmentModel->message);
            $this->response->set_data("\x75\x70\154\157\x61\x64\40\163\x75\143\x63\x65\x73\163");
        } else {
            $this->response->error(strip_tags($this->attachmentModel->message));
        }
        goto qpKOM;
        x7oVR:
        return true;
        goto HCFoR;
        qiLSw:
        $this->load->model("\x61\x74\164\x61\143\x68\x6d\145\x6e\x74\115\x6f\x64\145\x6c");
        goto UBccG;
        qpKOM:
        $this->response->write();
        goto x7oVR;
        UBccG:
        $file_data = $this->attachmentModel->upload_file("\x69\155\x70\157\x72\x74\115\x65\x64\151\x61");
        goto GY59D;
        HCFoR:
    }
    function resize_ecom_image($inputwidth, $cardStyle, $orgFile, $_imageToresize, $fileExt)
    {
        goto VWS_4;
        R1tkY:
        $params["\146\151\154\145\105\x78\x74"] = $fileExt;
        goto YLKBB;
        VWS_4:
        $params = array();
        goto R1tkY;
        NZqKJ:
        if (file_exists($_imageToresize)) {
            unlink($_imageToresize);
        }
        goto WZaRN;
        WZaRN:
        $params["\156\145\x77\137\151\155\x61\x67\x65"] = $_imageToresize;
        goto B6UpN;
        B6UpN:
        $this->attachmentModel->resize_ecom_files($orgFile, $params);
        goto WFZdb;
        YLKBB:
        if ($cardStyle == "\123") {
            $params["\167\x69\144\164\x68"] = $inputwidth;
            $params["\150\x65\151\x67\150\x74"] = $inputwidth;
        } else {
            if ($cardStyle == "\x56") {
                $params["\x77\x69\144\164\150"] = $inputwidth;
                $params["\150\x65\151\147\150\164"] = $inputwidth * 1.67;
            } else {
                if ($cardStyle == "\122") {
                    $params["\167\151\144\x74\x68"] = $inputwidth;
                    $params["\150\145\151\x67\150\x74"] = $inputwidth * 0.6;
                }
            }
        }
        goto NZqKJ;
        WFZdb:
    }
    public function update_ecom_item_image()
    {
        goto QpLwL;
        vRuje:
        if (empty($data) || !empty($data) && (!empty($data["\154\x69\x73\164\127\151\144\164\150"]) && $data["\x6c\x69\x73\164\x57\151\144\164\150"] <= 10) || !empty($data["\x69\x74\145\x6d\160\x61\147\x65\x57\151\x64\164\150"]) && $data["\151\164\x65\155\x70\141\x67\145\x57\151\144\164\x68"] <= 10) {
            goto AlORd;
            ri2h4:
            return false;
            goto Gztay;
            AlORd:
            $this->response->error("\x52\145\163\x69\172\x65\40\166\141\x6c\165\145\40\x6d\x75\163\164\x20\x62\145\40\x76\x61\154\151\x64\x20\156\x75\155\x62\x65\x72", 0);
            goto uz4fc;
            uz4fc:
            $this->response->write();
            goto ri2h4;
            Gztay:
        }
        goto az4tM;
        az4tM:
        $result = $this->ecommerceModel->get_ecom_item_image($data);
        goto aLuDw;
        pc20P:
        $this->response->set_data("\151\164\x65\x6d\163", sizeof($result), true);
        goto GvENr;
        QpLwL:
        $data = $this->request->post();
        goto vRuje;
        ZdJ83:
        LrkRj:
        goto pc20P;
        qV7Iy:
        return true;
        goto bynMy;
        LVjT8:
        $subDir = "\151";
        goto cBYs_;
        rOPQR:
        foreach ($result as $row) {
            goto ynfQj;
            KwMRA:
            Ioxlt:
            goto ertX3;
            ertX3:
            fu2jZ:
            goto lxyZ9;
            cpZ0k:
            $new_name = $ecomImagePath . $this->cId . DS . $subPath . DS . $row["\x69\x6d\141\147\145\111\x64"];
            goto jUb3o;
            Q180v:
            yK4LJ:
            goto KwMRA;
            gFryK:
            $subPath = "\151\x6d\141\x67\145\x73" . DS . $subDir . DS . $imageNewPath;
            goto cpZ0k;
            ynfQj:
            $imageNewPath = implode(DS, str_split($row["\151\155\141\147\x65\x49\144"]));
            goto gFryK;
            jUb3o:
            $orgFile = $new_name . "\x5f\x6c\141\162\147\145" . $row["\151\x6d\147\106\x69\x6c\145\105\x78\164"];
            goto HDmIs;
            HDmIs:
            if (!file_exists($orgFile)) {
                goto fu2jZ;
            }
            goto tuSDR;
            tuSDR:
            switch ($data["\165\x70\144\141\164\x65\124\x79\160\145"]) {
                case 1:
                    goto pavX3;
                    nomMi:
                    $dimension = "\137\155\x65\144\151\165\x6d";
                    goto AqR_e;
                    AqR_e:
                    $_imageToresize = $new_name . $dimension . $row["\151\155\147\x46\x69\154\x65\x45\x78\x74"];
                    goto Slj03;
                    pavX3:
                    $dimension = "\137\x64\145\146\x61\165\154\164";
                    goto SJwyh;
                    LZPp9:
                    $dimension = "\137\x73\155\141\154\x6c";
                    goto vcfM2;
                    R3A3q:
                    $this->resize_ecom_image(80, $data["\143\141\162\x64\x53\164\x79\154\145"], $orgFile, $_imageToresize, $row["\151\155\147\106\x69\x6c\x65\x45\170\164"]);
                    goto rurEx;
                    Iy9OT:
                    $this->resize_ecom_image($data["\x6c\151\163\x74\127\x69\144\164\x68"], $data["\143\x61\162\x64\123\164\x79\x6c\x65"], $orgFile, $_imageToresize, $row["\x69\155\147\x46\151\x6c\145\105\170\164"]);
                    goto nomMi;
                    vcfM2:
                    $_imageToresize = $new_name . $dimension . $row["\x69\155\x67\106\x69\x6c\x65\x45\x78\164"];
                    goto R3A3q;
                    SJwyh:
                    $_imageToresize = $new_name . $dimension . $row["\151\x6d\147\x46\151\154\145\105\170\x74"];
                    goto Iy9OT;
                    Slj03:
                    $this->resize_ecom_image($data["\151\164\145\155\160\x61\147\145\x57\151\x64\164\150"], $data["\x63\x61\162\x64\x53\164\171\x6c\145"], $orgFile, $_imageToresize, $row["\x69\155\147\x46\151\154\145\105\170\x74"]);
                    goto LZPp9;
                    rurEx:
                    goto Ioxlt;
                    goto JMJsv;
                    JMJsv:
                case 2:
                    goto yn_wY;
                    I1dNH:
                    goto Ioxlt;
                    goto BQ_yz;
                    uDmB9:
                    $_imageToresize = $new_name . $dimension . $row["\x69\x6d\147\x46\x69\154\145\x45\170\164"];
                    goto O3Y8d;
                    O3Y8d:
                    $this->resize_ecom_image($data["\x69\164\x65\x6d\x70\x61\147\x65\x57\x69\144\164\150"], $data["\143\141\162\144\x53\164\171\154\145"], $orgFile, $_imageToresize, $row["\x69\x6d\147\106\151\x6c\x65\x45\x78\x74"]);
                    goto I1dNH;
                    yn_wY:
                    $dimension = "\137\x6d\x65\144\x69\165\155";
                    goto uDmB9;
                    BQ_yz:
                case 3:
                    goto bmtFu;
                    bmtFu:
                    $dimension = "\x5f\144\145\x66\141\165\x6c\164";
                    goto woxzC;
                    woxzC:
                    $_imageToresize = $new_name . $dimension . $row["\151\x6d\x67\106\151\x6c\x65\105\170\x74"];
                    goto FIMFE;
                    FIMFE:
                    $this->resize_ecom_image($data["\154\151\x73\x74\127\151\144\x74\150"], $data["\x63\141\x72\144\123\164\171\x6c\x65"], $orgFile, $_imageToresize, $row["\151\155\x67\106\151\154\x65\x45\170\164"]);
                    goto BhsmO;
                    BhsmO:
                    goto Ioxlt;
                    goto rqWHX;
                    rqWHX:
            }
            goto Q180v;
            lxyZ9:
        }
        goto ZdJ83;
        GvENr:
        $this->response->write();
        goto qV7Iy;
        cBYs_:
        $ecomImagePath = !empty(ecom_upload_path) ? ecom_upload_path : "\56\56\x2f\x6f\x62\137\x75\160\154\x6f\x61\144\x73\57";
        goto rOPQR;
        aLuDw:
        $this->load->model("\x61\x74\x74\141\143\150\x6d\x65\156\x74\x4d\x6f\x64\145\x6c");
        goto LVjT8;
        bynMy:
    }
    public function update_ecom_category_image()
    {
        goto fZ9zI;
        US5Ga:
        return true;
        goto kxDlE;
        zY7Ax:
        $ecomImagePath = !empty(ecom_upload_path) ? ecom_upload_path : "\x2e\56\57\157\x62\137\165\160\154\157\x61\144\x73\x2f";
        goto ha1JZ;
        fZ9zI:
        $data = $this->request->post();
        goto CIDFd;
        dceoG:
        $subDir = "\143";
        goto zY7Ax;
        ZMYoh:
        hT9w6:
        goto bp1Lu;
        qXoED:
        $result = $this->ecommerceModel->get_ecom_category_image($data);
        goto KHODD;
        bp1Lu:
        $this->response->set_data("\x69\164\145\155\x73", sizeof($result), true);
        goto JW6UG;
        CIDFd:
        if (empty($data)) {
            return false;
        }
        goto qXoED;
        ha1JZ:
        foreach ($result as $row) {
            goto K5bF5;
            HYdpf:
            $orgFile = $new_name . "\x5f\154\141\162\x67\145" . $row["\x69\155\x67\106\151\154\x65\105\x78\164"];
            goto l8SbP;
            izTDx:
            $params["\x66\x69\154\x65\105\x78\x74"] = $row["\151\x6d\x67\106\151\x6c\145\105\170\x74"];
            goto A80tV;
            qEfmZ:
            $params = array();
            goto NVdrk;
            b20sA:
            if (file_exists($_imageToresize)) {
                unlink($_imageToresize);
            }
            goto qPmVD;
            FIiuM:
            $new_name = $ecomImagePath . $this->cId . DS . $subPath . DS . $row["\x69\155\x61\x67\145\111\144"];
            goto HYdpf;
            qPmVD:
            $params["\156\145\x77\x5f\151\x6d\x61\x67\x65"] = $_imageToresize;
            goto RecjB;
            l8SbP:
            if (!file_exists($orgFile)) {
                goto dFSWR;
            }
            goto qEfmZ;
            RecjB:
            if ($data["\143\141\x72\x64\123\164\171\154\145"] == "\x41") {
                $params["\x69\163\101\144\141\x70\164\111\x6d\141\x67\145"] = 1;
                $params["\x77\151\x64\164\x68"] = $data["\154\151\163\x74\x57\151\x64\164\150"];
            } else {
                if ($data["\143\141\x72\x64\123\x74\171\154\145"] == "\x53") {
                    $params["\x77\x69\144\164\x68"] = $data["\154\151\x73\164\127\151\x64\164\x68"];
                    $params["\x68\x65\x69\x67\x68\x74"] = $data["\x6c\x69\163\164\x57\x69\144\164\150"];
                } else {
                    if ($data["\x63\x61\162\x64\x53\x74\171\154\x65"] == "\x50") {
                        $params["\167\151\x64\x74\150"] = $data["\x6c\151\163\164\127\x69\x64\164\x68"];
                        $params["\150\x65\151\147\150\x74"] = $data["\154\151\x73\164\127\151\x64\164\x68"] * 1.67;
                    }
                }
            }
            goto w3I4t;
            VH6lG:
            $subPath = "\x69\155\x61\147\145\x73" . DS . $subDir . DS . $imageNewPath;
            goto FIiuM;
            A80tV:
            $_imageToresize = $new_name . $dimension . $row["\151\x6d\x67\106\151\x6c\145\x45\170\x74"];
            goto b20sA;
            Sli4o:
            dFSWR:
            goto TQlPW;
            w3I4t:
            $this->attachmentModel->resize_ecom_files($orgFile, $params);
            goto Sli4o;
            K5bF5:
            $imageNewPath = implode(DS, str_split($row["\x69\155\x61\x67\145\x49\x64"]));
            goto VH6lG;
            NVdrk:
            $dimension = "\x5f\144\x65\146\141\x75\154\x74";
            goto izTDx;
            TQlPW:
        }
        goto ZMYoh;
        JW6UG:
        $this->response->write();
        goto US5Ga;
        KHODD:
        $this->load->model("\x61\164\x74\141\143\x68\x6d\x65\x6e\x74\115\157\x64\x65\154");
        goto dceoG;
        kxDlE:
    }
    public function customers($page = 1)
    {
        goto HbOQg;
        Oe3rp:
        $result = $this->ecommerceModel->customers_list($page);
        goto cye6z;
        cye6z:
        $this->response->set_data("\151\x74\145\x6d\x73", $result, true);
        goto tk6Hj;
        HbOQg:
        $page = empty($page) ? 1 : $page;
        goto Oe3rp;
        tk6Hj:
        $this->response->write();
        goto RG8G9;
        RG8G9:
        return true;
        goto GD2dV;
        GD2dV:
    }
    public function contactId()
    {
        goto WVwfa;
        nWwoH:
        $result = $this->ecommerceModel->get_contact_id($data);
        goto WyrsC;
        WVwfa:
        $data = $this->request->post();
        goto TzG2s;
        rj6yn:
        return true;
        goto UOdJE;
        TzG2s:
        if (empty($data["\145\x6d\141\x69\154"])) {
            return false;
        }
        goto nWwoH;
        sEeoA:
        $this->response->write();
        goto rj6yn;
        WyrsC:
        $this->response->set_data("\x69\x74\145\x6d\x73", $result);
        goto sEeoA;
        UOdJE:
    }
    public function link_customer()
    {
        goto bd1BW;
        bd1BW:
        $data = $this->request->post();
        goto x25Cg;
        x25Cg:
        if (empty($data["\151\x64"]) || empty($data["\143\157\156\111\144"])) {
            return false;
        }
        goto FcuAI;
        FnSXd:
        return true;
        goto CST8g;
        Fa0Sa:
        $this->response->write();
        goto FnSXd;
        BrW69:
        if ($result) {
            $this->response->set_data("\x69\164\145\155\163", array("\x69\144" => $data["\151\x64"]));
        }
        goto Fa0Sa;
        FcuAI:
        $result = $this->ecommerceModel->link_contact($data);
        goto BrW69;
        CST8g:
    }
    public function unlink_customer($id)
    {
        goto TDVNU;
        GFigu:
        $result = $this->ecommerceModel->unlink_contact($id);
        goto nij6K;
        pAWxU:
        $this->response->write();
        goto gdBXk;
        TDVNU:
        if (empty($id)) {
            return false;
        }
        goto GFigu;
        gdBXk:
        return true;
        goto knLbd;
        nij6K:
        if ($result) {
            $this->response->set_data("\151\164\x65\155\x73", 1);
        }
        goto pAWxU;
        knLbd:
    }
    public function delete_customer($id)
    {
        goto Lni6F;
        HBgC5:
        $this->response->write();
        goto glEm8;
        glEm8:
        return true;
        goto dz4AR;
        Rhs_g:
        if ($result) {
            $this->response->set_data("\x69\164\145\x6d\x73", 1);
        }
        goto HBgC5;
        ksUJB:
        $result = $this->ecommerceModel->delete_contact($id);
        goto Rhs_g;
        Lni6F:
        if (empty($id)) {
            return false;
        }
        goto ksUJB;
        dz4AR:
    }
    public function theme_list()
    {
        goto yycEY;
        h3sIK:
        $this->response->write();
        goto DnmJl;
        DnmJl:
        return true;
        goto rneO4;
        yycEY:
        $result = $this->ecommerceModel->get_theme_list();
        goto LMWd7;
        LMWd7:
        if ($result) {
            goto KetsK;
            OUDMZ:
            $this->response->set_data("\164\150\145\x6d\x65", $result["\164\150\x65\x6d\x65"]);
            goto r1ZBV;
            KetsK:
            $this->response->set_data("\x69\x74\145\155\163", $result["\151\x74\x65\x6d\163"]);
            goto Z8_Lm;
            r1ZBV:
            $this->response->set_data("\143\x75\x73\164\x6f\155\137\x74\x68\x65\155\145\x73", $result["\x63\x75\x73\164\x6f\155\137\x74\150\x65\155\x65\x73"]);
            goto cH6FW;
            Z8_Lm:
            $this->response->set_data("\x70\141\164\x68", $result["\160\141\164\x68"]);
            goto OUDMZ;
            cH6FW:
        }
        goto h3sIK;
        rneO4:
    }
    public function theme_json($theme_name, $is_custom = false)
    {
        goto HbdK4;
        dWT6M:
        if ($result) {
            $this->response->set_data("\151\x74\x65\155\x73", $result);
        }
        goto x8h1Z;
        fIvZh:
        $is_custom = $is_custom === "\x74\x72\165\145" ? true : false;
        goto dxZQF;
        x8h1Z:
        $this->response->write();
        goto vdlaQ;
        vdlaQ:
        return true;
        goto uCYAu;
        dxZQF:
        $result = $this->ecommerceModel->get_theme_json($theme_name, $is_custom);
        goto dWT6M;
        HbdK4:
        if (empty($theme_name)) {
            return false;
        }
        goto ZFw9M;
        ZFw9M:
        $theme_name = urldecode($theme_name);
        goto fIvZh;
        uCYAu:
    }
    public function select_theme($theme_name, $is_custom = false)
    {
        goto f4S6T;
        vkr60:
        $theme_name = urldecode($theme_name);
        goto O7A5F;
        O7A5F:
        $is_custom = $is_custom === "\x74\x72\x75\x65" ? true : false;
        goto KAMyn;
        ndfsU:
        if ($result) {
            goto li5lE;
            Oe5VP:
            $this->response->write();
            goto hpQet;
            NOisl:
            $this->response->set_data("\163\x75\143\143\x65\163\x73", 1);
            goto Oe5VP;
            li5lE:
            $this->response->success("\x53\x55\103\x43\105\x53\123\x5f\x53\101\x56\x45");
            goto NOisl;
            hpQet:
        }
        goto dcFYJ;
        KAMyn:
        $themeData = $this->ecommerceModel->get_theme_json($theme_name, $is_custom);
        goto DXDfj;
        f4S6T:
        if (empty($theme_name)) {
            return false;
        }
        goto vkr60;
        DXDfj:
        $content = $this->load->view("\x63\163\163", array("\x61\137\x74\x68\x65\155\x65\123\x65\x74\x74\151\156\147" => $themeData), true);
        goto IKfFg;
        IKfFg:
        $result = $this->ecommerceModel->select_theme($theme_name, $is_custom, $content);
        goto ndfsU;
        dcFYJ:
    }
    public function delete_theme($theme_name)
    {
        goto AEq6l;
        kZgiS:
        if ($result) {
            goto w0tAf;
            b0XKa:
            $this->response->write();
            goto z44Nj;
            gYMAs:
            $this->response->set_data("\x73\165\x63\143\x65\x73\163", 1);
            goto b0XKa;
            w0tAf:
            $this->response->success("\104\105\114\105\124\x45\137\123\125\x43\x43\105\123\x53");
            goto gYMAs;
            z44Nj:
        }
        goto uDPuJ;
        AEq6l:
        if (empty($theme_name)) {
            return false;
        }
        goto DQsRE;
        xCtck:
        $result = $this->ecommerceModel->delete_theme($theme_name);
        goto kZgiS;
        DQsRE:
        $theme_name = urldecode($theme_name);
        goto xCtck;
        uDPuJ:
    }
    public function menu_lists($postion = '')
    {
        goto Drvoc;
        PrXYl:
        if (!empty($result)) {
            $this->response->set_data("\151\x74\x65\155\x73", $result);
        }
        goto dzzNz;
        dzzNz:
        $this->response->write();
        goto n0zPn;
        Drvoc:
        $result = $this->ecommerceModel->get_menu_list($postion);
        goto PrXYl;
        n0zPn:
    }
    public function parent_menu_lists($menu_type = "\x50")
    {
        goto gXMBB;
        KCPU1:
        $this->response->write();
        goto d6vGz;
        qt0Hc:
        if (!empty($result)) {
            $this->response->set_data("\151\x74\145\x6d\x73", $result);
        }
        goto KCPU1;
        gXMBB:
        $result = $this->ecommerceModel->get_parent_menu_list($menu_type);
        goto qt0Hc;
        d6vGz:
    }
    public function save_menu()
    {
        goto lGJt2;
        cEz5i:
        $result = $this->ecommerceModel->save_menu($data);
        goto mp3Hu;
        mLVVQ:
        $this->response->write();
        goto NiXco;
        qMvz6:
        if (empty($data)) {
            return false;
        }
        goto cEz5i;
        lGJt2:
        $data = $this->request->post();
        goto qMvz6;
        mp3Hu:
        if ($result) {
            $this->response->set_data("\151\x64", $result);
            $this->response->success("\x53\125\x43\x43\105\123\x53\137\123\x41\x56\x45");
        } else {
            $this->response->success("\123\x41\x56\x45\x5f\105\122\122\117\x52");
        }
        goto mLVVQ;
        NiXco:
    }
    public function menu_detail($menu_id)
    {
        goto Y_hiN;
        lJsIR:
        $this->response->write();
        goto VouKH;
        cFpsb:
        if ($result) {
            $this->response->set_data("\151\164\145\x6d\163", $result);
        }
        goto lJsIR;
        Y_hiN:
        if (empty($menu_id)) {
            return;
        }
        goto gv07E;
        gv07E:
        $result = $this->ecommerceModel->get_menu_detail($menu_id);
        goto cFpsb;
        VouKH:
        return true;
        goto wyY5M;
        wyY5M:
    }
    public function menu_delete($menu_id)
    {
        goto cGP8J;
        fLon8:
        if ($result) {
            $this->response->success("\104\x45\x4c\105\124\105\137\123\x55\103\103\105\x53\123");
        } else {
            $this->response->success("\x44\x45\x4c\x45\x54\105\x5f\x45\122\x52\x4f\122");
        }
        goto VCLmx;
        sUItB:
        $result = $this->ecommerceModel->delete_menu($menu_id);
        goto fLon8;
        VCLmx:
        $this->response->write();
        goto S3IF1;
        cGP8J:
        if (empty($menu_id)) {
            return;
        }
        goto sUItB;
        S3IF1:
    }
    public function save_menu_order()
    {
        goto Vyqyo;
        Vyqyo:
        $postData = $this->request->post();
        goto Y3BK6;
        Y3BK6:
        if (!empty($postData)) {
            goto uv_2F;
            nqEnP:
            $this->response->write();
            goto fEjhS;
            uv_2F:
            $result = $this->ecommerceModel->save_menu_order($postData);
            goto cfhTq;
            cfhTq:
            $this->response->success("\117\162\x64\145\162\x20\163\x61\166\x65\144\x20\x73\x75\x63\143\x65\x73\x73\146\165\x6c\x6c\x79");
            goto Sb7vA;
            Sb7vA:
            $this->response->set_data("\x69\x74\145\155\163", $result);
            goto nqEnP;
            fEjhS:
            return true;
            goto I0VAe;
            I0VAe:
        }
        goto vQsjV;
        vQsjV:
        return false;
        goto iX5CB;
        iX5CB:
    }
    public function test_json($theme_name)
    {
        if (empty($theme_name)) {
            return;
        }
        $this->ecommerceModel->create_modules($theme_name);
    }
    public function shipay_modules()
    {
        goto H6__c;
        H6__c:
        $result = $this->ecommerceModel->shipay_modules_list();
        goto z3gQY;
        CxNIs:
        $this->response->write();
        goto SvJ05;
        SvJ05:
        return true;
        goto swbkx;
        z3gQY:
        if ($result) {
            $this->response->set_data("\151\164\145\155\163", $result);
        }
        goto CxNIs;
        swbkx:
    }
    public function enable_shipaymodule()
    {
        goto wXRJO;
        Y4B46:
        if (!empty($postData)) {
            goto VtKel;
            mrbDt:
            $this->response->write();
            goto MUIrI;
            VtKel:
            $result = $this->ecommerceModel->save_shipay_module_status($postData);
            goto nOVM2;
            nOVM2:
            if ($result) {
                $this->response->success("\123\x55\103\103\105\x53\123\137\123\x41\126\x45");
            } else {
                $this->response->success("\123\101\126\105\137\x45\122\122\117\122");
            }
            goto mrbDt;
            MUIrI:
        }
        goto Yx9H_;
        wXRJO:
        $postData = $this->request->post();
        goto Y4B46;
        Yx9H_:
        return true;
        goto xHsoK;
        xHsoK:
    }
    public function app_moules($type)
    {
        goto ETfKO;
        HyJ1m:
        if (!empty($result)) {
            $this->response->set_data("\x69\164\x65\x6d\x73", $result);
        }
        goto RYiBF;
        RYiBF:
        $this->response->write();
        goto Mx9FQ;
        e7hnm:
        $result = $this->ecommerceModel->get_app_modules($type);
        goto HyJ1m;
        ETfKO:
        if (empty($type)) {
            return;
        }
        goto e7hnm;
        Mx9FQ:
        return true;
        goto codCA;
        codCA:
    }
    public function custom_scripts_listing()
    {
        goto wkjj7;
        FvJIl:
        $this->response->write();
        goto Nxlc1;
        wkjj7:
        $result = $this->ecommerceModel->get_custom_scripts();
        goto FxuJ_;
        FxuJ_:
        if ($result) {
            $this->response->set_data("\x69\164\x65\155\163", $result);
        }
        goto FvJIl;
        Nxlc1:
        return true;
        goto VN06Q;
        VN06Q:
    }
    public function save_custom_scripts()
    {
        goto H_rGE;
        IOi2_:
        return true;
        goto N16GV;
        QU5Um:
        if (!empty($postData)) {
            goto j1hKb;
            LQZbu:
            if ($result) {
                $this->response->success("\123\125\x43\x43\105\x53\123\137\x53\101\126\x45");
            } else {
                $this->response->success("\123\x41\126\105\x5f\x45\122\x52\x4f\x52");
            }
            goto p4Zgj;
            j1hKb:
            $result = $this->ecommerceModel->save_custom_scripts($postData);
            goto LQZbu;
            p4Zgj:
            $this->response->write();
            goto kAT8T;
            kAT8T:
        }
        goto IOi2_;
        H_rGE:
        $postData = $this->request->post();
        goto QU5Um;
        N16GV:
    }
    public function get_ecorder_list()
    {
        goto GVnsz;
        ngiXX:
        $result["\x69\x74\145\155\163"] = $this->ecommerceModel->get_ecorder_list($data);
        goto bK_Xe;
        aXyFg:
        $this->response->write();
        goto i0G9R;
        KIkTV:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto aXyFg;
        bK_Xe:
        $this->response->success();
        goto KIkTV;
        i0G9R:
        return true;
        goto OdzP9;
        GVnsz:
        $data = $this->request->post();
        goto ngiXX;
        OdzP9:
    }
    function preorder($tType, $trans_id, $export_type = 0, $download = 1, $is_pdf = 0, $isSlip = 0)
    {
        goto hQhwx;
        fC7cg:
        if (!empty($is_pdf) && $is_pdf != 0) {
            goto Vn4wk;
            uiabP:
            $mpdf->autoScriptToLang = true;
            goto n2k0a;
            GaCsO:
            $mpdf->autoArabic = true;
            goto xLEKj;
            j15H2:
            $mpdf->SetHTMLFooter(true);
            goto uiabP;
            TJ96k:
            return;
            goto Nivsj;
            FjKgA:
            $mpdf->autoVietnamese = true;
            goto GaCsO;
            xLEKj:
            $mpdf->autoLangToFont = true;
            goto YEBrB;
            QJm11:
            error_reporting(0);
            goto FAst7;
            YEBrB:
            $mpdf->shrink_tables_to_fit = 1;
            goto UuAvN;
            UuAvN:
            $mpdf->packTableData = true;
            goto qvpB2;
            OCoLj:
            $mpdf->SetDisplayMode("\146\165\154\x6c\160\141\x67\x65");
            goto j15H2;
            qvpB2:
            $mpdf->keep_table_proportions = TRUE;
            goto lpdOG;
            Sy1Bv:
            require_once APPPATH . "\164\150\x69\x72\x64\137\x70\141\162\164\171\57\155\x70\144\146\x2f\x61\x75\164\x6f\x6c\157\141\144\x2e\160\x68\160";
            goto QJm11;
            n2k0a:
            $mpdf->baseScript = 1;
            goto FjKgA;
            Vn4wk:
            $content = $this->load->view("\145\170\x70\x6f\x72\x74\x2f\145\143\160\162\x65\157\162\x64\x65\x72\56\x70\x68\160", $result, true);
            goto Sy1Bv;
            lpdOG:
            $mpdf->WriteHTML($content);
            goto iqOMh;
            iqOMh:
            $mpdf->Output();
            goto TJ96k;
            FAst7:
            $mpdf = new \Mpdf\Mpdf(["\157\x72\151\x65\156\164\141\x74\x69\157\156" => "\x50", "\x66\157\x72\x6d\141\164" => "\101\x34", "\155\157\x64\x65" => "\145\x6e", "\155\x6f\x64\145" => "\125\x54\106\55\70", "\x64\145\x66\141\x75\154\164\x5f\x66\157\156\164" => "\x61\162\151\141\x6c", "\x64\145\146\141\x75\x6c\164\x5f\146\157\x6e\164\137\163\x69\x7a\145" => 9, array(5, 5, 8, 8)]);
            goto OCoLj;
            Nivsj:
        }
        goto YoTfp;
        bVa7f:
        $result["\143\157\x6d\x70\x61\156\x79"]["\147\x73\164\x69\156"] = !empty($result["\x63\x6f\x6d\x70\x61\156\171"]["\x63\157\x6e\x66\151\147"]["\147\163\164\x69\156"]) ? $result["\x63\157\x6d\x70\141\156\171"]["\x63\x6f\156\146\x69\x67"]["\x67\x73\164\151\x6e"] : '';
        goto otjlM;
        YzZeo:
        $result = array_merge($result, $settings);
        goto qU1y1;
        TCczK:
        $this->load->model("\143\x6f\x6d\x70\141\156\171\115\x6f\x64\x65\x6c");
        goto QXg72;
        otjlM:
        $result["\151\156\x63\x6c\165\144\145\104\151\163\x63\157\x75\x6e\x74"] = true;
        goto fC7cg;
        QXg72:
        $settings = $this->companyModel->get_printsettings("\x53\117");
        goto YzZeo;
        hQhwx:
        $result = $this->ecommerceModel->get_ec_order_itemdetail($trans_id, array("\x69\163\160\x72\151\x6e\164" => $export_type, "\x74\x54\171\160\x65" => $tType));
        goto asLnY;
        YoTfp:
        $this->load->view("\145\170\x70\157\x72\x74\x2f\145\143\160\x72\x65\x6f\x72\x64\145\x72\x2e\160\x68\160", $result);
        goto hErFq;
        qU1y1:
        $result["\143\x6f\155\160\x61\x6e\x79"] = get_company();
        goto bVa7f;
        asLnY:
        $result["\x69\x73\120\x72\x69\156\164"] = false;
        goto TCczK;
        hErFq:
    }
    public function create_ec_saleorder()
    {
        goto RZOAy;
        q7pQT:
        return true;
        goto U6Vsw;
        k0CKy:
        $result = $this->ecommerceModel->create_ec_saleorder($data);
        goto jOgBI;
        jOgBI:
        if (!empty($result)) {
            $this->response->set_data("\x69\144", $result);
            $this->response->success("\103\x72\145\141\x74\145\144\x20\x53\165\143\x63\145\x73\x73\146\x75\x6c\154\171");
        } else {
            $this->response->error($this->ecommerceModel->message);
        }
        goto GKLpo;
        RZOAy:
        $data = $this->request->post();
        goto k0CKy;
        GKLpo:
        $this->response->write();
        goto q7pQT;
        U6Vsw:
    }
    public function update_ec_saleorder()
    {
        goto c3Vx1;
        zl3Xx:
        $this->response->write();
        goto q1hsC;
        dctgl:
        if (!empty($result)) {
            $this->response->set_data("\151\x64", $result);
            $this->response->success("\103\141\x6e\143\x65\x6c\154\x65\144\x20\x53\165\x63\x63\145\163\x73\146\165\154\154\x79");
        }
        goto zl3Xx;
        QRw_5:
        $result = $this->ecommerceModel->update_ec_saleorder($data);
        goto dctgl;
        c3Vx1:
        $data = $this->request->post();
        goto QRw_5;
        q1hsC:
        return true;
        goto TFHl8;
        TFHl8:
    }
    public function delete_ec_saleorder()
    {
        goto DqVPW;
        yhOYC:
        return true;
        goto k0mf_;
        DqVPW:
        $data = $this->request->post();
        goto H4UnF;
        MqFCH:
        $this->response->write();
        goto yhOYC;
        H4UnF:
        $result = $this->ecommerceModel->delete_ec_saleorder($data);
        goto cqjRD;
        cqjRD:
        if (!empty($result)) {
            $this->response->set_data("\x69\x64", $result);
            $this->response->success("\104\145\154\x65\x74\145\x64\40\x53\x75\143\x63\145\x73\x73\146\165\154\x6c\x79");
        }
        goto MqFCH;
        k0mf_:
    }
    public function load_coupons()
    {
        goto Y0yTf;
        YaV4y:
        $this->response->write();
        goto aWIvw;
        aWIvw:
        return true;
        goto dK2gH;
        aoHCC:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto YaV4y;
        Y0yTf:
        $data = $this->request->post();
        goto ofG19;
        ofG19:
        $result = $this->ecommerceModel->load_coupons($data);
        goto aoHCC;
        dK2gH:
    }
    public function delete_coupons()
    {
        goto oWa2j;
        oWa2j:
        $postdata = $this->request->post();
        goto oXufx;
        y4dcZ:
        if ($result) {
            $this->response->success("\x44\x45\114\105\x54\x45\137\x53\x55\103\x43\105\123\x53");
            $this->response->write();
        } else {
            $this->response->success("\x44\105\x4c\105\124\105\137\x45\122\x52\117\122");
            $this->response->write();
        }
        goto z7y6Q;
        oXufx:
        $result = $this->ecommerceModel->delete_coupons($postdata);
        goto y4dcZ;
        z7y6Q:
    }
    public function get_coupon_config($id)
    {
        goto yP3JY;
        v38qN:
        $this->response->write();
        goto lq83C;
        lq83C:
        return true;
        goto MGh2A;
        yP3JY:
        $result = $this->ecommerceModel->get_coupon_config($id);
        goto iZxh7;
        iZxh7:
        $this->response->set_data("\151\x74\145\155\x73", $result);
        goto v38qN;
        MGh2A:
    }
    public function save_coupons()
    {
        goto B3UAM;
        NAAwI:
        return false;
        goto GbHPx;
        B3UAM:
        $data = $this->request->post();
        goto kRfRa;
        kRfRa:
        if (!empty($data)) {
            goto jhiaW;
            jhiaW:
            if (empty($data["\151\144"])) {
                goto wlXB0;
                wlXB0:
                $this->load->library("\146\x6f\162\155\x5f\x76\141\154\x69\x64\141\x74\151\x6f\x6e");
                goto CEUND;
                eJnW6:
                if ($this->form_validation->run() == FALSE) {
                    goto iXwd3;
                    jKB5x:
                    $this->response->write();
                    goto snSw8;
                    snSw8:
                    return false;
                    goto mA5GG;
                    iXwd3:
                    $this->response->error("\103\x6f\x75\160\157\156\x20\143\157\x64\x65\x20\x61\154\162\x65\x61\144\x79\40\x65\170\151\x73\164\163", 0);
                    goto jKB5x;
                    mA5GG:
                }
                goto E1WoR;
                ji1UM:
                $this->form_validation->set_rules("\x63\157\165\x70\x6f\156\137\x63\x6f\144\x65", "\x63\x6f\x75\160\157\156\x5f\143\x6f\144\145", "\164\x72\x69\x6d\x7c\162\145\x71\165\151\x72\145\x64\174\165\156\x69\x71\165\x65\145\137\164\x6f\137\143\157\x6d\x70\x61\x6e\171\x5b\145\x63\137\x64\x69\163\143\x6f\165\156\164\56\x63\157\x75\160\157\156\137\143\157\144\145\x5d");
                goto eJnW6;
                CEUND:
                $this->form_validation->set_data($data);
                goto ji1UM;
                E1WoR:
            }
            goto OXPMB;
            JaA4k:
            $validFrom = strtotime($data["\166\x61\x6c\x69\144\x46\x72\157\x6d"]);
            goto fx4fH;
            CVsEY:
            $result = $this->ecommerceModel->save_coupons($data);
            goto F1nLE;
            fx4fH:
            $datediff = $validFrom - $endDate;
            goto T_nm7;
            F1nLE:
            $this->response->success("\103\157\x75\160\x6f\x6e\40\163\141\x76\145\144\x20\x73\x75\143\143\145\163\x73\146\165\x6c\x6c\x79");
            goto P5czJ;
            OXPMB:
            $endDate = strtotime($data["\x65\x78\160\151\162\x65\x64\117\156"]);
            goto JaA4k;
            Dj7G0:
            if ($datediff > 0) {
                $data["\x65\x78\x70\x69\162\145\x64\x4f\156"] = $data["\166\x61\154\x69\x64\x46\162\x6f\x6d"];
            }
            goto CVsEY;
            nhefA:
            return true;
            goto T9wNC;
            P5czJ:
            $this->response->set_data("\x69\x74\145\x6d\x73", $result);
            goto DeyPj;
            DeyPj:
            $this->response->write();
            goto nhefA;
            T_nm7:
            $datediff = round($datediff / (60 * 60 * 24));
            goto Dj7G0;
            T9wNC:
        }
        goto NAAwI;
        GbHPx:
    }
    public function check_ecom_coupon_exist()
    {
        goto wFKqE;
        YI6X4:
        $this->load->library("\x66\x6f\x72\155\137\x76\141\154\151\144\x61\x74\x69\157\x6e");
        goto slmMB;
        OLP0g:
        $this->form_validation->set_rules("\143\157\165\160\x6f\156\x5f\143\x6f\144\145", "\143\x6f\165\160\157\156\x5f\143\x6f\x64\x65", "\x74\x72\151\155\174\x72\145\x71\x75\151\162\x65\x64\x7c\x75\156\x69\161\x75\x65\x65\137\x74\157\x5f\143\x6f\x6d\160\141\156\x79\x5b\145\143\137\144\151\x73\x63\x6f\165\156\164\56\143\157\x75\160\157\x6e\x5f\x63\x6f\144\x65\x5d");
        goto PHg5i;
        PHg5i:
        if ($this->form_validation->run() == FALSE) {
            goto KxbpO;
            WTpYU:
            $this->response->write();
            goto F2kVK;
            F2kVK:
            return false;
            goto kItWf;
            KxbpO:
            $this->response->set_data("\151\163\x55\x6e\151\x71\165\145", 0);
            goto WTpYU;
            kItWf:
        } else {
            goto VoSe5;
            imMvz:
            return true;
            goto DEDA9;
            VoSe5:
            $this->response->set_data("\151\x73\125\156\x69\x71\x75\x65", 1);
            goto nWb14;
            nWb14:
            $this->response->write();
            goto imMvz;
            DEDA9:
        }
        goto L3ycH;
        slmMB:
        $this->form_validation->set_data($postdata);
        goto OLP0g;
        wFKqE:
        $postdata = $this->request->post();
        goto YI6X4;
        L3ycH:
    }
    public function get_ecom_zones_list()
    {
        goto BW8e9;
        m8F9X:
        $result = $this->ecommerceModel->get_ecom_zones_list($data);
        goto s_Zck;
        uDaWM:
        return true;
        goto Moha6;
        s_Zck:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto xALuy;
        xALuy:
        $this->response->write();
        goto uDaWM;
        BW8e9:
        $data = $this->request->post();
        goto m8F9X;
        Moha6:
    }
    public function get_zone_detail()
    {
        goto hiQJN;
        MQqfP:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto ZYGqW;
        hiQJN:
        $data = $this->request->post();
        goto DvroJ;
        DvroJ:
        $result = $this->ecommerceModel->get_zone_detail($data);
        goto MQqfP;
        ZYGqW:
        $this->response->write();
        goto w891Y;
        w891Y:
        return true;
        goto cL6_5;
        cL6_5:
    }
    public function save_zone_detail()
    {
        goto CIS7Q;
        RhIf6:
        $result = $this->ecommerceModel->save_zone_detail($data);
        goto LTaUQ;
        CIS7Q:
        $data = $this->request->post();
        goto RhIf6;
        LTaUQ:
        if (!empty($result)) {
            goto RV921;
            RV921:
            $this->response->success("\x5a\x6f\156\145\x20\163\x61\166\x65\144\x20\163\x75\143\x63\x65\163\x73\x66\x75\x6c\154\x79");
            goto Wng1R;
            Yft4B:
            return true;
            goto kajRd;
            Wng1R:
            $this->response->write();
            goto Yft4B;
            kajRd:
        }
        goto JJDou;
        JJDou:
        return false;
        goto FEUdP;
        FEUdP:
    }
    public function delete_zone_detail()
    {
        goto hfy8C;
        hpCXk:
        $result = $this->ecommerceModel->delete_zone_detail($data);
        goto ZOO_Q;
        ZOO_Q:
        if (!empty($result)) {
            goto HEtXK;
            Rs16Q:
            return true;
            goto RFQPC;
            HEtXK:
            $this->response->success("\132\157\156\x65\x20\144\145\x6c\145\x74\145\x64\x20\x73\x75\143\143\x65\163\163\146\x75\x6c\154\x79");
            goto RwM9u;
            RwM9u:
            $this->response->write();
            goto Rs16Q;
            RFQPC:
        }
        goto JrRyH;
        hfy8C:
        $data = $this->request->post();
        goto hpCXk;
        JrRyH:
        return false;
        goto TieX4;
        TieX4:
    }
    public function ecom_items_export($format = "\143\163\166")
    {
        goto AnXCY;
        Tdi2u:
        if (!empty($result)) {
            goto uwj0y;
            tfF1t:
            $head = $content = '';
            goto mSgXG;
            mSgXG:
            $file_path = "\x74\145\x6d\x70" . DS . "\x65\170\160\157\x72\x74" . DS . get_company("\151\x64");
            goto xs2ZS;
            WFzVc:
            $this->response->set_data("\165\162\154", $file_path);
            goto gNh__;
            gNh__:
            $this->response->write();
            goto mP3Ri;
            XdpeW:
            $ext = $data["\164\x79\x70\x65"] == "\x63\163\166" ? "\56\143\x73\166" : "\56\170\154\163";
            goto xdwBA;
            CQ5z3:
            if (!empty($data["\164\171\160\145"]) && $data["\x74\x79\160\145"] == "\143\x73\x76") {
                goto BTtM1;
                Imr63:
                fclose($fp);
                goto Bf3_D;
                plOyj:
                rewind($fp);
                goto WgZ3L;
                WgZ3L:
                $csv_contents = stream_get_contents($fp);
                goto Imr63;
                OlGYb:
                foreach ($result as $key => $res) {
                    goto GbFy_;
                    HyNmw:
                    rkYkI:
                    goto WcQlp;
                    PKM_5:
                    fputcsv($fp, $res);
                    goto HyNmw;
                    GbFy_:
                    if (!$key) {
                        fputcsv($fp, array_keys($res));
                    }
                    goto PKM_5;
                    WcQlp:
                }
                goto NT43O;
                BTtM1:
                $fp = fopen($file_path, "\167\x2b");
                goto OlGYb;
                NT43O:
                jSJ1v:
                goto plOyj;
                Bf3_D:
            }
            goto l55XJ;
            uwj0y:
            ini_set("\x6d\145\x6d\157\x72\171\x5f\154\151\155\151\164", "\x2d\61");
            goto tfF1t;
            mP3Ri:
            return true;
            goto qfyqG;
            xs2ZS:
            if (!is_dir($file_path)) {
                mkdir($file_path, 0755, TRUE);
            }
            goto XdpeW;
            xdwBA:
            $file_path .= DS . "\x45\x63\x6f\155\111\x74\x65\155\163\x5f" . time() . $ext;
            goto CQ5z3;
            l55XJ:
            if (!empty($format) && $format == "\x78\x6c\163") {
                goto YM4kX;
                GweT9:
                file_put_contents($file_path, $content);
                goto P1bqB;
                YM4kX:
                foreach ($result as $key => $row) {
                    goto eaZSE;
                    c2Iyn:
                    foreach ($head as $val) {
                        goto H4EL1;
                        VVa2U:
                        $rowData .= $tmp[$val];
                        goto urNkw;
                        urNkw:
                        wbdUB:
                        goto oPR3o;
                        Al22I:
                        $tmp[$val] = "\x22" . $row[$val] . "\x22" . "\11";
                        goto VVa2U;
                        H4EL1:
                        $row[$val] = !empty($row[$val]) ? $row[$val] : "\11";
                        goto Al22I;
                        oPR3o:
                    }
                    goto gzr9_;
                    EiPxc:
                    $tmp = array();
                    goto f7H9T;
                    DvPJe:
                    $content .= trim($rowData) . "\xa";
                    goto Lrpis;
                    eaZSE:
                    if (empty($head)) {
                        $head = array_keys($row);
                        $content = implode("\x9", array_values($head)) . "\12";
                    }
                    goto EiPxc;
                    f7H9T:
                    $rowData = '';
                    goto c2Iyn;
                    Lrpis:
                    K3JKm:
                    goto RYu_G;
                    gzr9_:
                    eoBVN:
                    goto DvPJe;
                    RYu_G:
                }
                goto IX_LH;
                IX_LH:
                VByZA:
                goto GweT9;
                P1bqB:
            }
            goto WFzVc;
            qfyqG:
        }
        goto kh30V;
        VAkLB:
        $result = $this->ecommerceModel->ecom_item_listing($data);
        goto Tdi2u;
        AnXCY:
        $data = $this->request->post();
        goto hEC86;
        hEC86:
        $data["\x74\171\160\x65"] = $format;
        goto VAkLB;
        kh30V:
        return false;
        goto Pxk7u;
        Pxk7u:
    }
    public function ecom_items_import($overwrite = false, $isxml = 0)
    {
        goto Ufwn7;
        eO833:
        if (!empty($data["\163\124\x79\x70\x65"])) {
            $params["\163\x54\171\160\145"] = $data["\163\124\171\x70\x65"];
        }
        goto zuK8T;
        q9fUw:
        $this->response->success();
        goto Tz7Dr;
        ZCUbM:
        return false;
        goto BUsi2;
        Tz7Dr:
        $this->response->set_data($result);
        goto I7PGB;
        sV2K5:
        $_POST = $data = $this->request->post();
        goto DFFyS;
        kPTGw:
        $file_data = $this->attachmentModel->upload_file("\x69\155\x70\x6f\162\x74");
        goto ZqN62;
        P_tZ2:
        $params = array("\x66\151\154\x65\137\144\x61\164\141" => !empty($file_data[0]) ? $file_data[0] : $data, "\x6f\166\145\x72\167\162\151\x74\x65" => $overwrite);
        goto eO833;
        DFFyS:
        $this->load->model("\141\164\164\x61\x63\150\x6d\x65\156\x74\x4d\157\144\145\154");
        goto kPTGw;
        Ufwn7:
        ini_set("\155\x65\x6d\157\x72\171\137\x6c\151\x6d\x69\x74", "\55\61");
        goto sV2K5;
        ZqN62:
        if (empty($file_data)) {
            $this->response->write();
            return false;
        }
        goto P_tZ2;
        zuK8T:
        if ($isxml) {
            $params["\170\155\154\x5f\151\x6d\160\x6f\x72\x74"] = $params["\x66\151\x6c\145\137\144\141\164\141"];
            unset($params["\146\x69\x6c\145\x5f\x64\x61\x74\x61"]);
        }
        goto VUOLn;
        VUOLn:
        $result = $this->ecommerceModel->ecom_items_import($params);
        goto gNl_9;
        gNl_9:
        if (!$result) {
            goto MU7LO;
            MU7LO:
            $this->response->error(lang("\x49\x4d\x50\x4f\122\124\x5f\x45\122\x52\x4f\122"));
            goto l3fRp;
            fCkpq:
            return false;
            goto TspxC;
            l3fRp:
            $this->response->write();
            goto fCkpq;
            TspxC:
        }
        goto q9fUw;
        I7PGB:
        $this->response->write();
        goto ZCUbM;
        BUsi2:
    }
    public function updateEcomShipment()
    {
        goto yFjXH;
        SJm3B:
        if ($result) {
            goto cje_l;
            tkS7Y:
            $this->response->set_data("\x69\x74\145\155\163", $result);
            goto mVBDJ;
            mVBDJ:
            $this->response->write();
            goto ca3bU;
            ca3bU:
            return true;
            goto JEIgp;
            cje_l:
            $this->response->success("\x53\150\151\x70\x6d\145\156\164\40\x54\x72\141\143\x6b\151\156\x67\40\111\156\x66\157\40\x73\x61\x76\145\144\40\x73\x75\x63\x63\x65\163\163\x66\x75\154\154\x79");
            goto tkS7Y;
            JEIgp:
        }
        goto V7qoV;
        V7qoV:
        return false;
        goto YM1tc;
        Pi3ik:
        $result = $this->ecommerceModel->updateEcomShipment($data);
        goto SJm3B;
        yFjXH:
        $data = $this->request->post();
        goto Pi3ik;
        YM1tc:
    }
    public function get_ecassets_url()
    {
        goto AXUGv;
        QXT5b:
        return false;
        goto oRrbg;
        SUgn3:
        $this->response->set_data($result);
        goto qWian;
        uLejE:
        $result = array();
        goto vSJO0;
        qWian:
        $this->response->write();
        goto QXT5b;
        tNdUH:
        $this->response->success();
        goto SUgn3;
        AXUGv:
        $ecom_assets_url = get_company("\145\143\137\165\x72\154") . ecom_site_assets_path;
        goto uLejE;
        vSJO0:
        $result["\x70\x61\164\150"] = $ecom_assets_url;
        goto tNdUH;
        oRrbg:
    }
    private function _load_update_model()
    {
        goto sCk5k;
        IuVjx:
        $this->updateModel->filePrefix = "\x4f\x75\x74\160\165\164\x42\157\x6f\153\x73\x2d\x45\103\x2d\120\141\x74\143\x68\x2d\166";
        goto bM4vE;
        sCk5k:
        $this->load->model("\165\160\144\141\164\x65\115\157\144\x65\154");
        goto h3daB;
        d0pf_:
        $this->updateModel->fcPath = OB_ECOM_PATH ? OB_ECOM_PATH : (ecom_upload_path ? ecom_upload_path . "\x2e\56\x2f" : FCPATH . "\56\x2e\x2f");
        goto i1bR2;
        bM4vE:
        $this->updateModel->curVersion = OB_ECOM_VERSION;
        goto d0pf_;
        h3daB:
        $this->updateModel->plugin = "\105\x43";
        goto IuVjx;
        i1bR2:
    }
    public function check_new_version($isBeta = 0)
    {
        goto rSU5C;
        w6T3Z:
        return true;
        goto mgvU4;
        hfOFU:
        $latest = null;
        goto sdIoP;
        sdIoP:
        $latest = $this->updateModel->get_latest_local();
        goto bOD3c;
        i2vJH:
        $this->response->write();
        goto w6T3Z;
        Nvnzc:
        $retData["\x69\x73\x4c\x6f\x63\141\x6c"] = 1;
        goto YaQ2D;
        x4lB7:
        if (empty($latest)) {
            $message = $this->updateModel->message;
        } else {
            if (version_compare($latest, $retData["\143\165\x72\162\x65\x6e\x74"]) <= 0) {
                $message = "\x41\154\162\x65\x61\144\x79\40\x55\x70\x74\157\x20\x44\x61\x74\145\56";
            } else {
                $retData["\x6c\141\164\145\x73\164"] = $latest;
            }
        }
        goto jlWrV;
        OiiIL:
        $retData["\143\165\x72\162\145\x6e\x74"] = OB_ECOM_VERSION;
        goto hfOFU;
        YaQ2D:
        if ($latest === false) {
            $latest = $this->updateModel->get_latest($isBeta);
            $retData["\151\x73\x4c\x6f\x63\141\154"] = 0;
        }
        goto Lto1G;
        l3_KH:
        $retData = array();
        goto OiiIL;
        rSU5C:
        $this->_load_update_model();
        goto l3_KH;
        ylSaS:
        $this->response->set_data($retData);
        goto i2vJH;
        bOD3c:
        $latest = false;
        goto Nvnzc;
        Lto1G:
        $message = '';
        goto x4lB7;
        jlWrV:
        $this->response->success($message);
        goto ylSaS;
        mgvU4:
    }
    public function doupdate($isLocal = false, $skipBackup = false)
    {
        goto VKZYl;
        WuxiK:
        $licData = get_user_data("\x6c\x69\143\145\x6e\163\145\x44\141\x74\x61");
        goto vTYYS;
        lx_ah:
        $skipBackup = true;
        goto EGQEB;
        vTYYS:
        if (empty($licData)) {
            goto A6AxK;
            A6AxK:
            $this->response->error("\114\151\x63\x65\156\x73\145\x20\144\141\x74\x61\40\156\157\x74\40\141\x76\x61\151\x6c\56");
            goto O1cS1;
            O1cS1:
            $this->response->write();
            goto y3S01;
            y3S01:
            return false;
            goto BYEad;
            BYEad:
        }
        goto baCyW;
        q2AxB:
        $ret = null;
        goto lx_ah;
        YHV6n:
        $this->response->write();
        goto qTNAe;
        VKZYl:
        $this->_load_update_model();
        goto WuxiK;
        xqb7n:
        if ($ret) {
            goto ipOnO;
            gPSXX:
            $result = $this->users->set_company_data(get_company("\x69\x64"));
            goto AWU53;
            V1dJc:
            $this->response->set_data(array("\x76\x65\162\x73\x69\x6f\156" => $_GET["\166"]));
            goto cx4wm;
            AWU53:
            $this->response->success("\123\165\143\143\145\x73\x73\146\165\154\x6c\171\40\165\160\x64\141\164\145\x64\56");
            goto V1dJc;
            ipOnO:
            $this->load->model("\x75\163\145\x72\x73");
            goto gPSXX;
            cx4wm:
        } else {
            $this->response->error($this->updateModel->message ? $this->updateModel->message : "\104\157\167\x6e\x6c\157\141\144\40\x65\162\x72\157\162\x2e");
        }
        goto YHV6n;
        baCyW:
        if (!empty($licData["\151\163\105\170\160\151\x72\145\x64"])) {
            goto EFoLn;
            sHlOt:
            return false;
            goto yGv1T;
            JbMT2:
            $this->response->write();
            goto sHlOt;
            EFoLn:
            if (!empty($licData["\x69\x73\124\x72\151\x61\x6c"])) {
                $this->response->error("\x4c\x69\143\145\x6e\x73\x65\40\153\145\x79\40\x65\x78\160\x69\x72\x65\144\56");
            } else {
                $this->response->error("\122\x65\156\x65\167\40\x79\157\165\x72\40\120\x72\157\x20\114\151\143\x65\156\163\145\x20\x6b\x65\x79\x20\x61\x6e\x64\40\x67\145\164\40\154\x61\164\x65\163\x74\x20\165\x70\144\141\164\x65\163\x20\146\x6f\x72\x20\x6e\x65\170\x74\40\x6f\x6e\x65\40\171\145\x61\162\56\x26\156\x62\x73\x70\73\x26\156\x62\x73\160\73\x26\x6e\142\163\160\73\x3c\141\40\150\162\145\x66\75\42\57\57\167\167\167\56\x6f\x75\x74\x70\x75\164\x62\x6f\157\153\163\56\143\157\155\57\160\x72\x69\143\x69\x6e\x67\x2f\x22\x20\x74\x61\x72\147\145\x74\x3d\42\x5f\x62\154\141\x6e\x6b\42\76\x52\x65\156\145\x77\40\x4e\157\167\74\x2f\141\x3e\46\156\142\163\x70\73\46\156\x62\x73\160\x3b\46\156\x62\x73\x70\x3b");
            }
            goto JbMT2;
            yGv1T:
        }
        goto gJMEb;
        EGQEB:
        if (!empty($isLocal)) {
            $ret = $this->updateModel->update_obooks_local($_GET["\166"], $skipBackup);
        } else {
            $ret = $this->updateModel->update_obooks($_GET["\x76"], $skipBackup);
        }
        goto xqb7n;
        gJMEb:
        if (empty($_GET["\x76"])) {
            goto UCqIu;
            xIxP1:
            return false;
            goto zX4L0;
            JvXrU:
            $this->response->write();
            goto xIxP1;
            UCqIu:
            $this->response->error("\x56\145\162\163\x69\157\x6e\x20\x6d\151\x73\x73\151\x6e\147\56");
            goto JvXrU;
            zX4L0:
        }
        goto q2AxB;
        qTNAe:
    }
    public function get_datafeedurl()
    {
        goto nUr5v;
        StCRh:
        $url = site_url("\145\x63\x6f\155\155\x65\x72\x63\145\x2f\167\150\x61\164\163\141\x70\160\x5f\x64\x61\x74\x61\146\x65\145\144\77\x63\x6f\x6d\160\141\x6e\x79\75" . $content);
        goto aT8IN;
        JSigy:
        $content = _obenc(json_encode($company_id), 10);
        goto StCRh;
        aT8IN:
        print_R($url);
        goto pNSad;
        nUr5v:
        $company_id = get_company("\x69\x64");
        goto JSigy;
        pNSad:
        return $url;
        goto b63Iv;
        b63Iv:
    }
    public function whatsapp_datafeed()
    {
        if (isset($_GET["\x63\157\155\160\141\x6e\x79"])) {
            goto PZzlz;
            sCZLM:
            if (!ctype_digit($company_id)) {
                echo "\105\162\x72\157\162\72\x20\x49\x6e\x76\x61\x6c\151\x64\40\x43\x6f\155\x70\141\x6e\171\40\111\x44\56";
                return false;
            }
            goto qvdFd;
            x0IAZ:
            if (!empty($comp_result)) {
                $currency = !empty($comp_result[0]["\143\x75\162\162\x65\156\143\171"]) ? $comp_result[0]["\x63\x75\162\162\145\156\x63\171"] : "\x49\x4e\x52";
            } else {
                echo "\105\162\x72\157\x72\72\40\103\x6f\155\x70\141\x6e\171\x20\x6e\x6f\x74\40\146\x6f\x75\156\144\x20\157\162\40\x69\x6e\x61\x63\x74\151\x76\145\56";
                return false;
            }
            goto ZuvEh;
            r07UE:
            if (strlen($encrypted_company) < 14) {
                echo "\x45\x72\x72\x6f\x72\72\x20\111\156\166\x61\x6c\x69\x64\40\103\x6f\x6d\x70\x61\156\171\40\120\x61\162\141\155\x65\164\145\x72\x20\114\x65\x6e\147\x74\150\56";
                return false;
            }
            goto Yq931;
            SXCbF:
            $comp_result = $this->db->get()->result_array();
            goto x0IAZ;
            ZuvEh:
            $result = $this->ecommerceModel->ecom_item_listing_datafeed_import($company_id, $currency);
            goto r0Che;
            ALb7Q:
            $this->db->where(["\x69\x64" => $company_id, "\x69\163\x41\143\164\151\166\145" => 1]);
            goto SXCbF;
            r0Che:
            return true;
            goto yjl1g;
            tYu4j:
            if (empty($company_id)) {
                echo "\x45\x72\x72\157\x72\x3a\40\x43\x6f\155\160\x61\x6e\171\40\x49\104\x20\x69\x73\x20\155\151\x73\x73\151\156\x67\40\157\x72\x20\151\x6e\x76\x61\x6c\151\144\x2e";
                return false;
            }
            goto sCZLM;
            qvdFd:
            $company_id = (int) $company_id;
            goto LETPf;
            a_mSS:
            $company_id = trim($company_id, "\x22");
            goto tYu4j;
            MSo6K:
            $this->db->from("\x63\x6f\155\160\141\x6e\x69\145\163");
            goto ALb7Q;
            Yq931:
            $company_id = _obdec($encrypted_company, 10);
            goto a_mSS;
            LETPf:
            $this->db->select("\x63\165\x72\162\x65\156\143\x79");
            goto MSo6K;
            PZzlz:
            $encrypted_company = $_GET["\x63\x6f\155\160\x61\x6e\171"];
            goto r07UE;
            yjl1g:
        } else {
            echo "\116\x6f\40\143\157\x6d\160\141\x6e\171\40\160\141\x72\x61\155\145\x74\x65\162\x20\x66\x6f\165\156\144\x21";
        }
    }
}
