include ('connect.phtml');
# English language version of voting script
## 1. check for viarables
# if(!$girl) {
# print "Вы не выбрали, за кого голосуете\n";
# exit;
# }
## 2. consturct cookie
$dat=date("Y-m",time());
# $paparazzi="paparazzi_voting";
## 3. check if cookie is present
if (${$dat}) {
print "
Ваш голос уже был учтен в этом месяце, спасибо
";
} else {
## 4. set voting cookie for today
setcookie("$dat","voted",time()+31536000,"","",0);
## 5. cookie set, proceed to voice counting. Open filename and write the voice.
# $line = "[".$dat."][Girl=".$girl."][Honest=".$honest."][New_organizers=".$new_org."][Transparent=".$transp."][State=".$state."][Alternative=".$alternate."][Weak=".$weak."]\n";
# $filename = "/usr/local/apache/data/paparazzi_voting.log";
# $fp = fopen ($filename, "a");
# fwrite($fp, $line, 512);
# fclose($fp);
$res=mysql_query("update antirating set votes=votes+1 where ID='$pol'");
$res=mysql_query("update antirating set votes=votes+1 where ID='$sing'");
$res=mysql_query("update antirating set votes=votes+1 where ID='$sport'");
$res=mysql_query("update antirating set votes=votes+1 where ID='$act'");
$res=mysql_query("update antirating set votes=votes+1 where ID='$radio'");
$res=mysql_query("update antirating set votes=votes+1 where ID='$tv'");
## 7. Ok, data written, give thanks
?>
Thanks
print "Благодарим Вас за участие в голосовании
";
}
?>