Sistema de notícias, exibindo-as...
Pessoal, minha página **news.php é a página que exibe as notícias em tópicos... e ao clicar na mesma abre a notícias como pop-up.
O que devo fazer para quando postar essas notícias, as mesmas já abrirem na página uma em baixo da outra, LIMITANDO os caracteres para gerar um link (leia mais)....
alguém pode me ajudar ???
Desde já, obrigado.
Código do news.php (págian de exibição)
<script language="JavaScript">
function popup(url, intWi, intHei, scr, nome, intTop, intLeft) {
if (intLeft == null){
intLeft = 10
intTop = 10
}
var janela = null
janela=window.open(url,nome,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scr+',resizable=no,menubar=no,width=' + intWi + ',height=' + intHei+ ', left=' + intLeft + ', top=' + intTop + '');
}
</script><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<table cellpadding="2" cellspacing="4" width="633">
<?
require('conexao.php');
require('funcoes.php');
$resultcomeca = $_GET["pag"] * 10;
$SQL = "SELECT * FROM `noticias` ORDER BY data DESC LIMIT ".$resultcomeca.",10";
$result_id = mysql_query($SQL) or die(mysql_error());
$total_eventos = mysql_num_rows($result_id);
while ($linha = mysql_fetch_array($result_id)) {
$i++;
$id = $linha["id"];
$data = $linha["data"];
$titulo = $linha["titulo"];
$noticia = $linha["noticia"];
$noticia = str_replace("\n","<br>",$corpo);
#$titulo = substr($titulo, 0, 50);
if (($i % 2) == 0) $bgcor = 'FFDC51'; else $bgcor = 'FFF3C6';
?>
<tr><td width="619" bgcolor="#<? echo $bgcor; ?>">
<span style="font-family:'Trebuchet MS'; color:#000000; font-size:10px" ><? echo $data; ?></span><br>
<a style="text-decoration:none" href="java script:popup('mostranoticia.php?codigo=<? echo $id; ?>',530,500,'yes','Noticia',10, 200);"><span style="font-family:'Trebuchet MS'; color:#000000; font-size:13px; padding-left:5px;" ><b><? echo $titulo; ?></b></span><br></a>
</td></tr>
<?
}
?>
</table>Discussão (3)
Carregando comentários...