<?

	include("../adm/conexao_e_agenda.php");

	include("../adm/funcoes.php");

	//include("/mostradata.php");

//...............................

	session_start();

	  if (isset($_GET['id'])){

	  $id=$_GET['id'];

  } else {

	  $id="";

  }



 $sql_c="select * from produtos where id='$id'";

 $result_c=mysqli_query($conexao,$sql_c) or die (mysqli_error($conexao));		  

 $linha=mysqli_fetch_array($result_c);

 //$data_comp = datapadrao_data($linha["dt_veiculo"]);

 //$placa = $linha["placa"];

		   $codigo    =   $linha['id'];

		   $titulo    =   $linha["produto"];//minusc_inicia_maiusc($chave["titulo"]);

		   $tipo     =   minusc_inicia_maiusc($conexao,descricao('tipos',$linha['tipo'],'desc_tipo'));

		   //$cidade    =   descricao(cidades,$linha['cidade'],cidade)."/".descricao(uf,descricao(cidades,$linha['cidade'],uf),uf);

		   //$uf = descricao(uf,descricao(cidades,$linha['cidade'],uf),uf);

		   //$cidade_maps = descricao(cidades,$linha['cidade'],cidade_maps);

		   //$bairro = descricao(bairros,$linha['bairro'],bairro);

		   //$endereco  = $linha["endereco"];

		   $preco     =   $linha["valor"];	

		  // $tipoimovel = (($linha["tipo"]=='4' || $linha["tipo"]=='5') ? "t" : "c");

		   //$tipopertence = (($linha["tipo"]=='4' || $linha["tipo"]=='5') ? "pertence='t'" : "pertence_pre='c'");

		   $referencia = $linha['id'];	

	?>

<!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=iso-8859-1" />

<title><? echo empresa; ?> - Mobile</title>

 <!--<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1;">-->
<?php include("metatags.php"); ?>
 <meta name="viewport" content="width=320, initial-scale=-1">

		<!-- CSS

  	================================================== -->

	<link rel="stylesheet" href="css/base.css">

	<link rel="stylesheet" href="css/grid.css">

	<link rel="stylesheet" href="css/mobile.css">

    

	<!-- Ícones

	================================================== -->

		

    <!-- JS

  	================================================== -->

	<script src="js/jquery_002.js"></script>

	<script src="js/jquery-migrate.js"></script>

	<script src="js/jquery.js"></script>

    <script src="js/selectivizr.js"></script>  

    <script src="js/functions.js"></script>



    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>

     <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>    

    <script type="text/javascript" src="js/spinners/spinners.min.js"></script>

    <script type="text/javascript" src="js/lightview/lightview.js"></script>



    <link rel="stylesheet" type="text/css" href="css/lightview/lightview.css" /> 

		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>

	<![endif]-->



              <script src="js/jquery-1.7.2.min.js"></script>

       <script src="js/lightbox.js"></script>



       <link href="css/lightbox.css" rel="stylesheet" />



       <script type="text/javascript">

           $(function () {

               $('#gallery a').lightBox();

           });

        </script>



    <!-- jQuery lightBox plugin - Gallery style */ -->

    <style type="text/css">

	#gallery {

		background-color: #fff;

		padding: 10px;

		width: auto;

	}

	#gallery ul { list-style: none; }

	#gallery ul li { display: inline; }

	#gallery ul img {

		border: 5px solid #444444;

		border-width: 5px 5px 20px;

	}

	#gallery ul a:hover img {

		border: 5px solid #fff;

		border-width: 5px 5px 20px;

		color: #fff;

	}

	#gallery ul a:hover { color: #fff; }

	</style>	



<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>

<script type="text/javascript" src="js/jquery.cycle.all.js"></script>

<style type="text/css">

.slideshow_ { height: 332px; width: 332px; margin: auto }

.slideshow_ img { padding: 5px; border: 1px solid #ccc; background-color: #eee; }

</style>

<script type="text/javascript">

$(document).ready(function() {

    $('.slideshow_').cycle({

		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...

		delay:   -4000

	});

});

</script> 

       

</head>

<body>

<? include("menu_iniciar.php"); ?>

	

	<div class="cols full" id="logo">

		<a href="http://www.adrianosoutoimoveis.com.br/mobile/"><img src="logo_adriano_creci_nabase_la224.png" width="322"></a>	</div>    

<div class="full" id="content">

		

		<div class="container" id="home">           

            <div align="left"><a href="javascript:history.go(-1)" target="_self"><img src="btn_voltar_anterior_azul.png" height="30" borde="0"/></a></div>

			<h1><br />

		    <img src="label_imoveis_detalhes.png" width="310" height="34" /></h1>

            

<div class="full cols">

                <script type="text/javascript" src="js/pesquisa.js"></script>

                <script type="text/javascript">

                    var valorbus = '';

                    var valorcod = '33';

                    var valorneg = '';

                    var valortip = '';

                    var valormin = '';

                    var valormax = '';

                    var valorest = '';

                    var valorcid = '';

                    var valorbai = '';

                    var valormap = '';

                </script>



      <div class="c5 cols">

<!--inicio-->  

           

<table width="320" border="0" align="center" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF">

  <tr>

    <td width="411"><div align="right">

      

        <table width="320" border="0" align="left" cellpadding="3" cellspacing="0">

          <tr>

            <td width="404" height="10" colspan="3" class="texto2b"><div align="right">REFER&Ecirc;NCIA: <? echo $linha['id']; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>

          </tr>

 <tr>

 <td>

 <table width="215" border="0" cellpadding="0" cellspacing="0"> 

  <tr>   

    <td width="308"><table width="172" border="0" align="right">



                    <td width="38%" rowspan="8"><div align="left"> 

                    <div class="slideshow_"><? 

					$sql_fotos1="select * from fotos where fk_categoria='$id' order by id asc";

                    $result_fotos1=mysqli_query($conexao,$sql_fotos1) or die (mysqli_error($conexao));		

                    while($linha_fotos1=mysqli_fetch_array($result_fotos1)) { 

                   

                    $nome_foto1 = $linha_fotos1['caminho_foto'];					

					$imagem_mini    =   "../fotos"."/".$linha_fotos1['caminho_foto'];

	                $imagem    =   "../fotos/".$linha_fotos1['caminho_foto']; 

		            $legenda = $linha_fotos1['modelo'];

			  /*if($nome_foto1!=""){

	  

			  print "<img src=\"fotos"."/".$nome_foto1."\" widht='250' height='250' border='0'>";

			  } else {

			  print "<img src=\"fotos"."/"."sem_fotografia.jpg"."\" border='0'>";

			  } */

			  ?>

             

    <? /*while($linha_cad=mysql_fetch_array($result_cad)) { 

	$galeria = $linha_cad['id']; 

	$select_cads = "SELECT * FROM galerias_fotos WHERE fk_galeria='$galeria' order by dt_foto desc limit 1"; //where id='5' 

    $result_cads = mysql_query($select_cads) or die(mysql_error());

	$linha_cads=mysql_fetch_array($result_cads);

	$fotocaminho = $linha_cads["caminho_foto"];	*/

	?>

    <!--<a href='<? //echo $imagem; ?>'

     class='lightview'

     data-lightview-group='example1'

     data-lightview-title=""

     data-lightview-caption="">

    <img src='<? //echo $imagem_mini; ?>'  width="300" height="300"/>  </a>-->       

    <a href="<? echo $imagem; ?>" rel="lightbox" title=""><img src='<? echo $imagem_mini; ?>'  width="300" height="300" border="1"  alt=''/></a>

	

<? } ?>

</div>

              

              

                    </div></td>

 </tr>

    </table></td>

    <td width="200">&nbsp;</td>

  </tr>

</table>

 </td>              

 </tr>

 <tr>

   <td height="10" colspan="3" class="verdana1">&nbsp;&nbsp;

     <table width="300" border="0" align="left" cellpadding="0" cellspacing="0">

       <tr>

         <td width="50%" class="texto"></td>

         <td width="50%"></td>

       </tr>

        <tr>

   <td colspan="2" class="texto2"><div align="center"><?  echo $linha['produto']; ?></div></td>

   </tr>  

         <tr>

<td width="50%" class="texto">&nbsp;</td>

              <td width="50%"></td>

        </tr>      

        <tr>

   <td class="texto2"><div align="right"><strong>&nbsp;&nbsp;&nbsp;VALOR:</strong></div></td>

   <td bgcolor="#F5F5F5" class="texto2b">

     <div align="left">&nbsp;

     R$

       <?  

	 /*  $pa = $linha['tipo'];

      $manutencao = true;

      $palavras = array("14","15","16");	

	  if ( ($manutencao) && (in_array ($pa, $palavras)) ){	 // && $p2a==$cadastro

	    $valor_imovel = "ADESÃO";

	  }	 else {

		$valor_imovel = $linha['valor'];  

	  }	   */

	   echo $preco; 

	   //echo $linha['valor']; ?>

&nbsp;  &nbsp;&nbsp;&nbsp;</div></td>

  </tr>    

     </table>

     <div align="right"></div>

       </td>

   </tr>
   <tr>

   <td valign="top" colspan="3" class="font11b"><br />



&nbsp;&nbsp;</td>

  </tr>     

     <tr>

   <td height="20" colspan="3" bgcolor="#F5F5F5" class="verdana1"><div align="left"><img src="label_imoveis_detalhes_simples.png" width="311" height="34" /></div></td>

   </tr>

      <tr>

   <td colspan="3"><div align="left">&nbsp;<?  echo $linha["descricao"]; ?></div></td

  ></tr>

       <tr>

   <td height="5" colspan="3" class="verdana1"></td>

   </tr>

 <tr>

   <td height="5" colspan="3" class="verdana1"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="textosimples">

     <tr>

       <td height="5" colspan="3">           </td>

     </tr>

     <tr>

       <td colspan="3">&nbsp;<?php //include("detalhes_imoveis.php"); ?></td>

     </tr>

     <tr>

       <td height="10" colspan="3">           </td>

     </tr>  

          <tr>

       <td height="10" colspan="3">           </td>

     </tr>

          <tr>

       <td height="20" colspan="3" bgcolor="#F5F5F5">

           <div align="left"><img src="label_imoveis_fotos.png" width="311" height="34" /></div></td>

     </tr>

          <tr>

            <td height="20" colspan="3" bgcolor="#F5F5F5">            

            

            <table width="113"  border="0" align="left" cellpadding="0" cellspacing="0">

              <tr> 

    

                   <div class="imageRow">

  	<div class="set">

                <?

	   $total = 2;	 

	   //EXIBE OS PRODUTOS	 

 $sql_fotos="select * from fotos where fk_categoria='$id' order by id asc";

 $result_fotos=mysqli_query($conexao,$sql_fotos) or die (mysqli_error($conexao));		

 while($linha_fotos=mysqli_fetch_array($result_fotos)){

  $data_foto = $linha_fotos["dt_foto"];

  $id_foto = $linha_fotos["id"];

  $nome_foto = $linha_fotos['caminho_foto'];

		   



		   $imagem_mini    =   "../fotos"."/".$linha_fotos['caminho_foto'];

	       $imagem    =   "../fotos/".$linha_fotos['caminho_foto']; 

		   //$legenda = $linha_fotos['modelo'];



           //VERIFICA

	       if($total == $atual) {

		      echo "</tr><tr>";

			  $atual = 0;

		   }	   

		  ?>

                <td width="10" height="118">&nbsp;&nbsp;</td>

                <td width="112" height="118"><div align="left"> 

                <div class="single">

  		  <a href="<? echo $imagem; ?>" rel="lightbox[plants]" title=""><img src='<? echo $imagem_mini; ?>'  width="100" height="100" border="1"  alt=''/></a>

  		</div>

                <!--<a href='<? //echo $imagem; ?>'

     class='lightview'

     data-lightview-group='example'

     data-lightview-title=""

     data-lightview-caption=""> <img src='<? //echo $imagem_mini; ?>'  width="100" height="100" border="1"  alt=''/> </a>--> 

                        <? //echo $legenda; ?>

                </div></td>

                

                <?

	      //SOMA 1 A VARI&Aacute;VEL CONTROLADORA

	      $atual++;

	   }//FEHA FOR ?>	</div>

  </div>  

              </tr>

            </table></td>

          </tr>

          <tr>

            <td height="20" colspan="3" bgcolor="#F5F5F5">&nbsp;</td>

          </tr>

   </table>

    </td>

 </tr>

        </table>

         

    </div></td>

  </tr>

</table> 

<br>

<? 

	  //if($linha['foto']>0){ ?>

<!--inicio-->

<br>

      <!--fim-->



<? //} ?> 



                              

                           

      <!--fim-->      

</div>

<!--inicio-->


<!--fim-->

            </div>

		</div>

</div>

    

		<div class="full" id="footer">    

    

    	<div class="container">



			<p class="address imobiliaria">

                <strong>Cabelos e Cremes</strong>

                <!--Rua Roberto Rikle, 1250, apto 401 Bloco 07, <br />CEP 85856-440

    Jardim S&atilde;o Paulo II -  Foz do Igua&ccedil;u-PR-->

            </p>

           

         

            <span class="telefone"><span class="ddd">(45)</span>3028-7275(BR)</span><br>
            <span class="telefone"><span class="ddd">(45)</span>9148-2809(BR)<img src="whatsapp-logo.png" width="35" height="31" /></span><br><br>
            <span class="telefone"><span class="ddd">(595)</span>984-344955(PY)</span><br><br>
            <span class="telefone"><span class="ddd">(595)</span>986-718429(PY)</span><br><br>

            <a href="../index.php" class="change"><img src="footer_version_icon.png" height="15" width="17">Acessar a versão clássica</a>

            

<span class="copyright">Cabelos e Cremes © 2016 - <? echo date("Y"); ?>. <br>

            	Todos os direitos reservados.

            </span>

                        

        </div>

        

	</div>        



</body></html>

