index.php
49 istruzioni<html>
<?
$lang="it";
$cosa="esempio1";
include $_SERVER["DOCUMENT_ROOT"]."/config.php";
?>
<head>
<title>Esempio di procedura di voto ClearVoting</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?>">Elezioni politiche del 10 Maggio 2009:
CAMERA DEI DEPUTATI<h2>Clicca sul candidato che vuoi votare:</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="immagine di '.$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="simbolo di '.$candidate_prt[$i].'" src="'.$candidate_smb[$i].'.gif"/></a>';
echo '</td>';
}
?>
</tr>
</table>
<h2>Oppure puoi votare <a href="vote_confirm.php?id=0"><span class="bold"><?=$candidate_nam[0]?></a></h2>
<?
} else {
echo "<h1>Chiedi al Presidente di Seggio di attivare questo chiosco</h1>";
}
?>
</tr></table>
</center>
</div>
</body>
</html>