<?php
/*
Generated by OutputBooks Team
*/

defined("\102\x41\123\105\x50\101\x54\110") or exit("\x4e\157\x20\x64\x69\162\x65\x63\x74\40\x73\x63\162\x69\x70\164\x20\x61\x63\x63\145\x73\163\40\141\154\x6c\157\167\145\144");
class Storage extends MY_Controller
{
    public function __construct()
    {
        goto tSW8f;
        cWqg9:
        $this->load->model("\163\x74\x6f\162\141\147\145\115\157\144\x65\x6c");
        goto X69ks;
        KUBqz:
        $this->cId = get_company("\x69\x64");
        goto cWqg9;
        X69ks:
        $this->isPointMod = sal_mod_active(POINTS_MOD) ? true : false;
        goto dF0Tm;
        tSW8f:
        parent::__construct();
        goto KUBqz;
        dF0Tm:
    }
    public function index()
    {
        $this->load->page("\150\157\x6d\145");
    }
    public function settings()
    {
        goto w6fr2;
        DSZJC:
        return true;
        goto nKVRx;
        TQHgF:
        $this->response->set_data($result);
        goto esArz;
        ceczP:
        if (!empty($result["\151\x74\x65\155\163"])) {
            $this->response->set_data("\x69\164\145\155\x73", $result["\151\164\x65\155\163"], true);
            unset($result["\x69\164\x65\x6d\x73"]);
        }
        goto TQHgF;
        kuKXU:
        $result = $this->storageModel->getSettings($data);
        goto ceczP;
        w6fr2:
        $data = $this->request->post();
        goto kuKXU;
        esArz:
        $this->response->write();
        goto DSZJC;
        nKVRx:
    }
    public function delete()
    {
        goto oZwVT;
        HOECj:
        $ret = $this->storageModel->deleteStorage($postData);
        goto j6DIN;
        oZwVT:
        $postData = $this->request->post();
        goto jwHA1;
        jwHA1:
        if (empty($postData) || empty($postData["\x69\144"])) {
            goto yAi6T;
            fBn1m:
            $this->response->write();
            goto Xcv0m;
            yAi6T:
            $this->response->error("\122\x65\161\165\x69\x72\145\144\x20\x66\151\145\x6c\x64\163\40\x6d\x69\163\163\151\x6e\x67");
            goto fBn1m;
            Xcv0m:
            return;
            goto MDOuG;
            MDOuG:
        }
        goto HOECj;
        j6DIN:
        if (!empty($ret) && !empty($ret["\x73\x74\157\x49\144"])) {
            goto p7IkK;
            kbz6q:
            return false;
            goto FsvLC;
            p7IkK:
            $this->response->set_data("\151\x74\x65\x6d\163", $ret);
            goto H7M8P;
            H7M8P:
            $this->response->write();
            goto kbz6q;
            FsvLC:
        } else {
            goto qmZeS;
            cOy4Y:
            return true;
            goto CqEoG;
            dQkzC:
            $this->response->write();
            goto cOy4Y;
            qmZeS:
            $this->response->success("\104\x65\154\x65\164\145\x64\40\x53\165\143\x63\145\163\163\x66\165\x6c\x6c\x79");
            goto dQkzC;
            CqEoG:
        }
        goto XtwqJ;
        XtwqJ:
    }
    public function save()
    {
        goto p_G_f;
        k44Mb:
        return true;
        goto nov9e;
        p_G_f:
        $_POST = $data = $this->request->post();
        goto D3lnf;
        VP5RA:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto NgyrM;
        z5OX3:
        if (!empty($data["\x73\x74\157\x43\157\x64\145"])) {
            $this->form_validation->set_rules("\163\x74\x6f\103\157\144\x65", "\x53\164\x6f\x72\141\x67\x65\x20\103\x6f\144\145", "\164\162\151\x6d\174\165\x6e\x69\161\x75\145\x65\137\x74\157\137\143\157\x6d\160\141\x6e\x79\133\163\x74\x6f\162\141\x67\145\x2e\x73\x74\157\103\157\144\145\135");
        }
        goto qHb3c;
        LRZbu:
        $this->response->write();
        goto k44Mb;
        NgyrM:
        $this->response->success("\x53\141\x76\145\144\x20\x53\x75\x63\143\x65\x73\163\146\165\x6c\154\x79");
        goto LRZbu;
        JMIoM:
        if (!empty($data["\x73\x74\157\x4e\x61\x6d\145"])) {
            $this->form_validation->set_rules("\163\x74\157\116\x61\x6d\x65", "\x53\x74\x6f\x72\x61\x67\x65\x20\156\141\155\145", "\x74\162\151\x6d\x7c\162\145\161\x75\151\162\x65\x64\174\165\156\x69\x71\165\145\x65\x5f\164\157\137\x63\157\x6d\x70\x61\x6e\x79\x5b\163\164\x6f\162\x61\147\x65\56\163\x74\157\x4e\141\x6d\x65\135");
        }
        goto z5OX3;
        nAh3E:
        $result = $this->storageModel->saveSettings($data);
        goto VP5RA;
        D3lnf:
        $this->load->library("\x66\157\x72\155\137\x76\141\x6c\151\144\141\x74\151\x6f\x6e");
        goto JMIoM;
        qHb3c:
        if ($this->form_validation->run() == FALSE) {
            goto bEXTF;
            KAxda:
            $this->response->write();
            goto K9NIx;
            bEXTF:
            $this->response->error(validation_errors());
            goto KAxda;
            K9NIx:
            return false;
            goto zUpyH;
            zUpyH:
        }
        goto nAh3E;
        nov9e:
    }
    public function delete_stock()
    {
        goto L1LMk;
        KcwFd:
        $ret = $this->storageModel->deleteStorageStock($postData);
        goto bvIZm;
        EscIg:
        if (empty($postData) || empty($postData["\151\164\x65\x6d\x49\144"]) || empty($postData["\x73\164\157\111\x64"]) || empty($postData["\x73\164\x6f\x4e\x6f"])) {
            goto JT1LT;
            qDg7O:
            return;
            goto alJ8M;
            JT1LT:
            $this->response->error("\122\x65\x71\x75\151\x72\x65\144\x20\x66\x69\x65\x6c\x64\x73\x20\155\151\x73\x73\151\156\147");
            goto te08V;
            te08V:
            $this->response->write();
            goto qDg7O;
            alJ8M:
        }
        goto KcwFd;
        bvIZm:
        if (!empty($ret) && !empty($ret["\x73\x74\157\x49\x64"])) {
            goto k5bak;
            k5bak:
            $this->response->set_data("\151\x74\x65\x6d\x73", $ret);
            goto jx52M;
            jx52M:
            $this->response->write();
            goto o5ggn;
            o5ggn:
            return false;
            goto wSi_z;
            wSi_z:
        } else {
            goto SBae7;
            SBae7:
            $this->response->success("\104\145\154\x65\x74\x65\x64\40\123\165\x63\x63\x65\163\x73\x66\165\154\154\x79");
            goto di3fF;
            di3fF:
            $this->response->write();
            goto zhGcT;
            zhGcT:
            return true;
            goto Sv_l6;
            Sv_l6:
        }
        goto ZhfyE;
        T7syA:
        valid_permission("\x53\x45\124\124\x49\x4e\107\x53", 4);
        goto EscIg;
        L1LMk:
        $postData = $this->request->post();
        goto T7syA;
        ZhfyE:
    }
}
