<?php
/*
Generated by OutputBooks Team
*/

defined("\x42\101\x53\105\x50\x41\x54\110") or exit("\x4e\157\x20\144\151\x72\x65\x63\x74\40\163\143\162\151\160\164\x20\x61\143\x63\145\x73\163\40\141\154\154\x6f\x77\x65\x64");
class Workflow extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model("\x77\157\162\x6b\146\154\x6f\167\x4d\157\144\x65\154");
    }
    public function listing()
    {
        goto vtg2Q;
        rFaYN:
        $this->response->set_data("\x69\x74\x65\155\163", $result, true);
        goto kKjKX;
        bnUzZ:
        $result = $this->workflowModel->getlist($data);
        goto rFaYN;
        vtg2Q:
        valid_permission("\122\x45\103", 1);
        goto GUCrK;
        tSur_:
        $data["\x70\141\147\x65"] = !empty($data["\x70\x61\x67\x65"]) ? $data["\x70\x61\147\x65"] : 1;
        goto bnUzZ;
        kKjKX:
        $this->response->write();
        goto thZ7i;
        GUCrK:
        $data = $this->request->post();
        goto tSur_;
        thZ7i:
        return true;
        goto uYC05;
        uYC05:
    }
    public function authorities()
    {
        goto fGq5h;
        x6Hbf:
        $result = $this->workflowModel->getauthoritieslist($data);
        goto PBXfD;
        ZeVme:
        unset($result["\x72\157\x6c\145\x73"]);
        goto KBrcd;
        fGq5h:
        $data = $this->request->post();
        goto x6Hbf;
        ZDUaD:
        $this->response->set_data("\x72\157\x6c\145\x73", $result["\x72\x6f\154\145\x73"], true);
        goto ZeVme;
        ILqGn:
        return true;
        goto f70Ze;
        HJKrF:
        unset($result["\165\x73\x65\x72\163"]);
        goto ZDUaD;
        PBXfD:
        $this->response->set_data("\165\x73\145\162\163", $result["\x75\x73\145\x72\163"], true);
        goto HJKrF;
        KBrcd:
        $this->response->write();
        goto ILqGn;
        f70Ze:
    }
    public function save()
    {
        goto bhEG6;
        hMCOB:
        return true;
        goto yoZ8p;
        NkzRH:
        $this->response->write();
        goto hMCOB;
        A_TDf:
        if (empty($postData)) {
            goto w8CMk;
            Su8tx:
            $this->response->write();
            goto OPqoX;
            w8CMk:
            $this->response->error("\122\145\161\x75\151\x72\145\x64\40\x66\x69\x65\x6c\144\x20\x6d\151\x73\163\x69\156\x67");
            goto Su8tx;
            OPqoX:
            return false;
            goto GVxMi;
            GVxMi:
        }
        goto b3lau;
        AZWoK:
        if (!empty($workflowId)) {
            $this->response->success("\x53\125\103\x43\105\123\x53\x5f\123\x41\x56\x45");
            $this->response->set_data("\151\x64", $workflowId);
        } else {
            $this->response->error("\127\157\162\x6b\x66\x6c\157\x77\x20\123\x61\166\x65\x20\145\162\162\157\162");
        }
        goto NkzRH;
        b3lau:
        $workflowId = $this->workflowModel->save($postData);
        goto AZWoK;
        bhEG6:
        $postData = $this->request->post();
        goto A_TDf;
        yoZ8p:
    }
    public function details($id)
    {
        goto kebTu;
        PVVXd:
        $this->response->write();
        goto DG4s5;
        Q9SHg:
        $result = $this->workflowModel->getdetails($id);
        goto FBORY;
        Bcbrn:
        $data = $this->request->post();
        goto Q9SHg;
        FBORY:
        $this->response->set_data("\x64\145\x74\141\151\154", $result);
        goto PVVXd;
        DG4s5:
        return true;
        goto qWHtJ;
        kebTu:
        valid_permission("\122\105\103", 1);
        goto Bcbrn;
        qWHtJ:
    }
    public function delete($id)
    {
        goto GX_Pp;
        GX_Pp:
        valid_permission("\x52\x45\103", 1);
        goto EskOd;
        GvHfM:
        $result = $this->workflowModel->deleteWorkFlow($id);
        goto CSR43;
        CSR43:
        if ($result) {
            $this->response->success("\x44\x45\x4c\x45\x54\105\137\x53\125\103\103\105\x53\x53");
        } else {
            $this->response->success("\104\105\114\105\x54\105\x5f\x45\x52\x52\x4f\122");
        }
        goto po8qo;
        XzDeI:
        return true;
        goto qDUeB;
        po8qo:
        $this->response->write();
        goto XzDeI;
        EskOd:
        $data = $this->request->post();
        goto GvHfM;
        qDUeB:
    }
    function sortOrder()
    {
        goto JwO6r;
        uzgI5:
        $result = $this->workflowModel->updateSortOrder($data);
        goto Y78Uw;
        Y78Uw:
        $this->response->success("\123\157\162\164\40\x4f\162\144\x65\x72\40\125\160\144\x61\x74\x65\x64");
        goto hF_38;
        cpEqI:
        return true;
        goto oIEB9;
        hF_38:
        $this->response->write();
        goto cpEqI;
        JwO6r:
        $data = $this->request->post();
        goto uzgI5;
        oIEB9:
    }
    function assign_approval_task()
    {
        goto Pu11T;
        Pu11T:
        $data = $this->request->post();
        goto sU965;
        fGQBc:
        $this->response->set_data("\141\160\160\162\x6f\x76\x65\144", $result["\141\160\160\162\157\x76\145\x64"]);
        goto Ll0Re;
        ETLUF:
        $this->response->write();
        goto zLGFT;
        Ll0Re:
        $this->response->set_data("\x73\x74\x61\x74\x75\x73", $result["\x73\164\141\x74\165\x73"]);
        goto HhTCc;
        sU965:
        $result = $this->workflowModel->assignTask($data);
        goto fGQBc;
        HhTCc:
        $this->response->success("\101\x70\x70\162\157\166\x61\x6c\x20\124\x61\163\153\40\x61\x73\163\151\x67\x6e\x65\x64");
        goto ETLUF;
        zLGFT:
        return true;
        goto uG_T_;
        uG_T_:
    }
    function approval_list()
    {
        goto ED27l;
        Kjx8a:
        $result = $this->workflowModel->get_approval_list($data);
        goto ROM4p;
        kwfeo:
        return true;
        goto sPzhH;
        zS6CQ:
        $this->response->write();
        goto kwfeo;
        ED27l:
        $data = $this->request->post();
        goto Kjx8a;
        ROM4p:
        $this->response->set_data("\x69\164\x65\x6d\163", $result, true);
        goto zS6CQ;
        sPzhH:
    }
    function check_approval_list($id)
    {
        goto bpl3z;
        bpl3z:
        $result = $this->workflowModel->check_approval_list($id);
        goto ls80m;
        ls80m:
        $this->response->set_data("\151\164\145\155", $result);
        goto lnJFu;
        lnJFu:
        $this->response->write();
        goto XuSZs;
        XuSZs:
        return true;
        goto DUlUH;
        DUlUH:
    }
    function approve_task()
    {
        goto iTkPe;
        Q2mpq:
        return true;
        goto C_usi;
        OrbNw:
        $this->response->write();
        goto Q2mpq;
        MivYG:
        $this->response->set_data("\x73\x74\x61\164\x75\163", $result["\x73\164\141\x74\x75\x73"]);
        goto rtwMd;
        ZrS3Q:
        $this->response->set_data("\141\x70\160\162\157\x76\145\144", $result["\x61\x70\160\162\x6f\166\x65\x64"]);
        goto MivYG;
        iTkPe:
        $data = $this->request->post();
        goto VZjjP;
        VZjjP:
        $result = $this->workflowModel->approve_task($data);
        goto ZrS3Q;
        rtwMd:
        $this->response->success("\x41\160\160\162\157\x76\x65\144\40\x73\165\143\x65\x73\x73");
        goto OrbNw;
        C_usi:
    }
    function reject_task()
    {
        goto EjmUO;
        d5l8r:
        $this->response->success("\101\160\x70\x72\x6f\166\x65\144\40\x73\x75\143\x65\163\163");
        goto AP3Xv;
        UQ2gn:
        $this->response->set_data("\162\145\x6a\145\143\164\145\x64", $result["\162\x65\x6a\x65\143\164\x65\x64"]);
        goto cZ1me;
        AP3Xv:
        $this->response->write();
        goto UWnj5;
        UWnj5:
        return true;
        goto rihhX;
        cZ1me:
        $this->response->set_data("\163\x74\x61\164\165\163", $result["\163\164\x61\164\x75\163"]);
        goto d5l8r;
        mN7dJ:
        $result = $this->workflowModel->reject_task($data);
        goto UQ2gn;
        EjmUO:
        $data = $this->request->post();
        goto mN7dJ;
        rihhX:
    }
}
