graphonline/cgi-bin/vote.php
2019-05-25 14:26:24 +02:00

16 lines
365 B
PHP

<?php
include ("../core/config/main.php");
if (!isset($_COOKIE["vote0"]))
{
$index = $_GET["index"];
setcookie("vote0", "true", time() + 3600 * 24 * 90, '/'); // 3 month
$file = fopen("../" . $g_config['vote'], "a");
fprintf($file, "%d\n", $index);
fclose($file);
echo ("OK");
}
?>