include ("adm/config.php");
include ("inc/class.php");
function EscreveData($data){
$data = explode(" ", $data);
return implode("/", array_reverse(explode("-",$data[0])))." às ".$data[1];
}
$conexao = @mysql_connect("$host","$login_db","$senha_db") or die("Falha na Conexão ao Banco de Dados!");
$db = @mysql_select_db("$database") or die ("Banco de Dados Inexistente!");
// Emulate register_globals on
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
}
?>
$sqlx = "SELECT * FROM destaques WHERE id ORDER BY id DESC LIMIT 0, 10";
$resultadox = mysql_query($sqlx) or die ("Ocorreu um erro no modulo: 01");
$active = "active";
while ($linhax=mysql_fetch_array($resultadox)) {
$numero = 0;
echo "";
$numero = $numero + 1;
$active = "";
}
?>
$sqlx = "SELECT * FROM destaques WHERE id ORDER BY id DESC LIMIT 0, 10";
$resultadox = mysql_query($sqlx) or die ("Ocorreu um erro no modulo: 01");
$active = "active";
while ($linhax=mysql_fetch_array($resultadox)) {
$idx = $linhax["id"];
$titulox = $linhax["titulo"];
$figurax = $linhax["figura"];
$sub_titulox = $linhax["sub_titulo"];
$urlx = $linhax["url"];
echo "
$sqlx = "SELECT * FROM adm_noticia WHERE categoria='3' ORDER BY id DESC";
$resultadox = mysql_query($sqlx) or die ("Ocorreu um erro no modulo: 01");
while ($linhax=mysql_fetch_array($resultadox)) {
$idx = $linhax["id"];
$titulox = $linhax["titulo"];
$figurax = $linhax["figura"];
$sub_titulox = $linhax["sub_titulo"];
$texto = $linhax["texto"];
$categoria = $linhax["categoria"];
echo "
$sqlx = "SELECT * FROM adm_noticia WHERE categoria='4' ORDER BY id DESC LIMIT 0, 2";
$resultadox = mysql_query($sqlx) or die ("Ocorreu um erro no modulo: 01");
while ($linhax=mysql_fetch_array($resultadox)) {
$idx = $linhax["id"];
$titulox = $linhax["titulo"];
$figurax = $linhax["figura"];
$sub_titulox = $linhax["sub_titulo"];
$texto = $linhax["texto"];
$categoria = $linhax["categoria"];
echo "
$sqlx = "SELECT * FROM adm_noticia WHERE categoria='3' ORDER BY id DESC LIMIT 0, 5";
$resultadox = mysql_query($sqlx) or die ("Ocorreu um erro no modulo: 01");
while ($linhax=mysql_fetch_array($resultadox)) {
$idx = $linhax["id"];
$titulox = $linhax["titulo"];
$figurax = $linhax["figura"];
$sub_titulox = $linhax["sub_titulo"];
$texto = $linhax["texto"];
$categoria = $linhax["categoria"];
echo "