$query = 'SELECT * FROM zavody WHERE datum > '.time().' ORDER BY datum ASC LIMIT 1';
$zavod = DBQRow($query);
if (!empty($zavod)) {
if($zavod['url'] and $zavod['neni_nightrun']): $odkaz=$zavod['url'];
else: $odkaz=ZavMenuAddr($zavod['url'], 'propozice');
endif;
echo '