require_once("bd.php"); include ("funcoes.php"); Inicio(); if ($limit) { $limit1 = $limit + 4; }else{ $limit=0; $limit1=$limit + 4; } ?>
| if($type==2) $sql = "select count(*) as total from noticias where activo=1"; else if($type==1) $sql = "select count(*) as total from noticias where activo_ing=1"; else if($type==3) $sql = "select count(*) as total from noticias where activo_fr=1"; $rs = $db->exec($sql); if ($noticias = $db->get_object($rs)) { if($limit!=0){ echo ""; if($type==2) echo "<< NotÃcias mais recentes"; if($type==1) echo "<< Recent News"; if($type==3) echo "<< Recent News"; echo ""; } if ($noticias->total > $limit1) { ?> if($type==2) echo "NotÃcias mais antigas >>"; if($type==1) echo "Old News >>"; if($type==3) echo "Old News >>"; echo ""; } } ?> | |||
| require('bd.php'); if($noticia and !$limit){ if($type==2) $sql = "select * from noticias where activo=1 and id=$noticia order by data_noticia DESC"; else if($type==1) $sql = "select * from noticias where activo_ing=1 and id=$noticia order by data_noticia DESC"; else if($type==3) $sql = "select * from noticias where activo_fr=1 and id=$noticia order by data_noticia DESC"; $stmt_not = $db->exec($sql); //$local_path_img = "/home/jbatalha/public_html/siteolaria/images/fotos_scroll/"; $local_path_img = "images/noticias/"; if(($not=$db->get_object($stmt_not))){ $rimg = $db->exec("select * from imagens_noticias where id_noticia =". $not->id); if($img = $db->get_object($rimg)){ $img_ok = 1; }else{ $img_ok = ""; } ?> | |||
| style="border-bottom: #000000 0px solid;" } ?>>
if($type==2) echo ($not->cabecalho); else if($type==1) echo ($not->cabecalho_ing); else if($type==3) echo ($not->cabecalho_fr); ?> echo "(". $not->data_noticia . ")";?> if($type==2) echo (nl2br($not->desenvolvimento)); else if($type==1) echo (nl2br($not->desenvolvimento_ing)); else if($type==3) echo (nl2br($not->desenvolvimento_fr)); ?> | |||
|
| |||
| "; }else{ echo " "; } } echo " | "; } ?>|||
| style="border-bottom: #000000 0px solid;" } ?>>
if($type==2) echo ($not->cabecalho); else if($type==1) echo ($not->cabecalho_ing); else if($type==3) echo ($not->cabecalho_fr); ?> echo "(". $not->data_noticia . ")";?> if($type==2) echo (nl2br($not->desenvolvimento)); else if($type==1) echo (nl2br($not->desenvolvimento_ing)); else if($type==3) echo (nl2br($not->desenvolvimento_fr)); ?> | |||
|
| |||
| "; }else{ echo " "; } } echo " | "; } ?>|||
| WriteBottom($type);?> | |||