<?php

include('includes/hlava.php');
title('Klub priateľov fotografie', '');

if ($link) {
  if ($db_selected) {
  
include('includes/vedla.php');
odkaz('');
include('includes/menu.php');
menu('','');
?>

    
                  
        <div class="obsah">
<?php
        		$sql = "SELECT N.news, UNIX_TIMESTAMP(N.kedy) AS 'dat'
                    FROM kpf_news N
                    ORDER BY kedy DESC;";
        		$result = mysql_query($sql, $link);
        		if ($result) {
          		  while ($row = mysql_fetch_assoc($result)) {
        		      echo $row['kedy'];
        		      echo '<p><b>'.date("d.m.Y", $row['dat']).', '.date("H:i", $row['dat']).'</b>';
        		      echo '<br/>';
                  echo $row['news'];
                  echo '<br/></p>';
                }
            }
              else echo 'CHYBA';
        		}   
	   mysql_close($link);   
 
	}
include('includes/pata.php'); 
?>
