Main
"; //echo "imagem 1"; $hoje = date('Y-m-d'); // WHERE `data_cotacao` = "'.$hoje.'" $result = mysql_query('SELECT * FROM `cambio` ORDER BY data_cotacao DESC LIMIT 1'); $row = mysql_fetch_assoc($result); if ($row == "") { $data_cotacao = "Sem cotação"; } else { $data_cotacao = date_to_string($row['data_cotacao'], 0); } $dolar_venda = $row['dolar_venda']; $dolar_compra = $row['dolar_compra']; $dolarv_venda = $row['dolarv_venda']; $dolarv_compra = $row['dolarv_compra']; $euro_venda = $row['euro_venda']; $euro_compra = $row['euro_compra']; $eurov_venda = $row['eurov_venda']; $eurov_compra = $row['eurov_compra']; $libra_venda = $row['libra_venda']; $libra_compra = $row['libra_compra']; $librav_venda = $row['librav_venda']; $librav_compra = $row['librav_compra']; $peso_arg_venda = $row['peso_arg_venda']; $peso_arg_compra = $row['peso_arg_compra']; $f_suico_venda = $row['f_suico_venda']; $f_suico_compra = $row['f_suico_compra']; $d_canadense_venda = $row['d_canadense_venda']; $d_canadense_compra = $row['d_canadense_compra']; $d_canadensev_venda = $row['d_canadensev_venda']; $d_canadensev_compra = $row['d_canadensev_compra']; echo ' */ //Todas ou específica if ( $_GET[id_noticias] != "all" ) { if(empty($_GET[Cid])) { $qCTitle = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]'"; $rCTitle = mysql_query($qCTitle) or die(mysql_error()); if(mysql_num_rows($rCTitle) != '0') { $aCTitle = mysql_fetch_array($rCTitle); //echo" > $aCTitle[Titulo] <"; } } if(!empty($_GET[id_noticia])) { $qSTitle = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]'"; $rSTitle = mysql_query($qSTitle) or die(mysql_error()); if(mysql_num_rows($rSTitle) != '0') { $aSTitle = mysql_fetch_array($rSTitle); echo"

-- Voltar --

"; //$aSTitle[Title]?Cid=$aSTitle[Cid] } $Filter = "and `id_noticia` = '$_GET[id_noticia]'"; } if(empty($_GET[SubID])) { //$sub = ""; $qSubCategories = "select * from `subcategories` where `Cid` = '$_GET[Cid]' order by `Title` asc"; $rSubCategories = mysql_query($qSubCategories) or die(mysql_error()); if(mysql_num_rows($rSubCategories) != '0') { while($aSubCategories = mysql_fetch_array($rSubCategories)) { if(!empty($sub)) { //echo ", $aSubCategories[Title]\n"; } else { //echo "

Sub Categorias:$aSubCategories[Title]\n"; } //$sub = 1; } // Entre topo e corpo echo "
"; } } if(!empty($_GET[ImageView])) { $xy = @getimagesize("images_files/$_GET[ImageView]"); $tx = $xy[0]; $ty = $xy[1]; echo"
<< Back to Category










"; } if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } //$ByPage = $aSettings[Columns_per_Page] * $aSettings[Rows_per_Page]; $ByPage = 1; $qnav = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]' $Filter order by data_noticia Desc"; $rnav = mysql_query($qnav) or die(mysql_error()); $rows = mysql_num_rows($rnav); if($rows > $ByPage) { $NextPrev = "

 
'.$data_cotacao.'
Compra
Venda
 U$
'.$dolar_compra.'
'.$dolar_venda.'
 U$D VTM
'.$dolarv_compra.'
'.$dolarv_venda.'
 Euro
'.$euro_compra.'
'.$euro_venda.'
 Euro VTM
'.$eurov_compra.'
'.$eurov_venda.'
 Libra
'.$libra_compra.'
'.$libra_venda.'
 Libra VTM
'.$librav_compra.'
'.$librav_venda.'
 Peso Arg.
'.$peso_arg_compra.'
'.$peso_arg_venda.'
 F. Suíço
'.$f_suico_compra.'
'.$f_suico_venda.'
 D.Canadense
'.$d_canadense_compra.'
'.$d_canadense_venda.'
 D.Canad. VTM
'.$d_canadensev_compra.'
'.$d_canadensev_venda.'
 - IOF incluso
 - Taxas sujeitas a variações sem aviso prévio.
 
 

Nome:  
E-mail:  
   
 
 


NOTÍCIAS
'; /* parceiros
 
 

 
 
"; $NextPrev .= ""; $NextPrev .= "
"; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " \n\t "; } elseif($PageStart < $rows) { $links[] = " $i2\n\t "; } } // $links2 = implode(" ", $links); $NextPrev .= $links2; $NextPrev .= "
"; } //echo "
$NextPrev
"; $WidthHeight = explode(" x ","$aSettings[Popup_window]"); $qData = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]' $Filter order by data_noticia Desc limit $Start, $ByPage"; $rData = mysql_query($qData) or die(mysql_error()); $Total = mysql_num_rows($rData); if(mysql_num_rows($rData) == '0') { echo "
Sem notícia.
"; } else { //Tabela da imagem echo ' '; $n = 1; while($aData = mysql_fetch_array($rData)) { $b = $n%4;//$aSettings[Columns_per_Page] if(!empty($aData[Image])) { $xy = @getimagesize("images_files/$aData[Image]"); $tx = $xy[0]; $ty = $xy[1]; if($aSettings[Thumbnail_Image_width_heigh] == Height) { $y = $aSettings[Thumb_Size]; $x = $tx/$ty; $x = $x * $aSettings[Thumb_Size]; } else { $x = $aSettings[Thumb_Size]; $y = $ty/$tx; $y = $y * $aSettings[Thumb_Size]; } if($aSettings[Show_full_sized_image]==Yes) { $image = "
"; } else { //$image = ""; } } if($aSettings[Display_File_name]=="Yes") { $Title = "$aData[Title]

"; } if($b == 1) { echo "\n"; } //Informações $qnav2 = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]' order by data_noticia Desc limit $Start, $ByPage"; $rnav2 = mysql_query($qnav2) or die(mysql_error()); while($aDnav = mysql_fetch_array($rnav2)) { $Titulo = "$aDnav[titulo]"; $Noticia = "$aDnav[noticia]"; $Data_noticia = date_to_string($aDnav[data_noticia],0); if (empty($_GET[SubID])) { echo ""; } else { echo ">"; }; // //$sub = ""; $qSubCategories2 = "select * from `subcategories` where `Image_origem` = '$aData[Image]'"; $rSubCategories2 = mysql_query($qSubCategories2) or die(mysql_error()); if(mysql_num_rows($rSubCategories2) != '0') { while($aSubCategories2 = mysql_fetch_array($rSubCategories2)) { //echo "+ detalhes\n\n"; } } if($b == 0) { echo "\n"; } elseif($Total == $n) { echo "\n"; } $n++; } echo'
$image
$Titulo


$Noticia

$Data_noticia

$image
$Titulo


$Noticia

$Data_noticia

'; //fim tabela imagem echo"$NextPrev"; } //tabela geral echo ''; } //Todas ou especifica } else { if(empty($_GET[Cid])) { $qCTitle = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]'"; $rCTitle = mysql_query($qCTitle) or die(mysql_error()); if(mysql_num_rows($rCTitle) != '0') { $aCTitle = mysql_fetch_array($rCTitle); //echo" > $aCTitle[Titulo] <"; } } if(!empty($_GET[id_noticias])) { $qSTitle = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]'"; $rSTitle = mysql_query($qSTitle) or die(mysql_error()); if(mysql_num_rows($rSTitle) == '0') { $aSTitle = mysql_fetch_array($rSTitle); echo"

-- Voltar --

"; //$aSTitle[Title]?Cid=$aSTitle[Cid] } $Filter = "and `id_noticia` = '$_GET[id_noticia]'"; } if(empty($_GET[SubID])) { //$sub = ""; $qSubCategories = "select * from `subcategories` where `Cid` = '$_GET[Cid]' order by `Title` asc"; $rSubCategories = mysql_query($qSubCategories) or die(mysql_error()); if(mysql_num_rows($rSubCategories) != '0') { while($aSubCategories = mysql_fetch_array($rSubCategories)) { if(!empty($sub)) { //echo ", $aSubCategories[Title]\n"; } else { //echo "

Sub Categorias: $aSubCategories[Title]\n"; } //$sub = 1; } // Entre topo e corpo echo "
"; } } if(!empty($_GET[ImageView])) { $xy = @getimagesize("images_files/$_GET[ImageView]"); $tx = $xy[0]; $ty = $xy[1]; echo"
<< Back to Category










"; } if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } //$ByPage = $aSettings[Columns_per_Page] * $aSettings[Rows_per_Page]; $ByPage = 1; $qnav = "select * from `noticias` where `id_noticia` = '$_GET[id_noticia]' $Filter order by data_noticia Desc"; $rnav = mysql_query($qnav) or die(mysql_error()); $rows = mysql_num_rows($rnav); if($rows > $ByPage) { $NextPrev = ""; $NextPrev .= ""; $NextPrev .= "
"; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " \n\t "; } elseif($PageStart < $rows) { $links[] = " $i2\n\t "; } } // $links2 = implode(" ", $links); $NextPrev .= $links2; $NextPrev .= "
"; } //echo "
$NextPrev
"; $WidthHeight = explode(" x ","$aSettings[Popup_window]"); $qData = "select * from `noticias` order by data_noticia Desc limit $Start, $ByPage"; $rData = mysql_query($qData) or die(mysql_error()); $Total = mysql_num_rows($rData); if(mysql_num_rows($rData) == '0') { echo "
Sem notícia.
"; } else { //Tabela da imagem echo '
'; echo ' '; $n = 1; while($aData = mysql_fetch_array($rData)) { $b = $n%4;//$aSettings[Columns_per_Page] if(!empty($aData[Image])) { $xy = @getimagesize("images_files/$aData[Image]"); $tx = $xy[0]; $ty = $xy[1]; if($aSettings[Thumbnail_Image_width_heigh] == Height) { $y = $aSettings[Thumb_Size]; $x = $tx/$ty; $x = $x * $aSettings[Thumb_Size]; } else { $x = $aSettings[Thumb_Size]; $y = $ty/$tx; $y = $y * $aSettings[Thumb_Size]; } if($aSettings[Show_full_sized_image]==Yes) { $image = "
"; } else { //$image = ""; } } if($aSettings[Display_File_name]=="Yes") { $Title = "$aData[Title]

"; } /* if($b == 1) { echo "\n"; } */ //Informações $qnav2 = "select * from `noticias` order by data_noticia Desc"; $rnav2 = mysql_query($qnav2) or die(mysql_error()); while($aDnav = mysql_fetch_array($rnav2)) { $Titulo = "$aDnav[titulo]"; $Noticia = "$aDnav[noticia]"; $Data_noticia = date_to_string($aDnav[data_noticia],0); if (empty($_GET[SubID])) { echo "\n"; } else { echo "\n"; }; // //$sub = ""; $qSubCategories2 = "select * from `subcategories` where `Image_origem` = '$aData[Image]'"; $rSubCategories2 = mysql_query($qSubCategories2) or die(mysql_error()); if(mysql_num_rows($rSubCategories2) != '0') { while($aSubCategories2 = mysql_fetch_array($rSubCategories2)) { //echo "+ detalhes\n\n"; } } if($b == 0) { echo "\n"; } elseif($Total == $n) { echo "\n"; } $n++; } echo'
$image
$Titulo


$Noticia

$Data_noticia

$image
$Titulo


$Noticia

$Data_noticia

'; //fim tabela imagem echo '
'; echo"$NextPrev"; } //tabela geral echo ''; } } //Todas ou especifica include"footer.php"; ?>