Mini Shell
<?
include('admin/inc/conexao.php');
include('admin/inc/funcoes.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<? include('head.php') ?>
<link type="text/css" rel="stylesheet" href="<?=URL()?>/css/internas.css" />
<script type="text/javascript">
$(window).on('load resize', function(){
$('#divTopo').anystretch("<?=URL()?>/imagens/bg-couro.jpg");
$('#divFilh').anystretch("<?=URL()?>/imagens/bg-madeira.jpg");
});
</script>
<style type="text/css">
.carregarMais{
display:inline-block;
width:100%;
margin:0 0 0 0;
text-align:center;
}
.carregarMais img{
display:none;
}
.carregarMais div{
display:none;
}
.carregarMais, .carregarMais *{
color:#201e1e;
}
</style>
</head>
<body>
<!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TT72FNK6" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) -->
<div id="divTudo">
<div id="divGera">
<? include('topo.php'); ?>
<? include('banner.php'); ?>
<div id="divCont">
<div class="limite">
<div id="divBlog">
<div class="c1 coluna">
<?
$HAVI = "";
if($_GET["cate"] != ""){
$HAVI = " HAVING CATE LIKE '%@#@".prevSQL($_GET["cate"])."' OR CATE LIKE '%@#@".prevSQL($_GET["cate"]).",%' ";
}
if(utf8_decode($_GET["busc"]) != ""){
$FILT = " AND (B.titu LIKE '%".prevSQL(utf8_decode($_GET["busc"]))."%' OR B.cham LIKE '%".prevSQL(utf8_decode($_GET["busc"]))."%' OR C.cate LIKE '%".prevSQL(utf8_decode($_GET["busc"]))."%') ";
}
$SQL = "
SELECT B.foto, B.data, B.titu, B.cham, B.perm, B.visu, GROUP_CONCAT(DISTINCT(CONCAT(C.cate,'@#@',C.perm))) AS CATE
FROM blog B
LEFT JOIN blog_categorias_rel BCR ON (BCR.id_blog = B.id)
LEFT JOIN blog_categorias C ON (C.id = BCR.id_cate)
WHERE ativ = 'S' $FILT
GROUP BY B.id
$HAVI
ORDER BY B.data DESC, B.id DESC
LIMIT 8
";
$SQL = mysql_query($SQL,$db) or die(mysql_error());
while($row = mysql_fetch_array($SQL)){
$FOTO = $row["foto"];
$DATA = MP($row["data"]);
$TITU = $row["titu"];
$CHAM = $row["cham"];
$PERM = $row["perm"];
$VISU = $row["visu"];
$aCATE = explode(',', $row["CATE"]);
?>
<div class="blog">
<h1><a href="<?=URL()?>/blog/<?=$PERM?>"><?=$TITU?></a></h1>
<div class="esquerda coluna">
<a href="<?=URL()?>/blog/<?=$PERM?>"><img src="<?=URL()?>/imagens/blog/<?=$FOTO?>" alt="<?=$TITU?>" /></a>
</div><div class="direita coluna">
<?=$CHAM?><br /><br />
<a href="<?=URL()?>/blog/<?=$PERM?>" class="botao">Saiba mais</a>
<table>
<tr>
<td width="1%" nowrap><span style="background-image:url('<?=URL()?>/imagens/icone-data.jpg');"></span></td>
<td width="1%" nowrap><?=$DATA?></td>
<td width="47%"></td>
<td width="1%" nowrap><span style="background-image:url('<?=URL()?>/imagens/icone-visualizacoes.jpg');"></span></td>
<td width="1%" nowrap><?=$VISU?></td>
<td width="47%"></td>
<td width="1%" nowrap><span style="background-image:url('<?=URL()?>/imagens/icone-permalink.jpg');"></span></td>
<td width="1%" nowrap><a href="<?=URL()?>/blog/<?=$PERM?>">Permalink</a></td>
</tr>
<tr>
<td width="1%" nowrap><span style="background-image:url(<?=URL()?>/imagens/icone-categorias.jpg);"></span></td>
<td colspan="7">
<?
$HTML = '';
for($i=0;$i<sizeof($aCATE);$i++){
$CATE = explode('@#@',$aCATE[$i]);
$HTML .= '<a href="'.URL().'/categoria/'.$CATE[1].'">'.$CATE[0].'</a>, ';
}
echo substr($HTML,0,-2);
?>
</td>
</tr>
</table>
</div>
</div>
<?
}
?>
<div style="text-align:center;margin-top:30px;">
<div class="carregarMais">
<a href="javascript: carregaMais()" id="lnkAjax" class="botao verde">CARREGAR MAIS</a>
<input type="hidden" name="leva" id="leva" value="1" />
<img src="<?=URL()?>/imagens/ajax-loader.gif" alt="Carregando" />
<div class="mensagem">Todos os itens foram carregados.</div>
</div>
<script type="text/javascript">
function carregaMais(){
$('.carregarMais a').hide();
$('.carregarMais img').show();
$.ajax({
url: "<?=URL()?>/blog-ajax.php?leva=" + $('#leva').val(),
success: function(html){
if(html){
$(".blog:last").after(html);
$('.carregarMais a').show();
$('.carregarMais img').hide();
$("#leva").val(parseInt($("#leva").val()) + 1);
altura();
} else {
$('.carregarMais a').hide();
$('.carregarMais img').hide();
$('.carregarMais div').show();
}
}
});
}
</script>
</div>
</div><div class="c2 coluna">
<? include('blog-direita.php') ?>
</div>
</div>
</div>
</div>
<? include('informacoes.php'); ?>
<div id="divFilh">
<? include('incFilhotes.php'); ?>
</div>
<? include('rodape.php'); ?>
</div>
</div>
</body>
</html>
Zerion Mini Shell 1.0