Ir para conteúdo
Fórum Script Brasil

Henrique Flausino

Membros
  • Total de itens

    67
  • Registro em

  • Última visita

Posts postados por Henrique Flausino

  1. Pessoal estou com uma duvida.

    Tenho o seguinte código, mas quero que ele calcule diretamente da seleção de uma combo.

    <?php
    function calcular_idade( $ano_de_nasc ){
    $ano_de_hoje = date("Y");
    $idade = $ano_de_hoje - $ano_de_nasc;
    echo $idade;
    }
    calcular_idade("1996");
    ?>
    Como posso fazer isso? Alguém me ajuda? Nome da combo é propertyyearbuilt2 Tentei assim e não funcionou.
    <?php
    function calcular_idade( $ano_de_nasc ){
    $ano_de_hoje = date("Y");
    $idade = $ano_de_hoje - $ano_de_nasc;
    echo $idade;
    }
    calcular_idade($propertyyearbuilt2);
    ?>

  2. Detalhe, já existe uma sistema parecido, porém é gratuito e apenas envia as mensagens.

    No site de cada operadora existe a opção de enviar mensagem sms gratuitamente, porém somente para a mesma operadora.

    Até a nextel tem este sistema gratuito.

    Não seria um investimento desnecessário montar algo assim?

  3. Boa tarde.

    Estou com um problema em uma busca dinamica entre duas tabelas.

    Preciso que seja mostrado resultados dinamicos e que alterem a cada atualização da página e a cada acesso.

    abaixo o código funciona normalmente, porém preciso que seja mostrado apenas a cidade, que esta em uma tabela separada.

    Se colocar o endereço aparece corretamente, porém a cidade está alternando com o estado.

    Segue código.

    <?php
    {
    require ( "includes/config.php" );
    require ( "includes/CGI.php" );
    require ( "includes/SQL.php" );
      
      $cgi = new CGI ();
      $sql = new SQL ( $DBusername, $DBpassword, $server, $database );
    
      if ( ! $sql->isConnected () )
      {
        die ( $DatabaseError );
      }
       require ( "includes/CSQL.php" ); 
      $rows = $sql->execute ( "SELECT * FROM $property_table, $cidade_table WHERE propertyshow = '1' ORDER BY RAND() LIMIT 1",
      SQL_RETURN_ASSOC );
      $row = $rows [ 0 ];
     {
     print "<p><a href=\"index.php?op=mi&id=$row[id]\">";
     if ($row [ 'propertyphoto1' ] ){ print "<IMG SRC=\"".$ImageURL."$row[propertyphoto1]\" BORDER=\"0\" WIDTH=\"$max_thumb_image_width\" HEIGHT=\"$max_thumb_image_height\">";}
     else { print "<IMG SRC=\"".$ImageURL."nopropertyimage.jpg\" BORDER=\"0\" WIDTH=\"$max_thumb_image_width\" HEIGHT=\"$max_thumb_image_height\">";}
     print "</a><br>$row[descricao]
     </p>";
     {
     }
     print "<p><a href=\"index.php?op=mi&id=$row[id]\">";
     if ($row [ 'propertyphoto2' ] ){ print "<IMG SRC=\"".$ImageURL."$row[propertyphoto2]\" BORDER=\"0\" WIDTH=\"$max_thumb_image_width\" HEIGHT=\"$max_thumb_image_height\">";}
     else { print "<IMG SRC=\"".$ImageURL."nopropertyimage.jpg\" BORDER=\"0\" WIDTH=\"$max_thumb_image_width\" HEIGHT=\"$max_thumb_image_height\">";}
     print "</a><br>$row[descricao]</p>";
    
    }
    }
        ?>
    Estrutura do banco. Banco properties.
    id    agentref    propertyoption        propertyref     propertytype     propertyprice     propertybedrooms     propertybathrooms     propertyyearbuilt     propertylivingarea     propertyplotsize     propertyaddress     propertyestado     propertycidade     propertybairro     propertypostcode        propertycountry     shortdescription         longdescription                propertystatus         propertyphoto1                 propertyphoto2     propertyphoto3     propertyphoto4     propertyphoto5     propertyphoto6     propertyphoto7     propertyphoto8     propertyphoto9     propertyphoto10     propertyviews     propertyshow     featuredproperty     virtualtour     propertyowner                         dateadded
    30                   S             1002         2           46000        1            2            1890            1300            1400        Av. Sapopemba            4        5        5       03374-000                        Breve descrição do Imóvel     Descrição do Imóvel                2        1002-32-1143225528_offer_27_e.jpg                                                                                                       0         1         N                   Esta informação não é exibida no site. É para sua ...     11/10/2011 14:20
    29                   S             1002         2           46000        1            2            1890            1300            1400        Av. Sapopemba            4        5        5       03374-000                        Breve descrição do Imóvel     Descrição do Imóvel                2        1002-32-1143225528_offer_27_e.jpg                                                                                                       0         1         N                   Esta informação não é exibida no site. É para sua ...     11/10/2011 14:20
    Banco cidade.
    codigo     cod_estado     descricao
      4           5        Rio de Janeiro
      5        4        São Paulo

  4. amigo simplifica tudo e so manda o erro.

    O problema não é erro e sim que não funciona.

    Estou tantando alterar mas não consigo. Estou tentando puxar Estado, Cidade e bairro, porém só vem a informação de localização que é a antiga tabela.

  5. Boa noite.

    Caros.

    Tenho um código que estou tentando alterar mas não consigo.

    Alterei a tabela do MYSQL para poder cadastrar Estado, Cidade e Bairro, porém não consigo ajustar o código para pesquisar.

    Será que alguém poderia me ajudar?

    Segue tabela:

    admin, bairro, cidade, configure, estado, features, properties, propertyfeatures, propertylocations, propertystatus, propertytypes

    Sendo que o propertylocations é o original e eu vou excluir.

    Estrutura das tabelas.

    Estado:

    Id, Descricao

    Cidade:

    codigo, cod_estado, descricao

    Bairro:

    codigo, cod_cidade, descricao

    properties:

    id, agentref, propertyoption, propertyref, propertytype, propertyprice, propertybedrooms, propertybathrooms, propertyyearbuilt, propertylivingarea, propertyplotsize, propertyaddress, propertylocationestado, propertylocationcidade, propertylocationbairro, propertypostcode, propertycountry, shortdescription, longdescription, propertystatus, propertyphoto1, propertyphoto2, propertyphoto3, propertyphoto4, propertyphoto5, propertyphoto6, propertyphoto7, propertyphoto8, propertyphoto9, propertyphoto10, propertyviews, propertyshow, featuredproperty, virtualtour, propertyowner, dateadded

    Código fonte.

    index.php

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    
    <html>
    
    <head>
    
    <title>SGM Imóveis</title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <link href="images/style.css" rel="stylesheet" type="text/css">
    
    <style type="text/css">
    
    <!--
    
    .style1 {color: #000000}
    
    .style3 {font-size: 14px}
    
    .style12 {
    
        font-size: 11px;
    
        color: #000;
    
    }
    
    .style10 {font-size: 12px}
    
    body {
    
        background-image: url(images/bg.gif);
    
    }
    
    -->
    
    </style>
    
    &lt;script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    
    &lt;script language="JavaScript" type="text/JavaScript">
    
    <!--
    
    function MM_preloadImages() { //v3.0
    
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    
    }
    
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    
      window.open(theURL,winName,features);
    
    }
    
    //-->
    
    </script>
    
    </head>
    
    <body>
    
    <table width="980" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    
      <tr>
    
        <td width="750" height="250" align="center">
    
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
          <tr>
    
            <td align="center"><img src="images/logo.jpg" width="990" height="250" class="logo" /></td>
    
          </tr>
    
        </table></td>
    
      </tr>
    
      <tr>
    
        <td valign="top">
    
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2">
    
            <tr>
    
              <td width="150" rowspan="2" valign="top"><table width="192" border="0" cellspacing="0" cellpadding="0">
    
                  
    
                  <tr>
    
                    <td align="left" valign="middle">
    
                    <div class="menu-imob"><br />
    
                        <ul>
    
                            <li class="bullets"><a href="index.php">Principal</a></li>
    
                            <li class="bullets"><a href="#" target="_top" onClick="MM_openBrWindow('cadastro/index.php','Cadastro','scrollbars=yes,width=650,height=480')"> Cadastre seu Imóvel</a></li>
    
                             
    
                            <li class="bullets"><a href="index.php?op=search&po=S" target="_top"> Imóveis para Venda</a></li>
    
                            <li class="bullets"><a href="index.php?op=search&po=R" target="_top"> Imóveis para Aluguel</a></li>
    
                            <li class="bullets"><a href="#" onClick="window.open('contato.php','Janela','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=461,height=260'); return false;">Fale Conosco</a><br></li>
    
                        </ul>
    
    </div>
    
                    <br><strong><span class="style12">     Busca Avançada</span></strong><br><?php include ("includes/templates/inc-searchbox.php"); ?></td>
    
                  </tr>
    
                  <td align="left" valign="middle">           
    
      <!-- start of searchbox include -->
    
      <!-- end of searchbox include -->
    
       <strong> </strong>
    
       <strong>  </strong><!-- end of price box include --></td>
    
                  </tr>
    
                  <tr>
    
                    <td align="center" valign="middle"><img src="images/white-dot.gif" width="192" height="1"></td>
    
                  </tr>
    
                  <tr>
    
                    <td align="left" valign="middle"> </td>
    
                  </tr>
    
                  <tr>
    
                    <td align="center" valign="middle"><table width="90%"  border="0" cellspacing="0" cellpadding="0">
    
                      <tr>
    
                        <td align="left" valign="middle"><p><strong><span class="style12">Busca por Cidade do Imóvel</span></strong><span class="style10">
    
                        <!-- start of location box include -->
    
                        </span> </p>
    
                          <blockquote>
    
                            <?php include ("includes/templates/inc-locations2.php"); ?>
    
                          </blockquote>
    
    <p><strong><span class="style12">Busca por Bairro do Imóvel</span></strong><span class="style10">
    
      <!-- start of location box include -->
    
      </span>
    
    </p>
    
                          <blockquote>
    
                            <?php include ("includes/templates/inc-locations.php"); ?>
    
                        </blockquote></td>
    
                      </tr>
    
                    </table>                  <!-- end of location box include --></td>
    
                  </tr>
    
                  <tr>
    
                    <td align="left" valign="middle"> </td>
    
                  </tr>
    
                  <tr>
    
                    <td align="center" valign="middle"><img src="images/white-dot.gif" width="192" height="1"></td>
    
                  </tr>
    
                  <tr>
    
                    <td align="left" valign="middle"> </td>
    
                  </tr>
    
                  <tr>
    
                    <td align="center" valign="middle"><table width="90%"  border="0" cellspacing="0" cellpadding="0">
    
                      <tr>
    
                        <td align="left" valign="middle"><strong><span class="style12">Busca por Valor do Imóvel</span> </strong>
    
                          <blockquote>
    
                            <?php include ("includes/templates/inc-pricesearch.php"); ?>
    
                          </blockquote></td>
    
                      </tr>
    
                    </table></td>
    
                  </tr>
    
                  <tr>
    
                    <td align="center" valign="middle"> </td>
    
                  </tr>
    
                  <tr>
    
                    <td align="center" valign="middle"> </td>
    
                  </tr>
    
                </table></td>
    
              <td valign="top" bgcolor="#FFFFFF">
    
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
    
                  <tr>
    
                    <td> </td>
    
                    <td align="left" valign="top"> </td>
    
                    <td> </td>
    
                  </tr>
    
                  <tr>
    
                    <td width="20"> </td>
    
                    <td width="800" align="left" valign="top"><?php
    
      if (
    
      $cgi->getValue ( "op" ) == "search" ||
    
      $cgi->getValue ( "op" ) == "mi"  ||
    
      $cgi->getValue ( "sp" ) == "y"||
    
      $cgi->getValue ( "op" ) == "SendInformationRequest" )
    
      { include "search_.php"; }
    
      else { ?>
    
                      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                      <tr>
    
                        <td> </td>
    
                      </tr>
    
                      <tr>
    
                        <td><div align="justify">
    
                          <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="300">
    
                            <param name="movie" value="images/teste2.swf">
    
      <param name="quality" value="high">
    
      <param name="wmode" value="opaque">
    
      <param name="swfversion" value="9.0.45.0">
    
      <!-- Esta tag param solicita que os usuários com o Flash Player 6.0 r65 e versões posteriores baixem a versão mais recente do Flash Player. Exclua-o se você não deseja que os usuários vejam o prompt. -->
    
      <param name="expressinstall" value="Scripts/expressInstall.swf">
    
      <!-- A tag object a seguir aplica-se a navegadores que não sejam o IE. Portanto, oculte-a do IE usando o IECC. -->
    
      <!--[if !IE]>-->
    
      <object type="application/x-shockwave-flash" data="images/teste2.swf" width="500" height="300">
    
        <!--<![endif]-->
    
        <param name="quality" value="high">
    
        <param name="wmode" value="opaque">
    
        <param name="swfversion" value="9.0.45.0">
    
        <param name="expressinstall" value="Scripts/expressInstall.swf">
    
        <!-- O navegador exibe o seguinte conteúdo alternativo para usuários que tenham o Flash Player 6.0 e versões anteriores. -->
    
        <div>
    
          <h4>O conteúdo desta página requer uma versão mais recente do Adobe Flash Player.</h4>
    
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Obter Adobe Flash player" width="112" height="33" /></a></p>
    
        </div>
    
        <!--[if !IE]>-->
    
      </object>
    
      <!--<![endif]-->
    
    </object>
    
                        </div></td>
    
                      </tr>
    
                      <tr>
    
                        <td> </td>
    
                      </tr>
    
                      <tr>
    
                          <td height="1" background="images/lista_im.gif"></td>
    
                        </tr>
    
                      <tr>
    
                        <td> </td>
    
                      </tr>
    
                      <tr>
    
                        <td height="30" align="left" valign="middle" bgcolor="#0058A9"><img src="includes/images/destaque.gif" width="189" height="30"></td>
    
                      </tr>
    
                      <tr>
    
                        <td> </td>
    
                      </tr>
    
                      <tr>
    
                        <td> </td>
    
                      </tr>
    
                    </table>
    
                      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                        <tr>
    
                          <td align="center" valign="middle"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                            <tr align="center" valign="middle">
    
                              <td><?PHP include "includes/tools/random-property.php"; ?></td>
    
                              <td><?PHP include "includes/tools/random-property.php"; ?></td>
    
                              <td><?PHP include "includes/tools/random-property.php"; ?></td>
    
                            </tr>
    
                          </table></td>
    
                        </tr>
    
                      </table>  
    
                      <p>        <?php }
    
    ?>         
    
                    </p>  </td><td width="10"> </td>
    
                  </tr>
    
                </table></td>
    
            </tr>
    
            <tr>
    
              <td bgcolor="#FFFFFF"> </td>
    
            </tr>
    
          </table></td>
    
      </tr>
    
      <tr>
    
        <td height="35" align="center" valign="middle" bgcolor="#0058A9">
    
          <table width="980" border="0" cellspacing="0" cellpadding="0">
    
            <tr>
    
              <td width="218"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    
                <tr>
    
                  <td align="right" valign="middle"><img src="includes/images/contato.gif" width="189" height="35"></td>
    
                </tr>
    
                <tr>
    
                  <td align="left" valign="middle"> <table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                    <tr>
    
                      <td width="26%"> </td>
    
                      <td width="74%" align="left" valign="middle"><span class="style12" style="color:#fff">Fone: <br>
    
                            (11) 0000-0000</span></td>
    
                    </tr>
    
                  </table></td>
    
                </tr>
    
                <tr>
    
                  <td align="left" valign="middle"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                    <tr>
    
                      <td width="26%"> </td>
    
                      <td width="74%" align="left" valign="middle"><span class="style12" style="color:#fff">Fax: <br>
    
                            (11) 0000-0000</span></td>
    
                    </tr>
    
                  </table></td>
    
                </tr>
    
                <tr>
    
                  <td align="left" valign="middle"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                    <tr>
    
                      <td width="26%"> </td>
    
                      <td width="74%" align="left" valign="middle"> </td>
    
                    </tr>
    
                  </table></td>
    
                </tr>
    
                <tr>
    
                  <td align="left" valign="middle"> </td>
    
                </tr>
    
              </table></td>
    
              <td width="762" align="center" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
    
                <tr>
    
                  <td height="25"> </td>
    
                </tr>
    
                <tr>
    
                    <td align="center" valign="middle"><p><span class="baseline">©
    
                        Copyright <?php echo date("Y"); ?> M&F Design.</span> </p>
    
                      <p> </p></td>
    
                </tr>
    
              </table></td>
    
            </tr>
    
          </table></td>
    
      </tr>
    
    </table>
    
    &lt;script type="text/javascript">
    
    swfobject.registerObject("FlashID");
    
    </script>
    
    </body>
    
    </html>
    inc-searchbox.php
    <link href="../../images/style.css" rel="stylesheet" type="text/css">
    
    <?php
    
    require ( "includes/config.php" );
    
    require ( "includes/CGI.php" );
    
    require ( "includes/SQL.php" );
    
    $cgi = new CGI ();
    
    $sql = new SQL ( $DBusername, $DBpassword, $server, $database );
    
    if ( ! $sql->isConnected () )
    
    {
    
      die ( $DatabaseError );
    
    }
    
    require ( "includes/CSQL.php" );
    
    require ( "includes/lang/" . $language_pack . "/index.php" );
    
    ?>
    
    <style type="text/css">
    
    <!--
    
    .style1 {
    
        color: #FFFFFF;
    
        font-weight: bold;
    
    }
    
    .style2 {color: #FFFFFF}
    
    -->
    
    </style>
    
    <form method="get" action="<?php echo "$template_page_name"; ?>">
    
    <input name="op" type="hidden" value="search" />
    
    <table width="233" height="297" border="0" align="center"  cellpadding="2" cellspacing="2">
    
    <?php if($display_search_types == "Y") { ?>
    
    <tr>
    
    <td width="87" height="25"><p align="right" class="menu style1" style="color:#000">Tipo:</p></td>
    
    <td width="128"><p>
    
    <select name="pt" size="1" style="height: 18px; width:125px;">
    
    <option value="" selected="selected"><?php echo FORM_SELECT_ALL_TYPES; ?></option>
    
    <?PHP
    
        $rows = $sql->execute ( "SELECT * FROM " . $propertytypes_table .
    
            " ORDER BY propertytype ASC", SQL_RETURN_ASSOC );
    
        for ( $i = 0; $i < sizeof ( $rows ); ++$i )
    
        {
    
          $row = $rows [ $i ];
    
         
    
          ?>
    
    <option value="<?php echo $cgi->htmlEncode ( $row [ "id" ] ); ?>">
    
    <?php
    
          echo $cgi->htmlEncode ( $row [ "propertytype" ] ); ?>
    
    </option>
    
    <?php
    
        }
    
    ?>
    
    </select>
    
    </p></td>
    
    </tr>
    
    <?php }
    
    if($display_search_max_price == "Y") {
    
    ?>
    
    <tr>
    
    <td class="b2" height="25"><p align="right" class="style1" style="color:#000">Menor Valor:</p></td>
    
    <td><p>
    
    <select name="pp_max" style="height: 18px; width:125px;">
    
    <?php if (($display_sale) == "Y"){ ?>
    
    <option value="45000" selected="selected"><?php echo CURRENCY; ?> 45.000,00</option>
    
    <option value="65000"><?php echo CURRENCY; ?> 65.000,00</option>
    
    <option value="75000"><?php echo CURRENCY; ?> 75.000,00</option>
    
    <option value="100000"><?php echo CURRENCY; ?> 100.000,00</option>
    
    <option value="125000"><?php echo CURRENCY; ?> 125.000,00</option>
    
    <option value="150000"><?php echo CURRENCY; ?> 150.000,00</option>
    
    <option value="175000"><?php echo CURRENCY; ?> 175.000,00</option>
    
    <option value="200000"><?php echo CURRENCY; ?> 200.000,00</option>
    
    <option value="300000"><?php echo CURRENCY; ?> 300.000,00</option>
    
    <option value="400000"><?php echo CURRENCY; ?> 400.000,00</option>
    
    <option value="500000"><?php echo CURRENCY; ?> 500.000,00</option>
    
    <option value="600000"><?php echo CURRENCY; ?> 600.000,00</option>
    
    <option value="700000"><?php echo CURRENCY; ?> 700.000,00</option>
    
    <option value="800000"><?php echo CURRENCY; ?> 800.000,00</option>
    
    <option value="900000"><?php echo CURRENCY; ?> 900.000,00</option>
    
    <option value="1000000"><?php echo CURRENCY; ?> 1.000,000,00</option>
    
    <option value="2000000"><?php echo CURRENCY; ?> 2.000,000,00</option>
    
    <?php } if (($display_rental) == "Y"){ ?>
    
    <option value=""><?php echo FORM_DISPLAY_RENTAL_SELECT; ?></option>
    
    <option value="200"><?php echo CURRENCY; ?> 200,00</option>
    
    <option value="300"><?php echo CURRENCY; ?> 300,00</option>
    
    <option value="400"><?php echo CURRENCY; ?> 400,00</option>
    
    <option value="500"><?php echo CURRENCY; ?> 500,00</option>
    
    <option value="750"><?php echo CURRENCY; ?> 750,00</option>
    
    <?php } ?>
    
    </select>
    
    </p></td>
    
    </tr>
    
    <tr>
    
    <td height="25"><p align="right" class="copyright style2"><strong style="color:#000">Maior  Valor:</strong></p></td>
    
    <td><p>
    
    <select name="pp_min" style="height: 18px; width:125px;">
    
    <?php if (($display_sale) == "Y"){ ?>
    
    <option value="100"><?php echo CURRENCY; ?> 100,00</option>
    
    <option value="125"><?php echo CURRENCY; ?> 125,00</option>
    
    <option value="150"><?php echo CURRENCY; ?> 150,00</option>
    
    <option value="175"><?php echo CURRENCY; ?> 175,00</option>
    
    <option value="200"><?php echo CURRENCY; ?> 200,00</option>
    
    <option value="300"><?php echo CURRENCY; ?> 300,00</option>
    
    <option value="400"><?php echo CURRENCY; ?> 400,00</option>
    
    <option value="500"><?php echo CURRENCY; ?> 500,00</option>
    
    <option value="600"><?php echo CURRENCY; ?> 600,00</option>
    
    <option value="700"><?php echo CURRENCY; ?> 700,00</option>
    
    <option value="800"><?php echo CURRENCY; ?> 800,00</option>
    
    <option value="900"><?php echo CURRENCY; ?> 900,00</option>
    
    <option value="1000"><?php echo CURRENCY; ?> 1.000,00</option>
    
    <option value="2000" selected="selected"><?php echo CURRENCY; ?> 2.000,00</option>
    
    <?php } if (($display_rental) == "Y"){ ?>
    
    <option value=""><?php echo FORM_DISPLAY_RENTAL_SELECT; ?></option>
    
    <option value="200"><?php echo CURRENCY; ?> 200,00</option>
    
    <option value="300"><?php echo CURRENCY; ?> 300,00</option>
    
    <option value="400"><?php echo CURRENCY; ?> 400,00</option>
    
    <option value="500"><?php echo CURRENCY; ?> 500,00</option>
    
    <option value="750"><?php echo CURRENCY; ?> 750,00</option>
    
    <option value="1000"><?php echo CURRENCY; ?> 1.000,00</option>
    
    <option value="1500"><?php echo CURRENCY; ?> 1.500,00</option>
    
    <?php } ?>
    
    </select>
    
    </p></td>
    
    </tr>
    
    <?php }  if($display_search_bedrooms == "Y") { ?>
    
    <tr>
    
    <td height="25"><p align="right" class="style2 copyright"><strong style="color:#000"> Quartos:</strong></p></td>
    
    <td><p>
    
    <select name="pb" style="height: 18px; width:125px;">
    
    <option value="0" selected="selected"><?php echo FORM_NO_PREFERENCE; ?></option>
    
    <option value="1">1</option>
    
    <option value="2">2</option>
    
    <option value="3">3</option>
    
    <option value="4">4</option>
    
    <option value="5">5</option>
    
    </select>
    
    </p></td>
    
    </tr>
    
    <?php }  if($display_search_locations == "Y") { ?>
    
    <tr>
    
    <td height="25"><b>Estado:</b>:</strong></td>
    
    <td>&lt;script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
    
    &lt;script type="text/javascript" src="js/cbox.js"></script><p>
    
      <select name="categoria">
    
        <option value="0">Escolha um Estado</option>
    
        <?php
    
    include("include/connect_data_base.php");
    
    $sql_cat=mysql_query("SELECT * FROM estado ORDER BY descricao ASC") or die(mysql_error());
    
    while($result_sql_cat = mysql_fetch_object($sql_cat)){
    
    echo '<option value="'.$result_sql_cat->id.'">'.$result_sql_cat->descricao.'</option>';
    
    }
    
    ?>
    
        <!--  -->
    
      </select>
    
      </p>
    
    </td>
    
    </tr>
    
    <?php } ?>
    
    <?php
    
    if (($display_rental & $display_sale) == "Y"){
    
    echo "<TR><TD></TD><TD><p><input name=\"po\" type=\"radio\" value=\"S\"><font color=\"#000000\" face=\"Arial\" size=\"2\">Vendas</font><br>
    
    <input name=\"po\" type=\"radio\" value=\"R\"><font color=\"#000000\" face=\"Arial\" size=\"2\">Aluguel</font><br></p></TD></TR>";
    
    }
    
    elseif (($display_rental) == "Y"){
    
    echo "<TR><TD></TD><TD><p>
    
    <input name=\"po\" type=\"hidden\" value=\"R\"></p></TD></TR>";
    
    }
    
    elseif (($display_sale) == "Y"){
    
    echo "<TR><TD></TD><TD><p>
    
    <input name=\"po\" type=\"hidden\" value=\"S\"></p></TD></TR>";
    
    }
    
    ?>
    
    <tr>
    
    <td height="38"><b>Cidade:</b></td>
    
    <td>
    
      <select name="cidade">
    
        <option value="0" disabled="disabled">Escolha um Estado Primeiro</option>
    
      </select>
    
    </td>
    
    </tr>
    
    <tr>
    
      <td height="38"><b>Bairro</b></td>
    
      <td><select name="bairro">
    
        <option value="0" disabled="disabled">Escolha uma Cidade Primeiro</option>
    
      </select></td>
    
    </tr>
    
    <tr>
    
      <td height="38"></td>
    
      <td> </td>
    
    </tr>
    
    <tr>
    
      <td height="38"></td>
    
      <td><input name="input" type="image" src="<?php print "$LanguageFolder/$language_pack"; ?>/buttons/button-search.gif" /></td>
    
    </tr>
    
    </table>
    
    </form>
    inc-locations.php
    <?php
    
    require ( "includes/config.php" );
    
    require ( "includes/CGI.php" );
    
    require ( "includes/SQL.php" );
    
    $cgi = new CGI ();
    
    $sql = new SQL ( $DBusername, $DBpassword, $server, $database );
    
    if ( ! $sql->isConnected () )
    
    {
    
      die ( $DatabaseError );
    
    }
    
    require ( "includes/CSQL.php" );
    
    require ( "includes/lang/" . $language_pack . "/index.php" );
    
    // Get the property locations from the database and display them in alpha order
    
        {        
    
        $rows = $sql->execute ( "SELECT * FROM " . $bairro_table .
    
          " ORDER BY descricao ASC", SQL_RETURN_ASSOC );
    
        $num = sizeof ( $rows );      
    
          for ( $i = 0; $i < $num; ++$i )
    
          {
    
            $id = $rows [ $i ] [ "codigo" ];
    
            $propertylocation = $rows [ $i ] [ "descricao" ];
    
      echo "<img src=\"includes/images/arrow_blue.gif\" width=\"10\" height=\"13\">  <a href=\"$template_page_name?op=search&pl=$id\" style=\"color:#000\">$propertylocation</a><br>";        
    
    }
    
      }
    
    ?>
    inc-locations2.php
    <?php
    
    require ( "includes/config.php" );
    
    require ( "includes/CGI.php" );
    
    require ( "includes/SQL.php" );
    
    $cgi = new CGI ();
    
    $sql = new SQL ( $DBusername, $DBpassword, $server, $database );
    
    if ( ! $sql->isConnected () )
    
    {
    
      die ( $DatabaseError );
    
    }
    
    require ( "includes/CSQL.php" );
    
    require ( "includes/lang/" . $language_pack . "/index.php" );
    
    // Get the property locations from the database and display them in alpha order
    
        {        
    
        $rows = $sql->execute ( "SELECT * FROM " . $cidade_table .
    
          " ORDER BY descricao ASC", SQL_RETURN_ASSOC );
    
        $num = sizeof ( $rows );      
    
          for ( $i = 0; $i < $num; ++$i )
    
          {
    
            $id = $rows [ $i ] [ "codigo" ];
    
            $propertylocation = $rows [ $i ] [ "descricao" ];
    
      echo "<img src=\"includes/images/arrow_blue.gif\" width=\"10\" height=\"13\">  <a href=\"$template_page_name?op=search&pl=$id\" style=\"color:#000\">$propertylocation</a><br>";        
    
    }
    
      }
    
    ?>
    layout_view.php
    <?php
    
      
    
      $layoutId = $cgi->getValue ( "id" );
    
      $rows = $sql->execute ( "SELECT * FROM " . $property_table . " WHERE id=" .
    
        $sql->quote ( $layoutId ) . " AND propertyshow=1 LIMIT 1",
    
        SQL_RETURN_ASSOC );
    
      $row = $rows [ 0 ];
    
      $Price = number_format ( $row [ 'propertyprice' ], 2, ",", "." );
    
      $sql->execute ( "UPDATE " . $property_table .
    
          " SET propertyviews=(propertyviews + 1) WHERE id=" .
    
          $sql->quote ( $layoutId ) . " LIMIT 1" );
    
    $ThumbPhotoWidth = "100";
    
    $ThumbPhotoHeight = "80";
    
    ?>
    
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
    
    <tr valign="top">
    
      <td colspan="2" valign="top"><table width="100%" border="0"  align="center" cellpadding="0" cellspacing="0" class="lvp_top_nav_menu_bg">
    
        <tr valign="middle">
    
          <td>  <?php echo LV_PROPERTY_REF; ?> <strong><?php echo $row [ "propertyref" ]; ?></strong> - <?php echo $row [ "propertyaddress" ]; ?> - <?php echo $_GET [ "pl" ]; ?> - Cep: <?php echo $row [ "propertypostcode" ]; ?></td>
    
          <td align="right"> <a href="?sp=y&id=<?php echo $row [ "id" ]; ?>"><img src="includes/lang/<?php print "$language_pack"; ?>/buttons/button-view-photos.gif" title="Ver Fotos" border="0" /></a> <a href="java script:history.go(-1)"><img src="includes/lang/<?php print "$language_pack"; ?>/buttons/button-back.gif" title="Voltar" border="0" /></a></td>
    
        </tr>
    
      </table></td>
    
      </tr>
    
    <tr valign="top">
    
    <td width="48%" valign="top"><?php   if ( ! $row [ 'propertyphoto1' ] )
    
      {
    
        ?>
    
      <img src="<?php echo $ImageURL; ?>nopropertyimage.jpg" border="0" />
    
      <?php
    
      }
    
      else
    
      {
    
        ?>
    
      <table cellpadding="0" cellspacing="1">
    
        <tr>
    
          <td width="300" height="300" align="center" valign="top"><img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto1" ]; ?>" name="large" hspace="10"  border="0" align="left" id="large" />
    
              </td>
    
        </tr>
    
        <tr>
    
          <td width="300" align="center" valign="top"><table cellpadding="0" cellspacing="2">
    
              <tr>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto1' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto1]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto1]'\">";} ?>            </td>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto2' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto2]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto2]'\">";} ?></td>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto3' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto3]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto3]'\">";} ?></td>
    
              </tr>
    
              <tr>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto4' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto4]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto4]'\">";} ?>            </td>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto5' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto5]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto5]'\">";} ?>            </td>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto6' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto6]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto6]'\">";} ?>            </td>
    
              </tr>
    
              <tr>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto7' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto7]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto7]'\">";} ?>            </td>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto8' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto8]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto8]'\">";} ?>            </td>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto9' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto9]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto9]'\">";} ?>            </td>
    
              </tr>
    
              <tr>
    
                <td valign="middle" align="center"><?php if ($row [ 'propertyphoto10' ] ) { echo "<img src=\"$ImageURL$row[propertyphoto10]\" width=\"$ThumbPhotoWidth\" height=\"$ThumbPhotoHeight\" border=\"0\" onmousedown=\"document.images['large'].src='$ImageURL$row[propertyphoto10]'\">";} ?>            </td>
    
                <td valign="middle" align="center"></td>
    
                <td valign="middle" align="center"></td>
    
              </tr>
    
          </table></td>
    
        </tr>
    
      </table> <?php } ?> </td>
    
    <td width="52%" align="left" valign="top"><p><?php echo $row [ "shortdescription" ]; ?></p>
    
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    
      <tr>
    
        <td align="left" valign="top">
    
    <p><strong>Valor:</strong> <strong><?php echo CURRENCY; ?> <?php echo "$Price"; ?></strong></p>
    
    <p>
    
      <?php
    
      if ( $row [ 'propertybedrooms' ] )
    
      {
    
        echo " $row[propertybedrooms] - Quartos<br>";
    
      }
    
        if ( $row [ 'propertybathrooms' ] )
    
      {
    
        echo "$row[propertybathrooms] - Banheiros";
    
      }    
    
        ?>
    
    </p>
    
    <?php
    
      $_features = $sql->execute ( "SELECT description FROM " .
    
          $features_table . " INNER JOIN " . $propertyfeatures_table .
    
          " ON (id=feature_id) WHERE property_id=" .
    
          $sql->quote ( $layoutId ),
    
          SQL_RETURN_ASSOC );
    
      $features = array ();
    
      if ( $row [ 'propertyyearbuilt' ] )
    
      {
    
        $features [] = "Construído em $row[propertyyearbuilt]";
    
      }
    
      if ( $row [ 'propertylivingarea' ] )
    
      {
    
        $features [] = "$row[propertylivingarea] Área Construída";
    
      }
    
      if ( $row [ 'propertyplotsize' ] )
    
      {
    
        $features [] = "$row[propertyplotsize] Área Total";
    
      }
    
      for ( $i = 0; $i < sizeof ( $_features ); ++$i )
    
      {
    
        $features [] = $cgi->htmlEncode ( $_features [ $i ] [ "description" ] );
    
      }
    
      for ( $i = 0; $i < sizeof ( $features ); ++$i )
    
      {
    
    ?>
    
      <p><?php echo $cgi->htmlEncode ( $features [ $i ] ); ?></p>
    
      <?php
    
      }
    
    ?></td>
    
        </tr>
    
    </table></td>
    
    </tr>
    
    <tr valign="top">
    
    <td colspan="2" valign="top">
    
    <p align="left"><?php echo nl2br($row [ "longdescription" ]); ?></p></td>
    
    </tr>
    
    </table>
    
    <table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
    
      <tr align="center" valign="middle">
    
        <td width="150"><a href="#CONTACT"><img src="includes/images/link-requestinformation.gif" width="150" height="40" border="0"></a></td>
    
        <td width="20"> </td>
    
        <td width="174"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    
          <tr>
    
            <td align="center" valign="middle"><?php $MapLinkUrl = str_replace("XXXXXX", "$row[propertypostcode]", "$property_map_url"); if ($row [ 'propertypostcode' ] ) { print "<td></td><td><a href=\"$MapLinkUrl\" target=\"new\"><img src=\"includes/images/link-map.gif\" border=\"0\"/></a></td>";} ?></td>
    
          </tr>
    
        </table></td>
    
        <td width="20"> </td>
    
        <td width="176"><a href="includes/templates/printfactsheet.php?id=<?php echo $row [ "id" ]; ?>" target="_blank"><img src="includes/images/link-print.gif" width="176" height="40" border="0"></a></td>
    
      </tr>
    
    </table>
    
    <p> </p>
    layout_results.php
    <?php
    
      $Price = number_format ($row [ 'propertyprice' ], 2, ",", ".");
    
    ?>
    
    <table width="100%" align="center" class="lrp_bg">
    
        <tr valign="middle">
    
      <td colspan="2" valign="middle" align="left">
    
      <p> <font  size="-1"><b><?php echo $row [ "propertyaddress" ]; ?>
    
      - <?php echo $cgi->htmlEncode ( $row [ "codigo" ] ); ?></b></font></p></td>
    
        <td valign="middle" align="right"><p class="propertystatus"><?php
    
      echo strtoupper ( $cgi->htmlEncode ( $row [ "propertystatus" ] ) );
    
              ?> </p></td>
    
    </tr>
    
        <tr>
    
          <td colspan="3" bgcolor="#FFFFFF">
    
           <table width="100%" cellpadding="3" cellspacing="1">
    
            <tr>
    
              <td><p align="center">
    
    <?php
    
      if ( ! $row [ "propertyphoto1" ] )
    
      {
    
        ?><img src="<?php echo $ImageURL; ?>nopropertyimage.jpg" height="<?php
    
        echo $max_thumb_image_height; ?>" width="<?php echo $max_thumb_image_width; ?>"
    
          border="0" /><?php
    
      }
    
      else
    
      {
    
        ?><a href="?op=mi&id=<?php echo $row [ "id" ]; ?>&pl=<?php echo $row [ "propertylocation" ]; ?>"><img src="<?php
    
        echo $ImageURL; ?><?php echo $row [ "propertyphoto1" ]; ?>" height="<?php
    
        echo $max_thumb_image_height; ?>" width="<?php echo $max_thumb_image_width; ?>"
    
          border="0" alt="<?php
    
          echo $row [ "propertyaddress" ]; ?>, <?php
    
          echo $row [ "propertylocation" ]; ?>" title="<?php
    
          echo $row [ "propertyaddress" ]; ?>, <?php
    
          echo $row [ "propertylocation" ]; ?>" /></a><?php
    
      }
    
      ?></p></td>
    
              <td valign="top" align="left" width="100%">
    
       <table width="100%" cellpadding="1" cellspacing="1">
    
        <tr>
    
          <td>
    
        <p><?php echo LR_PROPERTY_TYPE; ?> <b><?php echo $row [ "propertytype" ]; ?></b></p></td>
    
          <td>
    
        <p><?php echo LR_PROPERTY_PRICE; ?> <b><?php echo CURRENCY, $Price; ?></b></p></td>
    
       </tr>
    
        <tr>
    
          <td>
    
        <p><?php echo LR_PROPERTY_REF; ?> <b><?php echo $row [ "propertyref" ]; ?></b></p></td>
    
          <td>
    
          <p>
    
        <?php if ($row [ "propertybedrooms" ] == "0") { echo "";} else { ?>    
    
        <?php echo LR_NUMBER_OF_BEDROOMS; ?> <b><?php echo $row [ "propertybedrooms" ]; ?></b>
    
        <?php } ?></p></td>
    
       </tr>
    
       </table>
    
               <p>
    
             <?php echo $row [ "shortdescription" ]; ?></p>
    
             <p align="right"><a href="?op=mi&id=<?php echo $row [ "id" ];
    
             ?>&pl=<?php echo $row [ "propertylocation" ]; ?>"><img src="<?php print "$LanguageFolder/$language_pack"; ?>/buttons/button-moreinformation.gif" title="Veja mais detalhes" border="0" /></a></p></td>
    
           </tr>
    
        </table></td>
    
    </tr>
    
    </table>
    
    <br />
    
    <br />
    search_.php
    <?php
    
    require ( "includes/config.php" );
    
    require ( "includes/CGI.php" );
    
    require ( "includes/SQL.php" );
    
    $cgi = new CGI ();
    
    $sql = new SQL ( $DBusername, $DBpassword, $server, $database );
    
    if ( ! $sql->isConnected () )
    
    {
    
      die ( $DatabaseError );
    
    }
    
    require ( "includes/CSQL.php" );
    
    require ( "includes/lang/" . $language_pack . "/index.php" );
    
    ?>
    
    <!--
    
    //  comment this out, allows you to use your own stylesheet with propertymax pro
    
    <link rel="stylesheet" href="includes/lang/<?php print "$language_pack"; ?>/style.css" />
    
    -->
    
    &lt;script language="JavaScript" type="text/javascript">
    
    <!-- Begin
    
    var submitcount=0;
    
    function reset() {
    
    document.emailform.name.value="";
    
    document.emailform.email.value="";
    
    document.emailform.address.value="";
    
    }
    
    function checkFields() {                    
    
    if (                                    
    
    (document.emailform.name.value=="") ||
    
    (document.emailform.email.value=="")  ||
    
    (document.emailform.address.value==""))  
    
       {
    
       alert("<?php echo GENERAL_FORM_POPUP_ERROR_MESSAGE; ?>");
    
       return false;
    
       }
    
    }
    
    //  End --></script>
    
    <?php
    
      if ( $cgi->getValue ( "op" ) == "SendInformationRequest" )
    
      {
    
    // Contact Form Spam Check for Website URl's which should not be there
    
    $SpamErrorMessage = "<p align=\"center\"><font color=\"red\">Website URLs are not permitted in the request form.</font></b></p>";
    
    if (preg_match("/http/", "" . $cgi->getValue ( "name" ) . "")) {echo "$SpamErrorMessage"; exit();}
    
    if (preg_match("/http/", "" . $cgi->getValue ( "email" ) . "")) {echo "$SpamErrorMessage"; exit();}
    
    if (preg_match("/http/", "" . $cgi->getValue ( "telephone" ) . "")) {echo "$SpamErrorMessage"; exit();}
    
    if (preg_match("/http/", "" . $cgi->getValue ( "address" ) . "")) {echo "$SpamErrorMessage"; exit();}
    
        $yoursubject = "".EMAIL_SUBJECT." Cod. " . $cgi->getValue ( "propertyref" );
    
        $emailtext = "
    
    -----------------------------------------------------------------------------
    
       ".EMAIL_TEXT_TITLE."
    
    -----------------------------------------------------------------------------
    
    ".EMAIL_TEXT_BODY."
    
    ".EMAIL_PD."
    
    ".EMAIL_PROEPRTY_REF."      " . $cgi->getValue ( "propertyref" ) . "
    
    ".EMAIL_PROPERTY_ADDRESS."  " . $cgi->getValue ( "propertyaddress" ) . "
    
    ".EMAIL_PROPERTY_PRICE."    ".CURRENCY.""  . $cgi->getValue ( "propertyprice" ) . "
    
    ".EMAIL_RD."
    
    ".EMAIL_NAME."    " . $cgi->getValue ( "name" ) . "
    
    ".EMAIL_EMAIL_ADDRESS."   " . $cgi->getValue ( "email" ) . "
    
    ".EMAIL_TELEPHONE."   " . $cgi->getValue ( "telephone" ) . "
    
    " . $cgi->getValue ( "address" ) . "
    
    ________________________________
    
    ".EMAIL_FOOTER."
    
    ";
    
        $yoursubject = stripslashes ( $yoursubject );
    
        $emailtext = stripslashes ( $emailtext );
    
        @mail ( $cgi->getValue ( "adminemailaddress" ), $yoursubject, $emailtext,
    
            "From: " . $cgi->getValue ( "email" ) );
    
    ?>
    
    <br />
    
    <br />
    
    <br />
    
    <p align="center"><?php echo EMAIL_SUCCESS_MESSAGE; ?></p>
    
    <br />
    
    <p align="center">[<a href="?op=search&po=S"><?php echo FORM_VIEW_ALL_SALE_PROPERTIES; ?></a>]</p>
    
    <br />
    
    <br />
    
    <?php
    
      }
    
      // view more information about the property if requested
    
      if ( $cgi->getValue ( "op" ) == "mi" )
    
      {
    
      // Start of Display Output
    
        require ( "includes/templates/layout_view.php" );
    
      // End of Display output
    
        $arows = $sql->execute ( "SELECT * FROM " . $admin_table . " LIMIT 1",
    
            SQL_RETURN_ASSOC );
    
        $arow = $arows [ 0 ];
    
    ?>
    
    <table width="100%"  align="center" class="lvp_top_nav_menu_bg">
    
    <tr valign="top">
    
    <td><p><?php echo LV_MORE_INFORMATION_TITLE; ?></p></td>
    
    </tr>
    
    </table>
    
    <a name="CONTACT" id="CONTACT"></a>
    
    <p align="center"><?php echo LV_MORE_INFORMATION_TEXT; ?></p>
    
    <br />
    
    <table width="85%" align="center" cellpadding="10">
    
    <tr>
    
    <td valign="top"><p><strong><?php echo $cgi->htmlEncode ( $arow [ "adminbusinessname" ] ); ?></strong><br />
    
    <?php echo $cgi->htmlEncode ( $arow [ "adminaddress" ] ); ?><br />
    
    <?php echo $cgi->htmlEncode ( $arow [ "admintown" ] ); ?><br />
    
    <?php echo $cgi->htmlEncode ( $arow [ "admincounty" ] ); ?><br />
    
    <?php echo $cgi->htmlEncode ( $arow [ "adminpostcode" ] ); ?></p>
    
    <p>Tel: <?php echo $cgi->htmlEncode ( $arow [ "admintelephone" ] ); ?><br />
    
    Fax: <?php echo $cgi->htmlEncode ( $arow [ "adminfax" ] ); ?></p></td>
    
    <td><form method="post" name="emailform" id="emailform" onsubmit="return checkFields()">
    
    <input name="op" type="hidden" value="SendInformationRequest" />
    
    <input name="propertyref" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertyref" ] ); ?>" />
    
    <input name="propertyaddress" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertyaddress" ] ); ?>" />
    
    <input name="propertylocation" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertylocation" ] ); ?>" />
    
    <input name="propertyprice" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertyprice" ] ); ?>" />
    
    <input name="adminemailaddress" type="hidden" value="<?php
    
                        echo $cgi->htmlEncode ( $arow [ "adminemailaddress" ] ); ?>" />
    
    <table cellpadding="1" cellspacing="1">
    
    <tr>
    
    <td align="right"><p><?php echo LV_NAME; ?> </p></td>
    
    <td><input type="text" name="name" size="35"
    
                          maxlength="100" /></td>
    
    </tr>
    
    <tr>
    
    <td align="right"><p><?php echo LV_EMAIL; ?> </p></td>
    
    <td><input type="text" name="email" size="35"
    
                          maxlength="100" /></td>
    
    </tr>
    
    <tr>
    
    <td align="right"><p><?php echo LV_TELEPHONE; ?> </p></td>
    
    <td><input type="text" name="telephone" size="35"
    
                          maxlength="100" /></td>
    
    </tr>
    
    <tr>
    
    <td align="right" valign="top"><p><?php echo LV_ADDRESS; ?> </p></td>
    
    <td><textarea name="address" rows="5" cols="35"></textarea></td>
    
    </tr>
    
    <tr>
    
    <td align="right" valign="top"> </td>
    
    <td><input name="" type="image" src="<?php print "$LanguageFolder/$language_pack"; ?>/buttons/button-send-request.gif" /></td>
    
    </tr>
    
    </table>
    
    <p> </p>
    
    </form></td>
    
    </tr>
    
    </table>
    
    <?php
    
      }
    
      else if ( $cgi->getValue ( "op" ) == "search" )
    
      {
    
        $pt = $cgi->getValue ( "pt" );
    
        $pp = $cgi->getValue ( "pp" );
    
        $pb = $cgi->getValue ( "pb" );
    
        $pl = $cgi->getValue ( "pl" );
    
        $po = $cgi->getValue ( "po" );
    
        $pp_min = $cgi->getValue ( "pp_min" );
    
        $pp_max = $cgi->getValue ( "pp_max" );
    
        $query = "
    
          SELECT
    
            p.id                AS id,
    
            p.propertyoption    AS propertyoption,
    
            p.propertyprice     AS propertyprice,
    
            p.propertyaddress   AS propertyaddress,
    
            pl.propertylocation AS propertylocation,
    
            ps.propertystatus   AS propertystatus,
    
            pt.propertytype     AS propertytype,
    
            p.propertyref       AS propertyref,
    
            p.propertybedrooms  AS propertybedrooms,
    
            p.propertyphoto1    AS propertyphoto1,
    
            p.propertyphoto2    AS propertyphoto2,
    
            p.propertyphoto3    AS propertyphoto3,
    
            p.propertyphoto4    AS propertyphoto4,
    
            p.shortdescription  AS shortdescription,
    
            p.longdescription   AS longdescription,
    
            p.virtualtour   AS virtualtour
    
          FROM
    
            " . $property_table . " p
    
            INNER JOIN
    
            " . $propertytypes_table . " pt ON (p.propertytype=pt.id)
    
            INNER JOIN
    
            " . $propertylocations_table . " pl ON (p.propertylocation=pl.id)
    
            INNER JOIN
    
            " . $propertystatus_table . " ps ON (p.propertystatus=ps.id)
    
          WHERE
    
            p.propertyshow=1
    
          ";
    
        if ( $pt != "" )
    
          $query .= " AND p.propertytype=" . $sql->quote ( $pt );
    
        if ( $pp_min != "" )
    
          $query .= " AND p.propertyprice>=" . $sql->quote ( $pp_min );
    
        if ( $pp_max != "" )
    
          $query .= " AND p.propertyprice<=" . $sql->quote ( $pp_max );
    
         
    
        if ( $pb != "" )
    
          $query .= " AND p.propertybedrooms>=" . $sql->quote ( $pb );
    
        if ( $pl != "" )
    
          $query .= " AND p.propertylocation=" . $sql->quote ( $pl );
    
        if ( $po != "" )
    
          $query .= " AND p.propertyoption=" . $sql->quote ( $po );
    
        // set the query ordering
    
        if ( isset ( $property_search_order ) && $property_search_order != "" )
    
          $query .= "ORDER BY p." . $property_search_order . " " .
    
               ( "a" == strtolower ( substr ( $property_search_ordering, 0, 1 ) ) ?
    
                 "ASC" : "DESC" );
    
        
    
        $results = $sql->execute ( $query, SQL_RETURN_ASSOC );
    
        
    
        $total_results = sizeof ( $results );
    
        if ( $total_results == 0 )
    
        {
    
          ?>
    
    <br />
    
    <br />
    
    <p align="center"><?php echo GENERAL_NO_PROPERTIES_FOUND; ?></p>
    
    <br />
    
    <br />
    
    <br />
    
    <?php
    
        }
    
    if ( $total_results  >0 ) {    
    
        $total_pages = ceil ( $total_results / $property_search_limit ); //total number of pages
    
        $page = $cgi->getValue ( "page" );
    
        if ( ! $page )
    
          $page = 1;
    
         
    
        $offset = ( $page - 1 ) * $property_search_limit; //starting number for displaying results out of DB
    
        $max = $offset + $property_search_limit;
    
        $max = ( $max > $total_results ? $total_results : $max );
    
        
    
    ?>
    
    <p align="center"><?php echo GENERAL_PROPERTIES_FOUND; ?></p>
    
    <br />
    
    <?php
    
        for ( $l = $offset; $l < $max; ++$l )
    
        {
    
          $row = $results [ $l ];
    
         
    
          // Start of Display Output
    
          require ( "includes/templates/layout_results.php" );
    
          // End of Display output
    
        }  
    
        ?>
    
    <div align="center">
    
    <p><?php echo GENERAL_PAGE; ?> -
    
    <?php
    
        
    
        if ( $page != 1 )
    
        {
    
        ?>
    
    <a href="<?php echo $_SERVER [ 'PHP_SELF' ]; ?>?op=search&page=1&po=<?php echo $po; ?>&pt=<?php echo $pt; ?>&pp=<?php echo $pp; ?>&pb=<?php echo $pb; ?>&pl=<?php echo $pl; ?>&pp_min=<?php echo $pp_min; ?>&pp_max=<?php echo $pp_max; ?>"><< Voltar </a>  -
    
    <?php
    
         
    
          $prevpage = $page - 1;
    
        }
    
        $to = ( $page < $total_pages - 2 ? $page + 3 : $total_pages );
    
        $from = ( $page >= 1 && $page <= 3 ? 1 : $page - 3 );
    
        for ( $i = $from; $i <= $to; ++$i )
    
        {
    
          if ( $i == $total_results )
    
            $to = $total_results;
    
            
    
          if ( $i != $page )
    
          {
    
            ?>
    
    <a href="?op=search&showold=yes&page=<?php echo $i; ?>&po=<?php echo $po; ?>&pt=<?php echo $pt; ?>&pp=<?php echo $pp; ?>&pb=<?php echo $pb; ?>&pl=<?php echo $pl; ?>&pp_min=<?php echo $pp_min; ?>&pp_max=<?php echo $pp_max; ?>"><?php echo $i; ?></a>
    
    <?php
    
          }
    
          else
    
          {
    
            ?>
    
    <b>[<?php echo $i; ?>]</b>
    
    <?php
    
          }
    
         
    
          if ( $i != $total_pages )
    
            ?>
    
    <?php
    
        }
    
        if ( $page != $total_pages )
    
        {
    
          $nextpage = $page + 1;
    
          ?>
    
    -  <a href="?op=search&page=<?php echo $total_pages; ?>&po=<?php echo $po; ?>&pt=<?php echo $pt; ?>&pp=<?php echo $pp; ?>&pb=<?php echo $pb; ?>&pl=<?php echo $pl; ?>&pp_min=<?php echo $pp_min; ?>&pp_max=<?php echo $pp_max; ?>">Próximo>></a>
    
    <?php
    
        }
    
        ?>
    
    </p>
    
    </div>
    
    <br />
    
    <br />
    
    <?php
    
      }
    
    }
    
      else if ( $cgi->getValue ( "sp" ) == "y" )
    
    {
    
          // Start of Display Output
    
          require ( "includes/templates/layout_view_photos.php" );
    
          // End of Display output
    
    }
    
      else
    
      {
    
        if ( !$cgi->getValue ( "op" ) == "SendInformationRequest" )
    
      {
    
        ?>
    
    <br />
    
    <br />
    
    <h2 align="center"><?php echo FORM_TITLE; ?></h2>
    
    <p align="center"><?php echo FORM_SEARCH_TEXT; ?></p>
    
    <?php
    
        // Start of Search Box Output
    
        require ( "includes/templates/inc-searchbox.php" );
    
         // End of Search Box Output
    
    }
    
      }
    
    ?>
    
    <br />
    
    <p></p>

  6. Fiz uma perquisa e pode ser uma solução você comentar a linha que verifica este limite.

    if (current_user_can ('manage_options'))
    @ ini_set ('memory_limit', apply_filters ('admin_memory_limit, WP_MAX_MEMORY_LIMIT));

    Caso consiga logar, retire os plugins e restaure o arquivo editado.

    Outra solução é restaurar um backup anterior do servidor.

  7. Pessoal, resolvi o problema com a ajuda do André Manoel.

    Foi simples, bastou fazer uma comparação com IF.

    Abaixo código caso alguém tenha uma duvida parecida, já tem uma solução.

    <input name="bar" type="text" disabled="disabled" id="bar" value="<?php  $bar = $cgi->htmlEncode ( $row [ "property_search_order" ] );
    if($bar === "propertyprice")
    echo "Valor do Im&oacute;vel";
    if($bar === "propertytype")
    echo "Tipo do Im&oacute;vel";
    if($bar === "propertylocation")
    echo "Localiza&ccedil;&atilde;o do Im&oacute;vel"; ?>" size="20" maxlength="4" readonly="readonly" />

    Att.

    Henrique Flausino

  8. Pessoal, vou ser mais claro.

    Já consegui puxar os dados do banco, mas preciso que o resultados seja mostrado assim:

    Quando o resultado for "propertyprice" deverá ser mostrado "Valor do Imóvel" e assim por diante, para mais 2 outros resoltados.

    Att.

    Henrique Flausino

  9. como está construído seu banco?

    acho que seria mais ou menos isso o que você quer:

    $conexao->SetSQL("select * from NOME_TABELA where ID= $ID");

    $resultado = $conexao->Consultar();

    $tabela=mysql_fetch_array($resultado);

    $valor_imovel = $tabela["propertyprice"];

    onde a variável valor_imovel pegaria o valor propertyprice da tabela

    echo "$valor_imovel";

    aqui mostraria o valor..

    acho que é isso.. posta ae se precisar

    Já puxei os dados, mas preciso de uma função que ao mostrar um dos 3 resultados ele altere para o seu respectivo valor.

    propertyprice = Valor do Imóvel

    propertytype = Tipo do Imóvel

    propertylocation = Localização do Imóvel

    Segue código:

    <?php
    
    require ( "../includes/config.php" );
    require ( "../includes/CGI.php" );
    require ( "../includes/SQL.php" );
    
    $cgi = new CGI ();
    $sql = new SQL ( $DBusername, $DBpassword, $server, $database );
    
    if ( ! $sql->isConnected () )
    {
      die ( $DatabaseError );
    }
    
    require ( "includes/Auth.php" );
    $auth = new Auth ( $cgi, $sql, $admin_table );
    $auth->checkAuth ( "index.php" );
    
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <title>Administração Geral de Imóveis</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="style.css" rel="stylesheet" type="text/css" /> 
    <style type="text/css">
    <!--
    .style1 {color: #FF0000}
    -->
    </style>
    </head> 
    <body> 
    <table border="0" cellpadding="1" cellspacing="0" width="100%"> 
    <tbody> 
    <tr> 
    <td bgcolor="#333333"> <?PHP include "header.php"; ?>
    <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%"> 
    <tbody> 
    <tr> 
    <td colspan="4"> 
    <table width="100%" cellpadding="0" cellspacing="0"> 
    <tr> 
    <td align="left" valign="top" class="leftbg"> <?PHP include "leftmenu.php"; ?></td> 
    <td valign="top"> 
    <h2 align="left"><img src="images/spacer.gif" height="10" width="15" />Configura&ccedil;&otilde;es</h2> 
    
    <table width="95%" align="center" cellpadding="0" cellspacing="1">
    <tr>
    <td> As defini&ccedil;&otilde;es nesta p&aacute;gina precisa ser configurada corretamente para permitir o bom funcionamento de suas propriedades em seu site. Certifique-se de que todas as informa&ccedil;&otilde;es inseridas est&atilde;o corretas.</td>
    </tr>
    </table><br />
    
    <?php
    
      if ( $cgi->getValue ( "op" ) == "UpdateConfigure" )
      {
        $sql->execute ( "UPDATE " . $configure_table . " SET  
          websiteurl=" . $sql->quote ( $cgi->getValue ( "websiteurl" ) ) . ", 
          imagepath=" . $sql->quote ( $cgi->getValue ( "imagepath" ) ) . ", 
          imageurl=" . $sql->quote ( $cgi->getValue ( "imageurl" ) ) . ", 
          language_pack=" . $sql->quote ( $cgi->getValue ( "language_pack" ) ) . ", 
          display_rental=" . $sql->quote ( $cgi->getValue ( "display_rental" ) ) . ", 
          display_sale=" . $sql->quote ( $cgi->getValue ( "display_sale" ) ) . ", 
          display_search_types=" . $sql->quote ( $cgi->getValue ( "display_search_types" ) ) . ", 
          display_search_locations=" . $sql->quote ( $cgi->getValue ( "display_search_locations" ) ) . ", 
          display_search_bedrooms=" . $sql->quote ( $cgi->getValue ( "display_search_bedrooms" ) ) . ",
          display_search_max_price=" . $sql->quote ( $cgi->getValue ( "display_search_max_price" ) ) . ",
          property_search_order=" . $sql->quote ( $cgi->getValue ( "property_search_order" ) ) . ", 
          property_search_ordering=" . $sql->quote ( $cgi->getValue ( "property_search_ordering" ) ) . ", 
          property_search_limit=" . $sql->quote ( $cgi->getValue ( "property_search_limit" ) ) . ", 
          property_map_url=" . $sql->quote ( $cgi->getValue ( "property_map_url" ) ) . ", 
          max_image_resize_width=" . $sql->quote ( $cgi->getValue ( "max_image_resize_width" ) ) . ", 
          max_thumb_image_height=" . $sql->quote ( $cgi->getValue ( "max_thumb_image_height" ) ) . ", 
          max_thumb_image_width=" . $sql->quote ( $cgi->getValue ( "max_thumb_image_width" ) ) . ",
          template_page_name=" . $sql->quote ( $cgi->getValue ( "template_page_name" ) ) . "
      " );
    
        ?>
    <br />
    <p align="center"><font color="red">As configura&ccedil;&otilde;es foram atualizadas com sucesso! </font></p>
    <?php
      }
    
      $rows = $sql->execute ( "SELECT * FROM " . $configure_table . " LIMIT 1",
        SQL_RETURN_ASSOC );
      $row = $rows [ 0 ];
    
    ?>
    <form method="post">
    <input name="op" type="hidden" value="UpdateConfigure" />
    <p align="center"></p>
    <table width="85%" align="center" cellpadding="2" cellspacing="1">
    <tr>
      <td height="32" colspan="2" align="left" valign="middle" background="images/top-menubg.gif" class="leftbg"> <b>Configura&ccedil;&otilde;es e Logotipo</b></td>  
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Website URL:</td>
    <td><input type="text" name="websiteurl" size="45" maxlength="125" value="<?php echo $cgi->htmlEncode ( $row [ "websiteurl" ] ); ?>" /></td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">  Path. Local da pasta das Imagens:</td>
    <td><input type="text" name="imagepath" size="45" maxlength="125" value="<?php echo $cgi->htmlEncode ( $row [ "imagepath" ] ); ?>" /> 
      <span class="style1">n&atilde;o mexer sem conhecimento</span> </td>
    </tr>
    <tr>
    <td align="right" valign="top" bgcolor="#F3F3F3">URL da pasta das Imagens:</td>
    <td valign="top"><input type="text" name="imageurl" size="45" maxlength="125" value="<?php echo $cgi->htmlEncode ( $row [ "imageurl" ] ); ?>" />
      <span class="style1">n&atilde;o mexer sem conhecimento</span> <br />
      <br /></td>
    </tr>
    <tr>
      <td height="32" colspan="2" align="left" valign="middle" background="images/top-menubg.gif" class="leftbg"> <b>Nome do arquivo principal</b></td>  
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Nome do arquivo:</td>
    <td><input type="text" name="template_page_name" size="45" maxlength="125" value="<?php echo $cgi->htmlEncode ( $row [ "template_page_name" ] ); ?>" /> <span class="style1">n&atilde;o mexer sem conhecimento</span>  </td>
    </tr>
    <tr>
      <td height="32" colspan="2" align="left" valign="middle" background="images/top-menubg.gif" class="leftbg"> <b>Defini&ccedil;&atilde;o de Idiomas </b></td>  
    </tr><tr>
    <td align="right" valign="top" bgcolor="#F3F3F3">Idioma:</td>
    <td valign="top">
    <select name="language_pack"><?php 
    $dirname = "../$LanguageFolder";
    $dh = opendir( $dirname ) or die("Could not find Language Director");
    while ( ! ( ( $langpack = readdir( $dh ) ) === false ) ) {
           if ($langpack != "." && $langpack != "..") {
    echo "<option value=\"$langpack\"";  
    if ( $row [ "language_pack" ] == "$langpack" ) { echo " selected"; }
    echo ">$langpack</option>";
           } }
    closedir( $dh );
    
    
    ?>
    </select>
    <br />
    <br /></td>
    </tr>
    <tr>
      <td height="32" colspan="2" align="left" valign="middle" background="images/top-menubg.gif" class="leftbg"> <b>Op&ccedil;&otilde;es de Pesquisa/Busca</b></td>  
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3"> Mostrar Aluguel:</td>
    <td><input name="display_rental" type="radio" value="Y"<?php if ( $row [ "display_rental" ] == "Y" ) { echo " checked"; } ?> /> 
    Sim &nbsp;
      <input name="display_rental" type="radio" value="N"<?php if ( $row [ "display_rental" ] == "N" ) { echo " checked"; } ?> /> 
      N&atilde;o</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Mostrar Vendas:</td>
    <td><input name="display_sale" type="radio" value="Y"<?php if ( $row [ "display_sale" ] == "Y" ) { echo " checked"; } ?> />   Sim&nbsp;&nbsp;
      <input name="display_sale" type="radio" value="N"<?php if ( $row [ "display_sale" ] == "N" ) { echo " checked"; } ?> />   N&atilde;o</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Mostrar Busca por Im&oacute;veis:</td>
    <td><input name="display_search_types" type="radio" value="Y"<?php if ( $row [ "display_search_types" ] == "Y" ) { echo " checked"; } ?> />   Sim&nbsp;&nbsp;
      <input name="display_search_types" type="radio" value="N"<?php if ( $row [ "display_search_types" ] == "N" ) { echo " checked"; } ?> />   N&atilde;o</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Mostrar Busca por Localiza&ccedil;&atilde;o:</td>
    <td><input name="display_search_locations" type="radio" value="Y"<?php if ( $row [ "display_search_locations" ] == "Y" ) { echo " checked"; } ?> />   Sim&nbsp;&nbsp;
      <input name="display_search_locations" type="radio" value="N"<?php if ( $row [ "display_search_locations" ] == "N" ) { echo " checked"; } ?> />   N&atilde;o</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Mostrar Busca por Quartos:</td>
    <td><input name="display_search_bedrooms" type="radio" value="Y"<?php if ( $row [ "display_search_bedrooms" ] == "Y" ) { echo " checked"; } ?> />   Sim&nbsp;&nbsp;
      <input name="display_search_bedrooms" type="radio" value="N"<?php if ( $row [ "display_search_bedrooms" ] == "N" ) { echo " checked"; } ?> />   N&atilde;o</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Mostrar Busca por Pre&ccedil;o:</td>
    <td><input name="display_search_max_price" type="radio" value="Y"<?php if ( $row [ "display_search_max_price" ] == "Y" ) { echo " checked"; } ?> />   Sim&nbsp;&nbsp;
      <input name="display_search_max_price" type="radio" value="N"<?php if ( $row [ "display_search_max_price" ] == "N" ) { echo " checked"; } ?> /> 
    N&atilde;o</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3"> Resultados por ordem da pesquisa:</td>
    <td><select name="property_search_order">
      <option value="propertyprice">Valor do Im&oacute;vel</option>
      <option value="propertytype">Tipo do Im&oacute;vel</option>
      <option value="propertylocation">Localiza&ccedil;&atilde;o do Im&oacute;vel</option> 
    </select> 
    Atual: 
    <input name="Atual2" type="text" disabled="disabled" value="<?php echo $cgi->htmlEncode ( $row [ "property_search_order" ] ); ?>" size="15" maxlength="4" readonly="readonly" /></td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Mostrar Resultados da busca por:</td>
    <td><select name="property_search_ordering">
        <option value="Ascendente">Ascendente</option>
        <option value="Descendente">Descendente</option>
    </select> 
      Atual: 
      <input name="Atual" type="text" disabled="disabled" value="<?php echo $cgi->htmlEncode ( $row [ "property_search_ordering" ] ); ?>" size="15" maxlength="4" readonly="readonly" /></td>
    </tr>
    <tr>
    <td align="right" valign="top" bgcolor="#F3F3F3">M&aacute;x. de Resultados por P&aacute;gina:</td>
    <td valign="top"><input type="text" name="property_search_limit" size="10" maxlength="4" value="<?php echo $cgi->htmlEncode ( $row [ "property_search_limit" ] ); ?>" />
      <br />
      <br /></td>
    </tr>
    <tr>
      <td height="32" colspan="2" align="left" valign="middle" background="images/top-menubg.gif" class="leftbg"> <b>Localiza&ccedil;&atilde;o de Im&oacute;veis por Cep e Mapa</b></td>  
    </tr>
    <tr>
    <td align="right" valign="top" bgcolor="#F3F3F3"> Pesquisar por Cep ou Mapa - URL:</td>
    <td><input type="text" name="property_map_url" size="55" maxlength="200"
    value="<?php echo $cgi->htmlEncode ( $row [ "property_map_url" ] ); ?>" />
    <br />
    (Isso permitir&aacute; que voc&ecirc; exiba um mapa para procurar um imovel pelo cep autamaticamente.<br />
    Deixamos como padr&atilde;o o Google, mas pode ser alterado caso tenha conhecimento e outra URL confi&aacute;vel. Temos <strong>3</strong> op&ccedil;&otilde;es abaixo.)<br />
    <b>Google Maps:</b> http://local.google.com/local?f=q&amp;hl=en&amp;q=XXXXXX<br />
    <b>Street Map:</b>
    http://www.streetmap.co.uk/streetmap.dll?postcode2map?XXXXXX<br />
    <b>Multimap:</b>
    http://www.multimap.com/map/browse.cgi?local=h&amp;scale=10000&amp;pc=XXXXXX<br />
    <br /></td>
    </tr>
    <tr>
      <td height="32" colspan="2" align="left" valign="middle" background="images/top-menubg.gif" class="leftbg"> <b>Configura&ccedil;&atilde;o do Tamanho da Imagem de Exibi&ccedil;&atilde;o </b></td>  
    </tr>
    <tr>
      <td colspan="2" bgcolor="#F3F3F3"> Isso se aplica aos retratos e paisagens das fotografias. Largura e Altura das imagens exibidas no site <br />
    <br /></td>
      </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Tamanho da Imagem:</td>
    <td><input type="text" name="max_image_resize_width" size="5" maxlength="4" value="<?php echo $cgi->htmlEncode ( $row [ "max_image_resize_width" ] ); ?>" />
    px </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Altura da Imagem:</td>
    <td><input type="text" name="max_thumb_image_height" size="5" maxlength="4" value="<?php echo $cgi->htmlEncode ( $row [ "max_thumb_image_height" ] ); ?>" />
    px - 
    
    
     Esta &eacute; para a p&aacute;gina de resultados da pesquisa</td>
    </tr>
    <tr>
    <td align="right" bgcolor="#F3F3F3">Largura da Imagem:</td>
    <td><input type="text" name="max_thumb_image_width" size="5" maxlength="4" value="<?php echo $cgi->htmlEncode ( $row [ "max_thumb_image_width" ] ); ?>" />
    px - Esta &eacute; para a p&aacute;gina de resultados da pesquisa</td>
    </tr>
    <tr><td height="20" align="left" valign="middle" class="leftbg" colspan="2">&nbsp; </td>  
    </tr>
    </table>
    <p align="center">
    <input type="submit" class="submit" value="Atualizar" onclick="return confirm('Tem certeza de que deseja atualizar?');" />
    </p>
    </form>
    <br /></td>
    </tr> 
    </table> </td> 
    </tr> 
    </tbody> 
    </table> </td> 
    </tr> 
    </tbody> 
    </table> <?PHP include "footer.php"; ?>
    </body>
    </html>

  10. Obrigado Henrique

    Funcionou perfeitamente.

    mas porque sera o meu script não funcionou o html??

    não tem nada de mais

    segue o script completo

    <?php

    $date = date("d/m/Y h:i");

    // RECEBE OS VALORES VINDO DO FORMULÁRIO E ATRIBUI AS VARIÁVEIS

    $nome = $_POST['nome'];

    $email = $_POST['email'];

    $telefone = $_POST['telefone'];

    $cidade = $_POST['cidade'];

    $textodamensagem = $_POST['textodamensagem'];

    //CABEÇALHO - ONFIGURAÇÕES SOBRE SEUS DADOS E SEU WEBSITE

    $nome_do_site="Seu Site";

    $email_para_onde_vai_a_mensagem = "programadorsesmo3@gmail.com";

    $nome_de_quem_recebe_a_mensagem = "Rob";

    $exibir_apos_enviar='enviado.html';

    //MAIS - CONFIGURAÇOES DA MENSAGEM ORIGINAL

    $cabecalho_da_mensagem_original="From: $name <$email>\n";

    $assunto_da_mensagem_original="Contato no Site";

    // FORMA COMO RECEBERÁ O E-MAIL (FORMULÁRIO)

    $configuracao_da_mensagem_original="

    <html>

    <body>

    <font face=Verdana size=1>

    <br>

    <b>Contato On-Line</b><br>

    <br>

    <b>Nome</b>: ' $nome ' <br>

    <b>E-mail</b>: ' $email ' <br>

    <b>Fone</b>: ' $telefone ' <br>

    <b>Mensagem</b>: ' $textodamensagem ' <br>

    <br><br>

    </font>

    </body>

    </html>";

    $headers = "Content-type: text/html; charset=iso-8859-1rn";

    //CONFIGURAÇÕES DA MENSAGEM DE RESPOSTA

    // CASO $assunto_digitado_pelo_usuario="s" ESSA VARIAVEL RECEBERA AUTOMATICAMENTE A CONFIGURACAO

    // "Re: $assunto"

    $assunto_da_mensagem_de_resposta = "Confirmação";

    $cabecalho_da_mensagem_de_resposta = "From: $nome_do_site < $email_para_onde_vai_a_mensagem>\n";

    $configuracao_da_mensagem_de_resposta="Obrigado por entrar em contato!\nEstaremos respondendo em breve...\nAtenciosamente,\n$nome_do_site\n\nEnviado em: $date";

    // ****** IMPORTANTE ********

    // A PARTIR DE AGORA RECOMENDA-SE QUE NÃO ALTERE O SCRIPT PARA QUE O SISTEMA FINCIONE CORRETAMENTE

    // ****** IMPORTANTE ********

    //ESSA VARIAVEL DEFINE SE É O USUARIO QUEM DIGITA O ASSUNTO OU SE DEVE ASSUMIR O ASSUNTO DEFINIDO

    //POR VOCÊ CASO O USUARIO DEFINA O ASSUNTO PONHA "s" NO LUGAR DE "n" E CRIE O CAMPO DE NOME

    //'assunto' NO FORMULARIO DE ENVIO

    $assunto_digitado_pelo_usuario="s";

    //ENVIO DA MENSAGEM ORIGINAL

    $headers = "$cabecalho_da_mensagem_original";

    if($assunto_digitado_pelo_usuario=="n"){

    $assunto = "$assunto_da_mensagem_original";

    }

    $seuemail = "$email_para_onde_vai_a_mensagem";

    $mensagem = "$configuracao_da_mensagem_original";

    mail($seuemail,$assunto,$mensagem,$headers);

    //ENVIO DE MENSAGEM DE RESPOSTA AUTOMATICA

    $headers = "$cabecalho_da_mensagem_de_resposta";

    if($assunto_digitado_pelo_usuario=="n"){

    $assunto = "$assunto_da_mensagem_de_resposta";

    }else{

    $assunto = "Re: $assunto";

    }

    $mensagem = "$configuracao_da_mensagem_de_resposta";

    mail($email,$assunto,$mensagem,$headers);

    echo "&lt;script>window.location='$exibir_apos_enviar'</script>";

    ?>

    Vamos por parte, $headers .= "Content-type: text/html; charset=iso-8859-1" é o correto e no seu código está $headers = "Content-type: text/html; charset=iso-8859-1rn";

    Sua página (form) deve conter o mesmo formato "iso-8859-1"

    Não olhei todo o seu código mas o que mais me chamou a atenção foi isso.

    Att.

    Henrique Flausino

  11. Por não se tratar de um servidor de qualidade, não desmerecendo você ou a empresa, mas nem toda programação funciona igual em servidores diferentes.

    Estou postando o código abaixo para você usar no seu servidor, não edite nada, apenas coloque e teste.

    Link para o meu servidor para que você possa testar

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Contato</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    &lt;script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    &lt;script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="latest-post" class="wide-post">
    <h1 class="title">Contato</h1>
        <div class="entry">
          <form id="form1" name="form1" method="post" action="form.php">
            <table width="100%" border="0" class="links">
      <tr>
        <th width="17%" scope="col">* Nome:</th>
        <th width="83%" align="left"><span id="sprytextfield1">
          <input name="nome" type="text" id="nome" size="50" />
          <span class="textfieldRequiredMsg">Informe seu Nome.</span></span></th>
      </tr>
      <tr>
        <th scope="row">* E-mail:</th>
        <td><span id="sprytextfield2">
          <input name="Form_Email_Remetente" type="text" id="Form_Email_Remetente" size="50" />
          <span class="textfieldRequiredMsg">Informe seu e-mail.</span><span class="textfieldInvalidFormatMsg">Formato inválido.</span></span></td>
      </tr>
      <tr>
        <th scope="row">Telefone:</th>
        <td><input name="fone" type="text" id="fone" size="50" /></td>
      </tr>
      <tr>
        <th scope="row">CEP:</th>
        <td><input type="text" name="CEP" id="CEP" /></td>
      </tr>
      <tr>
        <th scope="row">Descrição do Contato:</th>
        <td><span id="sprytextarea1">
          <textarea name="Mensagem" id="Mensagem" cols="48" rows="7"></textarea>
          <br /><span class="textareaRequiredMsg">Favor deixar a descrição do contato.</span></span></td>
      </tr>
      <tr>
        <th scope="row"> </th>
        <td>
        <input type="submit" name="Enviar" id="Enviar" value="Enviar" />
        <input type="reset" name="Limpar" id="Limpar" value="Limpar" />
        <input name="Form_Email_Destinatario" type="hidden" id="Form_Email_Destinatario" value="henrique.flausino@gmail.com" style="visibility:hidden"/>
        <input name="Form_Email_Comcopia" type="hidden" id="Form_Email_Comcopia" style="visibility:hidden" value="robsong@gmail.com"/>
        <input name="Form_Email_Comcopiaoculta" type="hidden" id="Form_Email_Comcopiaoculta" value="" style="visibility:hidden"/>
        <input name="Assunto" type="hidden" id="Assunto" value="Form de Contato Online" style="visibility:hidden"/>
        <input name="Form_Email_Titulo" type="hidden" id="Form_Email_Titulo" value="Form de Contato Online" style="visibility:hidden"/>
        <input type="hidden" name="IP_do_Visitante" id="IP_do_Visitante" value="<?php echo "$_SERVER[REMOTE_ADDR]";?>" /></td>
      </tr>
    </table>
          </form>
    &lt;script type="text/javascript">
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["change"]});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email", {validateOn:["blur"]});
    var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur"]});
    //-->
    </script>
    </body>
    </html>
    <?php
    /* Verifica qual é o sistema operacional do servidor para ajustar o cabeçalho de forma correta. Não alterar */
    if(PHP_OS == "Linux") $quebra_linha = "\n"; //Se for Linux
    elseif(PHP_OS == "WINNT") $quebra_linha = "\r\n"; // Se for Windows
    else die("Este script não esta preparado para funcionar com o sistema operacional de seu servidor");
    
    // Passando os dados obtidos pelo formulário para as variáveis abaixo
    $IP        = $_POST['IP_do_Visitante'];
    $Nome     = $_POST['nome'];
    $Fone     = $_POST['fone'];
    $CEP     = $_POST['CEP'];
    $Form_Email_Remetente    = $_POST['Form_Email_Remetente'];
    $Form_Email_Destinatario = $_POST['Form_Email_Destinatario'];
    $Form_Email_Comcopia          = $_POST['Form_Email_Comcopia'];
    $Form_Email_Comcopiaoculta    = $_POST['Form_Email_Comcopiaoculta'];
    $Titulo            = $_POST['Form_Email_Titulo'];
    $Assunto           = $_POST['Assunto'];
    $Comentarios          = $_POST['Mensagem'];
    
    /* Montando a mensagem a ser enviada no corpo do e-mail. */
    $mensagemHTML = '
    <font face="Verdana, Geneva, sans-serif", size="2">
     <table width="806" border="0" cellpadding="0">
       <tr>
         <td width="186"><b>• IP do Visitante:</b></td>
         <td width="614">'.$IP.'</td>
       </tr>
       <tr>
         <td><b>• Nome:</b></td>
         <td>'.$Nome.'</td>
       </tr>
       <tr>
         <td><b>• Telefone:</b></td>
         <td>'.$Fone.'</td>
       </tr>
       <tr>
         <td><b>• CEP:</b></td>
         <td>'.$CEP.'</td>
       </tr>
       <tr>
         <td><b>• Assunto:</b></td>
         <td>'.$Assunto .'</td>
       </tr>
       <tr>
         <td><b>• Mensagem:</b></td>
         <td>'.nl2br($Comentarios).'</td>
       </tr>
     </table>
    </font>';
    
    
    /* Montando o cabeçalho da mensagem */
    $headers = "MIME-Version: 1.1".$quebra_linha;
    $headers .= "Content-type: text/html; charset=iso-8859-1".$quebra_linha;
    // Perceba que a linha acima contém "text/html", sem essa linha, a mensagem não chegará formatada.
    $headers .= "From: ".$Nome."<$Form_Email_Remetente>".$quebra_linha;
    $headers .= "Cc: ".$Form_Email_Comcopia.$quebra_linha;
    $headers .= "Bcc: ".$Form_Email_Comcopiaoculta.$quebra_linha;
    $headers .= "Reply-To: ".$Form_Email_Remetente.$quebra_linha;
    $headers .= "Return-Path: ".$Form_Email_Remetente.$quebra_linha;
    // Note que o e-mail do remetente será usado no campo Reply-To (Responder Para)
    
    /* Enviando a mensagem */
    //Verificando qual é o MTA que está instalado no servidor e efetuamos o ajuste colocando o paramentro -r caso seja Postfix
    
        mail($Form_Email_Destinatario, $Titulo, $mensagemHTML, $headers );
    
    echo "<meta http-equiv='refresh' content='1; url=contato.php'>"
    
    ?>

  12. Funciona em alguns servidores, porém não em todos.

    <?php
    /* Verifica qual é o sistema operacional do servidor para ajustar o cabeçalho de forma correta. Não alterar */
    if(PHP_OS == "Linux") $quebra_linha = "\n"; //Se for Linux
    elseif(PHP_OS == "WINNT") $quebra_linha = "\r\n"; // Se for Windows
    else die("Este script não esta preparado para funcionar com o sistema operacional de seu servidor");
    
    // Passando os dados obtidos pelo formulário para as variáveis abaixo
    $IP                                = $_POST['IP_do_Visitante'];
    $Nome                            = $_POST['nome'];
    $Fone                            = $_POST['fone'];
    $CEP                            = $_POST['CEP'];
    $Form_Email_Remetente            = $_POST['Form_Email_Remetente'];
    $Form_Email_Destinatario        = $_POST['Form_Email_Destinatario'];
    $Form_Email_Comcopia            = $_POST['Form_Email_Comcopia'];
    $Form_Email_Comcopiaoculta        = $_POST['Form_Email_Comoculta'];
    $Titulo                            = $_POST['Form_Email_Titulo'];
    $Assunto                        = $_POST['Assunto'];
    $Comentarios                    = $_POST['Mensagem'];
    
    /* Montando a mensagem a ser enviada no corpo do e-mail. */
    $mensagemHTML = '
    <font face="Verdana, Geneva, sans-serif", size="2">
     <table width="806" border="0" cellpadding="0">
       <tr>
         <td width="186"><b>• IP do Visitante:</b></td>
         <td width="614">'.$IP.'</td>
       </tr>
       <tr>
         <td><b>• Nome:</b></td>
         <td>'.$Nome.'</td>
       </tr>
       <tr>
         <td><b>• Telefone:</b></td>
         <td>'.$Fone.'</td>
       </tr>
       <tr>
         <td><b>• CEP:</b></td>
         <td>'.$CEP.'</td>
       </tr>
       <tr>
         <td><b>• Assunto:</b></td>
         <td>'.$Assunto .'</td>
       </tr>
       <tr>
         <td><b>• Mensagem:</b></td>
         <td>'.nl2br($Comentarios).'</td>
       </tr>
     </table>
    </font>';
    
    
    /* Montando o cabeçalho da mensagem */
    $headers = "MIME-Version: 1.1".$quebra_linha;
    $headers .= "Content-type: text/html; charset=iso-8859-1".$quebra_linha;
    // Perceba que a linha acima contém "text/html", sem essa linha, a mensagem não chegará formatada.
    $headers .= "From: ".$Nome."<$Form_Email_Remetente>".$quebra_linha;
    $headers .= "Cc: ".$Form_Email_Comcopia.$quebra_linha;
    $headers .= "Bcc: ".$Form_Email_Comcopiaoculta.$quebra_linha;
    $headers .= "Reply-To: ".$Form_Email_Remetente.$quebra_linha;
    $headers .= "Return-Path: ".$Form_Email_Remetente.$quebra_linha;
    // Note que o e-mail do remetente será usado no campo Reply-To (Responder Para) assim evita erros de envio na maioria dos servidores (sistema de segurança)
    
        mail($Form_Email_Destinatario, $Titulo, $mensagemHTML, $headers );
    
    echo "<meta http-equiv='refresh' content='1; url=contato-ok.php'>"
    
    ?>

    Este funciona em 99%, agora é só fazer o form em html.

    Obs.: servidor local (localhost) não envia mensagens, somente executa o código e mostra se existe erro, para enviar mensagens você deve instalar um servidor de e-mail em sua máquina o que não garante 100% o envio ou recebimento, pois a maioria dos servidores (hotmail, gmail, ig) estão barrando mensagens de server's desconhecidos (não homologados).

    Att.

    Henrique Flausino

  13. Claro que este é somente um exemplo e você deverá ajustar ao que precisa.

    /* Montando a mensagem a ser enviada no corpo do e-mail. */
    $mensagemHTML = '
    <font face="Verdana, Geneva, sans-serif", size="2">
     <table width="806" border="0" cellpadding="0">
       <tr>
         <td width="186">Contato On-Line</td>
         <td width="614"> </td>
       </tr>
       <tr>
         <td><b>• Nome:</b></td>
         <td>'.$nome.'</td>
       </tr>
       <tr>
         <td><b>• Telefone:</b></td>
         <td>'.$telefone.'</td>
       </tr>
       <tr>
         <td><b>• E-mail:</b></td>
         <td>'.$email.'</td>
       </tr>
       <tr>
         <td><b>• Mensagem:</b></td>
         <td>'.nl2br($textodamensagem).'</td>
       </tr>
     </table></font>';
    
    
    /* Montando o cabeçalho da mensagem */
    $headers = "MIME-Version: 1.1".$quebra_linha;
    $headers .= "Content-type: text/html; charset=iso-8859-1".$quebra_linha;
    // Perceba que a linha acima contém "text/html", sem essa linha, a mensagem não chegará formatada.
    $headers .= "From: ".$Nome."<$email>".$quebra_linha;
    $headers .= "Cc: ".$Form_Email_Comcopia.$quebra_linha;
    $headers .= "Bcc: ".$Form_Email_Comcopiaoculta.$quebra_linha;
    $headers .= "Reply-To: ".$email.$quebra_linha;
    $headers .= "Return-Path: ".$email.$quebra_linha;
    // Note que o e-mail do remetente será usado no campo Reply-To (Responder Para)

    Att.

    Henrique Flausino

  14. Caros.

    Tenho um banco onde estou puxando os dados, porém preciso que apereça outra informação de acordo com o que estiver no banco.

    Ex: Quando estiver no banco propertyprice o que deverá ser mostrado é: Valor do Imóvel

    Vai ficar assim:

    propertyprice = Valor do Imóvel

    propertytype = Tipo do Imóvel

    propertylocation = Localização do Imóvel

    Estes valores são fixos, porém não consigo uma forma de mostrar isso em uma combo ou em uma caixa de texto.

    Muito obrigado.

    Att.

    Henrique Flausino

  15. Olá pessoal.

    Estou tendo problema com o script abaixo, não sei porque o servidor está me retornando o seguinte erro.

    Warning: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE in /home/XXXXXXXX/public_html/Multi_Anexos/_inc/MultiAnexos.class.php on line 347

    Index.php

    <?php
    
    require "_inc/MultiAnexos.class.php";
    
    if( $_POST && MultiAnexos::is_mail($_POST['email']) ):
    
        // Instânciamos a classe, sem assunto
        $email = new MultiAnexos();
        $email->setMail('From', $_POST['email'], $_POST['nome']);
        $email->setMail('To', 'contato@mfdesign.com.br');
        $email->send();
        
    endif;
    
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>Multi-Anexos</title>
    <link href="_css/typo.css" rel="stylesheet" type="text/css" />
    &lt;script type=text/javascript src="jquery.js"></SCRIPT>
    
    </head>
    
    
    <body>
    <div id="div">
    
    
        <?php
    
        if( $_POST ):
            echo defined('SEND_RETURN') ?
            '<h2>'.SEND_RETURN.'</h2>' : '<h2>Informe seu nome e um email válido.</h2>';
        endif;
    
    
        // Exibindo as variáveis postadas após submeter o formulário
        #MultiAnexos::showPOST();
    
        // Exibindo um preview da mensagem html formatada
        #MultiAnexos::showHTML();
    
        ?>
    
    
        <h1>Submetendo um formulário com múltiplos anexos</h1>    
    
        <p>Preencha o formulário abaixo para enviar sua mensagem.<br />É necessário preencher todos os campos.    </p>
    
        <form id="frm" action="<?=basename(__FILE__)?>" method="post" enctype="multipart/form-data">
    
          <fieldset>
                <legend>
          &lt;script language="JavaScript" type="text/javascript">
    
    var currentcheckcontent,lastcheckcontent;
    $(document).ready(function(){
        $("#addfileupload").click(function () {
            $("#fileuploads").append("<input type=\"file\" name=\"arquivo[]\" size=\"50\"><br />");
            return false;
        });
    });
    
    
    function getticketsuggestions() {
        currentcheckcontent = $("#message").val();
        if (currentcheckcontent!=lastcheckcontent && currentcheckcontent!="") {
            $.post("submitticket.php", { action: "getkbarticles", text: currentcheckcontent },
            function(data){
                if (data) {
                    $("#searchresults").html(data);
                    $("#searchresults").slideDown();
                }
            });
            lastcheckcontent = currentcheckcontent;
        }
        setTimeout('getticketsuggestions();', 3000);
    }
    getticketsuggestions();
    
          </script>
          Formulário de Contato</legend>
                <p>
                <label for="nome">Nome:</label>
                    <input id="nome" name="nome" />
                </p>
                <p>
                    <label for="email">E-Mail:</label>
                    <input id="email" name="email" />
                </p>
                <p>
                    <label for="telefone">Telefone:</label>
                    <input id="telefone" name="telefone" />
                </p>
                <p id=fileuploads>
                    <label for="arquivo1">Anexo</label>
                    <INPUT size=50 type=file name=arquivo[]>
              </p><A id=addfileupload href="#"><IMG class=absmiddle border=0 alt="" src="add.gif"></A>
              <p></p>
              <p>
              <label for="mensagem">Mensagem:</label>
                    <textarea id="mensagem" name="mensagem" cols="10" rows="10" class="text"></textarea>
                </p>
                <span>
                    <input type="submit" value="ENVIAR" class="send" />
                </span>
            </fieldset>
    
        </form>
    
    
    </div>
    </body>
    </html>
    MultiAnexos.class.php
    <?php
    
    /**
     * Multi-Anexos | Multiple File Attachments 
     * Envio de e-mail com múltiplos arquivos anexados
     * 
     * @author Giovanni Ramos
     * @twitter @giovanni_ramos
     * @version 2.5
     * @since 2009-09-23 
     * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     *
    **/
    
    
    class MultiAnexos {
    
        public  static $head, $body;
        private $boundary = array();
    
    
        /**
         * O objeto MultiAnexos ao ser instanciado, pode opcionalmente atribuir um assunto à mensagem
         * 
         * @access public
         * @param string $subject Assunto da mensagem
         * 
         * */
        public function __construct($subject = null) {
            self::setHTML();
            self::setReturnPath();
            $this->subject = $subject;
            $this->boundary = '==Multipart_Boundary_'.md5(uniqid(time()));
        }
    
    
        /**
         * Método para validar email
         * 
         * @access public
         * @param string $mail E-mail a ser testado
         * @return boolean Retorna true, se o e-mail for válido
         *
         * */
        public function is_mail($mail = null) {
            return (filter_var(trim($mail), FILTER_VALIDATE_EMAIL) ? true : false);
        }
    
    
        /**
         * Método para atribuir um assunto à mensagem
         * 
         * @access public
         * @param string $subject Assunto da mensagem
         * @return void
         *
         * */
        public function setSubject($subject = null) {
            $this->subject = $subject;
        }
    
    
        /**
         * Método para recuperar o assunto da mensagem
         * 
         * @access private
         * @return string Retorna o assunto da mensagem. Se nenhum for definido, retorna o Subject: "Sem assunto"
         *
         * */
        private function getSubject() {
            return (!is_null($this->subject)) ? $this->subject : "Sem assunto";
        }
    
    
        /**
         * Método para incorporar um e-mail à mensagem
         * 
         * @access public
         * @param string $type Tipo pré-definido de e-mail: From, To, Cc, Bcc ou Reply-To
         * @param string $email Endereço de e-mail
         * @param string $name Um nome ou apelido para o e-mail (opcional)
         * @return array Retorna o email
         *
         * */
        public function setMail($type, $mail = null, $name = null) {
            if(isset($mail) && self::is_mail($mail)):
                $type = strtolower($type);
                $type = str_replace('-', null, $type);
                $type = str_replace('_', null, $type);
    
                if(isset($type) && ereg('^[[:lower:]]*$', $type)):
                    if(!is_array($this->$type))
                        $this->$type = array();
                    array_push($this->$type, array($mail, $name));
                    return $this->$type;
                 endif;
             endif;
        }
    
    
        /**
         * Método para retornar a lista de e-mails atribuída à mensagem
         * 
         * @access public
         * @param string $type Tipo de e-mail: From, To, Cc, Bcc ou Reply-To
         * @return string Retorna a lista de acordo com o tipo
         *
         * */
         public function getMail($type) {
            if(isset($type)):
                if(!$this->$type) return false;
                if(!is_array($list)) $list = array(); 
    
                foreach($this->$type as $k => $v)
                    if(is_array($v))
                        $list[] = (is_null($v[1])) ? $v[0] : $v[1].' <'.$v[0].'>';
                return implode(', ', $list);
            endif;
        }
    
    
        /**
         * Método para incorporar um e-mail de retorno em caso de falha no envio da mensagem
         * IMPORTANTE: Informar um Return-Path, evita bloqueios anti-spam de servidores como Gmail ou Hotmail
         * 
         * @access public
         * @param string $setReturnPath Por padrão um e-mail de retorno será atribuído a mensagem
         * @return void
         *
         * */
        public function setReturnPath($setReturnPath = true) {
            $this->setReturnPath = $setReturnPath;
        }
    
    
         /**
         * Método para recuperar o e-mail de retorno da mensagem
         * 
         * @access private
         * @return string Retorna o e-mail de retorno
         *
         * */
        private function getReturnPath() {
            return (!is_bool($this->setReturnPath)) ? $this->setReturnPath : ( (bool)$this->setReturnPath ? $this->from[0][1] : null );
        }
    
    
         /**
         * Método para capturar variáveis enviadas via post, pelo formulário 
         * 
         * @access private
         * @return string Retorna a lista de variáveis
         *
         * */
        public function getPOST() { 
            $list = null;
            foreach($_POST as $k => $v)
                $list.= '<b>'.ucfirst($k).':</b> '.$v.'<br />';
            return $list;
        }
    
    
         /**
         * Método para exibir as variáveis submetidas pelo formulário
         * 
         * @access static
         * @return string void
         *
         * */
        static function showPOST() {
            if($_POST)
                echo '<pre>',htmlspecialchars(print_r($_POST, true)),'</pre>';
        }
    
    
         /**
         * Método para formatar o conteúdo da mensagem
         * 
         * @access public
         * @return string void
         *
         * */
        public function setHTML($body = null) {
            self::$body = (!is_null($body)) ? $body :
            '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-BR" lang="pt-BR">
                <head>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                <style>
                body         {background:#FFFFFF;}
                a, a:link     {color:#5b6105; text-decoration:none;}
                table         {margin:0; padding:0; border:1px solid #8F8E96; width:500px;}
                table tr     {background:#F6F6F6; }
                table td     {color:#000000; font: normal 11px arial, helvetica, sans-serif; border:dashed 1px #DDD; padding:30px;}
                </style>
                </head>
                <body>
                <br />
                <table border="0" cellspacing="10" cellpadding="0">
                <tr>
                    <td>
                    '.self::getPOST().'
                    </td>
                </tr>
                </table>
                <br />
                </body>
                </html>
            ';
        }
    
    
         /**
         * Método para limpar os espaços tabulados na mensagem 
         * 
         * @access public
         * @return string void
         *
         * */
        public function getHTML() {
            return str_replace("\t",null,self::$body);
        }
    
    
         /**
         * Método para exibir a mensagem enviada no corpo do e-mail
         * 
         * @access static
         * @return string void
         *
         * */
        static function showHTML() {
            if($_POST)
                echo self::$body;
        }
    
    
         /**
         * Método para preparar o cabeçalho da mensagem
         * 
         * @access public
         * @return string void
         *
         * */
        public function setHeader($multipart = false) {
            self::$head 
            = ('MIME-Version: 1.0'.PHP_EOL)
            . ('From: '.self::getMail("from").PHP_EOL)
            . ('X-Mailer: MultiAnexos v.2.0 PHP/'.phpversion().' '.PHP_EOL)
            . ((!empty($this->to[0][0])) ? 'To: '.self::getMail("to").PHP_EOL : NULL)
            . ((!empty($this->replyto[0][0])) ? 'Reply-To: '.self::getMail("replyto").PHP_EOL : NULL)
            . ((!empty($this->cc[0][0])) ? 'Cc: '.self::getMail("cc").PHP_EOL : NULL)
            . ((!empty($this->bcc[0][0])) ? 'Bcc: '.self::getMail("bcc").PHP_EOL : NULL)
            . ('Content-type: '.(($multipart) ? 'multipart/mixed; boundary="'.$this->boundary.'"'.PHP_EOL:'text/html; charset="ISO-8859-1"').PHP_EOL);
        }
    
    
         /**
         * Método para recuperar o cabeçalho da mensagem
         * 
         * @access public
         * @return string Retorna o HEADER da mensagem
         *
         * */
        public function getHeader() {
            return self::$head;
        }
    
    
         /**
         * Método para submeter a mensagem
         * 
         * @access public
         * @return boolean Retorna o status do envio
         *
         * */
        public function send() {
    
            // Verifico se o formulário submetido, possui algum arquivo anexo
            $file = (isset($_FILES['arquivo']) && in_array('0',$_FILES['arquivo']['error'])) ? $_FILES['arquivo'] : FALSE;
    
            $subj = self::getSubject();
    
            $body = self::getHTML();
    
            self::setHeader((bool) $file);
            $head = self::getHeader();
    
            // Executo a condição seguinte, se identificar um ou mais anexos junto a mensagem
            if($file){
    
                // Removendo da matriz os anexos falsos
                for ($x=0; $x<count($_FILES['arquivo']['name']); $x++):
                    if($file['error'][$x] <> UPLOAD_ERR_OK){
                        unset($file['name'][$x]);
                        unset($file['size'][$x]);
                        unset($file['type'][$x]);
                        unset($file['tmp_name'][$x]);
                        unset($file['error'][$x]);
                    }else{
                        $attach[] = array(
                            $file['name'][$x], 
                            $file['size'][$x], 
                            $file['type'][$x], 
                            $file['tmp_name'][$x]
                        );
                    }
                endfor;
    
    
                $html = stripslashes($body);
    
                // Criando os cabeçalhos MIME utilizados para separar as partes da mensagem 
                $body = '--'.$this->boundary.PHP_EOL;
                $body.= 'Content-Type: text/html; charset="ISO-8859-1"'.PHP_EOL;
                $body.= 'Content-Transfer-Encoding: 8bit'.PHP_EOL.PHP_EOL;
                $body.= $html.PHP_EOL;
                $body.= '--'.$this->boundary.PHP_EOL;
    
                for ($i=0; $i<sizeof($attach); $i++):
                    if(is_uploaded_file($attach[$i][3])) {
                        $Name = $attach[$i][0];
                        $Size = $attach[$i][1];
                        $Type = $attach[$i][2];
                        $Temp = $attach[$i][3];
    
                        if((strlen($Name)>1) && ($Size>0)) {
                            $fopen = fopen($Temp,"rb");
                            $fread = fread($fopen, filesize($Temp));
                            $cript = base64_encode($fread);
                            $close = fclose($fopen);
                            $chunk = chunk_split($cript);
        
                            $body.= 'Content-Disposition: attachment; filename="'.$Name.'"'.PHP_EOL;
                            $body.= 'Content-Type: '.$Type.'; name="'.$Name.'"'.PHP_EOL;
                            $body.= 'Content-Transfer-Encoding: base64'.PHP_EOL.PHP_EOL;
                            $body.= $chunk.PHP_EOL;
                            $body.= '--'.$this->boundary;
                            $body.= (sizeof($attach) == $i+1) ? '--'.PHP_EOL.PHP_EOL : PHP_EOL;
                        }
                    }
                endfor;
    
            }
    
            // Enviando a mensagem e definindo uma mensagem de status do envio em SEND_RETURN
            $status = mail(null, $subj, $body, $head, ((bool) $this->setReturnPath ? '-f'.self::getReturnPath() : null)) ? true : false;
    
            $status_message = ($status) ?
            '<span class="mail_ok">Sua mensagem foi enviada com sucesso.</span>' : 
            '<span class="mail_no">Sua mensagem não pôde ser enviada.</span><br /><br />Por favor tente novamente mais tarde.';
    
            define('SEND_RETURN', $status_message);
            
            return $status;
        }
    
    }
    
    
    ?>

    Alguém pode me ajudar?

    Atenciosamente.

    Henrique Flausino

  16. Pessoal.

    Tenho um banco de dados que contém alguns itens cadastrados com Categoria e Sub-Categoria.

    Gostaria de fazer um menu sanfonado, porém não está funcionando.

    Estou usando esta opção mas o Menu repete as categorias ao invéz de adcionar.

    <?php
    require_once("include/conexao.php");
    $sql = "SELECT* FROM categoria ORDER BY id ASC";
    $query = @mysql_query($sql);
    if (!$query){
    die ("Problemas ao executar o sql !!!");
    } else {
    while ($coluna = @mysql_fetch_array($query)){
    $id = $coluna["id"];
    $cat = $coluna["categoria"];
    $rol = $coluna["categoria"];
    $sub = $coluna["subcategoria"];
    ?>
    <li><? echo $cat; ?>
    <br />
    <a href="exibindo.php?subcategoria=<? echo $sub; ?>">» <? echo $sub; ?></a></li>
    <?
    }
    }
    // e para finalizar, fechamos a conexão com servidor MySQL
    mysql_close($conn);
    ?>

    Será que alguém poderia me dizer onde estou errando?

    Att.

    Henrique Flausino

  17. Olá garoto :)

    Testei aqui e funcionou perfeitamente a nova lógica....

    O script funciona da seguinte maneira, você informa na verdade o movieClip que está ATIVO no momento e por qual ele deve TROCAR.

    Resumindo em ordem crescente é uma lógica 0-1,1-2,2-3,3-4,4-5 ....

    você deve sempre repetir o ATIVO pois é uma referência.

    como você fez um teste booleano ACTIVE|INACTIVE nunca vai passar de 2 opções meu caro....

    não basta chamar o callFlip sem passar parâmetros o maximo que ele pode fazer é trocar de estado mesmo...

    Vamos lá uma nova lógica pra vc

    Mudando a função callflip:

    var objAtual:DisplayObject;
    
    function callFlip(obj:DisplayObject):void
    {
        if (! objAtual)
        {
            
        objAtual = mainView;
            
        }else{
            flip  = new Flip(objAtual, obj, 2, "left", true);
            addChild(flip);
            flipped = true;
            objAtual = obj;
        }
    }
    Assim guardamos o objeto de FLIP atual em objAtual e caso ele não tenha sido definido ainda ele é nosso objeto default "mainView"; Para que funcione deves chamar agora por :
    callFlip(secondView);
    Dentro de uma função de evento...
    mainView.infoButton.addEventListener(MouseEvent.MOUSE_DOWN, function(){callFlip(secondView)});

    Procure estudar mais seu código e ver seu funcionamento

    Boa sorte e bons Estudos

    Abraços

    OBS: testei com o TerceiroView e funcionou perfeitamente, basta você usar a função e passar por parâmetro quem será o mc a ser msotrado

    Olá Pooh.

    Muito obrigado pela ajuda, fiz alguns testes e aparentemente está ok.

    Estou tentando aplicar esta opção mas não está indo.

    Sempre me retorna o erro 1046: O tipo não foi encontrado ou não é uma constante de tempo de compilação: terceiroView.

    Onde será que estou errando?

    Revisei o código várias vezes e quando troco por secondView funciona normalmente.

    Usando o assistente não me retorna nenhum erro, somente quando estou exportando.

    Pode me ajudar?

    Att.

    Henrique Flausino

  18. Olá.

    Pessoal estou precisando de uma ajuda.

    Tenho um arquivo que faz um flip entre duas páginas, porém preciso adcionar mais e não sei como.

    Veja o código abaixo.

    AS3:

    import Classes.Flip;
    
    var cm:ContextMenu = new ContextMenu();
    cm.hideBuiltInItems();
    contextMenu = cm;
    
    var flipped:Boolean = false;
    var secondView:SecondView = new SecondView();
    var flip:Flip;
    
    function callFlip(e:MouseEvent):void
    {
        if (! flipped)
        {
            flip  = new Flip(mainView, secondView, 2, "left", true);
            addChild(flip);
            flipped = true;
        }
        else if (flipped)
        {
            flip = new Flip(secondView, mainView, 2, "left", true);
            addChild(flip);
            flipped = false;
        }
    }
    
    mainView.infoButton.addEventListener(MouseEvent.MOUSE_DOWN, callFlip);
    secondView.doneButton.addEventListener(MouseEvent.MOUSE_DOWN, callFlip);
    Da Class
    package Classes
    {
    
        import fl.transitions.Tween;
        import fl.transitions.TweenEvent;
        import fl.transitions.easing.Strong;
    
        import flash.display.*;
        import flash.utils.Timer;
        import flash.events.*;
    
        public class Flip extends Sprite
        {
    
            private var firstView:DisplayObject;
            private var secondView:DisplayObject;
            private var initFromSide:String;
            private var duration:int;
            private var flipTween:Tween;
            private var addSecondView:Boolean;
            private var added:Boolean = false;
            private var timer:Timer = new Timer(1);
    
            public function Flip(frontObject:DisplayObject, backObject:DisplayObject, timeInSeconds:int, flipFromSide:String, secondViewIsInLibrary:Boolean):void
            {
                firstView = frontObject;
                secondView = backObject;
                duration = timeInSeconds;
                initFromSide = flipFromSide;
                addSecondView = secondViewIsInLibrary;
    
                animateFirstView();
                timer.addEventListener(TimerEvent.TIMER, checkFlip);
            }
    
            private function animateFirstView():void
            {
                flipTween = new Tween(firstView,"scaleX",Strong.easeIn,1,0.5,duration/2,true);
                flipTween = new Tween(firstView,"scaleY",Strong.easeIn,1,0.5,duration/2,true);
    
                if (initFromSide == "left")
                {
                    flipTween = new Tween(firstView,"rotationY",Strong.easeIn,0,90,duration / 2,true);
                    timer.start();
                }
                else if (initFromSide == "right")
                {
                    flipTween = new Tween(firstView,"rotationY",Strong.easeIn,0,-90,duration / 2,true);
                    timer.start();
                }
            }
    
            private function checkFlip(e:TimerEvent):void
            {
                if (initFromSide == "left" && firstView.rotationY >= 90)
                {
                    timer.stop();
    
                    firstView.visible = false;
    
                    if (addSecondView && ! added)
                    {
                        secondView.x = firstView.x;
                        secondView.y = firstView.y;
    
                        addChild(secondView);
                        added = true;
                    }
                    else
                    {
                        secondView.x = firstView.x;
                        secondView.y = firstView.y;
                    }
    
                    animateSecondView();
                }
                else if (initFromSide == "right" && firstView.rotationY <= -90)
                {
                    timer.stop();
    
                    firstView.visible = false;
    
                    if (addSecondView && ! added)
                    {
                        secondView.x = firstView.x;
                        secondView.y = firstView.y;
    
                        addChild(secondView);
                        added = true;
                    }
                    else
                    {
                        secondView.x = firstView.x;
                        secondView.y = firstView.y;
                    }
    
                    animateSecondView();
                }
            }
    
            private function animateSecondView():void
            {
                flipTween = new Tween(secondView,"scaleX",Strong.easeOut,0.5,1,duration/2,true);
                flipTween = new Tween(secondView,"scaleY",Strong.easeOut,0.5,1,duration/2,true);
    
                if (initFromSide == "left")
                {
                    flipTween = new Tween(secondView,"rotationY",Strong.easeOut,-90,0,duration / 2,true);
                    firstView.visible = true;
                }
                else if (initFromSide == "right")
                {
                    flipTween = new Tween(secondView,"rotationY",Strong.easeOut,90,0,duration / 2,true);
                    firstView.visible = true;
                }
            }
        }
    }

    Será que alguém poderia me ajudar à colocar mais 1 página?

    Grato pela atenção.

    Henrique Flausino

×
×
  • Criar Novo...