Olá,
Onde posso esta errando.
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/tudoq/public_html/paginas/publicidades/exibe.php on line 21
<?php $variables=(strtolower($_SERVER['REQUEST_METHOD'])== 'GET') ? $_GET : $_POST; foreach ($variables as $k=> $v) $$k=$v; $palavra = "Publicidade"; $tabela = "tb_publicidades"; $file = "publicidades"; // INICIO DA ACAO DE EXIBIR BANNER if($acao == "exibe"){ //$pga = $_GET[pg]; if($formato=="728"){ $largura = "728"; $altura = "90";} if(!empty($posicao)){ $posicao = "AND posicao='$posicao'"; } if(!empty($pga)){ $paginaq = "AND pagina='$pga'"; } //if($acao == "exibe" AND $formato=="1024"){ include "../../config.php";} $busca = "SELECT * FROM $tabela WHERE status='S' AND formato='$formato' $pagina $posicao GROUP by and() LIMIT 1"; $query = mysql_query($busca); $total = mysql_num_rows($query); if($total == 0){ echo "<img width='$largura' height='$altura' src='".$url_Geral."upload/publicidades/sem_banner".$formato.".jpg' title='Anuncie Aqui' border='0'>"; } else { $dados = mysql_fetch_array($query); // COMEÇA CODIGO PRA EXIBIR BANNERS TIPO IMAGEM if($dados[tipo] == 'imagem'){ if(!empty($dados[url])){ echo "<a href='$dados[link]' target='_blank'><img width='$largura' height='$altura' name='imagem1' src='$dados[url]' border='0'></a>"; } else { echo "<a href='$dados[link]' target='_blank'><img width='$largura' height='$altura' name='imagem1' src='".$url_Geral."upload/publicidades/$dados[imagem]' border='0'></a>"; } } // COMEÇA CODIGO PRA EXIBIR BANNERS TIPO FLASH if($dados[tipo] == 'flash'){ if(!empty($dados[url])){ echo "<embed src='$dados[url]' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$largura' height='$altura'></embed>"; } else { echo "<script>exibeFash('".$url_Geral."upload/publicidades/$dados[imagem]', $largura, $altura, 1, 1);</SCRIPT>"; //echo "<embed src='".$usite."images/$tabela/$dados[imagem]' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$largura' height='$altura'></embed>"; } } // COMEÇA CODIGO PRA EXIBIR BANNERS TIPO HTML if($dados[tipo] == 'html'){ echo $dados[html]; } } } // FIM DA ACAO DE EXIBIR BANNER ?>