index.php

57 istruzioni
<html>
<?
$lang="en";
$cosa="esempio1";
include $_SERVER["DOCUMENT_ROOT"]."/config.php";
?>
<head>
<title>Example of ClearVoting voting procedure</title>
</head>
<body>
<?include "index_include.php";?>
<div class="sfondoscheda">
<center>
<table cellpadding="2" cellspacing="2">	<tr>
<?
include "config.php";
$quanti=count($candidate_nam);
touch ($lockfile); //no managing boot is yet involved
if (file_exists($lockfile)) {
	?>
	<table width="100%" border="0" cellpadding="4" cellspacing="4" class="bold">
	<tr>
<th colspan="<?=$quanti?>">May 10th, 2009 General Election: 
        HOUSE OF COMMONS<h2>Please click the candidate you want to vote for:</h2></th></tr>
	</table>
	<table width="100%" border="1" cellpadding="4" cellspacing="4" class="sfondoscheda">
	<tr>
	<?
	for ($i=1;$i<$quanti;$i++) {
		echo '<td class="centro"><a href="vote_confirm.php?id='.$i.'"><img alt="picture of '.$candidate_nam[$i].'" src="'.$candidate_img[$i].'.gif"/></a>';
                echo '<p><a href="vote_confirm.php?id='.$i.'"><span class="bold">'.$candidate_nam[$i].'</span></a></p>';
		echo '<br/><a href="vote_confirm.php?id='.$i.'"><img alt="symbol of '.$candidate_prt[$i].'" src="'.$candidate_smb[$i].'.gif"/></a>';
		echo '</td>';
	}
	?>

	</tr>
	</table>
<h2>Or you can vote <a href="vote_confirm.php?id=0"><span class="bold"><?=$candidate_nam[0]?></a></h2>
<?
} else {
	echo "<h1>Ask the polling station personell to acivate this kiosk</h1>";
}
?>
</tr></table>
</center>
</div>
<?

   if (file_exists("$_SERVER[DOCUMENT_ROOT]/CONTAMI/phpcounter.php")) {
        echo '<br/><div id="contatore" class="centro piccolone">', "\n";
        require "$_SERVER[DOCUMENT_ROOT]/CONTAMI/phpcounter.php";
        echo "</div>\n";
    }
?>
</body>
</html>