<?
$stahovany = $_REQUEST['stahovany'];
if (!file_exists($stahovany)) exit;
header("Location: $stahovany"); include("db.php"); $datum = date('y-m-d');
$dotaz1=@mysql_query("select stazen from ".$tabulka." where soubor = \"".$stahovany."\"");
$poc = @MySQL_Num_Rows($dotaz1); if($poc==0){
$dotaz4=@mysql_query("insert into ".$tabulka." values(\"".$stahovany."\",\"".$datum."\",1)");
if(!$dotaz4) exit("chyba4");
}
else
$res=@mysql_fetch_array($dotaz1);
$dotaz2=@mysql_query("UPDATE ".$tabulka." SET stazen = ".$res[0]."+1, datum = \"".$datum."\" where soubor = \"".$stahovany."\"");
if(!$dotaz2) exit(" chyba 2");
?>