AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.216.192
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/www/lrsys_apps/leo/application/plugins/module_imobles/helpers/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/www/lrsys_apps/leo/application/plugins/module_imobles/helpers/api/CRMHelper.php
<?php

include_once "APIUtils.php";
include_once __DIR__ . "/../../helpers/api/CRMScenariosHelper.php";
include_once __DIR__ . "/../../helpers/api/CRMGoalsHelper.php";
include_once __DIR__ . "/../../helpers/api/CRMJourneyTasksHelper.php";

class CRMHelper {

    private $apiUtils;
    private $crmScenariosHelper;
    private $crmGoalsHelper;
    private $crmJourneyTasksHelper;

    public function __construct() {
        $this->apiUtils = new APIUtils();
        $this->crmScenariosHelper = new CRMScenariosHelper();
        $this->crmGoalsHelper = new CRMGoalsHelper();
        $this->crmJourneyTasksHelper = new CRMJourneyTasksHelper();
        
    }

    public function listMywalletProps($clientID = null){
        $filter = $this->apiUtils->getInputFilter();

        if($clientID === null){
            try {
                $client = $this->apiUtils->crmAccount($filter);
                $clientID = $client->id;
            } catch (Exception $e) {
                return $this->apiUtils->apiError(401, $e->getMessage());
            }
        }

        $scenarios = $this->crmScenariosHelper->listScenarios($clientID);
        $goals = $this->crmGoalsHelper->listGoals($clientID);
        $journeyTasks = $this->crmJourneyTasksHelper->listJourneyTasks($clientID);
        $dataResult = [
            'scenarios' => $scenarios['results']['scenarios'],
            'goals' => $goals['results']['goals'],
            'journeys' => $journeyTasks['results']['journeys']
        ];
        return $dataResult;
    }

    public function login(){
        $filter = $this->apiUtils->getInputFilter();

        try {
            $client = $this->apiUtils->crmAutoLogin($filter);
        } catch (Exception $e) {
            return $this->apiUtils->apiError(401, $e->getMessage());
        }
        $dataResult = $this->listMywalletProps($client->id);
        $clientDetails = $this->apiUtils->clientDetails($client);
        $dataResult = array_merge($clientDetails, $dataResult);
        $output = array(
            "results" => $dataResult,
        );

        return $output;
    }

    public function listMywalletPropsApi(){
        $filter = $this->apiUtils->getInputFilter();
        try {
            $client = $this->apiUtils->crmAccount($filter);
            $clientID = $client->id;
        } catch (Exception $e) {
            return $this->apiUtils->apiError(401, $e->getMessage());
        }
        $dataResult = $this->listMywalletProps($client->id);
        $clientDetails = $this->apiUtils->clientDetails($client);
        $dataResult = array_merge($clientDetails, $dataResult);
        $output = array(
            "results" => $dataResult,
        );
        return $output;

    }
}

Anon7 - 2022
AnonSec Team