403Webshell
Server IP : 23.111.136.34  /  Your IP : 216.73.216.136
Web Server : Apache
System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : meusitei ( 1072)
PHP Version : 5.6.40
Disable Function : show_source, system, shell_exec, passthru, proc_open
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/meusitei/public_html/painel/geradoresintegracao/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/meusitei/public_html/painel/geradoresintegracao/123i.php
<?php

// Topo
$dom = new DOMDocument("1.0", "utf-8");
$root = $dom->createElement("Carga");
$dom->appendChild($root);
$dom->formatOutput = true;
/*
  $o = $dom->createAttribute("xmlns");
  $root->appendChild($o);
  $o1 = $dom->createTextNode("http://www.vivareal.com/schemas/1.0/VRSync");
  $o->appendChild($o1);
 */

$oo = $dom->createAttribute("xmlns:xsi");
$root->appendChild($oo);
$o2 = $dom->createTextNode("http://www.w3.org/2001/XMLSchema-instance");
$oo->appendChild($o2);

$ooo = $dom->createAttribute("xmlns:xsd");
$root->appendChild($ooo);
$o3 = $dom->createTextNode("http://www.w3.org/2001/XMLSchema");
$ooo->appendChild($o3);

/*
  $oo = $dom->createAttribute("xmlns:xsi");
  $root->appendChild($oo);

  $o2 = $dom->createTextNode("http://www.w3.org/2001/XMLSchema-instance");
  $oo->appendChild($o2);

  $ooo = $dom->createAttribute("xmlns:xsd");
  $root->appendChild($ooo);
  $o3 = $dom->createTextNode("http://www.w3.org/2001/XMLSchema");
  $ooo->appendChild($o3);
 */

// fim do topo
// header
///// OBRIGATORIO - INICIO
/*
  $Configuracao = $dom->createElement("Configuracao");
  $root->appendChild($Configuracao);

  $Provider = $dom->createElement("RetornoViaWebservice");
  $Configuracao->appendChild($Provider);
  $titulositee = $dom->createTextNode('0');
  $Provider->appendChild($titulositee);
 */
///// OBRIGATORIO - FIM
//fim do header
//inicio do Listings
$Listings = $dom->createElement("Imoveis");
$root->appendChild($Listings);

$imoveisintegrados = explode('-', $portal['imoveis']);

foreach ($imoveisintegrados as $campo) {
    $imovel_invalido_123 = '';
    if (@$infoimovel[$campo] != null) {
//echo $campo.'1';
// create child element
    $campo = $infoimovel[$campo];
    $imovelvalido = 'nao';
    $validar = '1';
    if (($campo['valor'] != null) && ($campo['areautil'] != null) && ($campo['areatotal'] != null) && ($campo['dormitorio'] != null) && ($campo['suite'] != null) && ($campo['banheiro'] != null) && ($campo['garagem'] != null) && ($campo['descricaodoimovel'] != null) && ($campo['cep_bairro'] != null) && ($campo['cep_cidade'] != null) && ($campo['cep_estado'] != null) && ($campo['cep'] != null)) {
        $imovelvalido = 'sim';
        if($campo['status'] != '0'){
            $imovelvalido = 'nao';
            $imovel_invalido_123 .= 'Status do Imóvel: Arquivado'.'%';
        }
        if ($imovelvalido == 'sim') {
                $validar = '0';
            /////
            if ($campo['dormitorio'] > 5) {
                
            } else {
                if (($campo['dormitorio'] == null) || ($campo['dormitorio'] == 0)) {
                    $campo['dormitorio'] = 0;
                }
            }

            if ($campo['banheiro'] > 5) {
                
            } else {
                if (($campo['banheiro'] == null) || ($campo['banheiro'] == 0)) {
                    $campo['banheiro'] = 0;
                }
            }

            if ($campo['suite'] > 5) {
                
            } else {
                if (($campo['suite'] == null) || ($campo['suite'] == 0)) {
                    $campo['suite'] = 0;
                }
            }

            if ($campo['garagem'] > 5) {
                
            } else {
                if (($campo['garagem'] == null) || ($campo['garagem'] == 0)) {
                    $campo['garagem'] = 0;
                }
            }

            if ($campo['cozinha'] > 0) {
                $campo['cozinha'] = 'Sim';
            } else {
                $campo['cozinha'] = 'Não';
            }

            if ($campo['dormitorio'] == null) {
                $campo['dormitorio'] = '0';
            }
            if ($campo['banheiro'] == null) {
                $campo['banheiro'] = '0';
            }
            if ($campo['suite'] == null) {
                $campo['suite'] = '0';
            }
            if ($campo['areautil'] == null) {
                $campo['areautil'] = '0';
            }
            if ($campo['areatotal'] == null) {
                $campo['areatotal'] = '0';
            }

            /////

            if ($campo['negocio'] == 'Locação') {
                $campo['negocio'] = 'Aluguel';
            }
            $imovel = $dom->createElement("Imovel");
            $Listings->appendChild($imovel);

            $pegarcodigo = $this->acaoglobal(array('integracoes', 'id'), 'get', 9);
            $iwdados = unserialize($pegarcodigo['dados']);

            $CodigoImovel = $dom->createElement("CodigoCliente");
            $imovel->appendChild($CodigoImovel);
            $codigoValue = $dom->createTextNode($iwdados['codigocentral']);
            $CodigoImovel->appendChild($codigoValue);

            $CodigoImovel = $dom->createElement("CodigoImovel");
            $imovel->appendChild($CodigoImovel);
            $codigoValue = $dom->createTextNode($campo['cod_referencia']);
            $CodigoImovel->appendChild($codigoValue);

            $imoveltipo = $campo['tipo'];
            if ($campo['tipo'] == 'Comercial') {
                $imoveltipo = 'negocio';
            }
            if ($campo['subtipoimovel'] == 'Galpão') {
                $imoveltipo = 'galpao';
            }
            if ($campo['subtipoimovel'] == 'Loja') {
                $imoveltipo = 'loja';
            }
           

            ////////////////////////////////////////////////////////////// CATEGORIAS - INICIO
            $subtipo = '';
            $subtipocateg = '';
            if ($campo['tipo'] == 'Apartamento') {
                if ($campo['subtipoimovel'] == 'Padrão') {
                    $imoveltipo = 'apartamento';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Alto Padrão') {
                    $imoveltipo = 'apartamento';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Luxo') {
                    $imoveltipo = 'apartamento';
                    $imoveltipo = '';
                    $subtipo = '';
                }
                if ($campo['subtipoimovel'] == 'Kitnete') {
                    $imoveltipo = 'kitnet';
                    $subtipo = 'residencial';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Cobertura') {
                    $imoveltipo = 'cobertura';
                    $subtipo = 'residencial';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Duplex') {
                    $imoveltipo = 'apartamento duplex';
                    $subtipo = 'apartamento padrao';
                    $subtipocateg = 'duplex';
                }
                if ($campo['subtipoimovel'] == 'Triplex') {
                    $imoveltipo = 'apartamento';
                    $subtipo = 'triplex';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Loft') {
                    $imoveltipo = 'loft';
                    $subtipo = 'loft';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Loft Duplex') {
                    $imoveltipo = 'loft';
                    $subtipo = 'loft';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Loft Triplex') {
                    $imoveltipo = 'loft';
                    $subtipo = 'loft';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobreloja') {
                    $imoveltipo = 'apartamento';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Flat') {
                    $imoveltipo = 'flat';
                    $subtipo = 'flat';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Village') {
                    $imoveltipo = 'apartamento';
                    $subtipo = 'Village';
                    $subtipocateg = '';
                }
            } elseif ($campo['tipo'] == 'Casa') {
                if ($campo['subtipoimovel'] == 'Padrão') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Alvenaria') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Madeira') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Térreo') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Em condomínio') {
                    $imoveltipo = 'casa em condominio';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Em vila fechada') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobrado Padrão') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobrado em condomínio') {
                    $imoveltipo = 'casa em condominio';
                    $subtipo = 'casa de condominio';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobrado em vila fechada') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobrado Duplex') {
                    $imoveltipo = 'sobrada';
                    $subtipo = 'casa padrao';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobrado Triplex') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Assobradada') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Geminada') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Village') {
                    $imoveltipo = 'casa';
                    $subtipo = 'Village';
                    $subtipocateg = '';
                }                
            } elseif ($campo['tipo'] == 'Rural') {
                if ($campo['subtipoimovel'] == 'Chácara') {
                    $imoveltipo = 'chacara';
                    $subtipo = 'chacara';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Chácara em condomínio') {
                    $imoveltipo = 'chacara';
                    $subtipo = 'residencial';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Fazenda') {
                    $imoveltipo = 'fazenda';
                    $subtipo = 'fazenda';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sítio') {
                    $imoveltipo = 'sitio';
                    $subtipo = 'sitio';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Haras') {
                    $imoveltipo = 'rural';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Comercial') {
                    $imoveltipo = 'rural';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Estância') {
                    $imoveltipo = 'rural';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Lavoura') {
                    $imoveltipo = 'rural';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Granja') {
                    $imoveltipo = 'rural';
                    $subtipo = '';
                    $subtipocateg = '';
                }
            } elseif ($campo['tipo'] == 'Terreno') {
                if ($campo['subtipoimovel'] == 'Em rua') {
                    $imoveltipo = 'terreno';
                    $subtipo = 'residencial';
                    $subtipocateg = '';
                } elseif ($campo['subtipoimovel'] == 'Em condomínio') {
                    $imoveltipo = 'terreno em condominio';
                    $subtipo = 'loteamento/condominio';
                    $subtipocateg = '';
                } elseif ($campo['subtipoimovel'] == 'Em loteamento') {
                    $imoveltipo = 'terreno';
                    $subtipo = '';
                    $subtipocateg = '';
                } elseif ($campo['subtipoimovel'] == 'Comercial') {
                    $imoveltipo = 'area';
                    $subtipo = 'comercial';
                    $subtipocateg = '';
                } elseif ($campo['subtipoimovel'] == 'Área industrial') {
                    $imoveltipo = 'area';
                    $subtipo = 'industrial';
                    $subtipocateg = '';
                } elseif ($campo['subtipoimovel'] == 'Para empreendimento') {
                    $imoveltipo = 'area';
                    $subtipo = 'com/res';
                    $subtipocateg = '';
                } else {
                    $subtipo = 'terreno padrao';
                    $subtipocateg = '';
                }
            } elseif ($campo['tipo'] == 'Comercial') {
                if ($campo['subtipoimovel'] == 'Negócio') {
                    $imoveltipo = 'comercial';
                    $subtipo = 'sala comercial';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Loja') {
                    $imoveltipo = 'comercial';
                    $subtipo = 'loja';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sala') {
                    $imoveltipo = 'comercial';
                    $subtipo = 'sala comercial';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Prédio Inteiro') {
                    $imoveltipo = 'comercial';
                    $subtipo = 'predio inteiro';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Casa') {
                    $imoveltipo = 'casa';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Loja de shopping') {
                    $imoveltipo = 'comercial';
                    $subtipo = 'loja de shopping/centro comercial';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Sobrado') {
                    $imoveltipo = 'predio comercial';
                    $subtipo = '';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Armazém') {
                    $imoveltipo = 'galpao';
                    $subtipo = 'galpao/deposito/armazem';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Depósito') {
                    $imoveltipo = 'galpao';
                    $subtipo = 'galpao/deposito/armazem';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Galpão') {
                   $imoveltipo = 'galpao';
                    $subtipo = 'galpao/deposito/armazem';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Industria') {
                    $imoveltipo = 'comercial/industrial';
                    $subtipo = 'galpao/deposito/armazem';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Hotel') {
                    $imoveltipo = 'hotel';
                    $subtipo = 'hotel';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Motel') {
                    $imoveltipo = 'pousada';
                    $subtipo = 'pousada/chale';
                    $subtipocateg = '';
                }
                if ($campo['subtipoimovel'] == 'Pousada') {
                    $imoveltipo = 'pousada';
                    $subtipo = 'pousada/chale';
                    $subtipocateg = '';
                }
            }
            
            $Category = $dom->createElement("TipoImovel");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($imoveltipo);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("SubTipoImovel");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($subtipo);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("CategoriaImovel");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($subtipocateg);
            $Category->appendChild($CategoryValue);

            ////////////////////////////////////////////////////////////// CATEGORIAS - FIM
            $Category = $dom->createElement("TituloImovel");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['tipo'] . ' para ' . $campo['negocio'] . ' em ' . $campo['cep_cidade'] . '/' . $campo['cep_estado']);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("Modelo");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode('Simples');
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("UF");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['cep_estado']);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("Cidade");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['cep_cidade']);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("Bairro");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['cep_bairro']);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("Endereço");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['cep_logradouro']);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("Numero");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['cep_numero']);
            $Category->appendChild($CategoryValue);

            $Category = $dom->createElement("CEP");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['cep']);
            $Category->appendChild($CategoryValue);

            if (($campo['negocio'] == 'Venda') || ($campo['negocio'] == 'Lançamento')) {
                $valor = $campo['valor3'];
                $valoraluguel = '0';
            } else {
                $valor = '0';
                $valoraluguel = $campo['valor3'];  
            }
            
            $Category = $dom->createElement("PrecoVenda");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($valor);
            $Category->appendChild($CategoryValue);
            
            if($campo['negocio'] == 'Temporada'){
            $Category = $dom->createElement("PrecoLocacaoTemporada");    
            }else{
            $Category = $dom->createElement("PrecoLocacao");
            }
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($valoraluguel);
            $Category->appendChild($CategoryValue);            
            
            if($campo['negocio'] == 'Temporada'){
                $campo['valor_condominio2'] = $campo['valor_condominio_temporada2'];
            }
            
            if ($campo['valor_condominio2'] == '') {
                $campo['valor_condominio2'] = 0;
            }
            $Category = $dom->createElement("PrecoCondominio");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['valor_condominio2']);
            $Category->appendChild($CategoryValue);

            if ($campo['valor_iptu2'] != '') {

                $Category = $dom->createElement("PrecoIptuImovel");
                $imovel->appendChild($Category);
                $CategoryValue = $dom->createTextNode($campo['valor_iptu2']);
                $Category->appendChild($CategoryValue);
            }
            
            $campo['areautil2'] = explode(',', $campo['areautil2']);
            
            $Category = $dom->createElement("AreaUtil");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['areautil2'][0]);
            $Category->appendChild($CategoryValue);
            
            if ($campo['areatotal2'] != '') {
                $campo['areatotal2'] = explode(',', $campo['areatotal2']);
                $Category = $dom->createElement("AreaTotal");
                $imovel->appendChild($Category);
                $CategoryValue = $dom->createTextNode($campo['areatotal2'][0]);
                $Category->appendChild($CategoryValue);
            }
            
            if ($campo['negocio'] == 'Temporada') {
                $url = $dom->createElement("QtdPessoasTemporada");
                $imovel->appendChild($url);
                $urlValue = $dom->createTextNode($campo['qtd_pessoas']);
                $url->appendChild($urlValue);
            }
            
            $Category = $dom->createElement("QtdDormitorios");
            $imovel->appendChild($Category);
            $CategoryValue = $dom->createTextNode($campo['dormitorio']);
            $Category->appendChild($CategoryValue);
                        
            if ($campo['banheiro'] != '') {
                $url = $dom->createElement("QtdBanheiros");
                $imovel->appendChild($url);
                $urlValue = $dom->createTextNode($campo['banheiro']);
                $url->appendChild($urlValue);
            }

            if ($campo['suite'] != '') {
                $url = $dom->createElement("QtdSuites");
                $imovel->appendChild($url);
                $urlValue = $dom->createTextNode($campo['suite']);
                $url->appendChild($urlValue);
            }

            if ($campo['garagem'] != '') {
                $url = $dom->createElement("QtdVagas");
                $imovel->appendChild($url);
                $urlValue = $dom->createTextNode($campo['garagem']);
                $url->appendChild($urlValue);
            }
            /*
            $url = $dom->createElement("QtdElevador");
            $imovel->appendChild($url);
            $urlValue = $dom->createTextNode(0);
            $url->appendChild($urlValue);

            $url = $dom->createElement("QtdSalas");
            $imovel->appendChild($url);
            $urlValue = $dom->createTextNode(0);
            $url->appendChild($urlValue);

            $url = $dom->createElement("QtdAndar");
            $imovel->appendChild($url);
            $urlValue = $dom->createTextNode(0);
            $url->appendChild($urlValue);
            */
            /*
              if ($campo['andar'] != '') {
              $url = $dom->createElement("Andar");
              $imovel->appendChild($url);
              $urlValue = $dom->createTextNode($campo['andar']);
              $url->appendChild($urlValue);
              }
             */
            
            $caracteristicas = unserialize($campo['caracteristicas']);          
                        
                if ($caracteristicas[0] != '') {                   
                    
                   
                   $detalhess = $dom->createElement("Detalhes");
                   $imovel->appendChild($detalhess);
                   
                    foreach ($caracteristicas as $detalhe) { 
                        
                            if ($detalhe == '474'){
                                $detalhe  = 'Coffee Shop';
                            }if($detalhe == '473'){
                                $detalhe  = 'Closet';
                            }if($detalhe == '472'){
                                $detalhe  = 'Cinema';
                            }if($detalhe == '471'){
                                $detalhe  = 'Churrasqueira';
                            }if($detalhe == '470'){
                                $detalhe  = 'Children Care';
                            }if($detalhe == '469'){
                                $detalhe  = 'Cerca';
                            }if($detalhe == '468'){
                                $detalhe  = 'Centro de estética';
                            }if($detalhe == '467'){
                                $detalhe  = 'Central telefônica';
                            }if($detalhe == '466'){
                                $detalhe  = 'Caseiro';
                            }if($detalhe == '465'){
                                $detalhe  = 'Casa de Fundo';
                            }if($detalhe == '464'){
                                $detalhe  = 'Casa de Caseiro';
                            }if($detalhe == '463'){
                                $detalhe  = 'Casa de Boneca';
                            }if($detalhe == '462'){
                                $detalhe  = 'Carpete';
                            }if($detalhe == '461'){
                                $detalhe  = 'Car Wash';
                            }if($detalhe == '460'){
                                $detalhe  = 'Campo de Golfe';
                            }if($detalhe == '459'){
                                $detalhe  = 'Campo de futebol';
                            }if($detalhe == '458'){
                                $detalhe  = 'Cameras de segurança';
                            }if($detalhe == '457'){
                                $detalhe  = 'Canil';
                            }if($detalhe == '456'){
                                $detalhe  = 'Business Center';
                            }if($detalhe == '455'){
                                $detalhe  = 'Bosque';
                            }if($detalhe == '454'){
                                $detalhe  = 'Brinquedoteca';
                            }if($detalhe == '453'){
                                $detalhe  = 'Bicicletário';
                            }if($detalhe == '452'){
                                $detalhe  = 'Bar';
                            }if($detalhe == '451'){
                                $detalhe  = 'Armário Embutido';
                            }if($detalhe == '450'){
                                $detalhe  = 'Armário Cozinha';
                            }if($detalhe == '449'){
                                $detalhe  = 'Área de serviço';
                            }if($detalhe == '448'){
                                $detalhe  = 'Ar Condicionado';
                            }if($detalhe == '447'){
                                $detalhe  = 'Água';
                            }if($detalhe == '446'){
                                $detalhe  = 'Aquecimento Central';
                            }if($detalhe == '445'){
                                $detalhe  = 'Aquecedor';
                            }if($detalhe == '444'){
                                $detalhe  = 'Acesso para deficientes';
                            }if($detalhe == '443'){
                                $detalhe  = 'Acesso 24 Horas';
                            }if($detalhe == '442'){
                                $detalhe  = 'Academia';
                            }if($detalhe == '484'){
                                $detalhe  = 'Entrada de Caminhões';
                            }if($detalhe == '483'){
                                $detalhe  = 'Elevador';
                            }if($detalhe == '482'){
                                $detalhe  = 'Edícula';
                            }if($detalhe == '481'){
                                $detalhe  = 'Despensa';
                            }if($detalhe == '480'){
                                $detalhe  = 'Dependência de empregados';
                            }if($detalhe == '479'){
                                $detalhe  = 'Curral';
                            }if($detalhe == '478'){
                                $detalhe  = 'Cozinha Gourmet';
                            }if($detalhe == '477'){
                                $detalhe  = 'Cozinha americana';
                            }if($detalhe == '476'){
                                $detalhe  = 'Copa';
                            }if($detalhe == '475'){
                                $detalhe  = 'Convenções';
                            }if($detalhe == '485'){
                                $detalhe  = 'Entrada lateral';
                            }if($detalhe == '486'){
                                $detalhe  = 'Escritório';
                            }if($detalhe == '487'){
                                $detalhe  = 'Escritório Virtual';
                            }if($detalhe == '488'){
                                $detalhe  = 'Esgoto';
                            }if($detalhe == '489'){
                                $detalhe  = 'Espaço Gourmet';
                            }if($detalhe == '490'){
                                $detalhe  = 'Espaço zen';
                            }if($detalhe == '491'){
                                $detalhe  = 'Esquina';
                            }if($detalhe == '492'){
                                $detalhe  = 'Estacionamento para visitantes';
                            }if($detalhe == '493'){
                                $detalhe  = 'Estacionamento Rotativo';
                            }if($detalhe == '494'){
                                $detalhe  = 'Estacionamento Visitantes';
                            }if($detalhe== '495'){
                                $detalhe  = 'Estrada Asfaltada';
                            }if($detalhe == '496'){
                                $detalhe  = 'Fitness';
                            }if($detalhe == '497'){
                                $detalhe  = 'Forno de pizza';
                            }if($detalhe == '498'){
                                $detalhe  = 'Frente para o Mar';
                            }if($detalhe == '499'){
                                $detalhe  = 'Fogão elétrico';
                            }if($detalhe == '500'){
                                $detalhe  = 'Galpão';
                            }if($detalhe == '501'){
                                $detalhe  = 'Garagem para Barcos';
                            }if($detalhe == '502'){
                                $detalhe  = 'Gerador';
                            }if($detalhe == '503'){
                                $detalhe  = 'Geminada';
                            }if($detalhe == '504'){
                                $detalhe  = 'Guarita';
                            }if($detalhe == '505'){
                                $detalhe  = 'Heliponto';
                            }if($detalhe == '506'){
                                $detalhe  = 'Hidromassagem';
                            }if($detalhe == '507'){
                                $detalhe  = 'Infra-estrutura Internet';
                            }if($detalhe == '508'){
                                $detalhe  = 'Interfone';
                            }if($detalhe == '509'){
                                $detalhe  = 'Jardim';
                            }if($detalhe == '510'){
                                $detalhe  = 'Lago';
                            }if($detalhe == '511'){
                                $detalhe  = 'Lan House';
                            }if($detalhe == '512'){
                                $detalhe  = 'Lareira';
                            }if($detalhe == '513'){
                                $detalhe  = 'Lavabo';
                            }if($detalhe == '514'){
                                $detalhe  = 'Lavanderia';
                            }if($detalhe == '515'){
                                $detalhe  = 'Lavoura';
                            }if($detalhe == '516'){
                                $detalhe  = 'Luminárias';
                            }if($detalhe == '517'){
                                $detalhe  = 'Luz';
                            }if($detalhe == '518'){
                                $detalhe  = 'Marina';
                            }if($detalhe == '519'){
                                $detalhe  = 'Mezanino';
                            }if($detalhe == '520'){
                                $detalhe  = 'Mobiliado';
                            }if($detalhe == '521'){
                                $detalhe  = 'Paiol';
                            }if($detalhe == '522'){
                                $detalhe  = 'Pasto';
                            }if($detalhe == '523'){
                                $detalhe  = 'Pátio Estacionamento';
                            }if($detalhe == '524'){
                                $detalhe  = 'Permite Animais';
                            }if($detalhe == '525'){
                                $detalhe  = 'Pet Care';
                            }if($detalhe == '526'){
                                $detalhe  = 'Píer';
                            }if($detalhe == '527'){
                                $detalhe  = 'Piscina';
                            }if($detalhe == '528'){
                                $detalhe  = 'Piscina aquecida';
                            }if($detalhe == '529'){
                                $detalhe  = 'Pscina Climatizada';
                            }if($detalhe == '530'){
                                $detalhe  = 'Piscina Coberta';
                            }if($detalhe == '531'){
                                $detalhe  = 'Piscina Infantil';
                            }if($detalhe == '532'){
                                $detalhe  = 'Piso Elevado';
                            }if($detalhe == '533'){
                                $detalhe  = 'Pista de cooper';
                            }if($detalhe == '534'){
                                $detalhe  = 'Pista de Pouso';
                            }if($detalhe == '535'){
                                $detalhe  = 'Pista de Skate';
                            }if($detalhe == '536'){
                                $detalhe  = 'Playground';
                            }if($detalhe == '537'){
                                $detalhe  = 'Poço Artesiano';
                            }if($detalhe == '538'){
                                $detalhe  = 'Pomar';
                            }if($detalhe == '539'){
                                $detalhe  = 'Ponte Rolante';
                            }if($detalhe == '540'){
                                $detalhe  = 'Portão Eletrônico';
                            }if($detalhe == '541'){
                                $detalhe  = 'Portaria 24 horas';
                            }if($detalhe == '542'){
                                $detalhe  = 'Porteira Fechada';
                            }if($detalhe == '543'){
                                $detalhe  = 'Quadra de futebol de salão';
                            }if($detalhe == '544'){
                                $detalhe  = 'Quadra Poliesportiva';
                            }if($detalhe == '545'){
                                $detalhe  = 'Quadra de Squash';
                            }if($detalhe == '546'){
                                $detalhe  = 'Quadra de Tênis';
                            }if($detalhe == '547'){
                                $detalhe  = 'Quarto da Empregada';
                            }if($detalhe == '548'){
                                $detalhe  = 'Quintal';
                            }if($detalhe == '549'){
                                $detalhe  = 'Redario';
                            }if($detalhe == '550'){
                                $detalhe  = 'Rede de Telefone';
                            }if($detalhe == '551'){
                                $detalhe  = 'Refeitório';
                            }if($detalhe == '552'){
                                $detalhe  = 'Reservatório de Água';
                            }if($detalhe == '553'){
                                $detalhe  = 'Restaurante';
                            }if($detalhe == '554'){
                                $detalhe  = 'Rio';
                            }if($detalhe == '555'){
                                $detalhe  = 'Ronda/Vigilância';
                            }if($detalhe == '556'){
                                $detalhe  = 'Rua Asfaltada';
                            }if($detalhe == '557'){
                                $detalhe  = 'Sala de Almoço';
                            }if($detalhe == '558'){
                                $detalhe  = 'Sala de Ginástica';
                            }if($detalhe == '559'){
                                $detalhe  = 'Sala de Jantar';
                            }if($detalhe == '560'){
                                $detalhe  = 'Sala íntima';
                            }if($detalhe == '561'){
                                $detalhe  = 'Salão de convenções';
                            }if($detalhe == '562'){
                                $detalhe  = 'Salão de Festas';
                            }if($detalhe == '563'){
                                $detalhe  = 'Salão de Jogos';
                            }if($detalhe == '564'){
                                $detalhe  = 'Salão de Vídeo/Cinema';
                            }if($detalhe == '565'){
                                $detalhe  = 'Sauna';
                            }if($detalhe == '566'){
                                $detalhe  = 'Sede';
                            }if($detalhe == '567'){
                                $detalhe  = 'Segurança Interna';
                            }if($detalhe == '568'){
                                $detalhe  = 'Segurança na Rua';
                            }if($detalhe == '569'){
                                $detalhe  = 'Segurança Patrimonial';
                            }if($detalhe == '570'){
                                $detalhe  = 'Semigeminada';
                            }if($detalhe == '571'){
                                $detalhe  = 'Silos';
                            }if($detalhe == '572'){
                                $detalhe  = 'Sistema de alarme';
                            }if($detalhe == '573'){
                                $detalhe  = 'Sistema de Incêndio';
                            }if($detalhe == '574'){
                                $detalhe  = 'Solariam';
                            }if($detalhe == '575'){
                                $detalhe  = 'Telefone';
                            }if($detalhe == '576'){
                                $detalhe  = 'Terraço';
                            }if($detalhe == '577'){
                                $detalhe  = 'TV';
                            }if($detalhe == '578'){
                                $detalhe  = 'TV a cabo';
                            }if($detalhe == '579'){
                                $detalhe  = 'Varanda';
                            }if($detalhe == '580'){
                                $detalhe  = 'Varanda Goumert';
                            }if($detalhe == '581'){
                                $detalhe  = 'Ventilador de Teto';
                            }if($detalhe == '582'){
                                $detalhe  = 'Vestiário';
                            }if($detalhe == '583'){
                                $detalhe  = 'Vigilância 24hs';
                            }if($detalhe == '584'){
                                $detalhe  = 'WC Empregada';
                            }
                        
                        $detalhenome = $dom->createElement("Detalhes");
                        $detalhess->appendChild($detalhenome);
                        $detalhenomeValue = $dom->createTextNode($detalhe);
                        $detalhenome->appendChild($detalhenomeValue); 
                    }
                }
                      
                
            $Category = $dom->createElement("Observacao");
            $imovel->appendChild($Category);
            $descricaofinal = $campo['descricaodoimovel'];// . ' - O imóvel possui: ' . $adddetalhes . ' - O imóvel é próximo de: ' . $addproximidades;
            $CategoryValue = $dom->createTextNode($descricaofinal);
            $Category->appendChild($CategoryValue);

            $fotoss = unserialize($campo['fotos']);

            if ($fotoss[0] != '') {
                $pictures = $dom->createElement("Fotos");
                $imovel->appendChild($pictures);

                $contfotos = 0;
                foreach ($fotoss as $imagem) {
                    if ($contfotos < 15) {
                        $imageURL = $dom->createElement("Foto");
                        $pictures->appendChild($imageURL);

                        $imageURLnome = $dom->createElement("NomeArquivo");
                        $imageURL->appendChild($imageURLnome);
                        $imageURLnomeValue = $dom->createTextNode($imagem);
                        $imageURLnome->appendChild($imageURLnomeValue);

                        $imageURLlink = $dom->createElement("URLArquivo");
                        $imageURL->appendChild($imageURLlink);
                        $imageURLlinkValue = $dom->createTextNode(HOME_URI . 'subdominios/' . $_SESSION['userdata']['contratante'] . '/fotos/' . $campo['id_imovel'] . '/' . $imagem);
                        $imageURLlink->appendChild($imageURLlinkValue);

                        $imageURLlink = $dom->createElement("Principal");
                        $imageURL->appendChild($imageURLlink);
                        $fotoprincipal = 0;
                        if ($campo['icone'] == $imagem) {
                            $fotoprincipal = 1;
                        }
                        $imageURLlinkValue = $dom->createTextNode($fotoprincipal);
                        $imageURLlink->appendChild($imageURLlinkValue);
                        /*
                          $imageURLlink = $dom->createElement("Ordem");
                          $imageURL->appendChild($imageURLlink);
                          $imageURLlinkValue = $dom->createTextNode($contfotos);
                          $imageURLlink->appendChild($imageURLlinkValue);
                          $contfotos++;

                         */
                    }
                }
            }

            if ($campo['video'] != '') {
                $video = $dom->createElement("Videos");
                $imovel->appendChild($video);

                $videoitem = $dom->createElement("Video");
                $video->appendChild($videoitem);

                $url = $dom->createElement("Descricao");
                $videoitem->appendChild($url);
                $urlValue = $dom->createTextNode('Vídeo do Imóvel');
                $url->appendChild($urlValue);

                $url = $dom->createElement("URLArquivo");
                $videoitem->appendChild($url);
                $urlValue = $dom->createTextNode('https://www.youtube.com/watch?v=' . $campo['video']);
                $url->appendChild($urlValue);

                $imageURLlink = $dom->createElement("Principal");
                $videoitem->appendChild($imageURLlink);
                $imageURLlinkValue = $dom->createTextNode(1);
                $imageURLlink->appendChild($imageURLlinkValue);
            }
            ///////////////////////////////////////////////////////////////// Imovel Web - fim
        }
   
    }else{
        //if($campo['valor_condominio'] == ''){
        //    $imovel_invalido_123 .= 'Valor do Condomínio'.'%';
        //}
        if($campo['garagem'] == ''){
            $imovel_invalido_123 .= 'Garagem'.'%';
        }
        if($campo['banheiro'] == ''){
            $imovel_invalido_123 .= 'Banheiro'.'%';
        }
        //if($campo['anoconstrucao'] == ''){
        //    $imovel_invalido_123 .= 'Ano de Construção'.'%';
        //}
        if($campo['areautil'] == ''){
            $imovel_invalido_123 .= 'Área Útil'.'%';
        }
        if($campo['dormitorio'] == ''){
            $imovel_invalido_123 .= 'Dormitório'.'%';
        }
        if($campo['areatotal'] == ''){
            $imovel_invalido_123 .= 'Área Total'.'%';
        }
        if($campo['valor'] == ''){
            $imovel_invalido_123 .= 'Valor do Imóvel '.'%';
        }
        if($campo['cep_estado'] == null){
            $imovel_invalido_123 .= 'CEP'.'%';
        }
        if($campo['cep_cidade'] == null){
            $imovel_invalido_123 .= 'Cidade'.'%';
        }
        if($campo['cep_bairro'] == null){
            $imovel_invalido_123 .= 'Bairro'.'%';
        }
        if($campo['suite'] == ''){
            $imovel_invalido_123 .= 'Suite'.'%';
        }
        if($campo['status'] != '0'){           
            $imovel_invalido_123 .= 'Status do Imóvel: Arquivado'.'%';    
        }
        if(($campo['descricaodoimovel'] == null) || ($campo['descricaodoimovel'] == '')){
                $imovel_invalido_123 .= 'Descrição do Imóvel'.'%';
        }
        if($campo['descricaodoimovel'] == '<br>'){
            $imovel_invalido_123 .= 'Descrição do Imóvel'.'%';
        }
    }
    if(($validar == '1') || ($imovelvalido == 'nao')){
        $cod_referencia_pendente_123 .= '-' .$campo['id_imovel'];
    }
  } 
    if($imovel_invalido_123 != ''){ 
        $imovel_invalido_id_123 .= $campo['id_imovel'].'%'.$imovel_invalido_123.'//';
    }
}

$get_integracoes = $this->acaoglobal(array('integracoes', 'id'), 'get', 9);
                                $this->acaoglobal(array('integracoes', 'id'), 'update', array(
                                                                              'pendentes' => $cod_referencia_pendente_123,
                                                                              'pendencias' => $imovel_invalido_id_123,
                                                                              'id' => '9'
                                        )
                                );

$prod_dom_load = $banco->query('SELECT * FROM produtos WHERE id_cliente = "' . $_SESSION['userdata']['contratante'] . '" AND produto_servico < 6');
$prod_dom = $prod_dom_load->fetch(PDO::FETCH_ASSOC);

$prod_dom_info_load = $banco->query('SELECT * FROM produtos WHERE dominio = "' . $prod_dom['dominio'] . '" AND produto_servico = 8');
$prod_dom_info = $prod_dom_info_load->fetch(PDO::FETCH_ASSOC);

$serv_info_load = $banco->query('SELECT * FROM servidores WHERE id_servidores = 2');
$serv_info = $serv_info_load->fetch(PDO::FETCH_ASSOC);

$prod_info = unserialize($prod_dom_info['dados_cpanel']);
//final do imovel
// save tree to file
$dom->save(ABSPATH . "/subdominios/" . $_SESSION['userdata']['contratante'] . "/123i.xml");
// save tree to string
$order = $dom->save(ABSPATH . "/subdominios/" . $_SESSION['userdata']['contratante'] . "/123i.xml");


$file = ABSPATH . "/subdominios/" . $_SESSION['userdata']['contratante'] . "/123i.xml";

// set up basic connection
$conn_id = ftp_connect($serv_info['ip_server']);
$dir = 'public_html/integracoes';
$remote_file = $dir.'/123i.xml';
// login with username and password
$login_result = ftp_login($conn_id, $prod_info['user'], $prod_info['senha']);
// upload a file

if (@ftp_mkdir($conn_id, $dir)) {
    echo "successfully created $dir\n";
} else {
    echo "There was a problem while creating $dir\n";
}
    if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
        echo "successfully uploaded $file\n";
    } else {
        echo "There was a problem while uploading $file\n";
    }



// close the connection
unlink($file);
ftp_close($conn_id);
?>

Youez - 2016 - github.com/yon3zu
LinuXploit