Added vote to site

This commit is contained in:
Unick Soft
2017-07-28 00:17:42 +03:00
parent a64fff2dd9
commit ab0d155367
23 changed files with 199 additions and 9 deletions

15
cgi-bin/vote.php Normal file
View File

@@ -0,0 +1,15 @@
<?
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");
}
?>