<?php
session_start();

switch ($_GET['akce']) {

case "set" :
$jmeno = $_SESSION['username'];
$heslo = $_SESSION['userpassword'];
SetCookie ("jtcms_jmeno", "$jmeno",time() + 10* 365 * 86400);
SetCookie ("jtcms_heslo", "$heslo",time() + 10* 365 * 86400);
Header("Location: login.php");
break;


case "del" :
setcookie ("jtcms_jmeno", "", time() - 1);
setcookie ("jtcms_heslo", "", time() - 1);
Header("Location: login.php");
break;

default :
Header("Location: login.php");
};
?>