<html>
<head>
<title>Glasanje</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="5" link="#0099FF" vlink="#0099FF" alink="#990033">
<p>
<script language="php">
$buffer=file("rezultati.txt");
parse_str($buffer[0]);
if ($radiobutton==1) {
$prvi+=1;
}
elseif ($radiobutton==2) {
$drugi+=1;
}
elseif ($radiobutton==3) {
$treci+=1;
}
$procenat1=($prvi/($prvi+$drugi+$treci))*100;
$procenat2=($drugi/($prvi+$drugi+$treci))*100;
$procenat1=number_format($procenat1,2);
$procenat2=number_format($procenat2,2);
$procenat3=number_format(100-$procenat1-$procenat2,2);
$p1=$procenat1*3;$p2=$procenat2*3;$p3=$procenat3*3;
$buffer="prvi=".$prvi."&"."drugi=".$drugi."&"."treci=".$treci;
$h=fopen("rezultati.txt","w");
rewind ($h);
fwrite ($h,$buffer);
fclose($h);
</script>
</p>
<table width="95%" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000">
<tr valign="middle">
<td width="20%" height="30">Prvi</td>
<td width="5%" align="center">
<?php echo "<b>".$prvi."</b>"; ?>
</td>
<td width="10%"> </td>
<td><img src="images/levo.gif" width="7" height="18"><img src="images/s.gif" width="<?php echo $p1; ?>" height="18"><img src="images/desno.gif" width="7" height="18">
<?php echo "<b>$procenat1%</b>"; ?>
</td>
</tr>
<tr valign="middle">
<td width="20%" height="30">Drugi</td>
<td width="5%" align="center">
<?php echo "<b>".$drugi."</b>"; ?>
</td>
<td width="10%"> </td>
<td><img src="images/levo1.gif" width="7" height="18"><img src="images/s1.gif" width="<?php echo $p2; ?>" height="18"><img src="images/desno1.gif" width="7" height="18">
<?php echo "<b>$procenat2%</b>"; ?>
</td>
</tr>
<tr valign="middle">
<td width="20%" height="30">Treci</td>
<td width="5%" align="center">
<?php echo "<b>".$treci."</b>"; ?>
</td>
<td width="10%"> </td>
<td><img src="images/levo2.gif" width="7" height="18"><img src="images/s2.gif" width="<?php echo $p3; ?>" height="18"><img src="images/desno2.gif" width="7" height="18">
<?php echo "<b>$procenat3%</b>"; ?>
</td>
</tr>
</table>
<p> </p>
</body>
</html>
Sajt sa dnevnim vestima vezanim za fotografiju, foto aparate i obradu slika
[url]http://www.dphotonews.com[/url]