<html>
<head>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" charset="utf-8" />
</head>
<?php
$tamanhoPagina = 13;
$numLinks = 1;
$page = (int) $_GET['page'];
if (!$page) {
$inicio = 0;
$page=1;
}
else {
$inicio = ($page - 1) * $tamanhoPagina;
}
$sql = "select date_format(data,'%d/%m/%y')as data,numero,evento,linkimagem,link from dallas order by numero desc";
$query1=mysql_query($sql);
$total=mysql_num_rows($query1);
$numRegistros = $total;
$total_paginas = ceil($numRegistros / $tamanhoPagina);
$limit = " $inicio, $tamanhoPagina";
if($total>0){
$sql .= " limit ".$limit;
$query=mysql_query($sql);
//include('');
$fabrica = new fabrica();
$P = $fabrica->load_lib("paginator", "");
$P->totalRegistros = $numRegistros;
$P->limit = $tamanhoPagina;
$P->urlBusca = "secao=eventos";
?>
<table cellpadding="1" cellspacing="1" class="tahoma11azulb" style="width:530px;border:solid 1px #fff;">
<tr style="background-color:#079dcf">
<td height="5" class="tahoma11brancob"><div align="center">Data</div></td>
<td class="tahoma11brancob"><div align="center">Número</div></td>
<td class="tahoma11brancob"><div align="center">Miniatura</div></td>
<td class="tahoma11brancob"><div align="center">Eventos</div></td>
</tr>
<?
$i=0;
while($linha=mysql_fetch_array($query)){
?>
<tr style="border:1px solid red;background-color:<?=($i==1 or $i%2)?"#ecf6fc;":"#fff"?>">
<td valign="top"><p style="text-align:center"><?=utf8_encode($linha['data']);?></p></td>
<td valign="top"><p style="text-align:center"><?=$linha['numero']?></p></td>
<td valign="top"><p style="align:center"><img src=<?=$linha['linkimagem']?>></img></p></td>
<td valign="top"><p style="text-align:center"><?=($linha['evento']);?><br>
<?
$imgc = 1;
$images=glob(".$linha[link]{*.jpg,*.png,*.gif,*.bmp}", GLOB_BRACE);
echo "Fotos ";
foreach($images as $image) { ?><a href="<?=$image;?>" rel="prettyPhoto[galeria_<? echo $i; ?>]"><? echo $imgc . " | "; $imgc++; ?></a><? } ?>
</p></td>
</tr>
<tr style="border-bottom:10px solid; background-color:<?=($i== 1 or $i % 2)?"#ecf6fc;":"#fff"?>">
<td valign="top" style="font-weight:normal;" colspan="4"><p style="margin:6px;"><?=($linha['html'])?></p></td>
</tr>
<tr style="margin:0px;padding:0px;background:#079dcf;">
<td colspan="4" height="0px"></td>
</tr>
<?
$i++;
}
?>
</table>
<?php
if($total_paginas>1){ $P->show();}
}
else{
echo NaoExiste('Ainda não existem históricos cadastrados!','img/naoexiste.png','100');
}
?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
<div style="clear:left"></div>
</html>
Nenhum comentário:
Postar um comentário