Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* Generated by OutputBooks Team */ defined("BASEPATH") or exit("No direct sc..

Decoded Output download

<?php 
/* 
Generated by OutputBooks Team 
*/ 
   defined("BASEPATH") or exit("No direct script access allowed"); class Contacts extends MY_Controller { private $_csType; public function __construct() { goto gm0lq; xffNQ: $this->cId = get_company("id"); goto jtiEe; SRax4: $this->load->library("trans_table"); goto xffNQ; zP1Dc: $this->_csType = (object) array("customer" => "C", "supplier" => "S", "salesrep" => "R"); goto OmQmo; gm0lq: parent::__construct(); goto zP1Dc; OmQmo: $this->load->model("contactsModel"); goto SRax4; jtiEe: } public function index() { $this->load->page("home"); } public function customers() { echo(rand() . "<br>");$this->listing($this->_csType->customer); } public function suppliers() { $this->listing($this->_csType->supplier); } public function branches($csType = '') { goto HWDT4; HWDT4: $this->response->success(); goto S_1Hi; S_1Hi: $branches = $this->contactsModel->get_branches($csType); goto w2uqi; bgs7q: $this->response->write(); goto O5xmm; w2uqi: $this->response->set_data($branches); goto bgs7q; O5xmm: } public function listing($csType = "C", $page = 1) { goto myH70; t_h60: $isProject = $csType == "P" ? true : false; goto qBuc2; m9w5R: valid_permission(!empty($permissionArr[$csType]) ? $permissionArr[$csType] : "MNCUS", 1); goto CQ4OS; vlm_m: require_once $clsFile; goto PXFoZ; cWLBr: Qc0CT: goto B3fyu; KthUF: $this->response->set_data("items", $result["items"], true); goto cGZG6; Z00Vp: $this->response->set_data("url", $file_name); goto DESCV; qxU8K: aV4Uj: goto ynWkJ; wqmex: ozjRL: goto T5cbc; yqzGs: $this->response->error(lang("MODULE_DISABLED")); goto cqfN4; opX7l: $export_type = "pdf"; goto n23Pq; xa3lB: if ($csType == "P") { goto aV4Uj; } goto VjQDw; hxm8_: W81XX: goto hzIWw; hz2SE: if ($csType == "P" && !empty($data["type"])) { goto il0Fq; } goto jVx53; zdJGX: return false; goto wqW5I; GGmmc: $fileName = $result["file_name"] . ".xml"; goto H59NV; WnjN5: foreach ($result["items"] as $key => $item) { goto E_iOk; FyxC2: if (!($csType == "C" && empty($item["score"]))) { goto j2PtS; } goto mhxVP; mhxVP: $item["score"] = $item["score"]; goto JvRDg; C9sJu: if ($csType == "C" && array_key_exists($item["score"], $scoreLevel)) { goto L7It5; } goto FyxC2; wyZw2: L7It5: goto eAxOv; aodru: goto hP5GU; goto wyZw2; JvRDg: j2PtS: goto aodru; E_iOk: $item["balance"] = format_amt_value($item["balance"]); goto C9sJu; JG0ct: $result["items"][$key] = $item; goto Q5rq0; eAxOv: $item["score"] = $item["score"] . "-" . $scoreLevel[$item["score"]]; goto zYl1J; Q5rq0: eRj9D: goto gSeF7; zYl1J: hP5GU: goto JG0ct; gSeF7: } goto QlkXW; T5cbc: $result["companyName"] = get_company("name"); goto NZ5UV; nXM7d: if ($csType) { goto zB3Qq; } goto EhRTE; O71RJ: hD9DZ: goto A23pY; sCFOT: if ($exportClass) { goto Qc0CT; } goto opX7l; hzIWw: LCQER: goto wM11I; DESCV: $this->response->write(); goto ragff; Drk9z: if (empty($data["type"])) { goto G0v8Z; } goto G4a5Q; HygqA: $file_name = ''; goto sCFOT; X3Yt7: if (empty($result["items"])) { goto CUzp3; } goto KthUF; B3fyu: $exportClass->setData($result); goto JqYER; b47a9: $exportClass = ExportFactory::Export($data["fileType"], $data["format"], $data); goto HygqA; fd8jh: IDZ6L: goto O71RJ; de5C1: foreach ($result["items"] as $key => $item) { goto AAHP2; SlRCq: $item["income"] = format_amt_value($item["income"]); goto rYyQ1; wYHec: $item["expenses"] = format_amt_value($item["expenses"]); goto SlRCq; nCRs3: J5MQ8: goto YA1hf; fZj3E: if (empty($item["expenses"])) { goto aOy8J; } goto wYHec; AAHP2: $item["sno"] = $key + 1; goto qaMhp; rYyQ1: $item["profit"] = format_amt_value($item["profit"]); goto FgXZn; qaMhp: $item["balance"] = format_amt_value($item["balance"]); goto fZj3E; FgXZn: aOy8J: goto jlI3s; jlI3s: $result["items"][$key] = $item; goto nCRs3; YA1hf: } goto KLxYx; XgFL_: CUzp3: goto iJxs0; cqfN4: $this->response->write(); goto vhpOk; m2VKq: hXxQ3: goto Drk9z; uZTXi: $result = array(); goto xa3lB; ynWkJ: $result = $this->contactsModel->get_list_project($data); goto m2VKq; iSf4p: if (empty($data["type"])) { goto WdQ5t; } goto g94f5; ragff: return true; goto a_dwx; PXFoZ: Vwjy4: goto b47a9; EhRTE: $this->response->error("Type missing"); goto AwuTZ; i13NN: $this->response->success(); goto X3Yt7; zEWdW: $outputPath = "temp" . DS . "export" . DS . get_company("id"); goto GGmmc; VjQDw: $result = $this->contactsModel->get_list($csType, $data); goto G4zc5; a_dwx: WdQ5t: goto i13NN; L6Lpu: il0Fq: goto de5C1; g94f5: if (empty($result["items"])) { goto ozjRL; } goto P94sf; NY3IQ: C9YeN: goto t_h60; vhpOk: return false; goto NY3IQ; bRFdJ: return true; goto tVEcl; s7UrA: $this->response->write(); goto bRFdJ; Ri1dr: $result["heading"] = $data["head"]; goto wqmex; KLxYx: PQxHs: goto fd8jh; nira0: $data["fileType"] = "Contact"; goto SaWXn; jVx53: $scoreLevel = array(9 => "Champions", 8 => "Loyal Customers", 7 => "Potential Loyalist", 6 => "New Customer", 5 => "Promising Customer", 4 => "Need Attention", 3 => "About to Sleep", 2 => "Can't loose them", 1 => "Sleeping"); goto WnjN5; KQeQ0: goto IDZ6L; goto L6Lpu; t26Rr: $result["type"] = "contacts_summary"; goto Ri1dr; qBuc2: $data = $this->request->post(); goto nXM7d; CQ4OS: if (!($csType == "R" && !sal_mod_active(SREP_MOD))) { goto C9YeN; } goto yqzGs; wM11I: $data["page_limit"] = $this->config->item("page_limit"); goto Cl8tZ; AwuTZ: $this->response->write(); goto zdJGX; QlkXW: k9qp4: goto KQeQ0; A23pY: G0v8Z: goto iSf4p; cGZG6: unset($result["items"]); goto XgFL_; JqYER: $data["format"] = substr($data["format"], -3); goto zEWdW; p0sr2: switch ($csType) { case "CS": $csType = array("C", "S"); goto LCQER; case "CSBF": $csType = array("C", "S", "B", "F"); goto LCQER; case "CSE": $csType = array("C", "S", "E"); goto LCQER; } goto hxm8_; myH70: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto m9w5R; MTLTM: $file_name = $outputPath . DS . $fileName; goto eFrcH; eFrcH: oYPAv: goto Z00Vp; Cl8tZ: $data["from"] = ($page - 1) * $data["page_limit"]; goto uZTXi; HNxLh: $result["file_name"] = $isProject ? "Projects" : "Contacts_List"; goto t26Rr; P94sf: $result["title"] = $data["heading"]; goto HNxLh; wqW5I: zB3Qq: goto p0sr2; G4a5Q: if (empty($result["items"])) { goto hD9DZ; } goto hz2SE; iJxs0: $this->response->set_data($result); goto s7UrA; NZ5UV: $data["format"] = str_replace("_det", '', $data["type"]); goto nira0; REWiD: if (!file_exists($clsFile)) { goto Vwjy4; } goto vlm_m; H59NV: $exportClass->save($fileName, $outputPath, $result); goto MTLTM; n23Pq: $file_name = $this->export_file($result, $export_type); goto iVSUo; iVSUo: goto oYPAv; goto cWLBr; G4zc5: goto hXxQ3; goto qxU8K; SaWXn: $clsFile = APPPATH . "classes/export/ExportFactory.php"; goto REWiD; tVEcl: } public function address($conId = '') { goto pPX8S; IZ7xw: $this->response->write(); goto P88Rp; fEy_h: if (!empty($conId)) { goto HtfPZ; } goto FoZpW; yHbXV: $this->response->set_data($acc); goto IZ7xw; joCI3: if (!($data["csType"] == "P")) { goto UHMEh; } goto j2FOe; P88Rp: return true; goto ZJfUJ; D4qpO: $acc = $this->contactsModel->get_account($conId); goto nY3l1; rWwXU: if (!($data["csType"] == "P")) { goto kbYYN; } goto hiMMm; WtNgy: UHMEh: goto TbvK_; bIi8l: $isPhoneCode = !empty($data["isPhoneCode"]) ? true : false; goto cAid7; j2FOe: $this->response->set_data("fields", $fields, true); goto WtNgy; G1dd1: return false; goto QI3M2; nY3l1: $this->response->set_data("items", $address, true); goto joCI3; QI3M2: HtfPZ: goto wC51A; Jz6ax: $tags["tags"] = $this->contactsModel->get_contactTags($conId); goto D4qpO; FoZpW: $this->response->error("Contact ID missing"); goto w1HX9; wC51A: $isProject = !empty($data["isProject"]) ? true : false; goto bIi8l; hiMMm: $fields = $this->contactsModel->get_custom_fields($conId, false, $data); goto PQmkx; PQmkx: kbYYN: goto Jz6ax; w1HX9: $this->response->write(); goto G1dd1; pPX8S: $data = $this->request->post(); goto fEy_h; cAid7: $address = $this->contactsModel->get_address($conId, '', $isProject, $isPhoneCode); goto rWwXU; TbvK_: $this->response->set_data($tags); goto yHbXV; ZJfUJ: } public function commission($conId = '') { goto jwmF4; jwmF4: $data = $this->request->post(); goto OUDI7; qBBm2: $this->response->write(); goto c1tTf; CKnhm: return false; goto llDyT; q3wPk: $value = $this->contactsModel->get_Commission_data($conId, $data); goto o315e; ttVYY: $this->response->error("Contact ID missing"); goto moAVc; c1tTf: return true; goto PduSn; llDyT: MWT4t: goto q3wPk; OUDI7: if (!empty($conId)) { goto MWT4t; } goto ttVYY; o315e: $this->response->set_data($value); goto qBBm2; moAVc: $this->response->write(); goto CKnhm; PduSn: } public function save_contact_password() { goto g4FUo; RwUUq: return; goto e2HX0; Pafqd: $this->response->write(); goto ix5TP; b7Ana: r7lsu: goto eBv1S; eBv1S: $this->response->success("SUCCESS_SAVE"); goto VA1S5; VA1S5: $this->response->set_data("id", $post["id"]); goto KQkGZ; IR89L: return; goto cabD3; l7q9u: $this->response->write(); goto J3Zog; Rc3tq: $result = $this->contactsModel->save_contact_password($post); goto Dl4Qj; PMS9f: if (!empty($post["email"])) { goto uMSKH; } goto TrFy7; MX6fH: goto InY3O; goto b7Ana; Dl4Qj: if ($result) { goto r7lsu; } goto r6MIh; JB3dp: InY3O: goto IR89L; Y4Dlm: if (!empty($post["id"])) { goto iQMtf; } goto iiX6G; iiX6G: $this->response->error("Required fileds missing"); goto l7q9u; Y2rpX: $this->response->write(); goto RwUUq; r6MIh: $this->response->error("Error while saving"); goto Pafqd; iy7CJ: iQMtf: goto Rc3tq; J3Zog: return; goto iy7CJ; wiX6h: return true; goto JB3dp; KQkGZ: $this->response->write(); goto wiX6h; TrFy7: $this->response->error("Email id required for the contact"); goto Y2rpX; e2HX0: uMSKH: goto Y4Dlm; g4FUo: $post = $this->request->post(); goto PMS9f; ix5TP: return false; goto MX6fH; cabD3: } public function save() { goto JWYyP; to051: XXQwy: goto zCwmJ; I8ylK: $this->response->set_data("id", $conId); goto Vx_IH; mJ2_z: $this->response->write(); goto P5HSy; n_9c0: if (!(sal_mod_active(BRANCH_MOD) && !empty($data["csType"]) && in_array($data["csType"], array("B", "L")))) { goto DYCCH; } goto dRxBM; rvbKd: $this->response->error(validation_errors()); goto WjjjT; tjnuy: $this->response->error(lang("MAIN_BRANCH_RESTRICTED")); goto DVTTC; tQwnK: if (!in_array($data["csType"], array("C", "S", "R", "D", "B", "F", "L"))) { goto t5R5Z; } goto Z5QKa; UjPSp: goto YSfpo; goto N0uma; pc2y5: $this->response->error($this->contactsModel->message); goto FvwUH; Vx_IH: $this->response->write(); goto SJvFi; HVO_0: if (!($this->form_validation->run() == FALSE)) { goto HXvc5; } goto rvbKd; Ga_5o: if (empty($data["taxNo"])) { goto xu4WS; } goto pxCyk; Q4BOE: $message = lang("CONTACT_SAVE_ERROR"); goto OqdMz; ZBubn: goto F3QLl; goto g24iB; neCbP: return false; goto Gr2O4; oKhcD: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto tQwnK; N0uma: iHfGj: goto hFRaq; QmOKR: $this->response->error(lang("SUPPLIER_ALREADY_EXISTS")); goto mJ2_z; hFRaq: if ($this->contactsModel->valid_branch_taxNo($data)) { goto J3KH6; } goto pc2y5; oeW_n: $this->load->library("form_validation"); goto VSIM_; QrhzN: $this->form_validation->set_rules("name", $error_msg, "uniquee_to_company[contacts.name]"); goto ZBubn; diIYQ: $this->response->set_data("dup_confirm", 1); goto c0Id2; sgLAF: if ($data["csType"] != "F") { goto mGFeP; } goto MlFYm; I3v_J: mGFeP: goto ePXSn; fRUKT: $error_msg = "Project name"; goto lq9FY; OcsjH: t5R5Z: goto oeW_n; GlW4Y: if (!(!empty($data["contactPersonMobile"]) && !$this->contactsModel->unique_mobile($data) && empty($data["allow_phone_duplicate"]))) { goto XXQwy; } goto xp5cY; c0Id2: lHlHi: goto MMHTL; g24iB: b9qQT: goto E6f2E; Gr2O4: ZREXX: goto oKhcD; v3oN6: return false; goto p3P0E; YJVQZ: tlCKe: goto UjPSp; OqdMz: if (!$this->contactsModel->message) { goto WFZ9b; } goto KUvze; Add0I: F3QLl: goto HVO_0; YhUDS: $this->form_validation->set_rules("name", $error_msg, "trim|required"); goto xpC3b; dRxBM: $this->load->model("users"); goto pcGnM; xp5cY: $this->response->error(); goto zsZGR; VSIM_: $error_msg = "Contact display name"; goto IOvo9; dwYEm: $this->response->success("SUCCESS_SAVE"); goto I8ylK; lLKrj: eYWPw: goto Add0I; JWYyP: $_POST = $data = $this->request->post(); goto rHHmO; IOvo9: if (!(!empty($data["csType"]) && $data["csType"] == "P")) { goto Kd0Fb; } goto fRUKT; xUTXf: $this->response->error($message); goto Edx3d; WjjjT: $this->response->write(); goto n3LUK; mUN8s: DYCCH: goto fBXor; zCwmJ: $conId = $this->contactsModel->save($data); goto n_9c0; MMHTL: $this->response->write(); goto L0G3A; E6f2E: if ($this->contactsModel->uniquee_to_franchise($data)) { goto eYWPw; } goto QmOKR; uF3WY: goto lHlHi; goto I3v_J; rHHmO: if (!(!empty($data["id"]) && $data["csType"] == "B" && $data["id"] == get_company("mainbId"))) { goto ZREXX; } goto tjnuy; pxCyk: if (get_company("countryCode") == "IN" && sal_mod_active(BRANCH_MOD) && in_array($data["csType"], array("B", "L"))) { goto iHfGj; } goto z9rD3; KUvze: $message = $this->contactsModel->message; goto wVBiM; z9rD3: if (!(!$this->contactsModel->unique_taxNo($data) && empty($data["allow_duplicate"]))) { goto tlCKe; } goto sgLAF; fOsXY: xu4WS: goto GlW4Y; wVBiM: WFZ9b: goto xUTXf; DVTTC: $this->response->write(); goto neCbP; p3P0E: J3KH6: goto mC8vR; Edx3d: $this->response->write(); goto vFg3L; SJvFi: return true; goto hGHvN; xpC3b: if (!empty($data["csType"]) && $data["csType"] == "S" && get_company("isFranchise")) { goto b9qQT; } goto QrhzN; hGHvN: fE4rQ: goto Q4BOE; iOAhu: return false; goto to051; L0G3A: return false; goto YJVQZ; fBXor: if (empty($conId)) { goto fE4rQ; } goto dwYEm; MlFYm: $this->response->error(lang("TAXNO_ALREADY_EXISTS")); goto uF3WY; Syltr: $this->response->write(); goto iOAhu; ePXSn: $this->response->error(); goto diIYQ; vFg3L: return false; goto eyJP0; pcGnM: $this->users->set_company_data($this->cId); goto mUN8s; xPwDq: HXvc5: goto Ga_5o; zsZGR: $this->response->set_data("dup_phone_confirm", 1); goto Syltr; n3LUK: return false; goto xPwDq; mC8vR: YSfpo: goto fOsXY; P5HSy: return false; goto lLKrj; lq9FY: Kd0Fb: goto YhUDS; Z5QKa: valid_permission($permissionArr[$data["csType"]], empty($data["id"]) ? 2 : 3); goto OcsjH; FvwUH: $this->response->write(); goto v3oN6; eyJP0: } public function download($id = 0, $isPreview = 0) { goto SsFqd; SySxB: if (!empty($data)) { goto v0Cgk; } goto y4bIH; yJ8Z0: v0Cgk: goto f8vPc; f8vPc: $this->_trigger_download($data["filePath"], $data["fileName"], $isPreview); goto xtICf; y4bIH: return; goto yJ8Z0; SsFqd: $data = $this->contactsModel->get_file($id); goto SySxB; xtICf: } private function _trigger_download($filePath = '', $fileName = '', $isPreview = 0) { goto xh1Bu; QpfPd: header("Expires: 0"); goto LMwqQ; S3K70: return true; goto AioJW; cLelL: header("Content-Type: {$result["ContentType"]}"); goto JXHGL; xh1Bu: if (!(defined("USE_AWS_S3") && USE_AWS_S3)) { goto si3b9; } goto yOTKX; liw2d: echo $result["Body"]; goto S3K70; tZ6au: header("Cache-Control: private, no-transform, no-store, must-revalidate"); goto liw2d; RM9_8: $filePath = FCPATH . $filePath; goto vDgr1; JXHGL: if ($isPreview) { goto yt5Bs; } goto bd3G_; cW9FE: ryq49: goto gTJrR; bd3G_: header("Content-Disposition: attachment; filename="" . $fileName . """); goto Dq8sQ; gTJrR: force_download($filePath, null, true, $fileName, $isPreview ? false : true); goto XhlhH; Dq8sQ: yt5Bs: goto QpfPd; AioJW: si3b9: goto iInIb; thVtq: $filePath = str_replace("/", "\", $filePath); goto cW9FE; yOTKX: $result = get_from_s3($filePath); goto cLelL; iInIb: $this->load->helper("download"); goto RM9_8; XhlhH: return true; goto RcvvC; LMwqQ: header("Content-Transfer-Encoding: binary"); goto tZ6au; vDgr1: if (!(strtoupper(substr(PHP_OS, 0, 3)) === "WIN")) { goto ryq49; } goto thVtq; RcvvC: } public function details($conId, $noAddress = 0) { goto bK8rP; iNRm4: b24yn: goto hS4z9; KdOM7: $this->response->write(); goto Ow5gd; Ow5gd: return true; goto MZ3RY; RacM_: $message = ''; goto dfZf0; zpzQ_: VTwXY: goto KdOM7; LZDXI: Nc3Gi: goto O9132; dfZf0: if (!$this->contactsModel->message) { goto Nc3Gi; } goto Me2P0; zo_yq: $result = $this->contactsModel->get_details($conId, $data); goto RacM_; hS4z9: if (empty($result)) { goto VTwXY; } goto X2kOQ; m7MMT: $this->response->error($message); goto rv8j8; asFMY: valid_permission($permissionArr[$data["csType"]], empty($data["id"]) ? 2 : 3); goto iMKzW; wHstS: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto tPJJE; tPJJE: if (empty($data["csType"])) { goto zx_v3; } goto asFMY; bK8rP: $data = $this->request->post(); goto wHstS; X2kOQ: $this->response->set_data($result); goto zpzQ_; O9132: if ($result) { goto f7Hmn; } goto m7MMT; rv8j8: goto b24yn; goto eXTFN; pYn2c: $this->response->success($message); goto iNRm4; iMKzW: zx_v3: goto zo_yq; Me2P0: $message = $this->contactsModel->message; goto LZDXI; eXTFN: f7Hmn: goto pYn2c; MZ3RY: } public function trans($tType, $conId, $noAddress = 0) { goto KRrZX; GkPOc: $return_items = $this->contactsModel->get_return_items($tType, $result["contacts"]); goto YxtWN; WhZL4: $this->response->write(); goto JLa0S; ct8pt: $result = $this->contactsModel->get_conTrans_details($tType, $conId, $data); goto K3uha; dIrzb: if (empty($points)) { goto YxDAB; } goto H0YOp; CM2jt: if (!(!$noAddress && !empty($result["last_accounts"]))) { goto MLFnz; } goto fZ8sI; U1DvD: $this->response->set_data("contact", $result["contacts"]); goto Ie305; M9TxC: if (!empty($result)) { goto dwYng; } goto rpdxq; Un_6b: if (!(strpos($modCodes, "PNT") !== FALSE)) { goto oGH4t; } goto GIN7E; C2I9M: $this->response->set_data("recentTrans", $result["recentTrans"]); goto qyfHe; zof2J: if (!$this->contactsModel->message) { goto pTBOn; } goto QYa99; W_CS6: if (empty($result["rate_sheets"])) { goto fVsbi; } goto XfiAU; fOonN: azggy: goto WhZL4; YxtWN: if (!$return_items) { goto mH60s; } goto fuFES; y38qe: if (!(!$noAddress && !empty($result["recentTrans"]))) { goto KEIJf; } goto C2I9M; EpHJo: $this->response->set_data("credits", $result["credits"]); goto EiXx_; rpdxq: $this->response->error($message); goto Qe68H; VfJyp: if (empty($result["billable"])) { goto wzAAi; } goto BjW1O; qSJ7J: if (isset($conId)) { goto Wro86; } goto hhkcI; x6Wdo: mH60s: goto tzwgz; Qe68H: $this->response->write(); goto l3ghs; qjhZ1: wzAAi: goto GkPOc; QYa99: $message = $this->contactsModel->message; goto PFo5H; tzwgz: $modCodes = get_company("salModCodes"); goto Un_6b; hhkcI: $this->response->error("Contact ID missing"); goto DG6PE; HwJIF: if (empty($result["credits"])) { goto D7Rnb; } goto EpHJo; fZ8sI: $this->response->set_data("last_accounts", $result["last_accounts"]); goto Y7IbU; EiXx_: D7Rnb: goto W_CS6; GIN7E: $this->load->model("points/pointsModel"); goto wA9AP; L_ssZ: goto azggy; goto YSSnM; DG6PE: $this->response->write(); goto sXvwp; dHGr6: fVsbi: goto VfJyp; zaosu: if (empty($result["contacts"])) { goto rqMrt; } goto U1DvD; l3ghs: return false; goto L_ssZ; WVRAG: YxDAB: goto OuEZq; D0F40: Wro86: goto ct8pt; XfiAU: $this->response->set_data("rate_sheets", $result["rate_sheets"], true); goto dHGr6; wA9AP: $points = $this->pointsModel->getContactPoints(array_merge($data, array("tType" => $tType, "conId" => $conId))); goto dIrzb; eJLe8: heCB9: goto HwJIF; KRrZX: $data = $this->request->post(); goto qSJ7J; K3uha: $message = ''; goto zof2J; oxxi5: $this->response->set_data("address", $result["address"]); goto eJLe8; xmb6w: $this->response->success($message); goto zaosu; YSSnM: dwYng: goto xmb6w; Ie305: rqMrt: goto CM2jt; OuEZq: oGH4t: goto fOonN; H0YOp: $this->response->set_data("points", $points); goto WVRAG; Q9jm2: if (!(!$noAddress && !empty($result["address"]))) { goto heCB9; } goto oxxi5; JLa0S: return true; goto B2CqY; BjW1O: $this->response->set_data("billable", $result["billable"]); goto qjhZ1; sXvwp: return false; goto D0F40; fuFES: $this->response->set_data("return_items", $return_items, true); goto x6Wdo; PFo5H: pTBOn: goto M9TxC; qyfHe: KEIJf: goto Q9jm2; Y7IbU: MLFnz: goto y38qe; B2CqY: } public function salesrep($conId) { goto kZGvs; RpNFQ: return true; goto cezFq; iEy9t: $this->response->write(); goto RpNFQ; MpCMY: KcGWI: goto iEy9t; kZGvs: $result = $this->contactsModel->salesrep_details($conId); goto pGZQz; E8eA3: $this->response->set_data("user", $user); goto MpCMY; Oi3_W: if (empty($user)) { goto KcGWI; } goto E8eA3; s9I1t: $this->response->set_data("contact", $result); goto Tj_4h; pGZQz: if (empty($result)) { goto Nj1JQ; } goto s9I1t; Tj_4h: Nj1JQ: goto Bwzu_; Bwzu_: $this->load->model("users"); goto hq3_j; hq3_j: $user = $this->users->get_user(0, array("u.conId" => $conId)); goto Oi3_W; cezFq: } public function credits($tType, $conId, $transId = 0) { goto rx2B2; sw8oD: return true; goto v3UH_; dECBL: OrYY7: goto SNVJH; K0Ib3: $message = ''; goto wpfJc; vM9oE: $this->response->write(); goto sw8oD; g8OMg: $this->response->set_data("items", $credits, true); goto X20pI; HpM9n: return false; goto dECBL; wpfJc: if (!$this->contactsModel->message) { goto jrxmj; } goto nAUYw; SNVJH: $credits = $this->contactsModel->contact_credit($tType, $conId, $transId); goto K0Ib3; X20pI: mYPqS: goto vM9oE; NODr9: $this->response->write(); goto HpM9n; m5QJ9: jrxmj: goto lku_7; pDd1o: $this->response->error("Contact ID missing"); goto NODr9; nAUYw: $message = $this->contactsModel->message; goto m5QJ9; zSOIL: if (empty($credits)) { goto mYPqS; } goto g8OMg; rx2B2: if (!empty($conId)) { goto OrYY7; } goto pDd1o; lku_7: $this->response->success($message); goto zSOIL; v3UH_: } public function search($type = "C", $q = '') { goto YEixk; aCd93: if (empty($customer)) { goto HIMVT; } goto T_Juu; O12Tk: $this->response->success(); goto aCd93; tP3dq: $this->response->write(); goto JWIWs; jYq_L: if (empty($q)) { goto ZcGxU; } goto PbAHT; T_Juu: $this->response->set_data("items", $customer); goto XmfQa; XmfQa: HIMVT: goto tP3dq; JWIWs: return true; goto xFZMe; PbAHT: $data = array("str" => $q, "type" => $type, "page" => 1, "isDetail" => true, "isAllSearch" => true); goto HFBTV; HFBTV: ZcGxU: goto V1NEA; YEixk: $data = $this->request->post(); goto jYq_L; V1NEA: $customer = $this->contactsModel->customer_search($data); goto O12Tk; xFZMe: } public function city($q = '', $stateCode = '') { goto mEQYm; mrJzK: return true; goto q8Lgq; KGJvr: if (empty($city)) { goto VvGXl; } goto Qzt3R; fNVYL: VvGXl: goto Qpe_O; hRyMo: $this->response->success(); goto KGJvr; Qpe_O: $this->response->write(); goto mrJzK; mEQYm: $city = $this->contactsModel->city_search($q, $stateCode); goto hRyMo; Qzt3R: $this->response->set_data("items", $city); goto fNVYL; q8Lgq: } public function detailed_search($type = "C", $isArchived = 0, $q = '') { goto r1UZC; SyRI8: $this->response->write(); goto ju2lG; TE8Og: $this->response->set_data("items", $customer); goto GY9Re; GY9Re: OHuFx: goto SyRI8; J7nPs: $this->response->success(); goto NA4Si; ju2lG: return true; goto IyTst; r1UZC: $customer = $this->contactsModel->customer_search(array("str" => $q, "type" => $type, "page" => 1, "isDetail" => true, "isArchived" => $isArchived, "isAllSearch" => true)); goto J7nPs; NA4Si: if (empty($customer)) { goto OHuFx; } goto TE8Og; IyTst: } public function search2($type = "A", $q = '', $page = 1) { goto phwWU; PCJFp: $this->response->set_data("items", $ret); goto DyhZH; I82aO: if (empty($data["display"])) { goto ReDCe; } goto IbEXq; Sd3mN: $this->load->model("tagModel"); goto y8adE; l8cC3: if (empty($ret)) { goto jc3j0; } goto PCJFp; fRiSm: $ret = array_merge($customer, $tags); goto Bg9I7; s7FvR: goto f8IVR; goto N_ovX; DyhZH: jc3j0: goto nwwb0; phwWU: $data = $this->request->post(); goto I82aO; XXy0w: f8IVR: goto Sd3mN; IbEXq: $customer = $this->contactsModel->customer_search(array("str" => $q, "type" => $type, "page" => $page, "isDetail" => false, "isArchived" => false, "isAllSearch" => false, "all" => true)); goto s7FvR; Bg9I7: $this->response->success(); goto l8cC3; Tf0BY: return true; goto l3R03; N_ovX: ReDCe: goto jBm_H; y8adE: $tags = $this->tagModel->search($q, "C", "id, tagName AS name, 1 AS isTag, 'Tag' AS groupName"); goto fRiSm; jBm_H: $customer = $this->contactsModel->customer_search(array("str" => $q, "type" => $type, "page" => $page)); goto XXy0w; nwwb0: $this->response->write(); goto Tf0BY; l3R03: } function restore($id = '') { goto vAGTf; SwH_h: $this->response->write(); goto jESM_; KQLi8: R0Dfo: goto zLdpl; KTH12: $this->response->error("Id Missing."); goto dbUeB; xspUn: $this->response->set_data("data", $ret); goto PHsXw; eLyhh: $this->response->error($this->contactsModel->message); goto oi2kE; HvAcs: return false; goto KQLi8; geAYC: $this->response->write(); goto fH09t; ylZY1: M0ICz: goto IbkdO; oi2kE: if (!$ret) { goto ifsCp; } goto xspUn; jESM_: return false; goto fwUkh; NZG7V: if ($ret === true) { goto DpTwu; } goto eLyhh; dbUeB: $this->response->write(); goto HvAcs; FENYu: $this->response->success("RESTORE_SUCCESS"); goto geAYC; vAGTf: if (!empty($id)) { goto R0Dfo; } goto KTH12; fwUkh: goto M0ICz; goto kqAAY; zLdpl: $ret = $this->contactsModel->restore($id); goto NZG7V; fH09t: return true; goto ylZY1; kqAAY: DpTwu: goto FENYu; PHsXw: ifsCp: goto SwH_h; IbkdO: } function delete($id = '') { goto pLMaj; SmZlo: return true; goto hymR3; elzDk: bqOYf: goto Z7SH2; Rl8s7: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto kX1hK; a90k5: $ret = $this->contactsModel->delete($id); goto TGb0N; kX1hK: valid_permission($permissionArr[$data["csType"]], 4); goto RRabv; dZ660: goto qjC6R; goto baFzP; fNOL1: $this->response->write(); goto E1y35; iw3tW: return false; goto dZ660; E1y35: return false; goto FvpAf; O_CF2: $this->response->write(); goto SmZlo; TGb0N: if ($ret === true) { goto jTqJ_; } goto EpMNb; LuaoD: if (!$ret) { goto bqOYf; } goto Px4ki; Z7SH2: $this->response->write(); goto iw3tW; EpMNb: $this->response->error($this->contactsModel->message); goto LuaoD; FvpAf: B0VJV: goto a90k5; Px4ki: $this->response->set_data("data", $ret); goto elzDk; hymR3: qjC6R: goto PRzlv; vwA2R: $this->response->error("Id Missing."); goto fNOL1; pLMaj: $data = $this->request->post(); goto Rl8s7; tgva0: $this->response->success("DELETE_SUCCESS"); goto O_CF2; RRabv: if (!empty($id)) { goto B0VJV; } goto vwA2R; baFzP: jTqJ_: goto tgva0; PRzlv: } function export($type = "A", $format = "csv") { goto OFlY0; M1717: Q30rM: goto vuXOs; l4Sw_: $content = implode(",", $head) . "\xa"; goto q321R; gTqMd: $file_path = "temp" . DS . "export" . DS . get_company("id"); goto DeLu0; Zr2hR: foreach ($result as $key => $row) { goto OJ8y5; CYfHZ: vsmbr: goto X70tQ; OFPqX: $rowData = ''; goto kvUab; kvUab: foreach ($head as $val) { goto DcMcf; DcMcf: $row[$val] = !empty($row[$val]) ? $row[$val] : ''; goto h_DmU; h_DmU: $tmp[$val] = """ . $row[$val] . """ . "\x9"; goto Inj_Z; Inj_Z: $rowData .= $tmp[$val]; goto D8p41; D8p41: jpYiy: goto IVCt_; IVCt_: } goto xsicE; OJ8y5: $tmp = array(); goto OFPqX; wSwNq: $content .= trim($rowData) . " 
"; goto CYfHZ; xsicE: X8jyd: goto wSwNq; X70tQ: } goto rw5EM; jaVVg: $head = array_keys($result[0]); goto ThsR3; q321R: foreach ($result as $key => $row) { goto apfse; apfse: $tmp = array(); goto E58UO; dUpsC: Ri7eE: goto SrUEm; E58UO: foreach ($head as $val) { $tmp[$val] = isset($row[$val]) ? $row[$val] : ''; vXZZg: } goto VdwoB; VdwoB: WeBFq: goto EmzSZ; EmzSZ: $content .= """ . implode("","", array_values($tmp)) . """ . " 
"; goto dUpsC; SrUEm: } goto pE970; W8QpP: $content = ''; goto dt_pL; BJ8cY: ini_set("memory_limit", "-1"); goto GTfJi; GTfJi: $permissionArr = array("C" => "MNCUS", "E" => "MNCUS", "EC" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto QXzu5; DeLu0: if (is_dir($file_path)) { goto YCz8a; } goto MtG9V; OFlY0: ini_set("max_execution_time", 0); goto BJ8cY; QO3bI: $contacts = $type == "C" ? "customer" : ($type == "P" ? "project" : "supplier"); goto GfWbQ; F2VEs: $file_path .= DS . $contacts . time() . $ext; goto y17rH; y17rH: $this->load->helper("download"); goto l4lmp; gqVZ1: return true; goto G_xHu; MtG9V: mkdir($file_path, 0755, TRUE); goto L5E0v; l4lmp: force_download($file_path, $content); goto gqVZ1; L5E0v: YCz8a: goto QO3bI; dt_pL: $result = $this->contactsModel->get_contacts($type); goto jaVVg; vuXOs: $content = implode("	", array_values($head)) . "\xa"; goto Zr2hR; rw5EM: jZtEf: goto ZkUQj; GfWbQ: $ext = $format == "csv" ? ".csv" : ".xls"; goto F2VEs; hmcGH: goto X_Tpo; goto M1717; ZkUQj: X_Tpo: goto gTqMd; ThsR3: if (!empty($format) && $format == "xls") { goto Q30rM; } goto l4Sw_; QXzu5: valid_permission($permissionArr[$type], 4); goto W8QpP; pE970: xTbWu: goto hmcGH; G_xHu: } function import($csType = "C", $overwrite = false, $isxml = 0) { goto KEGyO; Pcd5l: if (!($this->form_validation->run() == FALSE)) { goto b67bT; } goto ZTlVO; W_KbS: return true; goto jjw8y; uhevz: if (!$isxml) { goto kUB7R; } goto BHeQW; qo7E_: b67bT: goto IDoPD; DM8ED: $_POST = $data = $this->request->post(); goto tZUIs; IDoPD: m3XB0: goto ss42Z; Ozbrn: kUB7R: goto rrqbj; b3RW5: if (!(empty($file_data) && isset($data["dbdriver"]))) { goto m3XB0; } goto Kr9oJ; vWU7F: $this->response->error(lang("IMPORT_ERROR")); goto kS3y2; h8XKH: $this->response->error(implode(",", $import["invalidswitchcontact"]) . "Contacts cannot be switched!"); goto p4h3F; ef9kQ: bBg1C: goto s1Qdl; tZUIs: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto CUSBD; Kr9oJ: if (!function_exists("odbc_connect")) { goto UL1N1; mlJPM: $this->response->write(); goto TXztq; UL1N1: $this->response->error(lang("ODBC_ERROR")); goto mlJPM; TXztq: return false; goto mENcF; mENcF: } goto KebMY; ss42Z: $params = array("csType" => $csType, "file_data" => !empty($file_data[0]) ? $file_data[0] : $data, "overwrite" => $overwrite); goto uhevz; zT_Tl: $this->response->write(); goto W_KbS; STviG: $this->form_validation->set_rules("port", "Tally Port", "trim|required"); goto Pcd5l; ISMJz: $this->form_validation->set_rules("hostname", "Tally hostname", "trim|required"); goto STviG; KEGyO: ini_set("memory_limit", "-1"); goto uAMqs; Sh5e8: GbmQ_: goto TZtzO; KFoll: return false; goto mPzjq; mPzjq: Ru2Mj: goto TFw3i; TFw3i: if (empty($import["invalidswitchcontact"])) { goto GbmQ_; } goto h8XKH; uAMqs: $this->load->model("attachmentModel"); goto DM8ED; ZTlVO: $this->response->error(validation_errors()); goto tnRdf; eoJ82: return false; goto ef9kQ; p4h3F: $this->response->write(); goto CDnaI; s1Qdl: $this->response->success(lang("SUCCESS_IMPORT")); goto zT_Tl; JneWv: unset($params["file_data"]); goto Ozbrn; BYJfL: $file_data = $this->attachmentModel->upload_file("import"); goto b3RW5; kS3y2: $this->response->write(); goto eoJ82; CUSBD: valid_permission($permissionArr[$csType], 4); goto BYJfL; rrqbj: $import = $this->contactsModel->import($params); goto xGd02; CDnaI: return false; goto Sh5e8; O8f0B: $this->response->write(); goto KFoll; iAr9M: return false; goto qo7E_; jvOOO: $this->response->error(implode(",", $import["invalidGstCnt"]) . " contains invalid gstin record"); goto O8f0B; xGd02: if (empty($import["invalidGstCnt"])) { goto Ru2Mj; } goto jvOOO; BHeQW: $params["xml_import"] = $params["file_data"]; goto JneWv; KebMY: $this->load->library("form_validation"); goto oBMaN; tnRdf: $this->response->write(); goto iAr9M; TZtzO: if ($import) { goto bBg1C; } goto vWU7F; oBMaN: $this->form_validation->set_rules("dbdriver", "Tally DB Driver", "trim|required"); goto ISMJz; jjw8y: } function export_file($params, $export_type = "csv") { goto MFLMU; nVXpJ: RpvrQ: goto to4fO; dWNyR: mkdir($file_path, 0755, TRUE); goto BeUvo; Iptpt: $items = !empty($params["items"]) ? $params["items"] : array(); goto Trp0m; rbzBG: switch ($export_type) { case "pdf": goto DHY7g; uElni: goto RpvrQ; goto qp93a; o3F4u: $this->load->clear_vars(); goto t9mjQ; W3h1j: $mpdf->SetFooter($headerFooterConfiguration); goto ic7BS; Ftw1a: ini_set("memory_limit", "-1"); goto IvuBY; dYfzS: $mpdf->baseScript = 1; goto PDceN; NdlGn: $mpdf->AddPage('', '', '', '', ''); goto W3h1j; ic7BS: $mpdf->setHeader("{PAGENO} / {nb}"); goto o3F4u; QYBWj: $mpdf->Output(FCPATH . $file_path, "F"); goto uElni; DHY7g: $this->load->library("parser"); goto XXQxF; BUFz6: $mpdf->autoLangToFont = true; goto NdlGn; IvuBY: $mpdf = new \Mpdf\Mpdf(["orientation" => "P", "format" => "A4", "mode" => "en", "mode" => "UTF-8", "default_font_size" => 9, array(5, 5, 8, 8)]); goto KX128; YwA9b: $headerFooterConfiguration = ["odd" => $oddEvenConfiguration, "even" => $oddEvenConfiguration]; goto poPWD; poPWD: require_once APPPATH . "third_party/mpdf/autoload.php"; goto Ftw1a; XXQxF: $file_path .= DS . $file_name . ".pdf"; goto ir_Qx; ixKry: $mpdf->WriteHTML(html_entity_decode($content)); goto QYBWj; w_mjt: $mpdf->autoScriptToLang = true; goto dYfzS; cttGW: $oddEvenConfiguration = ["L" => ["content" => ''], "C" => ["content" => ''], "R" => ["content" => $headerFooterContent], "line" => 1]; goto YwA9b; D4Y2G: $mpdf->SetDisplayMode("real"); goto w_mjt; PDceN: $mpdf->autoVietnamese = true; goto yMImc; t9mjQ: $content = $this->parser->parse("export/report_transactions.php", $params, true); goto ixKry; O2gge: $mpdf->setAutoBottomMargin = "stretch"; goto D4Y2G; ir_Qx: $headerFooterContent = "<div align="right">{PAGENO} / {nb}</div>"; goto cttGW; KX128: $mpdf->setAutoTopMargin = "stretch"; goto O2gge; yMImc: $mpdf->autoArabic = true; goto BUFz6; qp93a: } goto AWMol; BeUvo: Qgoz5: goto rbzBG; HcmMR: ini_set("max_execution_time", -1); goto xH1nh; KFrHP: $file_path = "temp" . DS . "export" . DS . get_company("id"); goto hJ7Ba; MFLMU: ini_set("memory_limit", "-1"); goto HcmMR; Trp0m: $this->load->helper("download"); goto nv0sv; hJ7Ba: if (is_dir($file_path)) { goto Qgoz5; } goto dWNyR; nv0sv: $file_name = $params["file_name"]; goto KFrHP; AWMol: yPkkG: goto nVXpJ; YydXS: $content = ''; goto Iptpt; to4fO: return $file_path; goto r3gGc; xH1nh: $params["type"] = !empty($params["type"]) ? $params["type"] : "default"; goto YydXS; r3gGc: } public function save_branchAccount() { goto MvQEQ; B620x: $result = $this->contactsModel->save_branchAccount($data); goto HVGzj; VJGKm: $this->response->success("SUCCESS_SAVE"); goto KQhjf; qj2bK: KXEOh: goto ycHgx; WbBoh: return false; goto VweYG; ycHgx: $this->response->write(); goto WbBoh; MvQEQ: $_POST = $data = $this->request->post(); goto B620x; HVGzj: if (empty($result)) { goto KXEOh; } goto VJGKm; KQhjf: $this->response->write(); goto qRX90; qRX90: return true; goto qj2bK; VweYG: } public function get_branchAccount() { goto D7gDh; e4YIy: $result = $this->contactsModel->get_branchAccount($data); goto xpw37; jdNAs: return false; goto Qwtru; D7gDh: $_POST = $data = $this->request->post(); goto e4YIy; xpw37: $this->response->set_data("items", $result["items"], true); goto E0zBR; E0zBR: $this->response->write(); goto jdNAs; Qwtru: } public function credit_limit() { goto lvBzR; KpFAb: $this->response->write(); goto Ld561; FZdLZ: $this->response->set_data("items", $result["items"], true); goto KpFAb; cqFti: $result = $this->contactsModel->get_credit_limt($data); goto FZdLZ; lvBzR: $_POST = $data = $this->request->post(); goto cqFti; Ld561: return false; goto M0TM2; M0TM2: } public function contact_credit_limit() { goto PuPGM; aekb0: return false; goto ch7yS; PuPGM: $_POST = $data = $this->request->post(); goto vK7Mq; vK7Mq: $result = $this->contactsModel->get_contact_credit_limt($data); goto LRrtU; cJzKx: $this->response->write(); goto aekb0; LRrtU: $this->response->set_data("items", $result["items"], true); goto cJzKx; ch7yS: } public function get_credit_limit() { goto NDL4X; GBHKb: $result = $this->contactsModel->get_Single_credit_limt($data); goto EGd_Z; q_UxM: return false; goto C27y_; az1Vz: $this->response->write(); goto q_UxM; NDL4X: $_POST = $data = $this->request->post(); goto GBHKb; EGd_Z: $this->response->set_data("items", $result["items"], true); goto az1Vz; C27y_: } public function credit_limit_save() { goto HUBW_; v_mgo: $this->response->write(); goto SYNPK; GHRXT: $result = $this->contactsModel->save_credit_limit($data); goto xp2ye; HUBW_: $_POST = $data = $this->request->post(); goto GHRXT; k8dQb: return true; goto mQ5Ps; SYNPK: return false; goto zsy2t; iW0e0: $this->response->success("SUCCESS_SAVE"); goto Fi_m9; mQ5Ps: X74Mk: goto v_mgo; Fi_m9: $this->response->write(); goto k8dQb; xp2ye: if (empty($result)) { goto X74Mk; } goto iW0e0; zsy2t: } function credit_limit_delete($id = '') { goto vxsSW; LJOHK: if (!$ret) { goto yCQ7e; } goto v0N1W; vxsSW: $ret = $this->contactsModel->delete_credit_limt($id); goto m0Y9i; Qi_Za: qVFvT: goto RPz_g; RPz_g: $this->response->success("DELETE_SUCCESS"); goto K3jJt; vRi_i: goto cmrrH; goto Qi_Za; vEb_Y: return false; goto vRi_i; m0Y9i: if ($ret === true) { goto qVFvT; } goto kEOdo; v0N1W: $this->response->set_data("data", $ret); goto tJduK; rhqus: $this->response->write(); goto vEb_Y; tJduK: yCQ7e: goto rhqus; TRsQ7: return true; goto iAaUN; iAaUN: cmrrH: goto hg_lU; kEOdo: $this->response->error($this->contactsModel->message); goto LJOHK; K3jJt: $this->response->write(); goto TRsQ7; hg_lU: } function save_salerate() { goto o37K3; cZlys: if (empty($result)) { goto d0Z7S; } goto haFfe; k4CeH: d0Z7S: goto lrtoY; haFfe: $this->response->success("SUCCESS_SAVE"); goto yCXHv; AdXBI: $result = $this->contactsModel->save_salerate($data); goto cZlys; o37K3: $_POST = $data = $this->request->post(); goto AdXBI; yTGFD: return true; goto k4CeH; lrtoY: $this->response->write(); goto kpjl6; yCXHv: $this->response->write(); goto yTGFD; kpjl6: return false; goto ZvurA; ZvurA: } function getLocations() { goto DsC9z; DsC9z: $data = $this->request->post(); goto tVqDh; LwnDy: if (!$result) { goto Z50w1; } goto tP0Ih; tVqDh: $result = $this->contactsModel->getContactLocations($data); goto LwnDy; BwZJx: return true; goto ub8xG; D2nYm: Z50w1: goto nfOWQ; tP0Ih: $this->response->set_data("items", $result); goto D2nYm; nfOWQ: $this->response->write(); goto BwZJx; ub8xG: } public function unique_displayname() { goto GsnAR; dHldL: $this->response->set_data("isUnique", 0); goto T62jA; T62jA: goto MT_R6; goto h8R0R; h8R0R: smulk: goto skhup; TRSbz: MT_R6: goto efYjm; ZKsIS: if ($result) { goto smulk; } goto dHldL; Nzd7n: return true; goto ovDA3; tAlia: $result = $this->contactsModel->get_unique_displayname($data); goto ZKsIS; skhup: $this->response->set_data("isUnique", 1); goto TRSbz; GsnAR: $data = $this->request->post(); goto tAlia; efYjm: $this->response->write(); goto Nzd7n; ovDA3: } public function ratesheet() { goto gSUVS; h3VpB: $this->response->set_data("rate_sheets", $rate_sheets); goto tVFdF; tVFdF: $this->response->write(); goto ZiRmn; gSUVS: $data = $this->request->post(); goto daV7X; daV7X: $rate_sheets = $this->contactsModel->get_rate_sheets(); goto h3VpB; ZiRmn: return true; goto PIsoZ; PIsoZ: } } 
?>

Did this file decode correctly?

Original Code

<?php
/*
Generated by OutputBooks Team
*/
   defined("BASEPATH") or exit("No direct script access allowed"); class Contacts extends MY_Controller { private $_csType; public function __construct() { goto gm0lq; xffNQ: $this->cId = get_company("id"); goto jtiEe; SRax4: $this->load->library("trans_table"); goto xffNQ; zP1Dc: $this->_csType = (object) array("customer" => "C", "supplier" => "S", "salesrep" => "R"); goto OmQmo; gm0lq: parent::__construct(); goto zP1Dc; OmQmo: $this->load->model("contactsModel"); goto SRax4; jtiEe: } public function index() { $this->load->page("home"); } public function customers() { echo(rand() . "<br>");$this->listing($this->_csType->customer); } public function suppliers() { $this->listing($this->_csType->supplier); } public function branches($csType = '') { goto HWDT4; HWDT4: $this->response->success(); goto S_1Hi; S_1Hi: $branches = $this->contactsModel->get_branches($csType); goto w2uqi; bgs7q: $this->response->write(); goto O5xmm; w2uqi: $this->response->set_data($branches); goto bgs7q; O5xmm: } public function listing($csType = "C", $page = 1) { goto myH70; t_h60: $isProject = $csType == "P" ? true : false; goto qBuc2; m9w5R: valid_permission(!empty($permissionArr[$csType]) ? $permissionArr[$csType] : "MNCUS", 1); goto CQ4OS; vlm_m: require_once $clsFile; goto PXFoZ; cWLBr: Qc0CT: goto B3fyu; KthUF: $this->response->set_data("items", $result["items"], true); goto cGZG6; Z00Vp: $this->response->set_data("url", $file_name); goto DESCV; qxU8K: aV4Uj: goto ynWkJ; wqmex: ozjRL: goto T5cbc; yqzGs: $this->response->error(lang("MODULE_DISABLED")); goto cqfN4; opX7l: $export_type = "pdf"; goto n23Pq; xa3lB: if ($csType == "P") { goto aV4Uj; } goto VjQDw; hxm8_: W81XX: goto hzIWw; hz2SE: if ($csType == "P" && !empty($data["type"])) { goto il0Fq; } goto jVx53; zdJGX: return false; goto wqW5I; GGmmc: $fileName = $result["file_name"] . ".xml"; goto H59NV; WnjN5: foreach ($result["items"] as $key => $item) { goto E_iOk; FyxC2: if (!($csType == "C" && empty($item["score"]))) { goto j2PtS; } goto mhxVP; mhxVP: $item["score"] = $item["score"]; goto JvRDg; C9sJu: if ($csType == "C" && array_key_exists($item["score"], $scoreLevel)) { goto L7It5; } goto FyxC2; wyZw2: L7It5: goto eAxOv; aodru: goto hP5GU; goto wyZw2; JvRDg: j2PtS: goto aodru; E_iOk: $item["balance"] = format_amt_value($item["balance"]); goto C9sJu; JG0ct: $result["items"][$key] = $item; goto Q5rq0; eAxOv: $item["score"] = $item["score"] . "-" . $scoreLevel[$item["score"]]; goto zYl1J; Q5rq0: eRj9D: goto gSeF7; zYl1J: hP5GU: goto JG0ct; gSeF7: } goto QlkXW; T5cbc: $result["companyName"] = get_company("name"); goto NZ5UV; nXM7d: if ($csType) { goto zB3Qq; } goto EhRTE; O71RJ: hD9DZ: goto A23pY; sCFOT: if ($exportClass) { goto Qc0CT; } goto opX7l; hzIWw: LCQER: goto wM11I; DESCV: $this->response->write(); goto ragff; Drk9z: if (empty($data["type"])) { goto G0v8Z; } goto G4a5Q; HygqA: $file_name = ''; goto sCFOT; X3Yt7: if (empty($result["items"])) { goto CUzp3; } goto KthUF; B3fyu: $exportClass->setData($result); goto JqYER; b47a9: $exportClass = ExportFactory::Export($data["fileType"], $data["format"], $data); goto HygqA; fd8jh: IDZ6L: goto O71RJ; de5C1: foreach ($result["items"] as $key => $item) { goto AAHP2; SlRCq: $item["income"] = format_amt_value($item["income"]); goto rYyQ1; wYHec: $item["expenses"] = format_amt_value($item["expenses"]); goto SlRCq; nCRs3: J5MQ8: goto YA1hf; fZj3E: if (empty($item["expenses"])) { goto aOy8J; } goto wYHec; AAHP2: $item["sno"] = $key + 1; goto qaMhp; rYyQ1: $item["profit"] = format_amt_value($item["profit"]); goto FgXZn; qaMhp: $item["balance"] = format_amt_value($item["balance"]); goto fZj3E; FgXZn: aOy8J: goto jlI3s; jlI3s: $result["items"][$key] = $item; goto nCRs3; YA1hf: } goto KLxYx; XgFL_: CUzp3: goto iJxs0; cqfN4: $this->response->write(); goto vhpOk; m2VKq: hXxQ3: goto Drk9z; uZTXi: $result = array(); goto xa3lB; ynWkJ: $result = $this->contactsModel->get_list_project($data); goto m2VKq; iSf4p: if (empty($data["type"])) { goto WdQ5t; } goto g94f5; ragff: return true; goto a_dwx; PXFoZ: Vwjy4: goto b47a9; EhRTE: $this->response->error("Type missing"); goto AwuTZ; i13NN: $this->response->success(); goto X3Yt7; zEWdW: $outputPath = "temp" . DS . "export" . DS . get_company("id"); goto GGmmc; VjQDw: $result = $this->contactsModel->get_list($csType, $data); goto G4zc5; a_dwx: WdQ5t: goto i13NN; L6Lpu: il0Fq: goto de5C1; g94f5: if (empty($result["items"])) { goto ozjRL; } goto P94sf; NY3IQ: C9YeN: goto t_h60; vhpOk: return false; goto NY3IQ; bRFdJ: return true; goto tVEcl; s7UrA: $this->response->write(); goto bRFdJ; Ri1dr: $result["heading"] = $data["head"]; goto wqmex; KLxYx: PQxHs: goto fd8jh; nira0: $data["fileType"] = "Contact"; goto SaWXn; jVx53: $scoreLevel = array(9 => "Champions", 8 => "Loyal Customers", 7 => "Potential Loyalist", 6 => "New Customer", 5 => "Promising Customer", 4 => "Need Attention", 3 => "About to Sleep", 2 => "Can't loose them", 1 => "Sleeping"); goto WnjN5; KQeQ0: goto IDZ6L; goto L6Lpu; t26Rr: $result["type"] = "contacts_summary"; goto Ri1dr; qBuc2: $data = $this->request->post(); goto nXM7d; CQ4OS: if (!($csType == "R" && !sal_mod_active(SREP_MOD))) { goto C9YeN; } goto yqzGs; wM11I: $data["page_limit"] = $this->config->item("page_limit"); goto Cl8tZ; AwuTZ: $this->response->write(); goto zdJGX; QlkXW: k9qp4: goto KQeQ0; A23pY: G0v8Z: goto iSf4p; cGZG6: unset($result["items"]); goto XgFL_; JqYER: $data["format"] = substr($data["format"], -3); goto zEWdW; p0sr2: switch ($csType) { case "CS": $csType = array("C", "S"); goto LCQER; case "CSBF": $csType = array("C", "S", "B", "F"); goto LCQER; case "CSE": $csType = array("C", "S", "E"); goto LCQER; } goto hxm8_; myH70: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto m9w5R; MTLTM: $file_name = $outputPath . DS . $fileName; goto eFrcH; eFrcH: oYPAv: goto Z00Vp; Cl8tZ: $data["from"] = ($page - 1) * $data["page_limit"]; goto uZTXi; HNxLh: $result["file_name"] = $isProject ? "Projects" : "Contacts_List"; goto t26Rr; P94sf: $result["title"] = $data["heading"]; goto HNxLh; wqW5I: zB3Qq: goto p0sr2; G4a5Q: if (empty($result["items"])) { goto hD9DZ; } goto hz2SE; iJxs0: $this->response->set_data($result); goto s7UrA; NZ5UV: $data["format"] = str_replace("_det", '', $data["type"]); goto nira0; REWiD: if (!file_exists($clsFile)) { goto Vwjy4; } goto vlm_m; H59NV: $exportClass->save($fileName, $outputPath, $result); goto MTLTM; n23Pq: $file_name = $this->export_file($result, $export_type); goto iVSUo; iVSUo: goto oYPAv; goto cWLBr; G4zc5: goto hXxQ3; goto qxU8K; SaWXn: $clsFile = APPPATH . "classes/export/ExportFactory.php"; goto REWiD; tVEcl: } public function address($conId = '') { goto pPX8S; IZ7xw: $this->response->write(); goto P88Rp; fEy_h: if (!empty($conId)) { goto HtfPZ; } goto FoZpW; yHbXV: $this->response->set_data($acc); goto IZ7xw; joCI3: if (!($data["csType"] == "P")) { goto UHMEh; } goto j2FOe; P88Rp: return true; goto ZJfUJ; D4qpO: $acc = $this->contactsModel->get_account($conId); goto nY3l1; rWwXU: if (!($data["csType"] == "P")) { goto kbYYN; } goto hiMMm; WtNgy: UHMEh: goto TbvK_; bIi8l: $isPhoneCode = !empty($data["isPhoneCode"]) ? true : false; goto cAid7; j2FOe: $this->response->set_data("fields", $fields, true); goto WtNgy; G1dd1: return false; goto QI3M2; nY3l1: $this->response->set_data("items", $address, true); goto joCI3; QI3M2: HtfPZ: goto wC51A; Jz6ax: $tags["tags"] = $this->contactsModel->get_contactTags($conId); goto D4qpO; FoZpW: $this->response->error("Contact ID missing"); goto w1HX9; wC51A: $isProject = !empty($data["isProject"]) ? true : false; goto bIi8l; hiMMm: $fields = $this->contactsModel->get_custom_fields($conId, false, $data); goto PQmkx; PQmkx: kbYYN: goto Jz6ax; w1HX9: $this->response->write(); goto G1dd1; pPX8S: $data = $this->request->post(); goto fEy_h; cAid7: $address = $this->contactsModel->get_address($conId, '', $isProject, $isPhoneCode); goto rWwXU; TbvK_: $this->response->set_data($tags); goto yHbXV; ZJfUJ: } public function commission($conId = '') { goto jwmF4; jwmF4: $data = $this->request->post(); goto OUDI7; qBBm2: $this->response->write(); goto c1tTf; CKnhm: return false; goto llDyT; q3wPk: $value = $this->contactsModel->get_Commission_data($conId, $data); goto o315e; ttVYY: $this->response->error("Contact ID missing"); goto moAVc; c1tTf: return true; goto PduSn; llDyT: MWT4t: goto q3wPk; OUDI7: if (!empty($conId)) { goto MWT4t; } goto ttVYY; o315e: $this->response->set_data($value); goto qBBm2; moAVc: $this->response->write(); goto CKnhm; PduSn: } public function save_contact_password() { goto g4FUo; RwUUq: return; goto e2HX0; Pafqd: $this->response->write(); goto ix5TP; b7Ana: r7lsu: goto eBv1S; eBv1S: $this->response->success("SUCCESS_SAVE"); goto VA1S5; VA1S5: $this->response->set_data("id", $post["id"]); goto KQkGZ; IR89L: return; goto cabD3; l7q9u: $this->response->write(); goto J3Zog; Rc3tq: $result = $this->contactsModel->save_contact_password($post); goto Dl4Qj; PMS9f: if (!empty($post["email"])) { goto uMSKH; } goto TrFy7; MX6fH: goto InY3O; goto b7Ana; Dl4Qj: if ($result) { goto r7lsu; } goto r6MIh; JB3dp: InY3O: goto IR89L; Y4Dlm: if (!empty($post["id"])) { goto iQMtf; } goto iiX6G; iiX6G: $this->response->error("Required fileds missing"); goto l7q9u; Y2rpX: $this->response->write(); goto RwUUq; r6MIh: $this->response->error("Error while saving"); goto Pafqd; iy7CJ: iQMtf: goto Rc3tq; J3Zog: return; goto iy7CJ; wiX6h: return true; goto JB3dp; KQkGZ: $this->response->write(); goto wiX6h; TrFy7: $this->response->error("Email id required for the contact"); goto Y2rpX; e2HX0: uMSKH: goto Y4Dlm; g4FUo: $post = $this->request->post(); goto PMS9f; ix5TP: return false; goto MX6fH; cabD3: } public function save() { goto JWYyP; to051: XXQwy: goto zCwmJ; I8ylK: $this->response->set_data("id", $conId); goto Vx_IH; mJ2_z: $this->response->write(); goto P5HSy; n_9c0: if (!(sal_mod_active(BRANCH_MOD) && !empty($data["csType"]) && in_array($data["csType"], array("B", "L")))) { goto DYCCH; } goto dRxBM; rvbKd: $this->response->error(validation_errors()); goto WjjjT; tjnuy: $this->response->error(lang("MAIN_BRANCH_RESTRICTED")); goto DVTTC; tQwnK: if (!in_array($data["csType"], array("C", "S", "R", "D", "B", "F", "L"))) { goto t5R5Z; } goto Z5QKa; UjPSp: goto YSfpo; goto N0uma; pc2y5: $this->response->error($this->contactsModel->message); goto FvwUH; Vx_IH: $this->response->write(); goto SJvFi; HVO_0: if (!($this->form_validation->run() == FALSE)) { goto HXvc5; } goto rvbKd; Ga_5o: if (empty($data["taxNo"])) { goto xu4WS; } goto pxCyk; Q4BOE: $message = lang("CONTACT_SAVE_ERROR"); goto OqdMz; ZBubn: goto F3QLl; goto g24iB; neCbP: return false; goto Gr2O4; oKhcD: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto tQwnK; N0uma: iHfGj: goto hFRaq; QmOKR: $this->response->error(lang("SUPPLIER_ALREADY_EXISTS")); goto mJ2_z; hFRaq: if ($this->contactsModel->valid_branch_taxNo($data)) { goto J3KH6; } goto pc2y5; oeW_n: $this->load->library("form_validation"); goto VSIM_; QrhzN: $this->form_validation->set_rules("name", $error_msg, "uniquee_to_company[contacts.name]"); goto ZBubn; diIYQ: $this->response->set_data("dup_confirm", 1); goto c0Id2; sgLAF: if ($data["csType"] != "F") { goto mGFeP; } goto MlFYm; I3v_J: mGFeP: goto ePXSn; fRUKT: $error_msg = "Project name"; goto lq9FY; OcsjH: t5R5Z: goto oeW_n; GlW4Y: if (!(!empty($data["contactPersonMobile"]) && !$this->contactsModel->unique_mobile($data) && empty($data["allow_phone_duplicate"]))) { goto XXQwy; } goto xp5cY; c0Id2: lHlHi: goto MMHTL; g24iB: b9qQT: goto E6f2E; Gr2O4: ZREXX: goto oKhcD; v3oN6: return false; goto p3P0E; YJVQZ: tlCKe: goto UjPSp; OqdMz: if (!$this->contactsModel->message) { goto WFZ9b; } goto KUvze; Add0I: F3QLl: goto HVO_0; YhUDS: $this->form_validation->set_rules("name", $error_msg, "trim|required"); goto xpC3b; dRxBM: $this->load->model("users"); goto pcGnM; xp5cY: $this->response->error(); goto zsZGR; VSIM_: $error_msg = "Contact display name"; goto IOvo9; dwYEm: $this->response->success("SUCCESS_SAVE"); goto I8ylK; lLKrj: eYWPw: goto Add0I; JWYyP: $_POST = $data = $this->request->post(); goto rHHmO; IOvo9: if (!(!empty($data["csType"]) && $data["csType"] == "P")) { goto Kd0Fb; } goto fRUKT; xUTXf: $this->response->error($message); goto Edx3d; WjjjT: $this->response->write(); goto n3LUK; mUN8s: DYCCH: goto fBXor; zCwmJ: $conId = $this->contactsModel->save($data); goto n_9c0; MMHTL: $this->response->write(); goto L0G3A; E6f2E: if ($this->contactsModel->uniquee_to_franchise($data)) { goto eYWPw; } goto QmOKR; uF3WY: goto lHlHi; goto I3v_J; rHHmO: if (!(!empty($data["id"]) && $data["csType"] == "B" && $data["id"] == get_company("mainbId"))) { goto ZREXX; } goto tjnuy; pxCyk: if (get_company("countryCode") == "IN" && sal_mod_active(BRANCH_MOD) && in_array($data["csType"], array("B", "L"))) { goto iHfGj; } goto z9rD3; KUvze: $message = $this->contactsModel->message; goto wVBiM; z9rD3: if (!(!$this->contactsModel->unique_taxNo($data) && empty($data["allow_duplicate"]))) { goto tlCKe; } goto sgLAF; fOsXY: xu4WS: goto GlW4Y; wVBiM: WFZ9b: goto xUTXf; DVTTC: $this->response->write(); goto neCbP; p3P0E: J3KH6: goto mC8vR; Edx3d: $this->response->write(); goto vFg3L; SJvFi: return true; goto hGHvN; xpC3b: if (!empty($data["csType"]) && $data["csType"] == "S" && get_company("isFranchise")) { goto b9qQT; } goto QrhzN; hGHvN: fE4rQ: goto Q4BOE; iOAhu: return false; goto to051; L0G3A: return false; goto YJVQZ; fBXor: if (empty($conId)) { goto fE4rQ; } goto dwYEm; MlFYm: $this->response->error(lang("TAXNO_ALREADY_EXISTS")); goto uF3WY; Syltr: $this->response->write(); goto iOAhu; ePXSn: $this->response->error(); goto diIYQ; vFg3L: return false; goto eyJP0; pcGnM: $this->users->set_company_data($this->cId); goto mUN8s; xPwDq: HXvc5: goto Ga_5o; zsZGR: $this->response->set_data("dup_phone_confirm", 1); goto Syltr; n3LUK: return false; goto xPwDq; mC8vR: YSfpo: goto fOsXY; P5HSy: return false; goto lLKrj; lq9FY: Kd0Fb: goto YhUDS; Z5QKa: valid_permission($permissionArr[$data["csType"]], empty($data["id"]) ? 2 : 3); goto OcsjH; FvwUH: $this->response->write(); goto v3oN6; eyJP0: } public function download($id = 0, $isPreview = 0) { goto SsFqd; SySxB: if (!empty($data)) { goto v0Cgk; } goto y4bIH; yJ8Z0: v0Cgk: goto f8vPc; f8vPc: $this->_trigger_download($data["filePath"], $data["fileName"], $isPreview); goto xtICf; y4bIH: return; goto yJ8Z0; SsFqd: $data = $this->contactsModel->get_file($id); goto SySxB; xtICf: } private function _trigger_download($filePath = '', $fileName = '', $isPreview = 0) { goto xh1Bu; QpfPd: header("Expires: 0"); goto LMwqQ; S3K70: return true; goto AioJW; cLelL: header("Content-Type: {$result["ContentType"]}"); goto JXHGL; xh1Bu: if (!(defined("USE_AWS_S3") && USE_AWS_S3)) { goto si3b9; } goto yOTKX; liw2d: echo $result["Body"]; goto S3K70; tZ6au: header("Cache-Control: private, no-transform, no-store, must-revalidate"); goto liw2d; RM9_8: $filePath = FCPATH . $filePath; goto vDgr1; JXHGL: if ($isPreview) { goto yt5Bs; } goto bd3G_; cW9FE: ryq49: goto gTJrR; bd3G_: header("Content-Disposition: attachment; filename="" . $fileName . """); goto Dq8sQ; gTJrR: force_download($filePath, null, true, $fileName, $isPreview ? false : true); goto XhlhH; Dq8sQ: yt5Bs: goto QpfPd; AioJW: si3b9: goto iInIb; thVtq: $filePath = str_replace("/", "\", $filePath); goto cW9FE; yOTKX: $result = get_from_s3($filePath); goto cLelL; iInIb: $this->load->helper("download"); goto RM9_8; XhlhH: return true; goto RcvvC; LMwqQ: header("Content-Transfer-Encoding: binary"); goto tZ6au; vDgr1: if (!(strtoupper(substr(PHP_OS, 0, 3)) === "WIN")) { goto ryq49; } goto thVtq; RcvvC: } public function details($conId, $noAddress = 0) { goto bK8rP; iNRm4: b24yn: goto hS4z9; KdOM7: $this->response->write(); goto Ow5gd; Ow5gd: return true; goto MZ3RY; RacM_: $message = ''; goto dfZf0; zpzQ_: VTwXY: goto KdOM7; LZDXI: Nc3Gi: goto O9132; dfZf0: if (!$this->contactsModel->message) { goto Nc3Gi; } goto Me2P0; zo_yq: $result = $this->contactsModel->get_details($conId, $data); goto RacM_; hS4z9: if (empty($result)) { goto VTwXY; } goto X2kOQ; m7MMT: $this->response->error($message); goto rv8j8; asFMY: valid_permission($permissionArr[$data["csType"]], empty($data["id"]) ? 2 : 3); goto iMKzW; wHstS: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto tPJJE; tPJJE: if (empty($data["csType"])) { goto zx_v3; } goto asFMY; bK8rP: $data = $this->request->post(); goto wHstS; X2kOQ: $this->response->set_data($result); goto zpzQ_; O9132: if ($result) { goto f7Hmn; } goto m7MMT; rv8j8: goto b24yn; goto eXTFN; pYn2c: $this->response->success($message); goto iNRm4; iMKzW: zx_v3: goto zo_yq; Me2P0: $message = $this->contactsModel->message; goto LZDXI; eXTFN: f7Hmn: goto pYn2c; MZ3RY: } public function trans($tType, $conId, $noAddress = 0) { goto KRrZX; GkPOc: $return_items = $this->contactsModel->get_return_items($tType, $result["contacts"]); goto YxtWN; WhZL4: $this->response->write(); goto JLa0S; ct8pt: $result = $this->contactsModel->get_conTrans_details($tType, $conId, $data); goto K3uha; dIrzb: if (empty($points)) { goto YxDAB; } goto H0YOp; CM2jt: if (!(!$noAddress && !empty($result["last_accounts"]))) { goto MLFnz; } goto fZ8sI; U1DvD: $this->response->set_data("contact", $result["contacts"]); goto Ie305; M9TxC: if (!empty($result)) { goto dwYng; } goto rpdxq; Un_6b: if (!(strpos($modCodes, "PNT") !== FALSE)) { goto oGH4t; } goto GIN7E; C2I9M: $this->response->set_data("recentTrans", $result["recentTrans"]); goto qyfHe; zof2J: if (!$this->contactsModel->message) { goto pTBOn; } goto QYa99; W_CS6: if (empty($result["rate_sheets"])) { goto fVsbi; } goto XfiAU; fOonN: azggy: goto WhZL4; YxtWN: if (!$return_items) { goto mH60s; } goto fuFES; y38qe: if (!(!$noAddress && !empty($result["recentTrans"]))) { goto KEIJf; } goto C2I9M; EpHJo: $this->response->set_data("credits", $result["credits"]); goto EiXx_; rpdxq: $this->response->error($message); goto Qe68H; VfJyp: if (empty($result["billable"])) { goto wzAAi; } goto BjW1O; qSJ7J: if (isset($conId)) { goto Wro86; } goto hhkcI; x6Wdo: mH60s: goto tzwgz; Qe68H: $this->response->write(); goto l3ghs; qjhZ1: wzAAi: goto GkPOc; QYa99: $message = $this->contactsModel->message; goto PFo5H; tzwgz: $modCodes = get_company("salModCodes"); goto Un_6b; hhkcI: $this->response->error("Contact ID missing"); goto DG6PE; HwJIF: if (empty($result["credits"])) { goto D7Rnb; } goto EpHJo; fZ8sI: $this->response->set_data("last_accounts", $result["last_accounts"]); goto Y7IbU; EiXx_: D7Rnb: goto W_CS6; GIN7E: $this->load->model("points/pointsModel"); goto wA9AP; L_ssZ: goto azggy; goto YSSnM; DG6PE: $this->response->write(); goto sXvwp; dHGr6: fVsbi: goto VfJyp; zaosu: if (empty($result["contacts"])) { goto rqMrt; } goto U1DvD; l3ghs: return false; goto L_ssZ; WVRAG: YxDAB: goto OuEZq; D0F40: Wro86: goto ct8pt; XfiAU: $this->response->set_data("rate_sheets", $result["rate_sheets"], true); goto dHGr6; wA9AP: $points = $this->pointsModel->getContactPoints(array_merge($data, array("tType" => $tType, "conId" => $conId))); goto dIrzb; eJLe8: heCB9: goto HwJIF; KRrZX: $data = $this->request->post(); goto qSJ7J; K3uha: $message = ''; goto zof2J; oxxi5: $this->response->set_data("address", $result["address"]); goto eJLe8; xmb6w: $this->response->success($message); goto zaosu; YSSnM: dwYng: goto xmb6w; Ie305: rqMrt: goto CM2jt; OuEZq: oGH4t: goto fOonN; H0YOp: $this->response->set_data("points", $points); goto WVRAG; Q9jm2: if (!(!$noAddress && !empty($result["address"]))) { goto heCB9; } goto oxxi5; JLa0S: return true; goto B2CqY; BjW1O: $this->response->set_data("billable", $result["billable"]); goto qjhZ1; sXvwp: return false; goto D0F40; fuFES: $this->response->set_data("return_items", $return_items, true); goto x6Wdo; PFo5H: pTBOn: goto M9TxC; qyfHe: KEIJf: goto Q9jm2; Y7IbU: MLFnz: goto y38qe; B2CqY: } public function salesrep($conId) { goto kZGvs; RpNFQ: return true; goto cezFq; iEy9t: $this->response->write(); goto RpNFQ; MpCMY: KcGWI: goto iEy9t; kZGvs: $result = $this->contactsModel->salesrep_details($conId); goto pGZQz; E8eA3: $this->response->set_data("user", $user); goto MpCMY; Oi3_W: if (empty($user)) { goto KcGWI; } goto E8eA3; s9I1t: $this->response->set_data("contact", $result); goto Tj_4h; pGZQz: if (empty($result)) { goto Nj1JQ; } goto s9I1t; Tj_4h: Nj1JQ: goto Bwzu_; Bwzu_: $this->load->model("users"); goto hq3_j; hq3_j: $user = $this->users->get_user(0, array("u.conId" => $conId)); goto Oi3_W; cezFq: } public function credits($tType, $conId, $transId = 0) { goto rx2B2; sw8oD: return true; goto v3UH_; dECBL: OrYY7: goto SNVJH; K0Ib3: $message = ''; goto wpfJc; vM9oE: $this->response->write(); goto sw8oD; g8OMg: $this->response->set_data("items", $credits, true); goto X20pI; HpM9n: return false; goto dECBL; wpfJc: if (!$this->contactsModel->message) { goto jrxmj; } goto nAUYw; SNVJH: $credits = $this->contactsModel->contact_credit($tType, $conId, $transId); goto K0Ib3; X20pI: mYPqS: goto vM9oE; NODr9: $this->response->write(); goto HpM9n; m5QJ9: jrxmj: goto lku_7; pDd1o: $this->response->error("Contact ID missing"); goto NODr9; nAUYw: $message = $this->contactsModel->message; goto m5QJ9; zSOIL: if (empty($credits)) { goto mYPqS; } goto g8OMg; rx2B2: if (!empty($conId)) { goto OrYY7; } goto pDd1o; lku_7: $this->response->success($message); goto zSOIL; v3UH_: } public function search($type = "C", $q = '') { goto YEixk; aCd93: if (empty($customer)) { goto HIMVT; } goto T_Juu; O12Tk: $this->response->success(); goto aCd93; tP3dq: $this->response->write(); goto JWIWs; jYq_L: if (empty($q)) { goto ZcGxU; } goto PbAHT; T_Juu: $this->response->set_data("items", $customer); goto XmfQa; XmfQa: HIMVT: goto tP3dq; JWIWs: return true; goto xFZMe; PbAHT: $data = array("str" => $q, "type" => $type, "page" => 1, "isDetail" => true, "isAllSearch" => true); goto HFBTV; HFBTV: ZcGxU: goto V1NEA; YEixk: $data = $this->request->post(); goto jYq_L; V1NEA: $customer = $this->contactsModel->customer_search($data); goto O12Tk; xFZMe: } public function city($q = '', $stateCode = '') { goto mEQYm; mrJzK: return true; goto q8Lgq; KGJvr: if (empty($city)) { goto VvGXl; } goto Qzt3R; fNVYL: VvGXl: goto Qpe_O; hRyMo: $this->response->success(); goto KGJvr; Qpe_O: $this->response->write(); goto mrJzK; mEQYm: $city = $this->contactsModel->city_search($q, $stateCode); goto hRyMo; Qzt3R: $this->response->set_data("items", $city); goto fNVYL; q8Lgq: } public function detailed_search($type = "C", $isArchived = 0, $q = '') { goto r1UZC; SyRI8: $this->response->write(); goto ju2lG; TE8Og: $this->response->set_data("items", $customer); goto GY9Re; GY9Re: OHuFx: goto SyRI8; J7nPs: $this->response->success(); goto NA4Si; ju2lG: return true; goto IyTst; r1UZC: $customer = $this->contactsModel->customer_search(array("str" => $q, "type" => $type, "page" => 1, "isDetail" => true, "isArchived" => $isArchived, "isAllSearch" => true)); goto J7nPs; NA4Si: if (empty($customer)) { goto OHuFx; } goto TE8Og; IyTst: } public function search2($type = "A", $q = '', $page = 1) { goto phwWU; PCJFp: $this->response->set_data("items", $ret); goto DyhZH; I82aO: if (empty($data["display"])) { goto ReDCe; } goto IbEXq; Sd3mN: $this->load->model("tagModel"); goto y8adE; l8cC3: if (empty($ret)) { goto jc3j0; } goto PCJFp; fRiSm: $ret = array_merge($customer, $tags); goto Bg9I7; s7FvR: goto f8IVR; goto N_ovX; DyhZH: jc3j0: goto nwwb0; phwWU: $data = $this->request->post(); goto I82aO; XXy0w: f8IVR: goto Sd3mN; IbEXq: $customer = $this->contactsModel->customer_search(array("str" => $q, "type" => $type, "page" => $page, "isDetail" => false, "isArchived" => false, "isAllSearch" => false, "all" => true)); goto s7FvR; Bg9I7: $this->response->success(); goto l8cC3; Tf0BY: return true; goto l3R03; N_ovX: ReDCe: goto jBm_H; y8adE: $tags = $this->tagModel->search($q, "C", "id, tagName AS name, 1 AS isTag, 'Tag' AS groupName"); goto fRiSm; jBm_H: $customer = $this->contactsModel->customer_search(array("str" => $q, "type" => $type, "page" => $page)); goto XXy0w; nwwb0: $this->response->write(); goto Tf0BY; l3R03: } function restore($id = '') { goto vAGTf; SwH_h: $this->response->write(); goto jESM_; KQLi8: R0Dfo: goto zLdpl; KTH12: $this->response->error("Id Missing."); goto dbUeB; xspUn: $this->response->set_data("data", $ret); goto PHsXw; eLyhh: $this->response->error($this->contactsModel->message); goto oi2kE; HvAcs: return false; goto KQLi8; geAYC: $this->response->write(); goto fH09t; ylZY1: M0ICz: goto IbkdO; oi2kE: if (!$ret) { goto ifsCp; } goto xspUn; jESM_: return false; goto fwUkh; NZG7V: if ($ret === true) { goto DpTwu; } goto eLyhh; dbUeB: $this->response->write(); goto HvAcs; FENYu: $this->response->success("RESTORE_SUCCESS"); goto geAYC; vAGTf: if (!empty($id)) { goto R0Dfo; } goto KTH12; fwUkh: goto M0ICz; goto kqAAY; zLdpl: $ret = $this->contactsModel->restore($id); goto NZG7V; fH09t: return true; goto ylZY1; kqAAY: DpTwu: goto FENYu; PHsXw: ifsCp: goto SwH_h; IbkdO: } function delete($id = '') { goto pLMaj; SmZlo: return true; goto hymR3; elzDk: bqOYf: goto Z7SH2; Rl8s7: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto kX1hK; a90k5: $ret = $this->contactsModel->delete($id); goto TGb0N; kX1hK: valid_permission($permissionArr[$data["csType"]], 4); goto RRabv; dZ660: goto qjC6R; goto baFzP; fNOL1: $this->response->write(); goto E1y35; iw3tW: return false; goto dZ660; E1y35: return false; goto FvpAf; O_CF2: $this->response->write(); goto SmZlo; TGb0N: if ($ret === true) { goto jTqJ_; } goto EpMNb; LuaoD: if (!$ret) { goto bqOYf; } goto Px4ki; Z7SH2: $this->response->write(); goto iw3tW; EpMNb: $this->response->error($this->contactsModel->message); goto LuaoD; FvpAf: B0VJV: goto a90k5; Px4ki: $this->response->set_data("data", $ret); goto elzDk; hymR3: qjC6R: goto PRzlv; vwA2R: $this->response->error("Id Missing."); goto fNOL1; pLMaj: $data = $this->request->post(); goto Rl8s7; tgva0: $this->response->success("DELETE_SUCCESS"); goto O_CF2; RRabv: if (!empty($id)) { goto B0VJV; } goto vwA2R; baFzP: jTqJ_: goto tgva0; PRzlv: } function export($type = "A", $format = "csv") { goto OFlY0; M1717: Q30rM: goto vuXOs; l4Sw_: $content = implode(",", $head) . "\xa"; goto q321R; gTqMd: $file_path = "temp" . DS . "export" . DS . get_company("id"); goto DeLu0; Zr2hR: foreach ($result as $key => $row) { goto OJ8y5; CYfHZ: vsmbr: goto X70tQ; OFPqX: $rowData = ''; goto kvUab; kvUab: foreach ($head as $val) { goto DcMcf; DcMcf: $row[$val] = !empty($row[$val]) ? $row[$val] : ''; goto h_DmU; h_DmU: $tmp[$val] = """ . $row[$val] . """ . "\x9"; goto Inj_Z; Inj_Z: $rowData .= $tmp[$val]; goto D8p41; D8p41: jpYiy: goto IVCt_; IVCt_: } goto xsicE; OJ8y5: $tmp = array(); goto OFPqX; wSwNq: $content .= trim($rowData) . "
"; goto CYfHZ; xsicE: X8jyd: goto wSwNq; X70tQ: } goto rw5EM; jaVVg: $head = array_keys($result[0]); goto ThsR3; q321R: foreach ($result as $key => $row) { goto apfse; apfse: $tmp = array(); goto E58UO; dUpsC: Ri7eE: goto SrUEm; E58UO: foreach ($head as $val) { $tmp[$val] = isset($row[$val]) ? $row[$val] : ''; vXZZg: } goto VdwoB; VdwoB: WeBFq: goto EmzSZ; EmzSZ: $content .= """ . implode("","", array_values($tmp)) . """ . "
"; goto dUpsC; SrUEm: } goto pE970; W8QpP: $content = ''; goto dt_pL; BJ8cY: ini_set("memory_limit", "-1"); goto GTfJi; GTfJi: $permissionArr = array("C" => "MNCUS", "E" => "MNCUS", "EC" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto QXzu5; DeLu0: if (is_dir($file_path)) { goto YCz8a; } goto MtG9V; OFlY0: ini_set("max_execution_time", 0); goto BJ8cY; QO3bI: $contacts = $type == "C" ? "customer" : ($type == "P" ? "project" : "supplier"); goto GfWbQ; F2VEs: $file_path .= DS . $contacts . time() . $ext; goto y17rH; y17rH: $this->load->helper("download"); goto l4lmp; gqVZ1: return true; goto G_xHu; MtG9V: mkdir($file_path, 0755, TRUE); goto L5E0v; l4lmp: force_download($file_path, $content); goto gqVZ1; L5E0v: YCz8a: goto QO3bI; dt_pL: $result = $this->contactsModel->get_contacts($type); goto jaVVg; vuXOs: $content = implode("	", array_values($head)) . "\xa"; goto Zr2hR; rw5EM: jZtEf: goto ZkUQj; GfWbQ: $ext = $format == "csv" ? ".csv" : ".xls"; goto F2VEs; hmcGH: goto X_Tpo; goto M1717; ZkUQj: X_Tpo: goto gTqMd; ThsR3: if (!empty($format) && $format == "xls") { goto Q30rM; } goto l4Sw_; QXzu5: valid_permission($permissionArr[$type], 4); goto W8QpP; pE970: xTbWu: goto hmcGH; G_xHu: } function import($csType = "C", $overwrite = false, $isxml = 0) { goto KEGyO; Pcd5l: if (!($this->form_validation->run() == FALSE)) { goto b67bT; } goto ZTlVO; W_KbS: return true; goto jjw8y; uhevz: if (!$isxml) { goto kUB7R; } goto BHeQW; qo7E_: b67bT: goto IDoPD; DM8ED: $_POST = $data = $this->request->post(); goto tZUIs; IDoPD: m3XB0: goto ss42Z; Ozbrn: kUB7R: goto rrqbj; b3RW5: if (!(empty($file_data) && isset($data["dbdriver"]))) { goto m3XB0; } goto Kr9oJ; vWU7F: $this->response->error(lang("IMPORT_ERROR")); goto kS3y2; h8XKH: $this->response->error(implode(",", $import["invalidswitchcontact"]) . "Contacts cannot be switched!"); goto p4h3F; ef9kQ: bBg1C: goto s1Qdl; tZUIs: $permissionArr = array("C" => "MNCUS", "S" => "MNSUP", "R" => "MNSAR", "B" => "MNCUS", "L" => "MNCUS", "D" => "MNRBY", "F" => "MNCUS", "P" => "PRO"); goto CUSBD; Kr9oJ: if (!function_exists("odbc_connect")) { goto UL1N1; mlJPM: $this->response->write(); goto TXztq; UL1N1: $this->response->error(lang("ODBC_ERROR")); goto mlJPM; TXztq: return false; goto mENcF; mENcF: } goto KebMY; ss42Z: $params = array("csType" => $csType, "file_data" => !empty($file_data[0]) ? $file_data[0] : $data, "overwrite" => $overwrite); goto uhevz; zT_Tl: $this->response->write(); goto W_KbS; STviG: $this->form_validation->set_rules("port", "Tally Port", "trim|required"); goto Pcd5l; ISMJz: $this->form_validation->set_rules("hostname", "Tally hostname", "trim|required"); goto STviG; KEGyO: ini_set("memory_limit", "-1"); goto uAMqs; Sh5e8: GbmQ_: goto TZtzO; KFoll: return false; goto mPzjq; mPzjq: Ru2Mj: goto TFw3i; TFw3i: if (empty($import["invalidswitchcontact"])) { goto GbmQ_; } goto h8XKH; uAMqs: $this->load->model("attachmentModel"); goto DM8ED; ZTlVO: $this->response->error(validation_errors()); goto tnRdf; eoJ82: return false; goto ef9kQ; p4h3F: $this->response->write(); goto CDnaI; s1Qdl: $this->response->success(lang("SUCCESS_IMPORT")); goto zT_Tl; JneWv: unset($params["file_data"]); goto Ozbrn; BYJfL: $file_data = $this->attachmentModel->upload_file("import"); goto b3RW5; kS3y2: $this->response->write(); goto eoJ82; CUSBD: valid_permission($permissionArr[$csType], 4); goto BYJfL; rrqbj: $import = $this->contactsModel->import($params); goto xGd02; CDnaI: return false; goto Sh5e8; O8f0B: $this->response->write(); goto KFoll; iAr9M: return false; goto qo7E_; jvOOO: $this->response->error(implode(",", $import["invalidGstCnt"]) . " contains invalid gstin record"); goto O8f0B; xGd02: if (empty($import["invalidGstCnt"])) { goto Ru2Mj; } goto jvOOO; BHeQW: $params["xml_import"] = $params["file_data"]; goto JneWv; KebMY: $this->load->library("form_validation"); goto oBMaN; tnRdf: $this->response->write(); goto iAr9M; TZtzO: if ($import) { goto bBg1C; } goto vWU7F; oBMaN: $this->form_validation->set_rules("dbdriver", "Tally DB Driver", "trim|required"); goto ISMJz; jjw8y: } function export_file($params, $export_type = "csv") { goto MFLMU; nVXpJ: RpvrQ: goto to4fO; dWNyR: mkdir($file_path, 0755, TRUE); goto BeUvo; Iptpt: $items = !empty($params["items"]) ? $params["items"] : array(); goto Trp0m; rbzBG: switch ($export_type) { case "pdf": goto DHY7g; uElni: goto RpvrQ; goto qp93a; o3F4u: $this->load->clear_vars(); goto t9mjQ; W3h1j: $mpdf->SetFooter($headerFooterConfiguration); goto ic7BS; Ftw1a: ini_set("memory_limit", "-1"); goto IvuBY; dYfzS: $mpdf->baseScript = 1; goto PDceN; NdlGn: $mpdf->AddPage('', '', '', '', ''); goto W3h1j; ic7BS: $mpdf->setHeader("{PAGENO} / {nb}"); goto o3F4u; QYBWj: $mpdf->Output(FCPATH . $file_path, "F"); goto uElni; DHY7g: $this->load->library("parser"); goto XXQxF; BUFz6: $mpdf->autoLangToFont = true; goto NdlGn; IvuBY: $mpdf = new \Mpdf\Mpdf(["orientation" => "P", "format" => "A4", "mode" => "en", "mode" => "UTF-8", "default_font_size" => 9, array(5, 5, 8, 8)]); goto KX128; YwA9b: $headerFooterConfiguration = ["odd" => $oddEvenConfiguration, "even" => $oddEvenConfiguration]; goto poPWD; poPWD: require_once APPPATH . "third_party/mpdf/autoload.php"; goto Ftw1a; XXQxF: $file_path .= DS . $file_name . ".pdf"; goto ir_Qx; ixKry: $mpdf->WriteHTML(html_entity_decode($content)); goto QYBWj; w_mjt: $mpdf->autoScriptToLang = true; goto dYfzS; cttGW: $oddEvenConfiguration = ["L" => ["content" => ''], "C" => ["content" => ''], "R" => ["content" => $headerFooterContent], "line" => 1]; goto YwA9b; D4Y2G: $mpdf->SetDisplayMode("real"); goto w_mjt; PDceN: $mpdf->autoVietnamese = true; goto yMImc; t9mjQ: $content = $this->parser->parse("export/report_transactions.php", $params, true); goto ixKry; O2gge: $mpdf->setAutoBottomMargin = "stretch"; goto D4Y2G; ir_Qx: $headerFooterContent = "<div align="right">{PAGENO} / {nb}</div>"; goto cttGW; KX128: $mpdf->setAutoTopMargin = "stretch"; goto O2gge; yMImc: $mpdf->autoArabic = true; goto BUFz6; qp93a: } goto AWMol; BeUvo: Qgoz5: goto rbzBG; HcmMR: ini_set("max_execution_time", -1); goto xH1nh; KFrHP: $file_path = "temp" . DS . "export" . DS . get_company("id"); goto hJ7Ba; MFLMU: ini_set("memory_limit", "-1"); goto HcmMR; Trp0m: $this->load->helper("download"); goto nv0sv; hJ7Ba: if (is_dir($file_path)) { goto Qgoz5; } goto dWNyR; nv0sv: $file_name = $params["file_name"]; goto KFrHP; AWMol: yPkkG: goto nVXpJ; YydXS: $content = ''; goto Iptpt; to4fO: return $file_path; goto r3gGc; xH1nh: $params["type"] = !empty($params["type"]) ? $params["type"] : "default"; goto YydXS; r3gGc: } public function save_branchAccount() { goto MvQEQ; B620x: $result = $this->contactsModel->save_branchAccount($data); goto HVGzj; VJGKm: $this->response->success("SUCCESS_SAVE"); goto KQhjf; qj2bK: KXEOh: goto ycHgx; WbBoh: return false; goto VweYG; ycHgx: $this->response->write(); goto WbBoh; MvQEQ: $_POST = $data = $this->request->post(); goto B620x; HVGzj: if (empty($result)) { goto KXEOh; } goto VJGKm; KQhjf: $this->response->write(); goto qRX90; qRX90: return true; goto qj2bK; VweYG: } public function get_branchAccount() { goto D7gDh; e4YIy: $result = $this->contactsModel->get_branchAccount($data); goto xpw37; jdNAs: return false; goto Qwtru; D7gDh: $_POST = $data = $this->request->post(); goto e4YIy; xpw37: $this->response->set_data("items", $result["items"], true); goto E0zBR; E0zBR: $this->response->write(); goto jdNAs; Qwtru: } public function credit_limit() { goto lvBzR; KpFAb: $this->response->write(); goto Ld561; FZdLZ: $this->response->set_data("items", $result["items"], true); goto KpFAb; cqFti: $result = $this->contactsModel->get_credit_limt($data); goto FZdLZ; lvBzR: $_POST = $data = $this->request->post(); goto cqFti; Ld561: return false; goto M0TM2; M0TM2: } public function contact_credit_limit() { goto PuPGM; aekb0: return false; goto ch7yS; PuPGM: $_POST = $data = $this->request->post(); goto vK7Mq; vK7Mq: $result = $this->contactsModel->get_contact_credit_limt($data); goto LRrtU; cJzKx: $this->response->write(); goto aekb0; LRrtU: $this->response->set_data("items", $result["items"], true); goto cJzKx; ch7yS: } public function get_credit_limit() { goto NDL4X; GBHKb: $result = $this->contactsModel->get_Single_credit_limt($data); goto EGd_Z; q_UxM: return false; goto C27y_; az1Vz: $this->response->write(); goto q_UxM; NDL4X: $_POST = $data = $this->request->post(); goto GBHKb; EGd_Z: $this->response->set_data("items", $result["items"], true); goto az1Vz; C27y_: } public function credit_limit_save() { goto HUBW_; v_mgo: $this->response->write(); goto SYNPK; GHRXT: $result = $this->contactsModel->save_credit_limit($data); goto xp2ye; HUBW_: $_POST = $data = $this->request->post(); goto GHRXT; k8dQb: return true; goto mQ5Ps; SYNPK: return false; goto zsy2t; iW0e0: $this->response->success("SUCCESS_SAVE"); goto Fi_m9; mQ5Ps: X74Mk: goto v_mgo; Fi_m9: $this->response->write(); goto k8dQb; xp2ye: if (empty($result)) { goto X74Mk; } goto iW0e0; zsy2t: } function credit_limit_delete($id = '') { goto vxsSW; LJOHK: if (!$ret) { goto yCQ7e; } goto v0N1W; vxsSW: $ret = $this->contactsModel->delete_credit_limt($id); goto m0Y9i; Qi_Za: qVFvT: goto RPz_g; RPz_g: $this->response->success("DELETE_SUCCESS"); goto K3jJt; vRi_i: goto cmrrH; goto Qi_Za; vEb_Y: return false; goto vRi_i; m0Y9i: if ($ret === true) { goto qVFvT; } goto kEOdo; v0N1W: $this->response->set_data("data", $ret); goto tJduK; rhqus: $this->response->write(); goto vEb_Y; tJduK: yCQ7e: goto rhqus; TRsQ7: return true; goto iAaUN; iAaUN: cmrrH: goto hg_lU; kEOdo: $this->response->error($this->contactsModel->message); goto LJOHK; K3jJt: $this->response->write(); goto TRsQ7; hg_lU: } function save_salerate() { goto o37K3; cZlys: if (empty($result)) { goto d0Z7S; } goto haFfe; k4CeH: d0Z7S: goto lrtoY; haFfe: $this->response->success("SUCCESS_SAVE"); goto yCXHv; AdXBI: $result = $this->contactsModel->save_salerate($data); goto cZlys; o37K3: $_POST = $data = $this->request->post(); goto AdXBI; yTGFD: return true; goto k4CeH; lrtoY: $this->response->write(); goto kpjl6; yCXHv: $this->response->write(); goto yTGFD; kpjl6: return false; goto ZvurA; ZvurA: } function getLocations() { goto DsC9z; DsC9z: $data = $this->request->post(); goto tVqDh; LwnDy: if (!$result) { goto Z50w1; } goto tP0Ih; tVqDh: $result = $this->contactsModel->getContactLocations($data); goto LwnDy; BwZJx: return true; goto ub8xG; D2nYm: Z50w1: goto nfOWQ; tP0Ih: $this->response->set_data("items", $result); goto D2nYm; nfOWQ: $this->response->write(); goto BwZJx; ub8xG: } public function unique_displayname() { goto GsnAR; dHldL: $this->response->set_data("isUnique", 0); goto T62jA; T62jA: goto MT_R6; goto h8R0R; h8R0R: smulk: goto skhup; TRSbz: MT_R6: goto efYjm; ZKsIS: if ($result) { goto smulk; } goto dHldL; Nzd7n: return true; goto ovDA3; tAlia: $result = $this->contactsModel->get_unique_displayname($data); goto ZKsIS; skhup: $this->response->set_data("isUnique", 1); goto TRSbz; GsnAR: $data = $this->request->post(); goto tAlia; efYjm: $this->response->write(); goto Nzd7n; ovDA3: } public function ratesheet() { goto gSUVS; h3VpB: $this->response->set_data("rate_sheets", $rate_sheets); goto tVFdF; tVFdF: $this->response->write(); goto ZiRmn; gSUVS: $data = $this->request->post(); goto daV7X; daV7X: $rate_sheets = $this->contactsModel->get_rate_sheets(); goto h3VpB; ZiRmn: return true; goto PIsoZ; PIsoZ: } }
?>

Function Calls

None

Variables

None

Stats

MD5 306ce69786423bebed743838f435c9e9
Eval Count 0
Decode Time 119 ms