<?php

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

if ($link) {
  if ($db_selected) {
    if (isset($_GET['aid']) && ($_GET['aid'] != '') && (isset($_GET['zmen'])) && (($_GET['zmen'] == '0') || ($_GET['zmen'] == '1')) && ($_GET['aid'] == $_SESSION['aid'])) {
      $sql = "UPDATE kpf_author A SET A.rss = '" . $_GET['zmen'] . "'
                                  WHERE A.aid = '" . $_GET['aid'] . "';";
      $result = mysql_query($sql, $link);
          		if ($result) {
                  header("Location: nastav.php");
              }            
    } else echo 'nastala chyba!';
  }
}
?>
