Location: PHPKode > scripts > Silentum Poll > form.php
<?PHP
	/*
	Silentum Poll v1.3
	Modified July 8, 2010
	form.php copyright 2006-2012 HyperSilence
	*/

	include("poll_script.php");

	if(isset($_COOKIE["$cookie_name"]) && $_GET["message"] != "1" && $_GET["message"] != "2" && $_GET["message"] != "3") $message = "<u>Results</u><br><br>";
	elseif(!isset($_COOKIE["$cookie_name"]) && !isset($_GET["message"]) || $_GET["message"] < "1" || $_GET["message"] > "3") $message = "<u>Cast your vote below.</u><br><br>";
	elseif($_GET["message"] == "1") $message = "<u>Your vote has been added.</u><br><br>";
	elseif($_GET["message"] == "2") $message = "<u>You must select a choice.</u><br><br>";
	elseif($_GET["message"] == "3") $message = "<u>Please only vote once per week.</u><br><br>";
?>
<table id="poll">
				<tr>
					<td>
						<?=$date?>
					</td>
				</tr>
				<tr>
					<td>
						<i><?=$header?></i><br>
						<b><?=$question?></b><br><br>
						<?=$message?>

						<form action="vote.php" method="post">
						<hr>
						<p><input name="choice" type="radio" value="0"> <?=$choices[0]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[10]?></b>)<? } ?></p>
						<p><input name="choice" type="radio" value="1"> <?=$choices[1]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[11]?></b>)<? } ?></p>
<? if(isset($choices[2]) && trim($choices[2]) != "") { ?>
						<p><input name="choice" type="radio" value="2"> <?=$choices[2]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[12]?></b>)<? } ?></p>
<? } if(isset($choices[3]) && trim($choices[3]) != "") { ?>
						<p><input name="choice" type="radio" value="3"> <?=$choices[3]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[13]?></b>)<? } ?></p>
<? } if(isset($choices[4]) && trim($choices[4]) != "") { ?>
						<p><input name="choice" type="radio" value="4"> <?=$choices[4]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[14]?></b>)<? } ?></p>
<? } if(isset($choices[5]) && trim($choices[5]) != "") { ?>
						<p><input name="choice" type="radio" value="5"> <?=$choices[5]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[15]?></b>)<? } ?></p>
<? } if(isset($choices[6]) && trim($choices[6]) != "") { ?>
						<p><input name="choice" type="radio" value="6"> <?=$choices[6]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[16]?></b>)<? } ?></p>
<? } if(isset($choices[7]) && trim($choices[7]) != "") { ?>
						<p><input name="choice" type="radio" value="7"> <?=$choices[7]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[17]?></b>)<? } ?></p>
<? } if(isset($choices[8]) && trim($choices[8]) != "") { ?>
						<p><input name="choice" type="radio" value="8"> <?=$choices[8]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[18]?></b>)<? } ?></p>
<? } if(isset($choices[9]) && trim($choices[9]) != "") { ?>
						<p><input name="choice" type="radio" value="9"> <?=$choices[9]?><? if($display_votes == false && isset($_COOKIE["$cookie_name"]) || $display_votes == true) { ?> (<b><?=$choices[19]?></b>)<? } ?></p>
<? } ?>
						<hr>				
						<p><b><?=$total_votes?></b> total votes<br><br></p>
<? if(!isset($_COOKIE["$cookie_name"])) { ?>
						<p><input name="submit" type="submit" value="Vote"></p>
<? } else { ?>
						<p><i>Already voted.</i></p>
<? } ?>
						</form>
						<hr>
						<p>Powered by:<br><a href="http://hypersilence.com/silentum" title="Silentum Poll v1.3">Silentum Poll v1.3</a></p>
					</td>
				</tr>
			</table>
Return current item: Silentum Poll