P
piXel[-]Styler
Hallo Ich habe diesen Vote von Dunsti ( tutorial )
und wollte ne IP sperre aber dies geht nicht so richtig wie ich das möchte wer könnte mir helfen?
und wollte ne IP sperre aber dies geht nicht so richtig wie ich das möchte wer könnte mir helfen?
Code:
<html>
<head>
<title>Der Vote</title>
</head>
<style type="text/css">
BODY {
background-color: #FF9900;
font-family: Verdana;
font-size: 11px;
color: black;
}
td {
font-size: 11px;
font-family: Verdana;
color: black;
}
</style>
<body bgcolor="black" text="white">
<?PHP
$frage = "Der Vote";
$anzahl = 5;
$option[0] = "Sehr Gut";
$option[1] = "Gut";
$option[2] = "Mittelmaessig";
$option[3] = "Schlecht";
$option[4] = "rolfing";
$farbe[0]="#FF0000";
$farbe[1]="#FF0000";
$farbe[2]="#FF0000";
$farbe[3]="#FF0000";
$farbe[4]="#FF0000";
$datei = "ergebnis.txt";
if (file_exists($datei)) {
$votes=file($datei);
}
else { //wenn nicht
$handle = fopen($datei, "w+");
$i=0;
for ($i; $i<$anzahl; $i++) {
fputs($handle,"0\n");
}
fclose($handle);
$votes=file($datei);
}
if ($submitvote) {
settype($votes[$radio],"integer");
$votes[$radio]++;
$handle = fopen($datei, "w+");
$i=0;
for ($i; $i<$anzahl; $i++) {
settype($votes[$i],"integer");
fputs($handle,"$votes[$i]\n");
}
fclose($handle);
}
echo "$frage\n\n";
?>
<table cellpadding="3">
<?
$i=0;
for ($i; $i<$anzahl; $i++) { //fuer jede Option
$j=0;
echo "<tr><td>".$option[$i]." </td><td><FONT COLOR=\"".$farbe[$i]."\">";
for($j; $j<$votes[$i]; $j++) {
echo "|";
}
echo " ".$votes[$i]."</FONT></td></tr>\n";
}
?>
</table>
<?
echo "<FORM ACTION=\"".$PHP_SELF."\" METHOD=\"Post\">\n";
$i=0;
for ($i; $i<$anzahl; $i++) { //fuer jede Option
echo "<INPUT TYPE=\"radio\" NAME=\"radio\" VALUE=\"".$i."\">".$option[$i]."<BR>\n";
}
echo "<INPUT TYPE=\"Submit\" VALUE=\"Vote\" NAME=\"submitvote\"></FORM>";
?>
</body>
</html>