graphonline/backend/vote.php
2024-10-10 20:17:45 +02:00

16 lines
350 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");
}
?>