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 class Portfolio_Details_Model extends CI_Model { public function __construct() { p..
Decoded Output download
<?php
class Portfolio_Details_Model extends CI_Model { public function __construct() { parent::__construct(); $this->user = "tblUsers"; $this->company = "tblCompany"; $this->campaign = "tblCampaign"; $this->investorCompany = "tblInvestorCompany"; $this->instrument = "tblInstrument"; $this->familyMember = "tblInvestorFamilyMember"; $this->membership_type = "tblInvestorMembershipType"; } function getAllCompanies($type, $array) { if ($type == "portfolio") { return $this->getAllPortfolioCompany($array); } else { if ($type == "exit") { return $this->getAllExitCompany($array); } else { if ($type == "partialExit") { return $this->getAllPartialExitCompany($array); } else { if ($type == "windingUp") { return $this->getAllWindingUpCompany($array); } } } } } function getAllPortfolioCompany($data = array()) { extract($data); $this->db->select("C.userId, C.companyId, C.brand_name, C.company_name, C.current_valuation"); $this->db->select("(CASE WHEN (C.brand_name IS NULL) THEN (C.company_name) ELSE (CONCAT(C.brand_name, ' (', C.company_name, ') ')) END) as company_name", FALSE); $this->db->select("CONCAT_WS(' ', U.first_name, U.last_name) as name", FALSE); $this->db->select("(SELECT SUM(amount_invested) FROM tblInvestorCompany tic INNER JOIN tblCampaign tc ON tic.campaignId = tc.campaignId AND (tc.status = 'success' OR tc.status = 'partial_exit' OR tc.status = 'partial_success') WHERE tic.companyId = C.companyId AND tic.money_received_by_escrow = 'Y') as total_amount_invested", FALSE); $this->db->select("COUNT(DISTINCT(CM.campaignId)) as no_of_campaigns", FALSE); $this->db->select("COUNT(DISTINCT(IC.userId)) as no_of_investors", FALSE); $this->db->select("CM.status", FALSE); $this->db->join($this->investorCompany . " IC", "IC.companyId = C.companyId AND IC.amount_invested > 0 AND IC.money_received_by_escrow = 'Y'", "LEFT"); $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'success' OR CM.status = 'partial_exit' OR CM.status = 'partial_success')", "INNER"); $this->db->where("(CASE WHEN (CM.status = 'partial_exit') THEN (IC.investorCompanyId NOT IN (SELECT investorCompanyId FROM tblExitShareRegister WHERE campaignId = IC.campaignId)) ELSE 1 END)", NULL, FALSE); $this->db->where("(CASE WHEN (CM.status = 'partial_success') THEN (SCM.subCampaignId IS NOT NULL) ELSE 1 END)", NULL, FALSE); $this->db->join("tblSubCampaign SCM", "SCM.campaignId = CM.campaignId AND SCM.is_launch = "Y" AND SCM.status="completed"", "LEFT"); $this->db->join($this->user . " U", "U.userId = C.userId", "LEFT"); $this->db->where("(U.user_type = 'entrepreneur' AND U.parent_id = 0)"); $this->db->where("(U.email != '')"); $this->db->where("U.isverified", "Y"); $this->db->where("U.active", "Y"); $this->db->where("U.profileStatus", "COMPLETED"); $this->db->where("U.registerFromId", AUID()); $this->db->having("total_amount_invested >", 0); if (array_key_exists("companyId", $data) && $companyId > 0) { $this->db->where("C.companyId", $companyId); } $this->db->group_by("C.companyId"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("company_name", "ASC"); } $query = $this->db->get($this->company . " C"); return $query; } function getAllExitCompany($data = array()) { extract($data); $this->db->select("C.userId, C.companyId, C.brand_name, C.company_name, C.current_valuation"); $this->db->select("(CASE WHEN (C.brand_name IS NULL) THEN (C.company_name) ELSE (CONCAT(C.brand_name, ' (', C.company_name, ') ')) END) as company_name", FALSE); $this->db->select("CONCAT_WS(' ', U.first_name, U.last_name) as name", FALSE); $this->db->select("(SELECT SUM(amount_invested) FROM tblInvestorCompany tic INNER JOIN tblCampaign tc ON tic.campaignId = tc.campaignId AND tc.status = 'exit' WHERE tic.companyId = C.companyId AND tic.money_received_by_escrow = 'Y') as total_amount_invested", FALSE); $this->db->select("COUNT(DISTINCT(IC.campaignId)) as no_of_campaigns", FALSE); $this->db->select("COUNT(DISTINCT(IC.userId)) as no_of_investors", FALSE); $this->db->join($this->investorCompany . " IC", "IC.companyId = C.companyId AND IC.amount_invested > 0 AND IC.money_received_by_escrow = 'Y'", "LEFT"); $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'exit')", "INNER"); $this->db->join($this->user . " U", "U.userId = C.userId", "LEFT"); $this->db->where("(U.user_type = 'entrepreneur' AND parent_id = 0)"); $this->db->where("(U.email != '')"); $this->db->where("U.isverified", "Y"); $this->db->where("U.active", "Y"); $this->db->where("U.profileStatus", "COMPLETED"); $this->db->where("U.registerFromId", AUID()); $this->db->having("total_amount_invested >", 0); if (array_key_exists("companyId", $data) && $companyId > 0) { $this->db->where("C.companyId", $companyId); } $this->db->group_by("C.companyId"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("company_name", "ASC"); } $query = $this->db->get($this->company . " C"); return $query; } function getAllPartialExitCompany($data = array()) { extract($data); $this->db->select("C.userId, C.companyId, C.brand_name, C.company_name, C.current_valuation"); $this->db->select("(CASE WHEN (C.brand_name IS NULL) THEN (C.company_name) ELSE (CONCAT(C.brand_name, ' (', C.company_name, ') ')) END) as company_name", FALSE); $this->db->select("U.currency, CONCAT_WS(' ', U.first_name, U.last_name) as name", FALSE); $this->db->select("(SELECT SUM(amount_invested) FROM tblInvestorCompany tic INNER JOIN tblCampaign tc ON tic.campaignId = tc.campaignId AND tc.status = 'partial_exit' WHERE tic.companyId = C.companyId AND tic.money_received_by_escrow = 'Y') as total_amount_invested", FALSE); $this->db->select("(SELECT SUM(retained_amount_invested) FROM tblInvestorCompany tic INNER JOIN tblCampaign tc ON tic.campaignId = tc.campaignId AND tc.status = 'partial_exit' WHERE tic.companyId = C.companyId AND tic.money_received_by_escrow = 'Y') as retained_amount_invested", FALSE); $this->db->select("COUNT(DISTINCT(IC.campaignId)) as no_of_campaigns", FALSE); $this->db->select("COUNT(DISTINCT(IC.userId)) as no_of_investors", FALSE); $this->db->join($this->investorCompany . " IC", "IC.companyId = C.companyId AND IC.amount_invested > 0 AND IC.money_received_by_escrow = 'Y'", "LEFT"); $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'partial_exit')", "INNER"); $this->db->join($this->user . " U", "U.userId = C.userId", "LEFT"); $this->db->where("(U.user_type = 'entrepreneur' AND parent_id = 0)"); $this->db->where("(U.email != '')"); $this->db->where("U.isverified", "Y"); $this->db->where("U.active", "Y"); $this->db->where("U.profileStatus", "COMPLETED"); $this->db->where("U.registerFromId", AUID()); $this->db->where_in("CM.status", array("partial_exit")); $this->db->having("total_amount_invested >", 0); if (array_key_exists("companyId", $data) && $companyId > 0) { $this->db->where("C.companyId", $companyId); } $this->db->order_by("company_name", "ASC"); $this->db->group_by("C.companyId"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("C.company_name", "ASC"); } $query = $this->db->get($this->company . " C"); return $query; } function getAllWindingUpCompany($data = array()) { extract($data); $this->db->select("C.userId, C.companyId, C.brand_name, C.company_name, C.current_valuation"); $this->db->select("(CASE WHEN (C.brand_name IS NULL) THEN (C.company_name) ELSE (CONCAT(C.brand_name, ' (', C.company_name, ') ')) END) as company_name", FALSE); $this->db->select("CONCAT_WS(' ', U.first_name, U.last_name) as name", FALSE); $this->db->select("(SELECT SUM(amount_invested) FROM tblInvestorCompany tic INNER JOIN tblCampaign tc ON tic.campaignId = tc.campaignId AND tc.status = 'winding_up' WHERE tic.companyId = C.companyId AND tic.money_received_by_escrow = 'Y') as total_amount_invested", FALSE); $this->db->select("COUNT(DISTINCT(IC.campaignId)) as no_of_campaigns", FALSE); $this->db->select("COUNT(DISTINCT(IC.userId)) as no_of_investors", FALSE); $this->db->join($this->investorCompany . " IC", "IC.companyId = C.companyId AND IC.amount_invested > 0 AND IC.money_received_by_escrow = 'Y'", "LEFT"); $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'winding_up')", "INNER"); $this->db->join($this->user . " U", "U.userId = C.userId", "LEFT"); $this->db->where("(U.user_type = 'entrepreneur' AND parent_id = 0)"); $this->db->where("(U.email != '')"); $this->db->where("U.isverified", "Y"); $this->db->where("U.active", "Y"); $this->db->where("U.profileStatus", "COMPLETED"); $this->db->where("U.registerFromId", AUID()); $this->db->having("total_amount_invested >", 0); if (array_key_exists("companyId", $data) && $companyId > 0) { $this->db->where("C.companyId", $companyId); } $this->db->group_by("C.companyId"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("company_name", "ASC"); } $query = $this->db->get($this->company . " C"); return $query; } function getTotalInvestmentsByCurrency($type = "portfolio", $companyId = 0) { $this->db->select("CONCAT(FORMAT(SUM(IC.amount_invested), 2, "en_IN"), " ", U.currency) as amount_invested", FALSE); $this->db->from("tblInvestorCompany IC"); $this->db->join("tblCompany C", "C.companyId = IC.companyId", "left"); $this->db->join("tblCampaign CM", "CM.campaignId = IC.campaignId", "inner"); $this->db->join("tblUsers U", "U.userId = CM.userId AND U.user_type = "entrepreneur" AND U.parent_id = 0 AND U.email != "" AND U.isverified = "Y" AND U.active = "Y" AND U.profileStatus = "COMPLETED"", "inner"); $this->db->where("IC.amount_invested >", 0); $this->db->where("IC.money_received_by_escrow", "Y"); if ($type == "portfolio") { $this->db->join("tblSubCampaign SCM", "SCM.campaignId = CM.campaignId AND SCM.is_launch = "Y" AND SCM.status = "completed"", "left"); $this->db->where_in("CM.status", array("success", "partial_exit", "partial_success")); $this->db->where("(CM.status != "partial_exit" OR IC.investorCompanyId NOT IN (SELECT investorCompanyId FROM tblExitShareRegister WHERE campaignId = IC.campaignId))"); $this->db->where("(CM.status != "partial_success" OR SCM.subCampaignId IS NOT NULL)"); } else { if ($type == "exit") { $this->db->where_in("CM.status", array("exit")); } else { if ($type == "partialExit") { $this->db->where_in("CM.status", array("partial_exit")); } else { if ($type == "windingUp") { $this->db->where_in("CM.status", array("winding_up")); } } } } if ($companyId > 0) { $this->db->where("IC.companyId", $companyId); } $this->db->where("U.currency IS NOT NULL"); $this->db->group_by("U.currency"); $this->db->having("SUM(IC.amount_invested) > 0"); $this->db->order_by("C.company_name", "ASC"); $query = $this->db->get(); return $query; } function geCompanyCombo($type = "portfolio", $companyId = 0) { $array = explode(",", $companyId); $this->db->select("C.userId, C.companyId, C.brand_name, C.company_name"); $this->db->select("(CASE WHEN (C.brand_name IS NULL) THEN (C.company_name) ELSE (CONCAT(C.brand_name, ' (', C.company_name, ') ')) END) as company_name", FALSE); $this->db->select("CM.status", FALSE); $this->db->join($this->investorCompany . " IC", "IC.companyId = C.companyId AND IC.amount_invested > 0 AND IC.money_received_by_escrow = 'Y'", "LEFT"); if ($type == "portfolio") { $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'success' OR CM.status = 'partial_exit' OR CM.status = 'partial_success')", "INNER"); $this->db->where("(CASE WHEN (CM.status = 'partial_exit') THEN (IC.investorCompanyId NOT IN (SELECT investorCompanyId FROM tblExitShareRegister WHERE campaignId = IC.campaignId)) ELSE 1 END)", NULL, FALSE); $this->db->where("(CASE WHEN (CM.status = 'partial_success') THEN (SCM.subCampaignId IS NOT NULL) ELSE 1 END)", NULL, FALSE); $this->db->join("tblSubCampaign SCM", "SCM.campaignId = CM.campaignId AND SCM.is_launch = "Y" AND SCM.status="completed"", "LEFT"); } else { if ($type == "exit") { $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'exit')", "INNER"); } else { if ($type == "partialExit") { $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'partial_exit')", "INNER"); } else { if ($type == "windingUp") { $this->db->join($this->campaign . " CM", "CM.companyId = C.companyId AND (CM.status = 'winding_up')", "INNER"); } } } } $this->db->join($this->user . " U", "U.userId = C.userId", "LEFT"); $this->db->where("U.isverified", "Y"); $this->db->where("U.active", "Y"); $this->db->where("U.profileStatus", "COMPLETED"); $this->db->where("U.registerFromId", AUID()); $this->db->where("IC.money_received_by_escrow", "Y"); $this->db->where("IC.amount_invested >", 0); $this->db->group_by("C.companyId"); $this->db->order_by("company_name", "ASC"); $query = $this->db->get($this->company . " C"); $frmcombo = ''; if ($query->num_rows() > 0) { $frmcombo .= "<option value="">---Select Company---</option>"; foreach ($query->result() as $combo) { $frmcombo .= "<option value=" . $combo->companyId . " "; if (in_array($combo->companyId, $array)) { $frmcombo .= "selected='true'"; } $frmcombo .= ">"; $frmcombo .= $combo->company_name . "</option>"; } } return $frmcombo; } public function exportCompanyInvestmentInfo($companyId = 0, $type = "portfolio", $start_date = '', $end_date = '') { $this->db->select("(CASE WHEN (C.brand_name IS NULL) THEN (C.company_name) ELSE (CONCAT(C.brand_name, ' (', C.company_name, ') ')) END) as 'Company Name'", FALSE); $this->db->select("CM.campaign_name as "Campaign Name", CM.slug as "Campaign Code", CM.end_date as "End Date""); $this->db->select("SC.sub_campaign_name as "Tranche Name""); $this->db->select("CONCAT_WS(" ", U.first_name, U.last_name) as "Investor Name"", FALSE); $this->db->select("U.email as "Investor Email"", FALSE); $this->db->select("U.slug as "Investor Code""); $this->db->select("MT.membership_type as "Membership Type""); $this->db->select("I.instrument_name as "Instrument Name""); $this->db->select("IC.price_per_share as "Price Per Instrument" , IC.no_of_share as "Number of Instruments", IC.amount_invested as "Investment Amount", IC.invested_date as "Invested Date""); $this->db->select("C.current_instrument_price as "Current Instrument Price""); $this->db->select("(CASE WHEN ((GROUP_CONCAT(FM.member_name)) IS NULL) THEN CONCAT_WS(' ', U.first_name, U.last_name) ELSE (GROUP_CONCAT(FM.member_name)) END) as 'Member Name'", FALSE); $this->db->select("GROUP_CONCAT(FM.slug) as 'Member Code'", FALSE); $this->db->select("BD.name_of_account_holder as "Account Holder Name",BD.bank_name as "Bank Name",BD.account_number as "Account Number",BD.ifsc_code as "IFSC Code",BD.transact_date as "Transact Date" "); $this->db->select("DATE(IC.share_certificate_approved_date) as "Updated Date""); $this->db->join($this->user . " U", "U.userId = IC.userId", "left"); $this->db->join($this->membership_type . " MT", "MT.id = U.investor_membership_type", "left"); $this->db->join($this->instrument . " I", "I.instrumentId = IC.instrumentId", "left"); $this->db->join($this->company . " C", "C.companyId = IC.companyId", "LEFT"); $this->db->join("tblSubCampaign SC", "SC.subCampaignId = IC.subCampaignId", "left"); $this->db->join("tblBankDetails BD", "IC.campaignId = BD.campaignId", "left"); if ($type == "portfolio") { $this->db->join($this->campaign . " CM", "CM.campaignId = IC.campaignId AND (CM.status = 'success' OR CM.status = 'partial_exit' OR CM.status = 'partial_success')", "INNER"); $this->db->select("CM.status", FALSE); $this->db->where("(CASE WHEN (CM.status = 'partial_exit') THEN (IC.investorCompanyId NOT IN (SELECT investorCompanyId FROM tblExitShareRegister WHERE campaignId = IC.campaignId)) ELSE 1 END)", NULL, FALSE); $this->db->where("(CASE WHEN (CM.status = 'partial_success') THEN (SCM.subCampaignId IS NOT NULL) ELSE 1 END)", NULL, FALSE); $this->db->join("tblSubCampaign SCM", "SCM.campaignId = CM.campaignId AND SCM.is_launch = "Y" AND SCM.status="completed"", "LEFT"); } else { if ($type == "exit") { $this->db->select("IC.retained_amount_invested as "Retained Investment Amount", IC.retained_no_of_share as "Retained Number of Instrument ""); $this->db->select("IC.exit_date as "Exit Date", IC.closure_date as "Closure Date", share_holding_status as "Share Holding Status""); $this->db->join($this->campaign . " CM", "CM.campaignId = IC.campaignId AND (CM.status = 'exit')", "INNER"); } else { if ($type == "partialExit") { $this->db->select("ESR.investment_retained_value as "Retained Investment Amount", ESR.instrument_retained as "Retained Number of Instrument""); $this->db->select("ESR.exit_date as "Exit Date", ESR.closure_date as "Closure Date", share_holding_status as "Share Holding Status""); $this->db->join("tblExitShareRegister ESR", "ESR.investorCompanyId = IC.investorCompanyId", "LEFT"); $this->db->join($this->campaign . " CM", "CM.campaignId = IC.campaignId AND (CM.status = 'partial_exit')", "INNER"); $this->db->select("((IC.amount_invested) - (CASE WHEN (IC.retained_amount_invested IS NOT NULL) THEN (ESR.investment_retained_value) ELSE (IC.amount_invested) END)) as Retained Amount", FALSE); } else { if ($type == "windingUp") { $this->db->join($this->campaign . " CM", "CM.campaignId = IC.campaignId AND (CM.status = 'winding_up')", "INNER"); } } } } $this->db->join($this->familyMember . " FM", "FIND_IN_SET((FM.memberId),(IC.familyMemberId))", "left"); $this->db->join($this->user . " ENT", "ENT.userId = C.userId", "LEFT"); $this->db->where("IC.money_received_by_escrow", "Y"); $this->db->where("IC.amount_invested >", 0); if ($companyId > 0) { $this->db->where("IC.companyId", $companyId); } $this->db->where("ENT.isverified", "Y"); $this->db->where("ENT.active", "Y"); $this->db->where("ENT.profileStatus", "COMPLETED"); $this->db->where("ENT.registerFromId", AUID()); if (!empty($start_date) && !empty($end_date)) { $this->db->where("CM.end_date BETWEEN "" . date("Y-m-d", strtotime($start_date)) . "" and "" . date("Y-m-d", strtotime($end_date)) . """); } $this->db->order_by("C.company_name", "ASC"); $this->db->order_by("U.first_name", "ASC"); if ($type == "partialExit") { $this->db->group_by("(CASE WHEN ESR.id IS NOT NULL THEN ESR.id ELSE IC.investorCompanyId END)"); $this->db->order_by("ESR.exit_date", "DESC"); } else { $this->db->group_by("IC.investorCompanyId"); } $query = $this->db->get($this->investorCompany . " IC"); return $query; } function getCompanyNameById($companyId) { $this->db->select("(CASE WHEN (brand_name IS NULL) THEN (company_name) ELSE (brand_name) END) as company_name", FALSE); $this->db->where("companyId", $companyId); $query = $this->db->get($this->company); $company_name = ''; if ($query->num_rows() > 0) { $company_name = $query->row()->company_name; } return $company_name; } } ?>
Did this file decode correctly?
Original Code
<?php
class Portfolio_Details_Model extends CI_Model { public function __construct() { parent::__construct(); $this->user = "\164\x62\x6c\x55\x73\x65\162\x73"; $this->company = "\x74\142\154\103\x6f\155\x70\x61\x6e\x79"; $this->campaign = "\164\x62\154\103\141\155\160\x61\x69\x67\x6e"; $this->investorCompany = "\164\142\154\x49\156\x76\145\163\x74\157\x72\x43\x6f\x6d\x70\x61\156\x79"; $this->instrument = "\x74\142\x6c\x49\156\163\164\x72\x75\x6d\145\x6e\x74"; $this->familyMember = "\x74\142\154\x49\156\166\x65\163\164\157\x72\x46\141\x6d\151\x6c\171\115\x65\155\142\x65\162"; $this->membership_type = "\x74\142\154\111\x6e\x76\x65\163\164\157\162\x4d\x65\155\142\x65\162\x73\150\151\160\x54\171\x70\x65"; } function getAllCompanies($type, $array) { if ($type == "\160\157\162\x74\x66\157\x6c\151\157") { return $this->getAllPortfolioCompany($array); } else { if ($type == "\145\170\151\164") { return $this->getAllExitCompany($array); } else { if ($type == "\160\x61\162\164\151\x61\x6c\x45\x78\151\x74") { return $this->getAllPartialExitCompany($array); } else { if ($type == "\x77\151\x6e\144\151\156\147\125\160") { return $this->getAllWindingUpCompany($array); } } } } } function getAllPortfolioCompany($data = array()) { extract($data); $this->db->select("\103\x2e\165\x73\x65\162\111\144\x2c\x20\x43\x2e\143\157\x6d\160\x61\156\171\x49\x64\54\40\x43\x2e\142\162\x61\156\x64\137\156\x61\155\145\x2c\x20\103\56\x63\157\x6d\x70\141\156\171\x5f\x6e\x61\155\x65\54\40\103\56\143\165\x72\162\x65\x6e\x74\x5f\166\x61\154\x75\141\x74\151\157\x6e"); $this->db->select("\x28\x43\x41\123\x45\40\x57\x48\105\x4e\x20\50\x43\56\142\x72\x61\x6e\x64\137\156\141\x6d\x65\x20\x49\123\x20\x4e\125\x4c\114\51\40\124\110\x45\116\40\x28\x43\x2e\143\x6f\x6d\x70\141\x6e\171\137\156\141\155\145\x29\x20\x45\x4c\x53\x45\x20\50\103\117\x4e\103\x41\x54\x28\103\56\x62\162\141\156\x64\x5f\156\141\x6d\145\54\x20\x27\x20\x28\x27\54\40\x43\56\143\x6f\x6d\160\x61\156\171\137\x6e\x61\x6d\x65\x2c\40\47\51\40\x27\51\51\x20\105\x4e\x44\x29\40\141\x73\40\x63\157\155\160\141\156\171\x5f\x6e\x61\155\x65", FALSE); $this->db->select("\x43\x4f\x4e\x43\x41\124\137\127\123\x28\47\x20\47\x2c\x20\x55\56\x66\151\162\x73\x74\137\156\141\155\145\54\x20\x55\56\x6c\141\x73\164\x5f\x6e\x61\x6d\145\51\x20\x61\163\40\x6e\141\x6d\x65", FALSE); $this->db->select("\50\123\105\x4c\x45\x43\x54\x20\x53\125\x4d\x28\141\x6d\x6f\x75\x6e\x74\x5f\151\x6e\x76\145\163\x74\145\x64\x29\40\106\x52\117\115\x20\x74\x62\154\x49\x6e\x76\145\163\164\157\x72\103\x6f\x6d\x70\x61\x6e\x79\40\164\x69\x63\40\x49\116\116\x45\122\x20\112\117\111\x4e\40\164\x62\x6c\103\141\155\160\141\151\147\156\40\164\x63\x20\117\116\40\x74\151\x63\56\x63\141\155\160\141\151\147\x6e\x49\144\40\x3d\40\x74\x63\x2e\x63\141\x6d\x70\x61\151\147\x6e\111\144\40\x20\101\116\x44\x20\x28\x74\x63\x2e\x73\164\x61\x74\165\163\40\75\x20\47\x73\x75\x63\143\x65\163\163\47\x20\117\x52\x20\164\x63\x2e\163\x74\141\x74\165\163\x20\x3d\x20\x27\x70\141\162\x74\x69\141\154\137\x65\x78\x69\x74\47\x20\117\122\x20\164\143\x2e\163\x74\x61\164\165\x73\40\75\x20\x27\160\141\x72\x74\151\141\x6c\137\163\x75\x63\143\145\x73\163\x27\51\x20\x57\110\x45\x52\105\x20\x74\x69\x63\x2e\x63\x6f\x6d\x70\x61\156\x79\x49\144\40\75\40\103\x2e\x63\157\155\160\141\156\x79\x49\x64\40\101\116\104\x20\164\x69\x63\x2e\155\x6f\x6e\145\171\137\162\145\143\145\x69\x76\x65\x64\137\x62\x79\x5f\x65\x73\143\162\157\167\x20\75\x20\x27\x59\x27\x29\40\x20\x61\163\x20\x74\157\x74\x61\154\137\x61\155\157\165\x6e\x74\x5f\151\156\166\x65\x73\164\145\144", FALSE); $this->db->select("\x43\117\x55\116\124\x28\x44\x49\x53\124\111\x4e\x43\x54\x28\x43\x4d\56\x63\141\155\x70\x61\151\147\x6e\x49\144\x29\51\x20\x61\163\x20\x6e\157\137\x6f\x66\x5f\x63\141\155\x70\x61\x69\x67\x6e\163", FALSE); $this->db->select("\103\x4f\x55\x4e\124\50\104\x49\123\124\111\116\103\124\x28\111\103\x2e\165\x73\145\x72\x49\144\x29\x29\40\141\163\40\x6e\157\137\x6f\x66\137\x69\156\166\145\163\x74\157\x72\163", FALSE); $this->db->select("\103\x4d\56\x73\164\141\x74\x75\x73", FALSE); $this->db->join($this->investorCompany . "\x20\111\x43", "\111\x43\x2e\143\157\155\x70\x61\156\x79\x49\x64\40\x3d\x20\103\56\x63\x6f\x6d\160\141\156\171\x49\144\40\101\x4e\104\40\x49\103\x2e\x61\155\157\x75\x6e\x74\137\151\156\x76\x65\163\x74\x65\144\x20\76\40\x30\40\x41\116\104\40\x49\103\x2e\x6d\x6f\x6e\x65\x79\x5f\x72\145\x63\145\x69\x76\x65\144\137\x62\x79\137\145\163\x63\x72\157\167\40\75\x20\x27\x59\x27", "\x4c\105\106\124"); $this->db->join($this->campaign . "\x20\103\115", "\103\x4d\56\143\157\155\160\141\x6e\171\111\144\40\75\x20\x43\56\x63\157\155\160\x61\x6e\171\111\144\40\101\116\x44\40\x28\x43\115\x2e\x73\x74\141\x74\165\163\x20\x3d\40\47\163\x75\143\143\x65\163\x73\x27\40\117\122\x20\103\115\56\x73\x74\141\164\165\163\x20\x3d\40\x27\x70\x61\x72\164\151\x61\x6c\137\x65\170\151\x74\x27\40\x4f\x52\x20\x43\115\x2e\163\164\141\164\x75\x73\40\x3d\40\47\160\x61\162\164\151\x61\x6c\x5f\x73\165\x63\143\145\x73\163\47\51", "\111\116\x4e\105\x52"); $this->db->where("\x28\103\101\123\x45\x20\x57\x48\x45\x4e\x20\50\103\x4d\56\163\164\x61\164\x75\163\40\x3d\x20\x27\160\141\162\x74\x69\x61\x6c\x5f\145\170\151\x74\47\x29\40\x54\110\105\116\x20\50\111\x43\56\x69\156\166\x65\163\164\157\x72\103\x6f\x6d\x70\141\156\x79\111\144\x20\x4e\x4f\124\40\x49\x4e\x20\x28\x53\105\x4c\x45\103\124\x20\x69\x6e\x76\x65\x73\x74\157\162\x43\157\155\x70\x61\x6e\x79\111\x64\40\x46\122\117\x4d\40\x74\142\x6c\x45\170\151\x74\123\x68\x61\x72\145\x52\x65\x67\x69\163\x74\x65\x72\x20\x57\110\105\122\105\x20\143\141\x6d\x70\141\151\x67\x6e\x49\144\x20\75\40\111\103\x2e\x63\x61\155\160\141\x69\147\x6e\x49\x64\51\x29\x20\x45\114\x53\x45\40\61\x20\x45\x4e\x44\51", NULL, FALSE); $this->db->where("\x28\x43\101\123\x45\40\127\110\x45\x4e\x20\50\x43\x4d\x2e\x73\164\x61\164\165\163\40\x3d\x20\47\x70\141\162\x74\151\x61\x6c\137\163\x75\143\x63\145\163\163\x27\51\x20\x54\x48\105\116\40\50\123\x43\x4d\x2e\x73\165\142\x43\141\155\160\141\x69\x67\156\111\x64\x20\111\123\40\116\x4f\x54\x20\x4e\x55\114\x4c\x29\40\x45\114\x53\x45\40\x31\x20\105\116\104\51", NULL, FALSE); $this->db->join("\164\x62\x6c\123\165\142\x43\x61\155\160\141\151\x67\156\x20\123\103\x4d", "\123\103\x4d\56\x63\141\x6d\x70\x61\151\147\x6e\x49\144\40\75\40\x43\115\x2e\x63\141\x6d\x70\141\x69\147\156\111\144\40\101\116\x44\x20\123\x43\115\x2e\x69\x73\x5f\154\141\165\x6e\x63\150\x20\x3d\x20\42\131\42\40\101\116\x44\40\123\103\x4d\56\163\x74\x61\x74\165\163\x3d\42\143\x6f\155\160\154\x65\x74\145\144\x22", "\114\x45\106\124"); $this->db->join($this->user . "\40\x55", "\x55\x2e\x75\x73\x65\162\x49\144\x20\75\40\x43\56\165\163\145\x72\111\144", "\x4c\105\106\x54"); $this->db->where("\x28\x55\56\165\163\x65\x72\137\x74\x79\x70\x65\x20\75\x20\47\145\x6e\164\162\x65\160\x72\x65\x6e\x65\165\162\47\x20\101\x4e\104\40\125\56\160\141\x72\145\156\164\137\151\x64\x20\75\40\x30\51"); $this->db->where("\x28\125\x2e\x65\155\141\151\x6c\40\x21\75\40\47\x27\x29"); $this->db->where("\x55\56\151\163\166\145\x72\x69\146\x69\145\x64", "\x59"); $this->db->where("\125\x2e\x61\143\x74\151\x76\145", "\x59"); $this->db->where("\125\56\160\x72\x6f\x66\x69\154\x65\123\x74\141\164\x75\x73", "\103\x4f\115\x50\114\105\x54\x45\x44"); $this->db->where("\125\56\162\x65\x67\151\163\164\x65\x72\x46\x72\x6f\155\111\144", AUID()); $this->db->having("\x74\157\x74\x61\x6c\137\141\x6d\157\165\156\x74\x5f\151\156\x76\x65\163\164\145\x64\x20\x3e", 0); if (array_key_exists("\143\x6f\155\x70\141\156\171\111\x64", $data) && $companyId > 0) { $this->db->where("\103\x2e\143\157\x6d\x70\141\156\171\111\144", $companyId); } $this->db->group_by("\103\x2e\143\157\x6d\160\x61\x6e\x79\111\144"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("\x63\157\155\160\x61\x6e\x79\137\156\141\155\145", "\x41\123\x43"); } $query = $this->db->get($this->company . "\40\103"); return $query; } function getAllExitCompany($data = array()) { extract($data); $this->db->select("\x43\56\x75\163\x65\162\111\144\x2c\x20\103\56\x63\157\x6d\x70\x61\156\x79\x49\x64\54\x20\103\x2e\x62\x72\x61\x6e\144\137\156\x61\155\x65\54\x20\103\x2e\x63\157\x6d\x70\x61\156\171\x5f\156\x61\x6d\x65\x2c\x20\x43\x2e\143\165\x72\x72\x65\156\164\x5f\166\x61\x6c\x75\141\x74\x69\157\156"); $this->db->select("\x28\x43\101\x53\105\x20\x57\110\105\x4e\x20\x28\x43\x2e\x62\x72\141\x6e\144\x5f\156\141\155\145\x20\111\x53\x20\x4e\125\x4c\114\x29\x20\124\110\105\116\x20\50\x43\56\143\x6f\x6d\160\141\156\x79\x5f\156\x61\x6d\x65\x29\x20\105\114\123\105\x20\50\x43\x4f\x4e\103\101\x54\50\103\x2e\142\x72\141\x6e\x64\137\x6e\141\x6d\x65\54\x20\x27\40\x28\47\x2c\40\103\56\143\x6f\x6d\x70\141\156\171\x5f\x6e\141\x6d\x65\x2c\40\x27\51\x20\x27\51\51\x20\x45\116\104\51\40\x61\163\40\x63\157\x6d\160\141\156\171\x5f\x6e\x61\155\145", FALSE); $this->db->select("\x43\117\x4e\103\101\x54\x5f\127\x53\50\x27\x20\x27\x2c\40\125\x2e\146\x69\162\x73\x74\137\x6e\x61\x6d\145\54\x20\x55\x2e\154\x61\x73\164\137\x6e\x61\x6d\x65\x29\40\x61\x73\x20\x6e\141\155\145", FALSE); $this->db->select("\50\x53\x45\114\x45\103\x54\40\x53\125\x4d\50\x61\155\x6f\x75\x6e\x74\137\x69\156\166\145\x73\164\x65\x64\x29\40\106\x52\117\x4d\40\x74\x62\x6c\111\x6e\166\145\x73\x74\157\x72\x43\157\155\160\141\x6e\x79\40\x74\x69\x63\40\111\x4e\116\x45\122\x20\x4a\117\x49\116\40\164\x62\154\x43\141\155\160\141\x69\147\x6e\40\x74\143\40\x4f\x4e\40\164\151\x63\56\x63\x61\155\160\x61\x69\147\156\111\x64\40\x3d\x20\x74\x63\56\x63\x61\x6d\x70\x61\151\147\156\x49\144\40\x20\101\x4e\104\40\164\143\x2e\x73\164\x61\164\x75\x73\40\x3d\x20\47\145\x78\x69\x74\x27\x20\x57\110\105\122\x45\40\x74\x69\143\x2e\x63\157\x6d\x70\141\x6e\x79\111\144\40\x3d\40\103\56\143\x6f\155\x70\x61\x6e\171\111\144\40\x41\116\104\40\164\151\143\x2e\155\x6f\156\x65\x79\x5f\162\x65\x63\145\x69\x76\145\x64\137\142\x79\x5f\145\x73\x63\162\157\167\40\x3d\x20\47\131\x27\51\40\x20\141\x73\40\x74\157\x74\x61\x6c\x5f\x61\155\x6f\165\156\x74\137\x69\156\x76\x65\163\164\x65\144", FALSE); $this->db->select("\x43\x4f\125\116\124\x28\104\x49\123\x54\x49\x4e\x43\x54\x28\x49\x43\56\x63\141\155\160\141\151\x67\156\x49\x64\51\51\x20\x61\x73\x20\156\157\137\x6f\146\x5f\143\141\x6d\x70\x61\x69\x67\156\163", FALSE); $this->db->select("\x43\x4f\x55\x4e\124\x28\x44\x49\x53\124\x49\116\103\124\x28\x49\103\x2e\165\163\145\162\x49\x64\51\x29\x20\x61\x73\40\156\x6f\137\157\x66\137\x69\x6e\x76\x65\163\x74\157\x72\163", FALSE); $this->db->join($this->investorCompany . "\x20\x49\x43", "\x49\x43\56\143\x6f\155\x70\141\x6e\x79\111\x64\x20\75\40\x43\56\x63\157\155\160\x61\156\171\x49\x64\x20\101\116\x44\40\x49\103\56\141\155\157\x75\156\164\x5f\x69\x6e\166\145\163\164\145\144\x20\76\40\x30\x20\x41\x4e\104\x20\111\103\x2e\155\157\x6e\145\x79\x5f\x72\145\143\145\151\x76\x65\x64\x5f\x62\171\137\145\163\143\162\x6f\x77\40\75\40\47\x59\x27", "\x4c\105\x46\x54"); $this->db->join($this->campaign . "\40\103\x4d", "\x43\115\56\143\x6f\x6d\x70\x61\156\171\x49\144\x20\x3d\x20\103\x2e\x63\157\155\x70\x61\x6e\x79\111\x64\x20\101\x4e\x44\x20\x28\103\x4d\x2e\163\164\141\164\x75\163\40\x3d\40\47\145\170\x69\164\x27\x29", "\x49\116\116\105\x52"); $this->db->join($this->user . "\40\x55", "\x55\56\x75\163\x65\162\x49\x64\x20\75\x20\103\56\165\x73\145\162\x49\144", "\114\105\106\x54"); $this->db->where("\50\125\56\165\x73\145\x72\137\x74\171\x70\145\x20\x3d\40\x27\x65\156\x74\x72\x65\x70\x72\x65\156\145\x75\162\x27\x20\x41\116\x44\x20\160\x61\162\145\156\x74\x5f\x69\x64\40\x3d\x20\60\51"); $this->db->where("\x28\x55\56\x65\x6d\141\151\154\x20\x21\x3d\40\47\x27\51"); $this->db->where("\125\x2e\x69\163\166\x65\162\x69\x66\151\x65\x64", "\131"); $this->db->where("\x55\x2e\141\143\x74\x69\166\x65", "\x59"); $this->db->where("\125\x2e\160\x72\157\x66\151\154\x65\x53\x74\x61\164\x75\163", "\x43\117\115\x50\114\105\x54\105\104"); $this->db->where("\125\56\x72\145\147\151\163\164\x65\162\106\x72\157\x6d\111\x64", AUID()); $this->db->having("\164\157\x74\x61\x6c\x5f\141\x6d\157\x75\x6e\164\x5f\x69\156\166\145\163\164\145\x64\40\76", 0); if (array_key_exists("\x63\157\155\160\141\156\x79\111\144", $data) && $companyId > 0) { $this->db->where("\103\56\x63\x6f\x6d\x70\141\x6e\171\111\144", $companyId); } $this->db->group_by("\103\56\143\157\155\x70\x61\x6e\x79\111\x64"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("\143\157\x6d\x70\141\x6e\171\x5f\x6e\x61\x6d\145", "\x41\x53\103"); } $query = $this->db->get($this->company . "\x20\x43"); return $query; } function getAllPartialExitCompany($data = array()) { extract($data); $this->db->select("\x43\x2e\x75\163\145\x72\111\x64\54\40\103\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x49\x64\x2c\40\103\x2e\142\x72\x61\x6e\x64\137\x6e\141\155\145\x2c\x20\103\56\143\x6f\155\160\141\x6e\171\137\x6e\141\x6d\145\54\40\103\x2e\143\x75\x72\x72\145\x6e\164\x5f\x76\x61\x6c\165\x61\164\x69\x6f\x6e"); $this->db->select("\50\x43\101\x53\105\x20\x57\x48\x45\116\40\50\x43\56\142\162\x61\156\x64\137\x6e\x61\155\145\x20\x49\x53\x20\x4e\125\x4c\114\51\40\124\x48\x45\116\x20\50\x43\x2e\x63\x6f\155\x70\x61\x6e\171\x5f\156\x61\155\145\x29\x20\x45\114\123\105\40\x28\103\x4f\116\x43\x41\x54\x28\x43\56\x62\x72\x61\156\x64\x5f\x6e\141\x6d\145\x2c\x20\47\40\50\x27\x2c\40\x43\x2e\143\157\155\160\141\156\x79\x5f\156\141\x6d\x65\54\x20\47\x29\x20\47\x29\51\40\x45\x4e\x44\x29\40\141\163\40\x63\157\x6d\x70\x61\x6e\x79\137\x6e\x61\155\145", FALSE); $this->db->select("\125\56\x63\165\x72\x72\145\156\x63\171\x2c\40\103\x4f\116\103\101\x54\137\127\123\50\x27\x20\x27\x2c\40\x55\x2e\x66\x69\x72\163\x74\x5f\156\x61\x6d\x65\54\x20\x55\x2e\154\141\163\x74\x5f\x6e\x61\155\145\x29\x20\x61\x73\x20\156\x61\x6d\145", FALSE); $this->db->select("\x28\123\105\x4c\105\103\124\40\123\x55\115\x28\141\155\x6f\x75\x6e\x74\x5f\151\x6e\x76\x65\163\x74\145\144\51\x20\x46\x52\x4f\x4d\40\x74\x62\x6c\x49\x6e\166\x65\163\x74\157\x72\103\157\155\x70\x61\x6e\171\x20\x74\151\143\40\111\x4e\116\x45\122\x20\x4a\117\x49\116\40\x74\x62\x6c\103\141\x6d\160\141\x69\x67\x6e\x20\164\x63\x20\x4f\116\40\x74\x69\143\56\x63\141\x6d\x70\x61\151\147\x6e\x49\144\x20\75\x20\x74\x63\x2e\143\141\x6d\160\141\151\147\156\111\144\x20\40\101\x4e\x44\x20\164\x63\x2e\163\x74\141\164\165\163\40\x3d\x20\47\x70\141\x72\164\x69\141\x6c\x5f\x65\170\x69\164\x27\x20\x57\110\105\x52\x45\40\164\151\x63\x2e\x63\157\155\x70\141\156\x79\x49\144\x20\75\40\x43\56\x63\157\155\x70\141\x6e\171\111\x64\40\x41\x4e\104\x20\x74\x69\x63\x2e\155\157\156\x65\x79\137\x72\x65\143\145\151\166\145\x64\x5f\142\171\x5f\x65\x73\x63\162\x6f\167\40\x3d\x20\47\x59\x27\x29\x20\40\x61\x73\x20\x74\157\x74\141\154\x5f\141\x6d\157\x75\156\x74\x5f\151\x6e\166\x65\163\x74\x65\144", FALSE); $this->db->select("\x28\x53\105\114\x45\x43\x54\40\x53\125\115\x28\162\145\164\x61\151\156\145\144\x5f\141\x6d\157\x75\156\x74\137\x69\x6e\166\145\x73\164\x65\144\51\x20\x46\122\x4f\115\40\x74\142\x6c\x49\x6e\166\145\x73\164\x6f\162\x43\x6f\x6d\x70\x61\156\x79\x20\x74\x69\143\40\111\x4e\x4e\105\122\x20\x4a\117\x49\116\40\x74\142\154\103\x61\x6d\160\x61\x69\147\156\x20\x74\x63\40\117\x4e\x20\164\x69\143\56\x63\x61\x6d\x70\x61\x69\147\156\111\x64\x20\75\x20\164\143\56\x63\x61\x6d\160\141\x69\147\156\x49\x64\x20\40\101\116\x44\x20\x74\143\56\x73\164\x61\x74\165\163\x20\75\x20\47\160\x61\x72\164\x69\x61\x6c\137\145\x78\x69\164\47\40\127\x48\105\x52\105\x20\164\x69\143\56\x63\157\155\x70\x61\x6e\x79\x49\144\40\x3d\40\103\x2e\x63\157\155\160\141\156\x79\111\x64\40\101\116\104\40\x74\151\143\56\155\x6f\x6e\145\x79\x5f\162\x65\143\x65\x69\x76\x65\x64\x5f\142\171\137\x65\163\143\x72\x6f\167\40\75\40\x27\x59\x27\x29\x20\40\x61\x73\x20\162\145\164\141\151\156\145\x64\x5f\141\x6d\x6f\165\x6e\x74\137\151\x6e\166\145\x73\x74\145\x64", FALSE); $this->db->select("\103\x4f\125\116\x54\x28\104\x49\x53\x54\111\116\x43\x54\x28\111\x43\56\143\x61\x6d\160\141\151\147\x6e\111\144\x29\x29\40\141\163\40\x6e\157\137\157\x66\137\143\141\x6d\x70\141\151\x67\156\163", FALSE); $this->db->select("\103\117\x55\x4e\124\x28\104\111\123\x54\x49\116\103\x54\x28\111\103\x2e\165\163\145\162\x49\x64\x29\x29\x20\141\x73\40\x6e\x6f\x5f\157\146\137\x69\x6e\x76\145\163\164\x6f\x72\163", FALSE); $this->db->join($this->investorCompany . "\40\111\103", "\x49\103\56\x63\x6f\x6d\x70\141\156\x79\111\144\40\75\x20\x43\56\x63\157\x6d\x70\x61\x6e\171\111\144\x20\x41\116\104\x20\x49\x43\56\141\155\x6f\165\156\x74\x5f\x69\156\166\x65\163\164\x65\144\40\x3e\x20\60\x20\101\x4e\104\x20\111\x43\56\x6d\x6f\x6e\x65\171\x5f\x72\x65\x63\x65\151\166\x65\144\137\142\x79\x5f\145\x73\143\x72\157\x77\x20\x3d\40\x27\131\x27", "\x4c\x45\x46\124"); $this->db->join($this->campaign . "\40\103\x4d", "\103\x4d\56\143\157\155\160\x61\156\x79\111\x64\x20\x3d\40\103\56\x63\157\x6d\x70\141\156\x79\111\144\40\x41\116\104\40\50\x43\115\56\x73\x74\x61\x74\165\x73\x20\x3d\40\x27\x70\141\x72\x74\151\x61\x6c\x5f\x65\x78\x69\164\x27\51", "\111\116\x4e\x45\122"); $this->db->join($this->user . "\x20\x55", "\x55\56\165\163\x65\162\x49\x64\40\75\40\x43\56\165\x73\145\x72\111\x64", "\114\x45\x46\x54"); $this->db->where("\50\125\56\165\163\x65\162\137\x74\x79\160\145\40\75\x20\47\x65\x6e\164\162\x65\x70\x72\145\x6e\x65\x75\x72\x27\40\101\x4e\x44\40\x70\141\x72\145\x6e\164\137\x69\x64\x20\x3d\x20\60\51"); $this->db->where("\50\x55\x2e\145\x6d\x61\151\x6c\x20\x21\x3d\40\x27\x27\x29"); $this->db->where("\x55\56\151\x73\166\x65\x72\151\x66\151\145\x64", "\131"); $this->db->where("\125\56\x61\143\x74\x69\x76\x65", "\131"); $this->db->where("\x55\x2e\160\x72\x6f\x66\x69\x6c\145\x53\164\141\x74\x75\163", "\103\x4f\115\x50\114\105\124\105\104"); $this->db->where("\125\56\x72\x65\147\x69\x73\164\145\162\x46\162\x6f\x6d\111\x64", AUID()); $this->db->where_in("\x43\x4d\x2e\163\x74\141\164\x75\x73", array("\160\141\162\164\151\x61\x6c\137\145\x78\151\164")); $this->db->having("\164\157\x74\141\154\137\141\x6d\157\x75\x6e\x74\x5f\151\x6e\166\145\163\x74\145\144\40\76", 0); if (array_key_exists("\143\x6f\155\160\x61\x6e\171\x49\144", $data) && $companyId > 0) { $this->db->where("\x43\x2e\143\x6f\155\x70\141\156\x79\x49\144", $companyId); } $this->db->order_by("\x63\157\155\x70\141\156\x79\x5f\x6e\141\155\145", "\101\x53\103"); $this->db->group_by("\x43\56\143\x6f\x6d\160\x61\x6e\171\x49\144"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("\103\x2e\x63\x6f\155\x70\x61\x6e\x79\x5f\x6e\141\x6d\145", "\101\x53\x43"); } $query = $this->db->get($this->company . "\x20\103"); return $query; } function getAllWindingUpCompany($data = array()) { extract($data); $this->db->select("\103\x2e\165\x73\x65\x72\111\144\54\x20\103\56\143\x6f\155\x70\x61\x6e\171\111\x64\x2c\x20\103\56\x62\162\x61\x6e\x64\x5f\156\141\155\145\x2c\x20\x43\56\143\157\155\160\141\156\171\137\x6e\141\155\x65\54\40\x43\56\143\x75\162\x72\x65\x6e\164\137\x76\x61\x6c\x75\141\164\x69\x6f\156"); $this->db->select("\x28\x43\101\123\x45\40\x57\x48\x45\116\40\x28\103\x2e\x62\162\x61\156\x64\x5f\156\x61\x6d\x65\40\111\x53\x20\x4e\x55\x4c\x4c\x29\40\x54\110\x45\x4e\x20\x28\103\x2e\x63\157\x6d\x70\141\x6e\x79\x5f\x6e\141\x6d\145\x29\x20\105\114\x53\105\x20\50\103\x4f\116\103\101\x54\x28\103\x2e\x62\162\141\x6e\144\137\156\x61\x6d\145\x2c\x20\47\40\50\47\x2c\40\x43\56\143\x6f\x6d\160\x61\x6e\x79\x5f\x6e\141\155\x65\54\x20\47\51\x20\47\51\x29\40\x45\x4e\104\x29\40\141\x73\40\143\x6f\x6d\160\141\156\x79\x5f\x6e\x61\x6d\x65", FALSE); $this->db->select("\103\117\x4e\103\101\x54\x5f\x57\x53\50\x27\40\47\54\x20\125\x2e\146\151\x72\163\x74\x5f\x6e\141\x6d\x65\x2c\x20\125\56\x6c\x61\163\164\137\x6e\x61\x6d\145\x29\x20\x61\163\40\156\x61\x6d\x65", FALSE); $this->db->select("\50\123\x45\114\x45\x43\124\x20\x53\x55\x4d\x28\141\x6d\x6f\165\x6e\x74\137\151\x6e\x76\145\163\x74\x65\144\51\x20\106\122\x4f\115\40\x74\x62\154\x49\156\166\145\163\164\x6f\x72\103\157\x6d\160\x61\156\x79\x20\x74\151\143\x20\x49\116\x4e\105\x52\40\112\117\111\116\x20\x74\x62\x6c\x43\141\155\160\141\151\x67\x6e\x20\164\x63\x20\117\116\40\x74\x69\x63\56\x63\141\x6d\x70\141\x69\147\156\111\144\x20\75\40\164\x63\x2e\143\141\155\160\x61\x69\147\156\111\x64\x20\40\x41\x4e\x44\40\x74\x63\x2e\163\164\141\x74\x75\163\40\75\40\47\x77\151\x6e\144\151\156\147\x5f\165\160\47\x20\127\110\x45\x52\x45\x20\x74\151\143\56\143\x6f\x6d\x70\141\156\171\x49\x64\40\x3d\x20\103\x2e\143\157\x6d\160\x61\156\x79\x49\144\40\x41\116\104\x20\x74\x69\143\x2e\x6d\x6f\156\145\171\137\162\145\x63\145\x69\166\145\x64\137\142\171\x5f\x65\163\x63\162\x6f\167\x20\75\x20\x27\x59\x27\51\40\40\141\x73\40\164\x6f\x74\141\154\x5f\x61\155\x6f\x75\x6e\x74\x5f\151\156\166\x65\x73\x74\x65\144", FALSE); $this->db->select("\x43\x4f\125\116\x54\x28\x44\111\123\x54\x49\x4e\103\x54\x28\x49\x43\x2e\143\141\155\160\141\x69\147\156\111\x64\x29\x29\40\x61\163\x20\x6e\157\137\157\x66\x5f\143\141\155\160\141\x69\147\x6e\163", FALSE); $this->db->select("\x43\117\x55\x4e\124\50\104\111\123\x54\x49\116\103\124\50\x49\x43\56\165\x73\x65\162\x49\x64\x29\x29\40\x61\163\40\156\x6f\x5f\157\x66\137\151\156\166\145\x73\x74\x6f\x72\163", FALSE); $this->db->join($this->investorCompany . "\x20\111\x43", "\x49\x43\x2e\x63\157\155\160\141\156\x79\x49\144\40\75\40\103\56\x63\157\x6d\x70\x61\156\171\x49\x64\40\101\x4e\104\40\111\x43\x2e\x61\155\157\165\156\x74\137\x69\x6e\x76\x65\x73\x74\145\x64\40\76\x20\x30\x20\101\x4e\104\x20\x49\103\56\155\x6f\156\145\x79\137\162\x65\143\x65\x69\166\145\x64\137\x62\x79\x5f\x65\x73\143\162\157\x77\40\75\40\47\131\47", "\x4c\x45\106\x54"); $this->db->join($this->campaign . "\40\103\x4d", "\x43\x4d\56\143\157\x6d\160\x61\156\x79\x49\144\40\x3d\x20\103\56\143\157\155\x70\141\x6e\171\x49\x64\40\101\x4e\x44\40\x28\103\x4d\56\x73\164\141\x74\165\163\40\x3d\40\x27\167\x69\156\x64\151\156\147\x5f\x75\160\x27\x29", "\x49\x4e\x4e\105\x52"); $this->db->join($this->user . "\40\125", "\125\x2e\165\163\145\x72\111\144\x20\75\40\103\56\x75\163\145\x72\111\x64", "\x4c\x45\106\x54"); $this->db->where("\x28\125\56\165\163\x65\162\137\x74\171\x70\x65\40\75\40\47\x65\x6e\x74\162\x65\160\162\x65\x6e\x65\165\x72\x27\x20\x41\x4e\104\x20\160\141\x72\x65\156\164\x5f\151\x64\x20\75\x20\60\x29"); $this->db->where("\50\x55\x2e\x65\x6d\141\x69\154\x20\41\75\x20\47\x27\x29"); $this->db->where("\x55\56\x69\x73\166\145\162\x69\146\x69\145\x64", "\131"); $this->db->where("\125\56\141\x63\x74\151\x76\145", "\131"); $this->db->where("\x55\x2e\160\162\x6f\x66\151\154\x65\123\x74\141\164\165\163", "\x43\117\x4d\120\114\x45\124\x45\104"); $this->db->where("\125\x2e\162\145\x67\x69\x73\164\145\162\x46\x72\157\155\111\144", AUID()); $this->db->having("\x74\157\x74\141\154\137\141\x6d\x6f\165\x6e\164\x5f\151\x6e\x76\x65\163\164\x65\x64\x20\76", 0); if (array_key_exists("\x63\157\x6d\x70\x61\156\171\x49\x64", $data) && $companyId > 0) { $this->db->where("\x43\x2e\143\x6f\x6d\160\x61\x6e\x79\x49\x64", $companyId); } $this->db->group_by("\x43\56\x63\157\x6d\x70\x61\156\171\111\144"); if ($orderby != '' && $sortColName != '') { $this->db->order_by($sortColName, $orderby); } else { $this->db->order_by("\x63\157\155\160\141\x6e\171\x5f\156\141\x6d\145", "\101\123\103"); } $query = $this->db->get($this->company . "\40\103"); return $query; } function getTotalInvestmentsByCurrency($type = "\160\157\x72\x74\146\x6f\154\x69\x6f", $companyId = 0) { $this->db->select("\x43\117\116\103\x41\124\x28\x46\x4f\x52\115\101\124\x28\123\x55\115\x28\x49\x43\x2e\141\155\x6f\165\x6e\x74\x5f\151\156\x76\x65\x73\x74\x65\144\x29\x2c\x20\x32\54\40\42\x65\156\137\x49\116\42\51\x2c\40\x22\40\42\54\x20\x55\x2e\x63\165\x72\x72\x65\x6e\143\x79\x29\x20\141\163\40\141\155\x6f\165\x6e\x74\137\151\x6e\x76\145\163\x74\x65\144", FALSE); $this->db->from("\x74\142\154\111\156\x76\145\x73\x74\157\x72\103\157\155\x70\x61\x6e\171\x20\111\x43"); $this->db->join("\x74\x62\x6c\x43\157\155\x70\141\x6e\x79\x20\x43", "\103\x2e\x63\157\155\160\x61\156\171\111\144\40\75\x20\x49\103\x2e\143\x6f\x6d\x70\x61\156\171\x49\x64", "\x6c\x65\146\x74"); $this->db->join("\x74\x62\x6c\103\141\155\x70\141\x69\x67\156\x20\x43\115", "\103\115\x2e\x63\141\155\160\x61\x69\x67\156\111\x64\40\x3d\x20\111\103\56\x63\x61\155\x70\x61\151\147\x6e\111\144", "\x69\156\156\145\162"); $this->db->join("\x74\x62\x6c\125\163\145\x72\163\x20\125", "\125\56\x75\163\145\162\x49\x64\40\x3d\40\103\x4d\56\x75\163\x65\x72\x49\144\40\101\116\x44\40\125\x2e\165\163\145\162\x5f\164\171\x70\x65\40\75\40\x22\145\x6e\164\x72\x65\160\x72\x65\x6e\x65\x75\x72\42\40\x41\x4e\104\x20\x55\56\x70\x61\162\145\x6e\164\137\x69\x64\x20\x3d\40\60\40\101\x4e\104\x20\x55\56\x65\155\141\x69\x6c\40\x21\75\40\x22\42\x20\x41\x4e\x44\x20\125\56\x69\x73\x76\145\x72\151\146\x69\145\x64\x20\75\40\42\131\x22\40\x41\116\x44\40\x55\x2e\x61\x63\x74\x69\x76\x65\40\75\x20\x22\131\42\40\x41\116\104\40\x55\56\x70\x72\157\146\x69\x6c\145\123\164\x61\x74\x75\x73\40\75\x20\x22\x43\117\x4d\x50\x4c\x45\x54\x45\104\x22", "\151\156\156\x65\162"); $this->db->where("\111\x43\x2e\141\155\157\165\156\164\137\x69\156\166\145\163\164\145\x64\40\x3e", 0); $this->db->where("\x49\103\56\155\x6f\156\x65\x79\x5f\x72\145\x63\x65\x69\x76\x65\x64\x5f\142\x79\137\145\163\143\162\157\167", "\x59"); if ($type == "\160\157\x72\164\x66\x6f\x6c\x69\x6f") { $this->db->join("\x74\x62\154\x53\x75\x62\103\x61\x6d\x70\141\x69\x67\156\40\123\x43\x4d", "\x53\x43\x4d\x2e\x63\141\155\x70\x61\151\147\156\x49\144\x20\75\40\103\x4d\x2e\x63\x61\x6d\x70\141\151\147\156\111\144\40\101\x4e\104\40\x53\103\115\56\x69\163\x5f\154\141\165\156\x63\150\40\75\x20\x22\131\42\40\101\116\104\x20\123\103\115\x2e\x73\x74\141\x74\x75\163\x20\x3d\40\x22\143\157\x6d\x70\154\x65\x74\145\144\x22", "\154\145\146\164"); $this->db->where_in("\x43\x4d\56\163\164\141\164\x75\163", array("\x73\165\x63\x63\x65\163\163", "\x70\x61\162\x74\151\x61\154\137\145\170\151\164", "\160\141\x72\x74\151\141\x6c\137\x73\165\143\x63\x65\x73\163")); $this->db->where("\50\x43\115\x2e\x73\x74\x61\x74\x75\x73\40\41\75\40\x22\x70\x61\162\164\x69\x61\154\137\x65\x78\x69\164\42\40\x4f\x52\x20\111\x43\x2e\151\x6e\166\145\163\164\157\x72\x43\157\x6d\160\141\x6e\x79\111\144\40\116\117\124\x20\111\116\40\50\123\x45\114\105\103\124\x20\x69\156\166\x65\x73\164\157\x72\103\x6f\x6d\x70\x61\x6e\171\111\144\x20\106\x52\x4f\x4d\40\x74\x62\154\105\x78\151\164\123\150\x61\x72\145\122\145\x67\151\163\x74\x65\x72\40\x57\x48\x45\122\x45\40\143\141\x6d\160\x61\x69\x67\156\x49\144\40\x3d\x20\x49\103\x2e\x63\141\155\160\141\x69\x67\x6e\111\x64\51\51"); $this->db->where("\x28\103\x4d\56\163\164\x61\x74\x75\163\x20\x21\75\40\x22\160\141\162\164\x69\x61\x6c\137\x73\x75\x63\x63\x65\163\163\x22\40\117\122\40\x53\x43\115\x2e\163\165\142\x43\x61\x6d\160\141\x69\x67\156\111\x64\40\111\x53\x20\116\117\124\x20\x4e\125\114\114\x29"); } else { if ($type == "\145\x78\x69\164") { $this->db->where_in("\x43\x4d\x2e\x73\x74\x61\164\165\163", array("\145\x78\x69\164")); } else { if ($type == "\x70\141\162\164\x69\141\x6c\105\170\151\164") { $this->db->where_in("\103\115\x2e\x73\x74\x61\164\165\163", array("\x70\x61\162\x74\151\141\154\x5f\145\x78\x69\x74")); } else { if ($type == "\x77\x69\156\x64\x69\156\x67\x55\x70") { $this->db->where_in("\x43\115\x2e\163\164\141\x74\165\x73", array("\167\x69\x6e\x64\x69\x6e\147\x5f\x75\160")); } } } } if ($companyId > 0) { $this->db->where("\111\x43\x2e\143\x6f\155\x70\x61\156\171\111\x64", $companyId); } $this->db->where("\x55\56\143\165\162\162\x65\x6e\x63\x79\x20\x49\x53\40\x4e\117\x54\x20\x4e\x55\114\114"); $this->db->group_by("\125\x2e\143\165\162\162\145\x6e\x63\x79"); $this->db->having("\123\x55\115\50\111\103\56\x61\x6d\157\165\156\164\137\x69\156\x76\145\x73\x74\x65\144\x29\40\x3e\40\60"); $this->db->order_by("\103\56\x63\x6f\155\x70\141\156\171\137\156\x61\x6d\145", "\101\x53\103"); $query = $this->db->get(); return $query; } function geCompanyCombo($type = "\x70\x6f\x72\x74\146\157\x6c\x69\x6f", $companyId = 0) { $array = explode("\x2c", $companyId); $this->db->select("\103\56\x75\x73\145\162\111\144\54\40\103\x2e\x63\x6f\x6d\160\x61\x6e\171\x49\144\54\40\103\56\142\x72\141\156\144\137\x6e\x61\155\x65\54\40\103\56\x63\x6f\155\160\x61\156\171\137\x6e\141\x6d\x65"); $this->db->select("\50\x43\x41\123\x45\40\127\110\105\116\40\x28\x43\56\x62\162\x61\156\x64\137\156\x61\155\145\x20\111\123\40\x4e\125\114\x4c\x29\40\x54\x48\105\116\40\x28\x43\x2e\143\x6f\155\160\141\156\x79\x5f\x6e\141\155\x65\51\x20\x45\x4c\x53\105\40\50\x43\117\x4e\x43\x41\124\50\x43\x2e\142\162\x61\156\144\x5f\x6e\x61\x6d\145\54\x20\47\x20\50\x27\x2c\40\x43\56\143\x6f\155\160\x61\x6e\171\137\156\141\155\145\x2c\40\47\x29\x20\x27\x29\51\40\x45\x4e\104\51\40\141\x73\x20\143\x6f\x6d\160\141\x6e\171\137\x6e\x61\155\145", FALSE); $this->db->select("\x43\x4d\x2e\x73\164\x61\164\x75\163", FALSE); $this->db->join($this->investorCompany . "\x20\x49\x43", "\x49\103\56\x63\x6f\155\x70\141\156\x79\x49\144\40\75\x20\103\x2e\143\x6f\x6d\160\141\156\171\x49\144\40\x41\x4e\x44\x20\x49\103\56\141\x6d\157\165\156\x74\137\x69\x6e\x76\145\163\x74\145\x64\40\x3e\x20\x30\x20\101\x4e\x44\x20\111\x43\x2e\155\x6f\156\x65\x79\x5f\x72\145\x63\x65\x69\166\x65\x64\137\142\x79\137\x65\x73\143\162\157\x77\x20\75\40\x27\131\47", "\114\x45\x46\124"); if ($type == "\x70\x6f\162\x74\146\x6f\154\x69\157") { $this->db->join($this->campaign . "\40\x43\x4d", "\103\x4d\56\143\x6f\x6d\160\x61\156\x79\111\144\40\x3d\40\103\x2e\143\157\x6d\x70\141\156\171\x49\x64\40\101\116\104\40\x28\x43\115\x2e\x73\x74\141\164\x75\163\x20\75\x20\47\163\x75\143\x63\145\163\163\x27\x20\117\122\40\103\115\x2e\163\x74\141\x74\165\163\x20\x3d\x20\47\x70\x61\x72\x74\x69\141\154\x5f\x65\170\151\x74\47\x20\x4f\122\40\103\115\x2e\163\x74\141\x74\x75\163\40\75\40\x27\160\141\162\164\151\141\x6c\137\x73\x75\x63\143\x65\163\x73\47\51", "\x49\x4e\x4e\x45\122"); $this->db->where("\50\103\x41\123\x45\x20\127\x48\x45\x4e\40\50\x43\x4d\x2e\163\164\141\164\x75\163\40\x3d\x20\47\x70\141\x72\x74\151\x61\x6c\x5f\145\170\151\x74\47\x29\x20\124\x48\x45\116\x20\50\x49\103\56\151\x6e\x76\145\163\x74\x6f\x72\x43\157\x6d\160\x61\156\x79\111\144\40\116\x4f\124\x20\x49\x4e\x20\x28\123\x45\114\x45\x43\124\40\x69\x6e\166\145\163\164\157\162\103\157\155\x70\141\x6e\171\111\144\40\x46\x52\117\x4d\x20\164\142\154\x45\x78\x69\x74\x53\x68\x61\x72\x65\122\x65\147\x69\x73\x74\x65\x72\x20\127\110\105\122\x45\40\143\x61\155\x70\141\151\x67\156\x49\144\40\x3d\40\x49\x43\56\x63\141\155\x70\x61\x69\147\x6e\x49\144\51\x29\x20\105\x4c\123\x45\x20\61\40\x45\x4e\104\51", NULL, FALSE); $this->db->where("\x28\x43\x41\x53\x45\x20\127\110\105\116\40\x28\103\x4d\x2e\163\x74\x61\x74\x75\x73\x20\75\x20\47\x70\x61\x72\x74\x69\x61\154\x5f\x73\165\x63\x63\x65\163\163\47\x29\40\124\x48\105\116\x20\50\x53\103\x4d\x2e\x73\x75\142\103\141\155\x70\141\151\x67\x6e\x49\x64\40\x49\x53\40\116\117\x54\x20\x4e\x55\x4c\114\x29\x20\105\114\x53\105\40\x31\x20\x45\116\x44\51", NULL, FALSE); $this->db->join("\164\142\154\123\165\142\103\x61\x6d\160\141\x69\147\x6e\x20\x53\103\115", "\x53\x43\115\56\x63\141\155\x70\x61\x69\147\x6e\x49\x64\40\75\40\103\x4d\56\143\x61\155\x70\x61\x69\x67\x6e\111\x64\40\x41\x4e\x44\x20\123\x43\115\x2e\x69\x73\x5f\x6c\x61\165\156\143\x68\40\x3d\40\x22\x59\42\40\101\x4e\x44\40\x53\x43\x4d\x2e\163\x74\x61\x74\165\163\x3d\42\x63\157\x6d\160\x6c\x65\x74\x65\x64\42", "\114\105\106\x54"); } else { if ($type == "\145\x78\151\164") { $this->db->join($this->campaign . "\40\103\x4d", "\103\x4d\x2e\143\x6f\155\x70\x61\156\171\111\144\x20\x3d\x20\103\56\x63\x6f\155\160\141\x6e\171\x49\144\40\x41\x4e\104\x20\50\x43\x4d\x2e\163\164\141\164\165\163\x20\x3d\40\x27\145\170\151\164\x27\51", "\x49\x4e\116\105\122"); } else { if ($type == "\160\x61\162\x74\151\141\154\x45\170\x69\164") { $this->db->join($this->campaign . "\x20\x43\x4d", "\x43\115\56\x63\x6f\155\x70\141\156\x79\111\x64\40\75\40\103\x2e\x63\157\x6d\160\x61\x6e\171\x49\x64\x20\x41\116\x44\x20\50\103\115\56\163\x74\x61\x74\x75\x73\40\x3d\x20\x27\160\141\x72\164\151\141\x6c\x5f\x65\170\x69\164\47\x29", "\111\x4e\x4e\105\122"); } else { if ($type == "\x77\151\156\x64\x69\x6e\x67\x55\160") { $this->db->join($this->campaign . "\40\103\115", "\103\x4d\56\143\157\155\160\x61\x6e\x79\111\144\x20\x3d\x20\103\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x49\144\40\x41\116\x44\x20\50\103\x4d\56\163\x74\x61\164\165\x73\40\75\x20\47\167\151\156\144\151\156\x67\x5f\165\x70\x27\x29", "\111\116\116\x45\122"); } } } } $this->db->join($this->user . "\x20\x55", "\125\56\x75\x73\145\162\111\x64\x20\x3d\40\x43\56\165\x73\145\x72\111\x64", "\114\x45\106\x54"); $this->db->where("\x55\56\151\163\166\145\x72\x69\x66\151\x65\x64", "\131"); $this->db->where("\125\x2e\141\x63\164\x69\x76\x65", "\x59"); $this->db->where("\x55\56\160\x72\157\146\x69\x6c\x65\x53\x74\141\x74\x75\x73", "\103\117\x4d\x50\114\105\x54\x45\104"); $this->db->where("\x55\x2e\162\x65\x67\x69\x73\164\x65\x72\106\162\x6f\155\111\x64", AUID()); $this->db->where("\x49\103\56\155\157\156\x65\171\x5f\x72\x65\143\145\151\x76\145\x64\x5f\x62\171\x5f\x65\x73\143\162\x6f\x77", "\x59"); $this->db->where("\x49\x43\x2e\141\x6d\x6f\165\x6e\x74\x5f\x69\x6e\166\x65\163\x74\x65\x64\40\76", 0); $this->db->group_by("\103\56\143\157\x6d\160\141\156\171\x49\144"); $this->db->order_by("\x63\x6f\155\x70\x61\x6e\171\x5f\156\x61\155\145", "\101\123\103"); $query = $this->db->get($this->company . "\x20\103"); $frmcombo = ''; if ($query->num_rows() > 0) { $frmcombo .= "\x3c\157\160\164\x69\157\156\x20\x76\x61\x6c\x75\145\75\x22\x22\x3e\55\55\x2d\123\x65\x6c\x65\x63\x74\40\x43\157\x6d\160\141\x6e\171\55\55\x2d\74\x2f\x6f\x70\164\x69\x6f\x6e\x3e"; foreach ($query->result() as $combo) { $frmcombo .= "\x3c\x6f\x70\x74\151\157\156\x20\166\141\154\165\x65\75" . $combo->companyId . "\40"; if (in_array($combo->companyId, $array)) { $frmcombo .= "\163\145\x6c\145\143\164\x65\144\x3d\x27\x74\162\165\145\47"; } $frmcombo .= "\76"; $frmcombo .= $combo->company_name . "\x3c\x2f\157\160\164\x69\x6f\156\x3e"; } } return $frmcombo; } public function exportCompanyInvestmentInfo($companyId = 0, $type = "\160\x6f\x72\164\146\x6f\154\x69\x6f", $start_date = '', $end_date = '') { $this->db->select("\x28\103\x41\123\105\x20\127\110\x45\116\40\50\x43\56\x62\162\141\156\144\137\x6e\x61\x6d\x65\40\111\123\40\116\125\114\114\51\x20\x54\110\x45\x4e\x20\50\x43\56\x63\x6f\155\160\x61\x6e\171\137\156\141\155\x65\51\40\x45\x4c\123\105\40\50\x43\x4f\x4e\x43\101\x54\50\103\56\142\x72\x61\156\144\137\156\x61\155\145\x2c\x20\47\40\x28\47\54\40\103\56\x63\157\x6d\160\x61\x6e\x79\x5f\156\141\x6d\145\54\x20\x27\x29\x20\47\x29\x29\x20\105\x4e\x44\51\x20\x61\x73\x20\x27\103\x6f\x6d\x70\141\156\171\x20\116\x61\x6d\145\x27", FALSE); $this->db->select("\x43\115\56\143\x61\155\x70\141\x69\147\x6e\x5f\156\141\155\145\40\141\163\40\42\103\141\x6d\x70\141\151\147\156\40\x4e\141\155\145\42\54\40\103\x4d\x2e\163\x6c\x75\x67\x20\141\x73\40\42\x43\141\155\160\x61\x69\147\156\x20\x43\157\x64\x65\42\x2c\40\103\115\x2e\145\156\x64\137\x64\141\164\x65\40\141\x73\40\x22\105\x6e\144\40\x44\x61\164\145\x22"); $this->db->select("\123\x43\56\x73\x75\142\x5f\x63\x61\155\x70\141\x69\147\156\137\x6e\141\x6d\145\x20\141\x73\x20\x22\x54\x72\x61\x6e\x63\x68\x65\x20\116\x61\x6d\145\x22"); $this->db->select("\x43\x4f\x4e\x43\101\x54\137\127\x53\50\x22\40\42\x2c\x20\125\x2e\146\151\x72\163\x74\137\x6e\x61\155\x65\x2c\x20\125\x2e\x6c\x61\163\164\137\156\x61\155\145\x29\x20\141\163\40\42\x49\x6e\166\x65\x73\164\x6f\162\x20\x4e\141\x6d\145\x22", FALSE); $this->db->select("\125\56\145\155\x61\151\154\40\x61\x73\40\42\111\x6e\x76\x65\x73\x74\x6f\x72\40\105\155\141\151\154\42", FALSE); $this->db->select("\125\56\163\154\x75\x67\40\141\163\x20\x22\x49\x6e\166\145\163\164\x6f\x72\40\103\x6f\x64\145\x22"); $this->db->select("\115\124\56\155\x65\x6d\x62\145\x72\163\150\x69\x70\137\x74\171\160\145\x20\x61\x73\x20\x22\x4d\145\155\142\145\162\x73\x68\x69\160\40\x54\171\160\x65\x22"); $this->db->select("\x49\x2e\x69\156\163\164\162\x75\x6d\x65\x6e\x74\137\156\x61\x6d\145\40\141\x73\40\x22\111\x6e\163\164\x72\x75\x6d\145\x6e\x74\x20\116\x61\155\145\42"); $this->db->select("\111\x43\x2e\x70\162\x69\143\x65\137\x70\145\162\x5f\x73\150\x61\x72\x65\x20\141\x73\40\x22\120\162\x69\143\x65\40\120\x65\x72\40\111\156\x73\164\x72\165\x6d\145\156\x74\x22\x20\54\40\x49\103\56\x6e\157\x5f\x6f\x66\x5f\163\150\x61\162\x65\x20\x61\163\x20\42\116\x75\155\x62\145\162\40\157\146\40\111\156\x73\164\162\165\155\145\156\164\x73\x22\54\x20\111\103\56\141\x6d\157\x75\156\164\137\151\x6e\x76\145\x73\164\145\x64\x20\x61\163\40\42\x49\x6e\x76\145\163\164\155\x65\156\x74\40\101\155\x6f\x75\156\164\42\54\40\x49\x43\x2e\151\x6e\x76\145\x73\x74\x65\144\x5f\144\141\164\145\40\x61\x73\40\42\x49\x6e\166\x65\x73\x74\x65\144\40\104\141\x74\145\42"); $this->db->select("\x43\56\x63\x75\x72\162\x65\x6e\164\137\151\156\163\164\x72\165\x6d\145\156\x74\x5f\x70\x72\x69\143\145\40\x61\x73\40\x22\103\x75\162\x72\x65\156\164\x20\111\x6e\x73\x74\x72\165\155\145\x6e\164\40\120\x72\x69\x63\145\x22"); $this->db->select("\50\x43\101\x53\x45\40\x57\110\x45\x4e\x20\50\x28\x47\122\117\x55\x50\137\103\117\116\x43\x41\124\x28\x46\115\x2e\x6d\x65\x6d\x62\145\x72\137\x6e\141\155\x65\x29\x29\x20\x49\123\x20\116\x55\114\114\51\x20\124\x48\105\116\40\x43\x4f\x4e\x43\x41\x54\x5f\x57\x53\50\x27\x20\47\54\40\x55\56\x66\x69\162\x73\x74\137\156\x61\155\x65\54\x20\x55\56\154\x61\x73\164\x5f\156\141\155\x65\x29\x20\105\114\123\x45\40\50\x47\122\x4f\125\120\137\103\117\x4e\x43\101\x54\x28\x46\x4d\56\x6d\x65\x6d\142\x65\x72\x5f\x6e\x61\x6d\145\51\x29\x20\105\116\104\51\40\141\x73\x20\x27\115\x65\x6d\x62\x65\162\x20\116\x61\x6d\145\47", FALSE); $this->db->select("\x47\x52\117\x55\x50\x5f\103\x4f\x4e\103\x41\124\50\x46\115\56\163\154\165\147\x29\40\141\163\40\47\x4d\x65\155\142\145\x72\40\103\157\144\x65\47", FALSE); $this->db->select("\102\104\x2e\x6e\x61\155\145\x5f\x6f\x66\137\x61\x63\143\x6f\x75\156\x74\x5f\150\157\154\x64\x65\x72\x20\141\163\40\42\x41\143\x63\157\x75\156\x74\40\x48\x6f\154\144\145\x72\x20\x4e\141\155\145\x22\54\x42\x44\56\142\x61\156\x6b\137\156\141\x6d\145\x20\141\x73\x20\x22\x42\x61\156\153\x20\116\x61\155\x65\42\x2c\102\104\x2e\141\143\143\x6f\x75\x6e\x74\x5f\156\x75\155\x62\145\162\40\x61\163\40\x22\101\143\143\x6f\x75\156\164\x20\x4e\165\155\142\x65\x72\x22\54\x42\104\x2e\151\146\x73\143\137\143\x6f\144\145\x20\141\x73\40\42\x49\x46\x53\103\40\103\x6f\144\145\42\x2c\x42\104\x2e\164\x72\141\x6e\163\141\x63\x74\137\144\x61\164\x65\40\141\x73\40\x22\x54\x72\141\x6e\163\x61\143\164\x20\104\x61\x74\x65\42\x20"); $this->db->select("\x44\101\x54\105\50\111\103\x2e\x73\x68\x61\162\x65\x5f\x63\x65\162\164\x69\146\151\x63\141\164\145\137\141\160\160\162\157\x76\145\144\x5f\x64\x61\164\145\51\x20\x61\x73\40\42\125\x70\144\141\164\145\x64\x20\x44\x61\x74\x65\x22"); $this->db->join($this->user . "\40\x55", "\x55\x2e\165\x73\145\162\x49\144\x20\75\40\111\x43\56\165\x73\145\x72\111\x64", "\x6c\x65\x66\164"); $this->db->join($this->membership_type . "\x20\x4d\124", "\x4d\x54\x2e\x69\x64\x20\x3d\40\125\x2e\x69\156\x76\x65\163\x74\x6f\162\x5f\155\145\x6d\142\145\162\163\150\x69\x70\137\x74\171\160\x65", "\154\145\146\164"); $this->db->join($this->instrument . "\x20\111", "\111\56\151\x6e\163\164\x72\165\155\145\156\x74\111\x64\x20\75\40\111\x43\56\x69\x6e\163\164\162\165\155\145\156\x74\111\144", "\x6c\145\146\164"); $this->db->join($this->company . "\x20\x43", "\x43\56\x63\157\155\160\141\x6e\x79\111\x64\x20\75\40\111\x43\56\143\x6f\155\160\x61\x6e\171\111\x64", "\x4c\105\106\x54"); $this->db->join("\164\142\154\123\x75\142\x43\x61\155\x70\141\x69\x67\x6e\x20\x53\103", "\x53\103\56\x73\165\x62\103\x61\x6d\160\x61\151\147\156\111\144\x20\75\x20\x49\x43\x2e\x73\x75\142\x43\141\155\160\141\x69\147\156\x49\144", "\x6c\145\x66\164"); $this->db->join("\164\x62\154\x42\141\156\x6b\x44\145\164\x61\x69\154\163\40\102\x44", "\111\103\56\x63\141\x6d\160\x61\x69\x67\x6e\111\x64\40\75\40\102\104\x2e\143\141\x6d\160\141\x69\x67\x6e\x49\x64", "\154\x65\x66\164"); if ($type == "\160\157\162\x74\x66\157\154\151\x6f") { $this->db->join($this->campaign . "\40\103\115", "\x43\x4d\x2e\143\x61\155\x70\141\151\x67\156\111\144\x20\x3d\40\111\x43\56\143\141\155\160\x61\151\x67\x6e\111\144\x20\x41\116\x44\40\x28\x43\x4d\x2e\x73\164\141\164\x75\x73\40\x3d\40\47\x73\x75\143\143\145\x73\x73\47\40\117\x52\40\103\115\x2e\x73\x74\x61\x74\165\163\40\x3d\40\x27\160\141\x72\x74\x69\x61\x6c\x5f\145\170\x69\x74\47\x20\x4f\x52\40\x43\x4d\x2e\163\164\141\x74\x75\x73\40\x3d\40\47\x70\141\162\164\x69\x61\154\x5f\163\x75\x63\x63\145\163\x73\x27\51", "\111\116\116\105\x52"); $this->db->select("\103\x4d\56\x73\164\x61\164\x75\163", FALSE); $this->db->where("\x28\x43\x41\x53\x45\x20\x57\x48\x45\116\40\x28\103\115\x2e\163\164\x61\x74\165\x73\x20\75\x20\47\x70\141\x72\164\x69\x61\154\137\145\170\x69\164\x27\x29\40\124\x48\x45\116\40\x28\x49\103\56\x69\156\x76\145\x73\x74\x6f\x72\103\x6f\x6d\160\x61\156\171\x49\144\40\x4e\117\124\40\111\x4e\x20\50\x53\x45\x4c\x45\x43\x54\40\151\156\166\145\163\164\157\x72\x43\x6f\155\160\141\x6e\x79\x49\144\40\106\x52\117\x4d\x20\164\x62\x6c\105\x78\151\164\x53\x68\141\162\x65\x52\x65\147\151\x73\x74\145\162\40\x57\110\105\122\105\x20\143\x61\155\160\x61\x69\147\156\111\144\40\75\40\111\x43\x2e\143\141\x6d\x70\x61\151\x67\156\x49\144\x29\x29\x20\105\x4c\123\x45\x20\61\x20\105\116\x44\51", NULL, FALSE); $this->db->where("\x28\103\x41\123\x45\40\127\x48\x45\116\x20\x28\103\115\x2e\x73\164\x61\x74\165\163\40\x3d\x20\47\160\x61\162\164\151\x61\x6c\x5f\x73\x75\x63\x63\145\163\x73\x27\x29\40\124\x48\x45\x4e\x20\x28\123\103\x4d\56\163\165\142\x43\141\x6d\160\141\x69\x67\x6e\111\144\40\x49\x53\40\x4e\117\124\x20\x4e\x55\x4c\114\51\40\105\x4c\x53\105\40\61\40\105\x4e\x44\x29", NULL, FALSE); $this->db->join("\164\142\x6c\123\165\x62\103\141\155\x70\141\151\147\x6e\x20\x53\103\x4d", "\x53\x43\115\56\143\141\x6d\160\141\x69\147\156\x49\144\40\75\x20\103\x4d\x2e\143\141\155\160\x61\x69\x67\x6e\111\144\40\101\116\104\x20\123\x43\x4d\56\151\x73\137\x6c\141\165\156\143\x68\40\75\x20\42\131\x22\x20\101\x4e\x44\x20\123\103\115\56\x73\164\x61\x74\x75\163\75\42\143\157\155\160\154\x65\164\x65\x64\42", "\x4c\105\106\124"); } else { if ($type == "\x65\x78\151\x74") { $this->db->select("\x49\x43\x2e\162\x65\x74\x61\x69\156\x65\x64\x5f\x61\x6d\x6f\x75\x6e\164\137\151\x6e\166\145\163\x74\x65\144\40\141\x73\40\x22\122\145\164\141\x69\156\x65\x64\x20\111\x6e\166\x65\163\164\x6d\x65\x6e\x74\x20\101\x6d\157\x75\x6e\164\42\54\40\x49\x43\56\x72\x65\164\x61\x69\156\x65\x64\x5f\156\157\137\x6f\x66\137\163\x68\141\162\145\40\141\x73\x20\x22\x52\145\x74\141\151\x6e\x65\x64\x20\x4e\x75\155\142\x65\162\40\x6f\146\x20\111\156\x73\x74\x72\x75\x6d\x65\156\x74\40\42"); $this->db->select("\111\103\x2e\145\x78\x69\x74\137\x64\141\164\x65\40\x61\163\x20\x22\105\170\x69\x74\x20\104\141\164\x65\x22\x2c\x20\111\103\56\x63\154\x6f\163\x75\x72\x65\x5f\144\x61\164\x65\x20\141\163\40\42\x43\x6c\157\163\165\162\145\x20\104\x61\164\x65\x22\54\40\x73\x68\x61\x72\x65\137\150\157\x6c\144\x69\x6e\147\137\163\x74\141\164\165\163\40\141\x73\40\42\x53\150\x61\162\145\x20\x48\x6f\154\144\151\156\x67\x20\123\164\141\x74\x75\163\x22"); $this->db->join($this->campaign . "\40\103\115", "\x43\115\56\143\141\155\x70\141\x69\x67\156\x49\144\x20\75\40\x49\x43\56\143\x61\155\x70\141\x69\147\156\x49\144\40\101\116\104\40\x28\103\115\56\x73\x74\x61\164\165\x73\x20\x3d\x20\x27\x65\170\151\164\x27\51", "\x49\116\116\x45\x52"); } else { if ($type == "\160\x61\162\164\151\x61\x6c\x45\170\x69\x74") { $this->db->select("\x45\x53\x52\x2e\151\156\x76\145\163\164\x6d\x65\156\164\137\x72\x65\x74\141\151\x6e\x65\144\x5f\166\141\x6c\x75\x65\40\x61\163\x20\x22\122\145\x74\141\x69\x6e\145\144\x20\x49\156\x76\145\163\x74\x6d\x65\156\164\40\101\155\x6f\165\x6e\x74\x22\54\40\x45\x53\x52\x2e\x69\x6e\x73\x74\162\x75\x6d\145\156\x74\137\162\145\x74\x61\x69\x6e\145\x64\x20\141\x73\x20\42\122\145\164\141\151\156\x65\x64\x20\116\x75\155\142\145\x72\40\157\x66\40\111\156\x73\x74\x72\x75\x6d\145\156\x74\42"); $this->db->select("\105\x53\122\x2e\x65\x78\151\164\x5f\x64\141\x74\145\40\141\x73\x20\42\105\170\151\164\x20\x44\141\x74\145\x22\x2c\x20\x45\x53\x52\x2e\x63\x6c\x6f\x73\x75\x72\x65\x5f\144\x61\164\145\x20\x61\163\x20\42\103\154\x6f\x73\x75\x72\145\40\x44\141\164\145\42\x2c\x20\163\150\x61\x72\145\137\150\x6f\x6c\144\151\156\x67\137\163\x74\x61\x74\x75\x73\40\141\163\x20\42\x53\x68\141\x72\145\40\110\157\154\x64\151\156\147\40\123\164\141\164\165\163\x22"); $this->db->join("\x74\x62\x6c\105\x78\x69\x74\123\150\x61\x72\x65\122\145\x67\151\x73\x74\145\x72\40\x45\123\122", "\105\x53\x52\56\x69\x6e\x76\145\163\164\157\x72\103\x6f\x6d\160\x61\156\171\x49\144\40\75\x20\x49\103\x2e\151\x6e\166\x65\x73\164\x6f\x72\x43\x6f\x6d\160\x61\156\171\x49\144", "\114\105\106\x54"); $this->db->join($this->campaign . "\x20\103\115", "\x43\x4d\56\x63\141\155\160\x61\x69\x67\x6e\111\144\40\75\x20\x49\x43\56\143\x61\x6d\160\x61\x69\x67\156\x49\144\x20\101\x4e\104\x20\x28\103\115\56\163\x74\x61\164\165\x73\40\75\x20\47\x70\141\162\x74\151\141\x6c\x5f\x65\x78\x69\164\47\x29", "\111\x4e\116\105\122"); $this->db->select("\x28\x28\x49\x43\x2e\141\155\x6f\x75\156\x74\137\x69\156\166\x65\x73\164\x65\x64\51\40\55\x20\50\x43\x41\123\105\x20\127\x48\x45\x4e\40\x28\111\103\56\162\145\x74\x61\151\156\x65\x64\x5f\141\x6d\x6f\x75\x6e\164\137\151\156\x76\x65\x73\x74\145\x64\x20\111\x53\x20\116\x4f\124\x20\x4e\x55\114\x4c\51\40\124\110\x45\x4e\x20\x28\105\123\122\56\151\156\166\145\163\164\155\x65\156\164\x5f\162\x65\x74\141\151\156\x65\x64\137\x76\x61\x6c\165\145\51\x20\x45\x4c\x53\105\40\x28\111\x43\56\141\155\157\165\x6e\164\137\151\156\166\145\163\x74\145\144\x29\40\105\116\104\x29\x29\40\141\x73\40\122\145\x74\x61\x69\156\145\x64\x20\101\155\157\x75\156\164", FALSE); } else { if ($type == "\167\151\x6e\144\x69\156\x67\125\160") { $this->db->join($this->campaign . "\x20\103\x4d", "\103\x4d\x2e\143\x61\155\x70\141\x69\x67\156\111\x64\40\x3d\x20\111\103\x2e\143\141\155\x70\x61\151\147\x6e\x49\144\40\x41\116\104\40\x28\x43\115\x2e\163\x74\x61\x74\x75\163\x20\75\x20\x27\x77\151\156\144\x69\x6e\147\137\x75\160\47\51", "\x49\116\x4e\105\x52"); } } } } $this->db->join($this->familyMember . "\x20\x46\x4d", "\106\111\x4e\x44\x5f\111\116\137\123\105\124\50\50\x46\115\x2e\155\x65\155\142\145\162\111\x64\51\x2c\50\111\103\56\x66\141\155\151\154\x79\115\145\x6d\142\145\162\111\144\x29\51", "\154\145\x66\164"); $this->db->join($this->user . "\x20\x45\116\124", "\105\116\x54\x2e\165\x73\x65\162\111\144\x20\x3d\40\103\56\165\x73\145\x72\111\144", "\114\105\x46\124"); $this->db->where("\x49\x43\x2e\155\x6f\x6e\x65\x79\137\162\145\143\145\x69\x76\145\144\137\x62\x79\x5f\145\163\143\162\x6f\167", "\x59"); $this->db->where("\x49\103\56\141\x6d\157\x75\156\x74\137\151\x6e\x76\145\x73\x74\145\x64\40\x3e", 0); if ($companyId > 0) { $this->db->where("\111\103\x2e\x63\157\x6d\x70\141\156\171\x49\x64", $companyId); } $this->db->where("\105\x4e\x54\56\x69\x73\x76\x65\x72\151\x66\x69\x65\144", "\x59"); $this->db->where("\105\x4e\x54\56\141\x63\164\151\166\145", "\x59"); $this->db->where("\105\x4e\124\56\160\162\157\146\151\x6c\145\x53\164\x61\164\165\163", "\x43\117\115\120\x4c\105\x54\105\x44"); $this->db->where("\105\116\124\56\x72\145\147\151\x73\x74\x65\162\106\162\157\155\x49\144", AUID()); if (!empty($start_date) && !empty($end_date)) { $this->db->where("\103\x4d\x2e\x65\156\x64\137\x64\x61\164\145\40\102\105\x54\x57\x45\x45\x4e\x20\42" . date("\x59\55\155\55\x64", strtotime($start_date)) . "\42\x20\141\x6e\144\40\x22" . date("\x59\x2d\x6d\x2d\x64", strtotime($end_date)) . "\42"); } $this->db->order_by("\103\x2e\x63\157\155\x70\141\156\x79\137\156\x61\x6d\x65", "\x41\123\103"); $this->db->order_by("\x55\x2e\146\x69\162\163\x74\x5f\156\x61\x6d\x65", "\x41\123\x43"); if ($type == "\160\x61\x72\x74\151\x61\154\105\170\x69\x74") { $this->db->group_by("\50\103\x41\123\105\x20\127\110\105\116\40\x45\123\122\56\151\144\40\111\x53\40\116\117\124\40\116\125\x4c\x4c\40\x54\110\x45\116\40\105\123\x52\56\x69\144\x20\105\114\123\105\x20\x49\x43\x2e\151\x6e\x76\x65\163\164\157\162\103\157\155\x70\x61\x6e\x79\111\144\40\105\116\104\51"); $this->db->order_by("\105\x53\122\x2e\x65\x78\151\164\137\x64\x61\x74\x65", "\104\105\x53\x43"); } else { $this->db->group_by("\111\x43\56\x69\156\x76\x65\x73\164\157\162\x43\157\155\x70\x61\156\x79\x49\x64"); } $query = $this->db->get($this->investorCompany . "\x20\111\103"); return $query; } function getCompanyNameById($companyId) { $this->db->select("\50\103\x41\123\x45\40\127\110\x45\x4e\40\50\142\162\141\x6e\x64\137\156\x61\x6d\145\40\x49\123\x20\x4e\x55\x4c\x4c\51\x20\124\x48\x45\x4e\x20\50\x63\157\155\160\141\156\171\137\156\141\155\x65\x29\40\x45\x4c\x53\105\x20\50\142\x72\x61\x6e\144\137\156\141\x6d\145\51\x20\105\x4e\x44\51\x20\141\x73\x20\x63\157\x6d\160\141\156\171\137\x6e\141\155\145", FALSE); $this->db->where("\143\x6f\x6d\x70\141\x6e\171\111\x64", $companyId); $query = $this->db->get($this->company); $company_name = ''; if ($query->num_rows() > 0) { $company_name = $query->row()->company_name; } return $company_name; } }
Function Calls
None |
Stats
MD5 | 4f7954beb032bbc2565ae5f126e34b3c |
Eval Count | 0 |
Decode Time | 221 ms |