infonet 1 Denunciar post Postado Julho 13, 2011 Estou tento uns problemas ao visualizar algumas páginas na minha index.php atravéz de include, será que alguém pode dar um help? Na index.php: <? include ("listar.php"); ?> PARA VER: http://francisimoveis.com/caduser/caduser/index.php NOTA: O erro começa depois do 5º item. PARA VER: http://francisimoveis.com/caduser/caduser/listar.php ---------------------------------- ---- index.php ---- <?php include"includes/pg_fns.php"; include"includes/pg_config.php"; require"includes/verificaLogin.php"; session_start(); if(session_is_registered('login') AND session_is_registered('senha')) { session_destroy(); } ?> <? instalaVerifica($acao); ?> <? mensagensErro($erro,$m); ?> <? include ("includes/conexao.php"); ?> <html> <head> <meta http-equiv="Content-Language" content="pt-br"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Pequenos serviços</title> <base target="_top"> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href="../css/custom.css" /> <style type="text/css"> body { background: url('../bkgindex/bg-page.png') 50% 50%; } #page { background: url('../bkgindex/bg-head.png') repeat-x 50% 0; } #head { background: url('../bkgindex/head-bg.png') no-repeat 50% 0; } #wrapper { background: url('../bkgindex/wrap-bg.png') repeat-y 50% 0; } #bottom { background: url('../bkgindex/footer-bg.png') no-repeat 50% 0; } </style> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <div style="background-image:url('../bkgindex/bg-head.png'); background-repeat:repeat-x"> <table width="900" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td> <p> <? include ("inicio.php"); ?> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="background-repeat:no-repeat"> <div id="head"> </tr> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <table width="900" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td style="background-repeat:no-repeat" background="imagens/bkg/meio.jpg"> <div id="wrapper"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="8" rowspan="4"> <img border="0" src="imagens/lines/line_transp.gif" width="8" height="20"></td> </tr> <tr> <td width="664" valign="top"> </td> <td width="208" valign="top"> </td> <td width="8"> </td> </tr> <tr> <td width="664" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <TD VALIGN="TOP" WIDTH="660"> <? include "listar.php"; ?> </TD> </tr> </table> </td> <TD VALIGN="TOP" WIDTH="208"> <iframe src="coluna2.php" width="215" scrolling="no" name="I1" border="0" frameborder="0" height="719" allowtransparency="true"></iframe> </TD> <td width="8"> </td> </tr> <tr> <td width="664" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="664"> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> </table> </td> <td width="208" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> </td> </tr> </table> </td> <td width="8"> <img border="0" src="imagens/lines/line_transp.gif" width="8" height="14"></td> </tr> </table> </td> </tr> </table> </tr></div> </div> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <p align="center"> <iframe src="rodape.php" width="900" scrolling="no" name="rodape" border="0" frameborder="0" height="132"></iframe> </td> </tr> </table> </html> ---------------------------------- ---- listar.php ---- <? include ("include/conexao.php"); $busca = "SELECT * FROM servicos WHERE publicar='1' ORDER BY valor ASC"; $total_reg = "20"; // número de registros por página if (!$pagina) { $pc = "1"; } else { $pc = $pagina; } $inicio = $pc - 1; $inicio = $inicio * $total_reg; $limite = mysql_query("$busca LIMIT $inicio,$total_reg"); $todos = mysql_query("$busca"); $tr = mysql_num_rows($todos); // verifica o número total de registros $tp = $tr / $total_reg; // verifica o número total de páginas if (!$busca){ die ("Problemas ao abrir!!! <BR><br> Favor entrar em contato com WEBdesign <br><BR> Paulo César Souza <BR> paulocesarsouza@gmail.com <BR> (31) 9908-2987"); } else { while ($coluna = @mysql_fetch_array($limite)){ $id = $coluna["id"]; $publicar = $coluna["publicar"]; $valor = $coluna["valor"]; $login = $coluna["login"]; $titulo = $coluna["titulo"]; $servico = $coluna["servico"]; $cidade = $coluna["cidade"]; $limit=35; $titulo = substr($titulo, 0,$limit); ?> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>SERVIÇOS</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="content-laguage" content="Português" /> <link rel="stylesheet" type="text/css" href="include/estilo.css" /> <style type="text/css">@import url("include/estilo.css");</style> </head> <script> function clearBrowserCache() { header("Pragma: no-cache"); header("Cache: no-cache"); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); } </script> <font face="arial" style="font-size: 9pt" color="#184270"> <body bgcolor="transparent" allowtransparency="true"> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <? if ($foto=="") { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td width="100%" align="center" valign="top"> </font><font style="font-size: 9pt" color="#184270"> <table width="100%" border="0" cellpadding="0" cellspacing="0" width="136%"> <tr> <td width="14" rowspan="4" height="80" valign="top"> </td> <td width="80" rowspan="4" height="80" valign="top"> <a href="user.php?id=<?=$id?>"><? echo "<img width='80' height='80' border='0' src='mini.php?gd=2&src={$coluna['foto']}&maxw=80'>"; ?></span></a><span style="font-size: 9pt"></font> </span> </span> </td> <td rowspan="4" width="13"><span style="font-size: 9pt"> </span></td> <td valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="390"> <span style="font-size: 13pt">Eu faço <u><font color="#3084B6"> <b><a href="user.php?id=<?=$id?>"><u> <font color="#3084B6"><? echo "$titulo..."; ?></font></u></a></b></font></u></span><u><font color="#3084B6"><span style="font-size: 9pt"> </span> </td> <td width="100"> </font><span style="font-size: 9pt"></font></font><font face="arial" color="#000000"> Por <span style="font-size: 13pt"> <b> <font color="#FF6600"><? echo "$valor"; ?></font></b></span></font><b> </b> </span> </td> </tr> </table> </td> </tr> </font> </font> <tr><td valign="top"><font face="Arial" color="#000000" style="font-size: 9pt"> Estou em<i> <? echo "$cidade"; ?></i></font> </td> </tr> </font><font face="arial" color="#184270" style="font-size: 9pt"> <tr> <td valign="top"> <font face="Tahoma" style="font-size: 9pt"> <img border="0" src="imagens/lines/line_transp.gif" width="42" height="8"></font></td> </tr> </font> <span style="font-size: 9pt"> </font> <font face="arial" color="#184270"> <tr> <td height="60" valign="top"> <span style="font-size: 9pt"> <? echo substr_replace ("$servico", '...', 130); ?><br>(De: <u><a href="areauser.php?login=<?=$login?>"><? echo "$login"; ?>)</u> </span> </td> </tr> <table width="100%"> <tr> <td width="100%"><hr size='1' color='#CCCCCC' noshade style='border:dotted;'></td> </tr> </table> <? } else { ?> <? break; } } } ?> </table> </font> </body> </html> <? // agora vamos criar os botões "Anterior e próximo" $intervalo = 20; $anterior = $pc -1; $proximo = $pc +1; $flag1 = floor($pc/$intervalo); $pi = ($flag1 * $intervalo ); $pf = $pi + $intervalo; echo "<div id='nave'>"; if ($pc > 1) { echo "<a href='?pagina=$anterior' class='categoria'>« Anterior</a> "; }else{ echo "<font class='categoria' style='color: #FFFFFF'>« Anterior </font>"; } if ($pc > 1) { echo "<font class='preto'>|</font>"; }else{ echo ""; } for ($pi; $pi < $pf; $pi++) { // Se número da página for menor que total de páginas if ($pi <= $tp) { if ($pc == $pi) { // se página atual for igual a página selecionada if ($pi > "0") { echo "<b class='preto'>" . $pi . "</b> "; } } else { // se for diferente, aparece o link para a página if ($pi > "0") { echo "<a href='?pagina=" . $pi . "' class='preto'>" . $pi . "</a> "; } } } } if ($pc < $tp) { echo "<font class='preto'>|</font>"; }else{ echo ""; } if ($pc < $tp) { echo " <a href='?pagina=$proximo' class='categoria'>Próxima »</a>"; }else{ echo " <font class='categoria' style='color: #FFFFFF'>Próxima »</font>"; } echo "</div>"; // e para finalizar, fechamos a conexão com servidor MySQL mysql_close($conn); ?> -------------------------------------------- Muito obrigado! Compartilhar este post Link para o post Compartilhar em outros sites
infonet 1 Denunciar post Postado Julho 13, 2011 [RESOLVIDO] Obrigado a todos! [RESOLVIDO] Compartilhar este post Link para o post Compartilhar em outros sites