|
$rowsPerPage = 10;
$pageNum = 1;
if(isset($_GET['StranaCislo']))
{
$pageNum = $_GET['StranaCislo'];
if($pageNum=='') $pageNum=1;
}
if(isset($_GET['page']))
{
$pageNum = $_GET['page'];
}
$pageNum10=($pageNum*$rowsPerPage)-$rowsPerPage;
$sSQL = "SELECT * FROM 02_prednaskova_cinnost ORDER by datum DESC LIMIT $pageNum10,$rowsPerPage;";
$sOutputTable = '';
$i=false;
$rs = mysql_query($sSQL) or die (mysql_error());
while ($row = mysql_fetch_array($rs)):
$rok=substr($row["datum"],0,4);
if ($rok<>$rok1)
{
print " ";
print " ";
print " Rok ";
print $rok."";
print "";
}
$rok1=substr($row["datum"],0,4);
if ($row['abstrakt']<>'')
{
print "";
}
else
{
print "";
}
print "".$row['autor']."";
print ", ".$row['misto']."";
print ", ".date("d.m.Y", strtotime($row["datum"]))."";
endwhile;
mysql_free_result($rs);
$query = "SELECT COUNT(id) AS numrows FROM 02_prednaskova_cinnost;";
$result = mysql_query($query) or die('Error, query failed2');
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$pocet = $row['numrows'];
if ($pocet>$rowsPerPage)
{
print " ";
print "";
}
?>
|
|
|
|
|