executa("select * from cad_". $tb ." where uri = '$tit_uri' "); $row_uri = $obj_uri -> fetchArray(); if(empty($row_uri) || !empty($_GET['id'])) { $l = 'http://www.10emtudo.com.br/404error.php'; //header("HTTP/1.0 404 Not Found"); header('HTTP/1.0 404 Not Found', true, 404); include('tis404.php'); die; //header("Location: http://www.10emtudo.com.br/404error.php"); //exit; ?>
executa("select * from cad_". $tb ." where cod = '$id' "); $row_tx_pagina = $obj_tx_pagina -> fetchArray(); $title = $row_tx_pagina[$coluna]; $keyword = strip_tags($row_tx_pagina["keyword"]); $description = strip_tags($row_tx_pagina["description"]); #------------------------ FIM BUSCANDO O CONTEUDO DA REDACAO ------------------# include("inc/head2.inc.php"); include("inc/menu_pequeno.inc.php"); ?>
"; for(($i_pg = $pg > 4 ? $pg-4 : 1) ; ($i_pg<=$qtd_pg = $pg+6 < $qtd_pg ? $pg+6 : $qtd_pg) ;$i_pg++) { // Verifica se a página que o navegante esta e retira o link do número para identificar visualmente if ($pg == ($i_pg-1)) { echo " $i_pg "; } else { $i_pg2 = $i_pg-1; echo " $i_pg "; } } $qtd_pg2 = count($tx)-1; if($pg+5 < $qtd_pg2){ echo "...";} echo " | $link_prox |
"; } #---------------- FIM PAGINAÇÃO ----------------------# #---------------- INICIO PROXIMO ARTIGO ---------------------------# $obj_cat_prox = new Principal; $obj_cat_prox -> executa("select * from cad_".$tb."_categoria where cod = '$categoria' "); $row_cat_prox = $obj_cat_prox -> fetchArray(); $categoria_sql = " where cod_".$tb."_categoria='$categoria' && ".$row_cat_prox['ordenar']." > '".addslashes($row_tx_pagina[$row_cat_prox['ordenar']])."' order by ".$row_cat_prox['ordenar']." ".$row_cat_prox['tp_ordenar']; $obj_tx_prox = new Principal; $obj_tx_prox -> executa("select ".$coluna." as tit, cod,uri from cad_". $tb . $categoria_sql); $row_tx_prox = $obj_tx_prox -> fetchArray(); $tit_prox = variavel_url($row_tx_prox['tit']); $pre_uri = $row_tx_prox['uri']; if($tit_prox) { for($i=0; $i<$qtd_id-1; $i++) { $ids_prox .= $ids[$i]."_"; } echo "Ver Próximo Artigo: $row_tx_prox[tit]