Ir para conteúdo
Fórum Script Brasil
  • 0

Erro (PHP)


Vagner Nunes

Pergunta

Prezados,

Bom dia. Peguei um site para fazer algumas correções simples, estava tudo correndo de acordo, tanto que as duas semanas atrás, apareceu um erro e simplesmente todos os dados não estão sendo visualizados, parece que a página perdeu a conexão com o banco, daí este erro apareceu justamente no dia em que nem fiz nenhuma intervenção no site, daí a empresa de hospedagem, por questões de ética não irei citar, encaminhou um e-mail para o meu cliente alegando que o problema estava na programação e não nos servidores deles, e esta mesma empresa, já tivemos duas reicindências de problemas anteriores causados por eles.

Mas estou, tranquilo, pois o erro não pelas minhas intervenções.

Mas gostaria de resolver esta questão, e sugerir para o cliente que troque de empresa. Que só assim continuaria a trabalhar com ele.

Erro abaixo:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/culturartes/www/paginas/principal.php on line 280

A página é esta abaixo:

http://www.culturartes.com.br/

Se alguém poder me ajudar a solucionar este pepino.

Seria muito grato.

Sds,

Vagner Nunes

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

Salve,

Seria mais interessante você postar o código para a galera dar uma olhada.

Abraços

Prezados,

Bom dia. Peguei um site para fazer algumas correções simples, estava tudo correndo de acordo, tanto que as duas semanas atrás, apareceu um erro e simplesmente todos os dados não estão sendo visualizados, parece que a página perdeu a conexão com o banco, daí este erro apareceu justamente no dia em que nem fiz nenhuma intervenção no site, daí a empresa de hospedagem, por questões de ética não irei citar, encaminhou um e-mail para o meu cliente alegando que o problema estava na programação e não nos servidores deles, e esta mesma empresa, já tivemos duas reicindências de problemas anteriores causados por eles.

Mas estou, tranquilo, pois o erro não pelas minhas intervenções.

Mas gostaria de resolver esta questão, e sugerir para o cliente que troque de empresa. Que só assim continuaria a trabalhar com ele.

Erro abaixo:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/culturartes/www/paginas/principal.php on line 280

A página é esta abaixo:

http://www.culturartes.com.br/

Se alguém poder me ajudar a solucionar este pepino.

Seria muito grato.

Sds,

Vagner Nunes

Link para o comentário
Compartilhar em outros sites

  • 0

Segue código das páginas, estava tudo funcionando certinho, do nada apresentou este erro:

index.php

<?php
require_once 'config.inc.php';

$serverUrl = 'http://'.$_SERVER['SERVER_NAME'];
//$endereco = $_SERVER ['REQUEST_URI'];
$area = $_GET['area'];
switch($area) {
//menu saiba quem é quem
case"segmentos":
$include="paginas/quemequem/segmentos.php";
break;
case"cadastro1":
$include="paginas/cadastro1.php";
break;
case"cadastro":
$include="paginas/cadastro.php";
break;
case"confirma":
$include="paginas/cadastro/confirma.php";
break;
case"recupera-senha":
$include="paginas/cadastro/recupera_senha.php";
break;
//Menu Arranjo Criativo
case"sobre-o-arranjo":
$include="paginas/arranjo/sobre.php";
break;
case"fique-ligado":
$include="paginas/arranjo/fique-ligado.php";
break;
case"cardapio":
$include="paginas/arranjo/cardapio.php";
break;
case"calendario-anual":
$include="paginas/arranjo/calendario-anual.php";
break;
case"auto-midia":
$include="paginas/arranjo/auto-midia.php";
break;
//menu inteligencia
case"artigos":
$include="paginas/inteligencia/artigos.php";
break;
case"leisdeincentivo":
$include="paginas/inteligencia/leis.php";
break;
case"estudos":
$include="paginas/inteligencia/estudos-setoriais.php";
break;
case"relatorios":
$include="paginas/inteligencia/relatorios.php";
break;
case"gestao":
$include="paginas/inteligencia/gestao.php";
break;
//menu agendão
case"revista-eletronica":
$include="paginas/revista/revista-eletronica.php";
break;
//painel usuario
case"painel-usr":
$include="paginas/painel_usr/index.php";
break;
//Painel do Fotolog
case"admFotolog":
$include="paginas/painel_usr/fotolog.php";
break;
case"aderirFotolog":
$include="paginas/painel_usr/aderirFotolog.php";
break;
//promocoes
case"promocoes":
$include="paginas/promocoes.php";
break;
//ULTIMAS ALTERAÇÕES ////////////////

case"enquetes":
$include="paginas/enquetes.php";
break;

case"calendario-anual":
$include="paginas/arranjo/calendario-anual.php";
break;

case"projetos":
$include="paginas/arranjo/projetos.php";
break;

case"qual-a-duvida":
$include="paginas/arranjo/qual-a-duvida.php";
break;

case"holofotes":
$include="paginas/inteligencia/holofotes.php";
break;

case"entrevista":
$include="paginas/inteligencia/entrevista.php";
break;

case"culturartes":
$include="paginas/culturartes/culturartes.php";
break;

case"pontos-de-cultura":
$include="paginas/pontos/pontos-de-cultura.php";
break;

case"mapa-do-site":
$include="paginas/mapa-do-site.php";
break;

case"dicas":
$include="paginas/dicas.php";
break;

case"responsabilidade":
$include="paginas/inteligencia/responsabilidade.php";
break;

case"bancomemoria":
$include="paginas/inteligencia/bancomemoria.php";
break;

case"busca":
$include="paginas/busca.php";
break;

case"espirito-santo":
$include="paginas/espirito-santo.php";
break;
////////////////////////////////////
//pagina principal
default:
$include="paginas/principal.php";
break;
}
echo"<html>
<head>
<meta name='verify-v1' content='VMhzrMP88To88VCtYDeBJcFGB+UMbiApsNYUePnSJnY=' />
<meta http-equiv='Content-Language' content='pt-br'>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title>Culturartes</title>
<link href='css/estilo.css' rel='stylesheet' type='text/css'>
<script language=\"JavaScript\" src=\"js/abrir_combo.js\"></script>
<script language='JavaScript' src='/js/site.js'></script>
<link rel='shortcut icon'  href='/favicon.ico' />
</head>
<body>
<div align='center'>
<table border='0' id='table1' style='border-collapse: collapse'>
        <tr>
                <td valign=top colspan='3' background='imagens/site/topo_1.jpg' height='25' style='background-repeat: no-repeat;'>
                &nbsp;</td>
        </tr>
        <tr>
                <td valign=top height='130' width='149' bgcolor='#b2def7' >
                <object data='imagens/site/topo_logo.swf' type='application/x-shockwave-flash' height='130' width='149' >
                    <param name='quality' value='high' />
                    <param name='SCALE' value='noborder' />
                    <param name='movie' value='imagens/site/topo_logo.swf' />
                    </object>
                </td>
                <td valign=top height='130' background='imagens/site/topo_bk.jpg'>
                <table border='0'  width='100%' id='table6' style='border-collapse: collapse'>
                        <tr>
                                
                                <td valign=top>
                                <table border='0' width='100%' id='table7' height='120' style='border-collapse: collapse'>
                                        <tr>
                                                <td height='15' style='font-weight:bold'>
                                                <p align='center' class='linkEspecial'>
                                                <a href='/index'>Principal</a>
                                                &nbsp;|&nbsp;
                                                <a href='/index?area=mapa-do-site'>Mapa do site</a>
                                                &nbsp;|&nbsp;
                                                <a href='/index?area=busca'>Buscar no site</a>
                                                &nbsp;|&nbsp;
                                                <a href=\"java script:addFav()\" title='Adicionar aos Favoritos'>Favoritos</a>
                                                &nbsp;|&nbsp;
                                                <a href=\"java script: janelaIndicacao('".$serverUrl."/paginas/indicar.php')\">Indique este site</a>
                                                </td>
                                        </tr>
                                        <tr>
                                                <td height='90' bgcolor='#FFFFFF'>
                                                <p align='center'>";
                                                include "banners/banner_topo.php";
                                                echo"
                                                </td>
                                        </tr>
                                </table>
                                </td>
                                
                        </tr>
                </table>
                </td>
                <td valign=top height='130' background='imagens/site/bk_direita.gif' bgcolor='#B2DEF7'> <a href='/index?area=cardapio'><img border='0' src='imagens/site/cardapio.gif'></a>
                &nbsp;</td>
        </tr>
        <tr>
                <td width='146' style='padding-left: 5px;' valign=top background='imagens/site/bk_menu.gif' bgcolor='#B2DEF7'>
                <table border='0' width='100%' id='table2' style='border-collapse: collapse'>
                        <tr>
                                <td height='10' background='imagens/site/menu_fundotop.gif'>&nbsp;</td>
                        </tr>
                        <tr>
                                <td height='38' background='imagens/site/topmenu_1.gif'>&nbsp;</td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=segmentos&cod=1'>Cultura</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=segmentos&cod=2'>Turismo</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=segmentos&cod=3'>Terceiro Setor</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=segmentos&cod=4'>Mídias do ES</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' height='16' align='center'><a href='index?area=cadastro1'>Cadastro</a></td>
                        </tr>
                        <tr>
                                <td background='imagens/site/topmenu_2.gif' height='38'>&nbsp;</td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=sobre-o-arranjo'>Sobre o Arranjo</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=fique-ligado'>Fique ligado</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=cardapio'>Cardápio Culturartes</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='/index?area=calendario-anual'>Calendário Anual</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=projetos'>Projetos</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=auto-midia'>Mídia Arranjo</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' height='16' align='center'><a href='index?area=qual-a-duvida'>Qual a Dúvida</a></td>
                        </tr>
                        <tr>
                                <td background='imagens/site/topmenu_3.gif' height='38'>&nbsp;</td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=holofotes'>Holofotes</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=entrevista'>Entrevistas</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=artigos'>Artigos</a></td>
                        </tr>
                                                <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=estudos'>Estudos Setoriais</a></td>
                        </tr>
                                                <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='/forum'>Fórum</a></td>
                        </tr>
                                                <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=relatorios'>Relatórios</a></td>
                        </tr>
                                                <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=gestao'>Gestão Passo a Passo</a></td>
                        </tr>
                                                <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=leisdeincentivo'>Leis de Incentivo</a></td>
                        </tr>
                                                                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=responsabilidade'>Responsabilidade</a></td>
                        </tr>
                                                                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=bancomemoria'>Banco de Memória</a></td>
                        </tr>
                        <tr>
                                <td background='imagens/site/topmenu_4.gif' height='38'>&nbsp;</td>
                        </tr>";

                        $selMenuRe = "SELECT * FROM re_categorias ORDER BY categoria asc";
                        $qMenuRe = mysql_query($selMenuRe);
                        $contaMenuRe = mysql_num_rows($qMenuRe);
                        if($contaMenuRe == 0){
                          echo "
                                <tr>
                                  <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=revista-eletronica'>Revista Eletrônica</a></td>
                                </tr>
                          ";
                        } else {

                          while($rows=mysql_fetch_assoc($qMenuRe)){
                            $idCategoria  = $rows['id'];
                            $categoria    = $rows['categoria'];
                            echo "
                              <tr>
                                  <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=revista-eletronica&cat=$idCategoria'>$categoria</a></td>
                              </tr>
                            ";
                          }

                        }
                        echo"
                        <tr>
                                <td background='imagens/site/topmenu_5.gif' height='38'>&nbsp;</td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=sobre'>Sobre os Pontos</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=pontos'>Rede de Integração</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=nucleos'>Núcleos</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=agenda'>Agenda</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=links'>Links</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=parceiros'>Parceiros Pontos</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=auto-midia'>Mídia Pontos</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=inclusao-digital'>Inclusão Digital</a></td>
                        </tr>
                        <tr>
                                <td background='imagens/site/topmenu_6.gif' height='38'>&nbsp;</td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=quem-somos'>Quem Somos</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=colaboradores'>Colaboradores</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px; font-size: 9px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=pontos-de-cultura&pg=embaixador'>Embaixador Culturartes</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=publicidade'>Publicidade</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=fale-conosco'>Fale Conosco</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=telefones-uteis'>Telefones Úteis</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=comentarios'>Comentários</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' align='center'><a href='index?area=culturartes&pg=auto-midia'>Automídia</a></td>
                        </tr>
                        <tr>
                                <td style='padding=left: 10px;' background='imagens/site/menu_tit.gif' height='16' align='center'><a href='index?area=culturartes&pg=parceiros'>Parceiros</a></td>
                        </tr>
                        <tr>
                                <td style='padding-left: 0px;' height='200'>
                                
                                
        <p align='center'><strong>Radio Culturartes</strong></p>
        <object type='application/x-shockwave-flash' width='144' height='200'
data='http://www.culturartes.com.br/xspf_player/xspf_player.swf?autoload=true&playlist_url=http://www.culturartes.com.br/xspf_player/radio.xspf'>
<param name='movie' 
value='http://www.culturartes.com.br/xspf_player/xspf_player.swf?autoload=true&playlist_url=http://www.culturartes.com.br/xspf_player/radio.xspf' />
</object>

        </td>
                        </tr>
                        
                    </table>
                </td>
        <td width='465' valign='top' bgcolor='#B4E0FC'>";
include("$include");
echo"</td>
                <td width='158' background='imagens/site/bk_direita.gif' style='padding-right: 5px;' valign=top bgcolor='#B2DEF7'>
                <table border='0' width='100%' id='table3' style='border-collapse: collapse'>
                      


                        <tr>
                                <td>
                                <table border='0' width='100%' id='table4' align='center' style='border-collapse: collapse'>
                                     <tr>
                                                  <td align='center'>
                                                     <img src='/imagens/site/bk_convenios.gif'>
                                                  </td>
                                           </tr>
                                        <tr>
                                                <td align='center'>
                                                ";
                                                include "banners/banner_convenios.php";
                                                echo"
                                                </td>
                                        </tr>
                                </table>
                                </td>
                        </tr>
                        <tr>
                                <td>&nbsp;</td>
                        </tr>
                          <tr>
                                <td height='25' align='center'>
                                <a href='index?area=busca'><img src='/imagens/site/bt_buscar.gif' border='0'></td>
                        </tr>
                        <tr>
                                <td>&nbsp;</td>
                        </tr>
                          <tr>
                                <td height='25' align='center'>
                                <a href='index?area=dicas'><img src='/imagens/site/bt_dicas.gif' border='0'></a>
                                </td>
                        </tr>
                        <tr>
                                <td>&nbsp;</td>
                        </tr>
                        <tr>
                                <td>
                                <table border='0' width='75%' id='table5' align='center' style='border-collapse: collapse'>
                                        <tr>
                                                <td>
                                                <img src='/imagens/site/bk_promo.gif' border='0'></td>
                                        </tr>
                                        <tr>
                                            <td bgcolor='#FFFFFF' style='border:1px solid #02489A' align='center'>";
                                            
                                            $selPromo = mysql_query("SELECT id, titulo FROM promo_cad where exibe = '1' and ativa = '1' order by rand()") or die ("<br><br><center>Problemas ao conectar no servidor: " . mysql_error() . "</center>");
                                            
                                            $ctPromo = mysql_num_rows($selPromo);
                                            if($ctPromo == 0){
                                                echo "<br /><b>Não Há Promoções Cadastradas ou Ativas<b><br>&nbsp;<br /><a href='/index?area=promocoes'><b style='color:#FF0000'>»</b><b style='color:#CC9933'>Veja Mais</b></a>";
                                            } else {
                                                    $rowPromo=mysql_fetch_assoc($selPromo);
                                                    $idpromo        = $rowPromo['id'];
                                                    $tituloPromo    = $rowPromo['titulo'];
                                                    echo "<br><a href='/index?area=promocoes&sub=ver-promo&cod=$idpromo' style='font-weight:bold;'>$tituloPromo</a><br>&nbsp;<br /><a href='/index?area=promocoes'><b style='color:#FF0000'>»</b><b style='color:#CC9933'>Veja Mais</b></a>";
                                            }
                                            echo"</td>
                                        </tr>
                                </table>
";


                                echo"</td>
                        </tr>
                        <tr>
                                <td><br /><br />
                                <table border='0' width='75%' id='table5' align='center' style='border-collapse: collapse'>
                                        <tr>
                                                <td>
                                                <img src='/imagens/site/bk_enquete.gif' border='0'></td>
                                        </tr>
                                        <tr>
                                            <td bgcolor='#FFFFFF' style='border:1px solid #02489A' align='center'>";
                                            $selEnquete = mysql_query("SELECT * FROM ca_enquete_perguntas WHERE status = '1'");
                                                                                        $ctEnquete = mysql_num_rows($selEnquete);
                                                                                        if($ctEnquete == 0){
                                                                                                echo "<br /><b>Não Há Enquetes Cadastradas ou Ativas</b><br>&nbsp;<br /><a href='/index?area=enquetes'><b style='color:#FF0000'>»</b><b style='color:#CC9933'>Veja Outras Enquetes</b></a>";
                                                                                        } else {
                                                                                                $rEnq = mysql_fetch_assoc($selEnquete);
                                                                                                $idEnq = $rEnq['id_pergunta'];
                                                                                                $pergunta = $rEnq['pergunta'];
                                                                                                echo "<br><a href=\"java script: janelaEnquete('".$serverUrl."/paginas/enquete.php')\"><b>$pergunta</b></a><br>&nbsp;<br /><a href='/index?area=enquetes'><b style='color:#FF0000'>»</b><b style='color:#CC9933'>Veja Outras Enquetes</b></a>";
                                                                                        }
                                                                                        echo"</td>
                                        </tr>
                                        <tr>
                                        <iframe src='http://selos.climatempo.com.br/selos/MostraSelo.php?CODCIDADE=84,80,2019,68,70&SKIN=padrão' scrolling='no' frameborder='0' width=150 height='170' marginheight='0' marginwidth='0'></iframe>
                                        </tr>
                                                                                
                                </table>
                                </td>
                        </tr>
                </table>
                </td>
        </tr>
                <tr>
                <td valign=top colspan='3' background='imagens/site/rodape_apoio.gif' height='18'>
                &nbsp;</td>
        </tr>
                <tr>
                <td width='769' valign=top colspan='3'>
                <p align='center'>
                ";
                include "banners/banner_apoiadores.php";
                echo"
        </tr>
                <tr>
                <td width='769' valign=top colspan='3' align='center'>
                <hr color='#000080' width='80%' size='1'><br>
                <b>Culturartes <font face='Times New Roman'>© </font>2008</b> - Todos os
                Direitos Reservados. Termos de Uso&nbsp;&nbsp; |&nbsp;&nbsp; Política de
                Privacidade</td>
        </tr>
        </table>
</div>
<script type='text/javascript'>
var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.');
document.write(unescape('%3Cscript src='' + gaJsHost + 'google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E'));
</script>
<script type='text/javascript'>
try {
var pageTracker = _gat._getTracker('UA-9096621-5');
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>";
?>
principal.php
<?php

$sel1 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '2'
ORDER BY
    rmat.id DESC
";
$sel2 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '12'
ORDER BY
    rmat.id DESC
";

$sel3 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '11'
ORDER BY
    rmat.id DESC
";
$sel4 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '10'
ORDER BY
    rmat.id DESC
";
$sel5 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '7'
ORDER BY
    rmat.id DESC
";
$sel6 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,    
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '8'
ORDER BY
    rmat.id DESC
";
$sel7 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,    
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '4'
ORDER BY
    rmat.id DESC
";
$sel8 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,    
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '3'
ORDER BY
    rmat.id DESC
";
$sel9 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,    
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '9'
ORDER BY
    rmat.id DESC
";
$sel10 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,        
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '5' AND
    rsub.id = '29'
ORDER BY
    rmat.id DESC
";
$sel11 = "
SELECT
    rmat.id,
    rmat.titulo,
    rmat.chamada,
    rmat.small,
    rcat.id as id_categoria
FROM
    re_materias as rmat,
    re_subcategorias as rsub,
    re_categorias as rcat
WHERE
    rmat.id_subcategoria = rsub.id AND
    rsub.id_categoria = rcat.id AND
    rcat.id = '6' AND
    rsub.id = '31'
ORDER BY
    rmat.id DESC
";

$selFiqueLigado = "
SELECT
     id,
     DATE_FORMAT(data_add,'%d/%m/%Y') as data,
       chamada
FROM
    ac_fiqueligado
ORDER BY
    id desc,
     data_add desc
LIMIT 0,5
";

$selForum = "
SELECT
     top.id_topico,
     top.assunto,
     tem.id_tema,
     tem.tema
FROM
     ni_forum_temas as tem,
     ni_forum_topicos as top
WHERE
  top.id_tema is not null and
    top.id_tema = tem.id_tema
ORDER BY
  top.id_topico DESC
LIMIT 0,3
";

$selArtigos = "
SELECT
     art.id,
     art.id_segmento,
     art.id_colaborador,
     art.nome_destaque,
     art.chamada,
     art.ativo,
     seg.id as id_segmento,
     seg.segmento,
     cad.id as id_colaborador,
     cad.proponente     
FROM
         ni_artigos as art,
         segmentos as seg,
         cadastro_geral as cad
WHERE
     art.ativo = '1' AND
     art.id_segmento = seg.id AND
     art.id_colaborador = cad.id
ORDER BY
     art.id DESC
LIMIT 0,3    
";

$selHolofote = "SELECT * FROM ni_holofotes ORDER BY id DESC LIMIT 0,3";
$selEntrevista = "SELECT * FROM ni_entrevista ORDER BY id DESC LIMIT 0,3";

$qSel1 = mysql_query($sel1);
$qSel2 = mysql_query($sel2);
$qSel3 = mysql_query($sel3);
$qSel4 = mysql_query($sel4);
$qSel5 = mysql_query($sel5);
$qSel6 = mysql_query($sel6);
$qSel7 = mysql_query($sel7);
$qSel8 = mysql_query($sel8);
$qSel9 = mysql_query($sel9);
$qSel10 = mysql_query($sel10);
$qSel11 = mysql_query($sel11);
$qFiqL = mysql_query($selFiqueLigado);
$qForu = mysql_query($selForum);
$qArti = mysql_query($selArtigos);
$qHolo = mysql_query($selHolofote);
$qEntr = mysql_query($selEntrevista);

$ctSel1 = mysql_num_rows($qSel1);
$ctSel2 = mysql_num_rows($qSel2);
$ctSel3 = mysql_num_rows($qSel3);
$ctSel4 = mysql_num_rows($qSel4);
$ctSel5 = mysql_num_rows($qSel5);
$ctSel6 = mysql_num_rows($qSel6);
$ctSel7 = mysql_num_rows($qSel7);
$ctSel8 = mysql_num_rows($qSel8);
$ctSel9 = mysql_num_rows($qSel9);
$ctSel10 = mysql_num_rows($qSel10);
$ctSel11 = mysql_num_rows($qSel11);
$ctFiqL = mysql_num_rows($qFiqL);
$ctForu = mysql_num_rows($qForu);
$ctArti = mysql_num_rows($qArti);
$ctHolo = mysql_num_rows($qHolo);
$ctEntr = mysql_num_rows($qEntr);


if($ctSel10 == 0){
$stSalaVideo = "&nbsp;";
$imgSalaVideo = "Não há matérias Cadastradas";
} else {
$row10 = mysql_fetch_assoc($qSel10);

$idSala = $row10['id'];
$stSala = substr($row10['titulo'], 0, 30);
$stSalaVideo = "<a href='/index?area=revista-eletronica&cat=5'style='color:#FFFFFF'>$stSala</a>";

$imgSala = $row10['small'];
    if(!empty($imgSala)){
        $imgSalaVideo = "<img src='/img_up/revista/$imgSala'>";
    } else {
        $imgSalaVideo = "<img src='/imagens/site/padrão.gif'>";
    }
}

if($ctSel11 == 0){
$stEnsaioFotografico = "&nbsp;";
$imgEnsaioFotografico = "Não há matérias Cadastradas";
} else {
$row11 = mysql_fetch_assoc($qSel11);

$idEnsaio = $row11['id'];
$stEnsaio = substr($row11['titulo'], 0, 30);
$stEnsaioFotografico = "<a href='/index?area=revista-eletronica&cat=6'style='color:#FFFFFF'>$stEnsaio</a>";

$imgEnsaio = $row11['small'];
    if(!empty($imgEnsaio)){
        $imgEnsaioFotografico = "<img src='/img_up/revista/$imgEnsaio'>";
    } else {
        $imgEnsaioFotografico = "<img src='/imagens/site/padrão.gif'>";
    }
}

echo"<table border='0' width='465' cellspacing='0' cellpadding='0'>
    <tr>
        <td><img src='imagens/site/top_cim.gif'></td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif' style='padding: 5px;'>
        <table border='0' width='100%' cellspacing='5' cellpadding='0'>
            <tr>"; 
            if($ctSel1 == 0){
                    echo "
                         <td height='161' background='imagens/site/bk_azul1.gif' align='center' width='33%' valign='top'>
                            <div><a href='/index?area=revista-eletronica&cat=2'><img src='imagens/site/icon_art.gif' border='0'></a></div>
                            <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>Não há Matérias Cadastradas</div>
                            <div>...</div>
                            </td>
                            
                    ";
            } else {
                    $row1 = mysql_fetch_assoc($qSel1);
                    $id = $row1['id'];
                    $titulo = $row1['titulo'];
                    $chamada = $row1['chamada'];
                    $id_cat = $row1['id_categoria'];
                    $chamada = substr($chamada, 0, 100); 
                    $img1 = $row1['small'];
                    if(!empty($img1)){
                            $img1 = "<img src='/img_up/revista/$img1' width='140' height='115' >";
                    } else {
                            $img1 = "<img src='/imagens/site/padrão.gif' width='140' height='115' >";
                    }
                    echo "
                         <td height='161'  align='center' width='33%' valign='top'>
                            <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_art.gif' border='0'></a></div>
                            <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img1</div>
                            <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                            <div></a></div>
                                <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                                <a href='/index?area=revista-eletronica&cat=2&sub=7&op=veja-mais'>Veja Mais</a>
                            </td>
                            
                            
                            
                    ";
            }
            if($ctSel2 == 0){
                    echo "
                    <td background='imagens/site/bk_rosa1.gif' height='161' align='center' width='33%' valign='top'>
                    <div style='padding-top: 4px;'><a href='/index?area=revista-eletronica&cat=12'><img src='imagens/site/icon_tur.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>Não há Matérias Cadastradas</div>
                    <div>...</div>
                    </td>
                    ";
            } else {
                    $row2 = mysql_fetch_assoc($qSel2);
                    $id = $row2['id'];
                    $titulo = $row2['titulo'];
                    $chamada = $row2['chamada'];
                    $id_cat = $row2['id_categoria'];
                    $chamada = substr($chamada, 0, 100); 
                    $img2 = $row2['small'];
                    if(!empty($img2)){
                            $img2 = "<img src='/img_up/revista/$img2' width='140' height='115'   >";
                    } else {
                            $img2 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    }
                    echo "
                    <td height='161' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_tur.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img2</div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=12&sub=67&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            if($ctSel3 == 0){
                    echo "
                    <td height='161' background='imagens/site/bk_azul1.gif' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=11'><img src='imagens/site/icon_musica.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>Não há Matérias Cadastradas</div>
                    <div>...</div>
                    </td>
                    ";
            } else {
                    $row3 = mysql_fetch_assoc($qSel3);
                    $id = $row3['id'];
                    $titulo = $row3['titulo'];
                    
                    $id_cat = $row3['id_categoria'];
            
                    $img3 = $row3['small'];
                    if(!empty($img3)){
                            $img3 = "<img src='/img_up/revista/$img3' width='140' height='115'  >";
                    } else {
                            $img3 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    }
                    echo "
                    <td height='161'  align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_musica.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img3</div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=11&sub=61&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            echo"
            </tr>
            <tr>";
            if($ctSel4 == 0){
                    echo"
                    <td bgcolor='#FEE4EF' height='144' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=10'><img src='imagens/site/icon_moda.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px;'>Não há Matérias Cadastradas</div>
                    <div></div>
                    </td>
                    ";
            } else {
                    $row4 = mysql_fetch_assoc($qSel4);
                    $id = $row4['id'];
                    $titulo = $row4['titulo'];
            
                    $id_cat = $row4['id_categoria'];
                    
                    $img4 = $row4['small'];
                    if(!empty($img4)){
                            $img4 = "<img src='/img_up/revista/$img4' width='140' height='115'  >";
                    } else {
                            $img4 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    }
                    echo"
                    <td height='144' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_moda.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img4</div>
                    <div style='font-weight: bold; padding-top: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=10&sub=55&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            if($ctSel5 == 0){
                    echo"
                    <td height='144' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=7'><img src='imagens/site/icon_forum.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>Não há Matérias Cadastradas</div>
                    <div></div>
                    </td>
                    ";
            } else {
                    $row5 = mysql_fetch_assoc($qSel5);
                    $id = $row5['id'];
                    $titulo = $row5['titulo'];

                    $id_cat = $row5['id_categoria'];

                    $img5 = $row5['small'];
                    if(!empty($img5)){
                            $img5 = "<img src='/img_up/revista/$img5' width='140' height='115'  >";
                    } else {
                            $img5 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    }
                    echo"
                    <td height='144' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_forum.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img5</div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=7&sub=37&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            if($ctSel6 == 0){
                    echo "
                    <td bgcolor='#FEE4EF' height='144' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=8'><img src='imagens/site/icon_infantil.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>Não há Matérias Cadastradas</div>
                    <div></div>
                    </td>
                    ";
            } else {
                    $row6 = mysql_fetch_assoc($qSel6);
                    $id = $row6['id'];
                    $titulo = $row6['titulo'];
                    
                    $id_cat = $row6['id_categoria'];
                
                    $img6 = $row6['small'];
                    if(!empty($img6)){
                            $img6 = "<img src='/img_up/revista/$img6' width='140' height='115'  >";
                    } else {
                            $img6 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    } 
                    echo "
                    <td  height='144' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_infantil.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img6</div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=8&sub=43&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            echo"
            </tr>
            <tr>";
            if($ctSel7 == 0){
                    echo "
                    <td height='163' align='center' width='33%' valign='top'>
                    <a href='/index?area=revista-eletronica&cat=4'><img src='imagens/site/icon_artesanato.gif' border='0'></a>
                    <div style='font-weight: bold; padding-top: 5px;'>Não há Matérias Cadastradas</div>
                    <div></div>
                    </td>
                    ";
            } else {
                    $row7 = mysql_fetch_assoc($qSel7 );
                    $id = $row7['id'];
                    $titulo = $row7['titulo'];
                
                    $id_cat = $row7['id_categoria'];
                
                    $img7 = $row7['small'];
                    if(!empty($img7)){
                            $img7 = "<img src='/img_up/revista/$img7' width='140' height='115'  >";
                    } else {
                            $img7 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    } 
                    echo "
                    <td height='163' align='center' width='33%' valign='top'>
                    <a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_artesanato.gif' border='0'></a>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img7</div>
                    <div style='font-weight: bold; padding-top: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=4&sub=19&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            if($ctSel8 == 0){
                    echo "
                    <td background='imagens/site/bk_rosa.gif' height='163' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=3'><img src='imagens/site/icon_artes.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px;'>Não há Matérias Cadastradas</div>
                    <div>...</div>
                    </td>
                    ";
            } else {
                    $row8 = mysql_fetch_assoc($qSel8);
                    $id = $row8['id'];
                    $titulo = $row8['titulo'];
                    //$chamada = $row8['chamada'];
                    $id_cat = $row8['id_categoria'];
                    //$chamada = substr($chamada, 0, 100);
                    $img8 = $row8['small'];
                    if(!empty($img8)){
                            $img8 = "<img src='/img_up/revista/$img8' width='140' height='115'  >";
                    } else {
                            $img8 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    }  
                    echo "
                    <td height='163' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_artes.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img8</div>
                    <div style='font-weight: bold; padding-top: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border='0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=3&sub=13&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }    
            if($ctSel9 == 0){
                    echo "
                    <td height='163' background='imagens/site/bk_azul.gif' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=9'><img src='imagens/site/icon_literatura.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px;'>Não há Matérias Cadastradas</div>
                    <div></div>
                    </td>
                    ";
            } else {
                    $row9 = mysql_fetch_assoc($qSel9);
                    $id = $row9['id'];
                    $titulo = $row9['titulo'];
    
                    $id_cat = $row9['id_categoria'];

                    $img9 = $row9['small'];
                    if(!empty($img9)){
                            $img9 = "<img src='/img_up/revista/$img9' width='140' height='115'  >";
                    } else {
                            $img9 = "<img src='/imagens/site/padrão.gif' width='140' height='115'  >";
                    }
                    echo "
                    <td height='163' align='center' width='33%' valign='top'>
                    <div><a href='/index?area=revista-eletronica&cat=$id_cat'><img src='imagens/site/icon_literatura.gif' border='0'></a></div>
                    <div style='font-weight: bold; padding-top: 5px; padding-bottom: 5px;'>$img9</div>
                    <div style='font-weight: bold; padding-top: 5px;'><a href='/index?area=revista-eletronica&cat=$id_cat'>$titulo</div>
                    <div></div></a>
                        <img border=' 0' align='absmiddle' src='/imagens/icones/bulletRight.gif'/>
                        <a href='/index?area=revista-eletronica&cat=9&sub=49&op=veja-mais'>Veja Mais</a>
                    </td>
                    ";
            }
            echo"
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif' align='center'><img border='0' src='imagens/site/linha.gif' width='452' height='7'><br><br></td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif' style='padding-left: 10px; padding-right: 5px;'>
        <table border='0' width='450' id='table4' cellspacing='0' cellpadding='0'>
            <tr>
                <td width='9'>
                <img border='0' src='imagens/site/vidtopesq.gif' width='9' height='23'></td>
                <td width='192' background='imagens/site/vidtopmei.gif'>
                <b>&nbsp;<a href='/index?area=revista-eletronica&cat=5'>Audiovisual</a></b></td>
                <td width='8'>
                <img border='0' src='imagens/site/vidtopdir.gif' width='8' height='23'></td>
                <td rowspan='3' width='32'>&nbsp;</td>
                <td width='9'>
                <img border='0' src='imagens/site/fottopesq.gif' width='9' height='23'></td>
                <td width='189' background='imagens/site/fottopmei.gif'>&nbsp;<b><a href='/index?area=revista-eletronica&cat=6'>Cultura Popular</a></b></td>
                <td width='11'>
                <img border='0' src='imagens/site/fottopdir.gif' width='8' height='23'></td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td width='172' bgcolor='#007CC2' align='center' style='padding: 10px;'>$imgSalaVideo</td>
                <td width='8'>&nbsp;</td>
                <td width='9'>&nbsp;</td>
                <td width='171' bgcolor='#FCE0EC' align='center' style='padding: 10px;'>$imgEnsaioFotografico</td>
                <td width='11'>&nbsp;</td>
            </tr>
            <tr>
                <td>
                <img border='0' src='imagens/site/vidfotesq.gif' width='9' height='20'></td>
                <td bgcolor='#005CA1'><font size='1' color='#FFFFFF'><b>$stSalaVideo</b></font></td>
                <td width='8'>
                <img border='0' src='imagens/site/vidfotdir.gif' width='8' height='20'></td>
                <td width='9'>
                <img border='0' src='imagens/site/fotfotesq.gif' width='9' height='20'></td>
                <td width='189' bgcolor='#E9728E'><font size='1' color='#FFFFFF'><b>$stEnsaioFotografico</b></font></td>
                <td width='11'>
                <img border='0' src='imagens/site/fotfotdir.gif' width='8' height='20'></td>
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif' style='padding: 10px;'>
        <table border='0' width='100%' id='table1' cellspacing='0' cellpadding='0'>
            <tr>
                <td width='2%' background='imagens/site/cant_1.gif'>&nbsp;</td>
                <td width='96%' bgcolor='#017EBE' height='20'>&nbsp;<font color='#FFFFFF'><b><a href='/index?area=fique-ligado' style='color:#FFFFFF'>FIQUE LIGADO</a></b> - Você 
                encontrará aqui editais, concursos, festivais</font></td>
                <td width='2%' background='imagens/site/cant_2.gif'>&nbsp;</td>
            </tr>
            <tr>
                <td colspan='3' style='padding-left: 1px;'>";
if($ctFiqL == 0){
echo "
<div style='border-bottom: 1px solid #BEDEED; padding: 3px; background-color: #D7EDFB;'>Não há Artigos Cadastrados</div>
";
} else {
$i = 0;
while($rowFl = mysql_fetch_assoc($qFiqL)){
$id = $rowFl['id'];
$data = $rowFl['data'];
$chamada = $rowFl['chamada'];
$chamada = substr($chamada, 0, 58); 

if(($i % 2) == 1) { $estilo="style='border-bottom: 1px solid #BEDEED; padding: 3px;'"; } else { $estilo="style='border-bottom: 1px solid #BEDEED; padding: 3px; background-color: #D7EDFB;'"; }                
echo"
<div $estilo><b>$data - <a href='index?area=fique-ligado&op=veja-mais&artigo=$id'>$chamada</a></b></div>";
$i++;
}

}
echo"
        </td>
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif'>&nbsp;</td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif'>
        <p align='center'>
        <img border='0' src='imagens/site/linha.gif' width='452' height='7'></td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif' style='padding: 5px;'>
        <table border='0' width='100%' id='table2' cellspacing='0' cellpadding='0'>
            <tr>
                <td width='39%' background='imagens/site/hol2.gif' style='padding: 2px;'>&nbsp;&nbsp;<font color='#FFFFFF'><b><a href='/index?area=holofotes' style='color:#FFFFFF'>Holofotes</a></b></font></td>
                <td width='12%' rowspan='2' valign='top'>
                <img border='0' src='imagens/site/hol.gif' width='47' height='62'></td>
                <td width='12%' rowspan='2' valign='top'>
                <p align='right' >
                <img border='0' src='imagens/site/for.gif'></td>
                <td width='38%' background='imagens/site/for2.gif'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FFFFFF'><b><a href='/index?area=entrevista' style='color:#FFFFFF'>Entrevista</a></b></font></td>
            </tr>
            <tr>";
            $rowHolo = mysql_fetch_assoc($qHolo);
            $idHolo = $rowHolo['id'];
            $nome_destaque = $rowHolo['nome_destaque'];

            $rowEntr = mysql_fetch_assoc($qEntr);
            $idEntr = $rowEntr['id'];
            $nome_destaque_entrevista = $rowEntr['nome_destaque'];            
            $chamadaEntrevista = substr($rowEntr['chamada'],0,76);
            
            echo"    
                <td width='39%' height='60' valign='top'><div style='padding: 3px;'><b><a href='/index?area=holofotes&ver=$idHolo' style='color:#000000'>$nome_destaque</a></b><br>O destaque do mês é $nome_destaque...</div></td>
                
                <td width='38%' height='60' valign='top'><div style='padding: 3px;'><b><a href='/index?area=entrevista&ver=$idEntr' style='color:#000000'>$nome_destaque_entrevista</a></b><br>$chamadaEntrevista</div></td>
            </tr>
        </table>
        </td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif'>
        <p align='center'>
        <img border='0' src='imagens/site/linha.gif' width='452' height='7'></td>
    </tr>
    <tr>
        <td background='imagens/cadastro/bk_meio.gif' width='100%' style='padding: 5px;'>
                <table border='0' width='455' id='table3' cellspacing='0' cellpadding='0'>
                    <tr>
                        <td width='8'><b>
                        <img border='0' src='imagens/site/foresq.gif' width='8' height='20'></b></td>
                        <td width='211' background='imagens/site/formei.gif'>
                        <b>&nbsp; <a href='/forum' style='color:#000' >Fórum</a> (Últimos Tópicos)</b></td>
                        <td width='7'>
                        <img border='0' src='imagens/site/fordir.gif' width='7' height='20'></td>
                        <td width='11' rowspan='2'>&nbsp;</td>
                        <td width='8'>
                        <img border='0' src='imagens/site/artesq.gif' width='8' height='20'></td>
                        <td width='211' background='imagens/site/artmei.gif'>&nbsp;
                        <b><a href='/index?area=artigos' style='color:#000' >Artigos</a> (Últimos Artigos)</b></td>
                        <td width='7'>
                        <img border='0' src='imagens/site/artdir.gif' width='7' height='20'></td>
                    </tr>
                    <tr>
                        ";
if($ctForu == 0){
echo "
<td colspan='3' width='211' bgcolor='#FFF0F7' valign='center'>
<center><b style='paddng-top:10px;'>Não Há Tópicos Cadastrados</b></center>
</td>
";
} else {                        

echo "<td colspan='3' width='211' bgcolor='#FFF0F7' valign='top'>";

while($rowF = mysql_fetch_assoc($qForu)){

$idTopico = $rowF['id_topico'];
$assunto    = substr($rowF['assunto'], 0, 90);
$idTema    = $rowF['id_tema'];
$tema    = $rowF['tema'];

echo"<div style='padding: 5px;'><b><a style='color:#000' href='/forum/?acao=verTema&idTema=$idTema'>$tema</a></b><br><a href='/forum/?acao=ver&id=$idTopico'>$assunto</a></div>";            
}          

echo "</td>";

}                        

if($ctArti == 0){
echo"
<td colspan='3' bgcolor='#ECF7FD' width='211' valign='center'>
<center><b style='paddng-top:10px;'>Não Há Artigos Cadastrados</b></center>
</td>
";
} else {

echo"<td colspan='3' bgcolor='#ECF7FD' width='211' valign='top'>";

while($rowA = mysql_fetch_assoc($qArti)){

$idArtigo = $rowA['id'];
$chamada    = substr($rowA['chamada'], 0, 90);
$segmento    = $rowA['segmento'];
$colaborador    = $rowA['proponente'];

echo"<div style='padding: 5px;'><b>$segmento</b><br><a href='/index?area=artigos&ver=$idArtigo'>$chamada</a><br><font size='1'><i>$colaborador</i></font></div>";            
}

echo"</td>";
}

echo"                </tr>
                </table>
                </td>
    </tr>
        <tr>
        <td height='2' background='imagens/cadastro/bk_meio.gif'>&nbsp;</td>
    </tr>
</table>";
?>

Editado por Vagner Nunes
Link para o comentário
Compartilhar em outros sites

  • 0

Salve,

Por ser um código muito extenso, vou pedir que você adicione o trecho de codigo abaixo apos a linha da mensagem de erro:

$qSel1 = mysql_query($sel1);
depurar($sel1);
depurar($qSel1);

function depurar($var, $exec = true)
{
    printf('<pre>%s</pre>', var_export($var, true));
    if(!$exec)
    {
        exit();
    }
}

Será exibido a consulta enviada ao banco de dados, veja se tudo esta ok e remova as informações de acesso do seu banco de dados do post aqui no fórum

abraços

Link para o comentário
Compartilhar em outros sites

  • 0

Rapaz, obrigado, querendo resolver a questao acabei inserido os dados de acesso junto.

Segue abaixo o erro que apareceu despois que inserir o código:

Parse error: syntax error, unexpected $end in /home/culturartes/www/paginas/principal.php on line 854
As linhas que está dando erro na principal.php são estas abaixo:
$ctSel1 = mysql_num_rows($qSel1);
$qSel1 = mysql_query($sel1);
$ctSel3 = mysql_num_rows($qSel3);
$ctSel4 = mysql_num_rows($qSel4);
$ctSel5 = mysql_num_rows($qSel5);
$ctSel6 = mysql_num_rows($qSel6);
$ctSel7 = mysql_num_rows($qSel7);
$ctSel8 = mysql_num_rows($qSel8);
$ctSel9 = mysql_num_rows($qSel9);
$ctSel10 = mysql_num_rows($qSel10);
$ctSel11 = mysql_num_rows($qSel11);
$ctFiqL = mysql_num_rows($qFiqL);
$ctForu = mysql_num_rows($qForu);
$ctArti = mysql_num_rows($qArti);
$ctHolo = mysql_num_rows($qHolo);
$ctEntr = mysql_num_rows($qEntr);

Sds,

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,6k
×
×
  • Criar Novo...