<?php

include_once('global.php');

$Output = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Osobní stránky Jiřího Hajdy</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="font-family: Arial;">

<h3>Seznam aktuálních projektů a aktivit:</h3><hr>
<table>';

$DbResult = $Database->select('projekty', '*', 'finished = 0');
while($Row = $DbResult->fetch_assoc())
{
  $Output .= '<tr><td>'.
  '<a href="'.$Row['link'].'"><img src="images/nahledy/'.$Row['image'].'_mini.png" alt="Náhled"></a>'.
  '</td><td valign="top">'.
  '<a href="'.$Row['link'].'">'.$Row['title'].'</a><br>'.$Row['description'].
  '</td></tr>';
}
$Output .= '</table>';


$Output .= '<h3>Seznam ukončených projektů a aktivit:</h3><hr>
<table>';

$DbResult = $Database->select('projekty', '*', 'finished = 1');
while($Row = $DbResult->fetch_assoc())
{
  $Output .= '<tr><td>'.
  '<a href="'.$Row['link'].'"><img src="images/nahledy/'.$Row['image'].'_mini.png" alt="Náhled"></a>'.
  '</td><td valign="top">'.
  '<a href="'.$Row['link'].'">'.$Row['title'].'</a><br>'.$Row['description'].
  '</td></tr>';
}
$Output .= '</table>';

$Output .= '</body></html>';

echo($Output);
