Changeset 73
- Timestamp:
- Apr 2, 2010, 3:30:01 PM (15 years ago)
- Location:
- trunk/client/modules/Elezioni
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/blocchi/01_votanti.php
r2 r73 54 54 while (list($tot_votanti,$validi,$nulli,$bianchi,$contestati,$id,$si,$no) = mysql_fetch_row($res)){ 55 55 $tot_votanti=$validi+$bianchi+$nulli+$contestati; 56 $arvoti=array($validi,$nulli,$bianchi,$contestati); 57 $arperc=arrayperc($arvoti,$tot_votanti); 56 58 if($tot_votanti){ 57 59 if($genere==0 and $validi) {$perc_si=number_format($si*100/$validi,2);$perc_no=number_format(100 - $si*100/$validi,2);} 58 60 else {$perc_si="0.00"; $perc_no="0.00";} 59 $perc_validi=number_format($ validi*100/$tot_votanti,2);60 $perc_nulli=number_format($ nulli*100/$tot_votanti,2);61 $perc_bianchi=number_format($ bianchi*100/$tot_votanti,2);62 $perc_conte=number_format($ contestati*100/$tot_votanti,2);61 $perc_validi=number_format($arperc[0],2);#number_format($validi*100/$tot_votanti,2); 62 $perc_nulli=number_format($arperc[1],2); 63 $perc_bianchi=number_format($arperc[2],2); 64 $perc_conte=number_format($arperc[3],2); 63 65 }else {$perc_validi="0.00";$perc_nulli="0.00";$perc_bianchi="0.00";$perc_conte="0.00";} 64 66 if($tot_aventi) … … 79 81 if ($genere==0) {echo "<br/>Referendum n. <b>[$num_gruppo]</b><br/>";} 80 82 echo " 81 <tr bgcolor=\"#ffffff\"><td ><b>"._AVENTI."</b></td><td >$tot_aventi</td><td><span class=\"red\">100%</span></td></tr>83 <tr bgcolor=\"#ffffff\"><td ><b>"._AVENTI."</b></td><td align=\"right\">$tot_aventi</td><td align=\"right\"><span class=\"red\">100.00%</span></td></tr> 82 84 83 <tr bgcolor=\"#ffffff\"><td><b>"._VOTANTI."</b></td><td >$tot_votanti</td><td><span class=\"red\">$perc_votanti%</span></td></tr>";85 <tr bgcolor=\"#ffffff\"><td><b>"._VOTANTI."</b></td><td align=\"right\">$tot_votanti</td><td align=\"right\"><span class=\"red\">$perc_votanti%</span></td></tr>"; 84 86 if ($genere==0){ 85 echo "<tr bgcolor=\"#ffffff\"><td>"._SI."</td><td >$si</td><td><span class=\"red\">$perc_si%</span></td></tr>87 echo "<tr bgcolor=\"#ffffff\"><td>"._SI."</td><td align=\"right\">$si</td><td align=\"right\"><span class=\"red\">$perc_si%</span></td></tr> 86 88 87 <tr bgcolor=\"#ffffff\"><td>"._NO."</td><td >$no</td><td><span class=\"red\">$perc_no%</span></td></tr>";89 <tr bgcolor=\"#ffffff\"><td>"._NO."</td><td align=\"right\">$no</td><td align=\"right\"><span class=\"red\">$perc_no%</span></td></tr>"; 88 90 } 89 echo "<tr bgcolor=\"#ffffff\"><td>"._VALIDI."</td><td >$validi</td><td><span class=\"red\">$perc_validi%</span></td></tr>91 echo "<tr bgcolor=\"#ffffff\"><td>"._VALIDI."</td><td align=\"right\">$validi</td><td align=\"right\"><span class=\"red\">$perc_validi%</span></td></tr> 90 92 91 <tr bgcolor=\"#ffffff\"><td>"._NULLI."</td><td >$nulli</td><td><span class=\"red\">$perc_nulli%</span></td></tr>93 <tr bgcolor=\"#ffffff\"><td>"._NULLI."</td><td align=\"right\">$nulli</td><td align=\"right\"><span class=\"red\">$perc_nulli%</span></td></tr> 92 94 93 <tr bgcolor=\"#ffffff\"><td>"._BIANCHI."</td><td >$bianchi</td><td><span class=\"red\">$perc_bianchi%</span></td></tr>95 <tr bgcolor=\"#ffffff\"><td>"._BIANCHI."</td><td align=\"right\">$bianchi</td><td align=\"right\"><span class=\"red\">$perc_bianchi%</span></td></tr> 94 96 95 <tr bgcolor=\"#ffffff\"><td>"._CONTESTATI."</td><td >$contestati</td><td><span class=\"red\">$perc_conte%</span></td></tr>97 <tr bgcolor=\"#ffffff\"><td>"._CONTESTATI."</td><td align=\"right\">$contestati</td><td align=\"right\"><span class=\"red\">$perc_conte%</span></td></tr> 96 98 97 99 </table>"; -
trunk/client/modules/Elezioni/blocchi/02_risultati.php
r72 r73 21 21 echo "<table>"; 22 22 for($x=0;$x<count($gruppo);$x++){ 23 echo "<tr><td><strong><big>·</big></strong></td><td>".$gruppo[$x]." </td><td ><b><span style=\"color:#ff0000;\">".$pro[$x] ."%</span></b></td></tr>\n";23 echo "<tr><td><strong><big>·</big></strong></td><td>".$gruppo[$x]." </td><td align=\"right\"><b><span style=\"color:#ff0000;\">".$pro[$x] ."%</span></b></td></tr>\n"; 24 24 } 25 25 echo "</table>"; -
trunk/client/modules/Elezioni/funzioni.php
r70 r73 428 428 $temp2tot=0;$temp2=array(); 429 429 while (list($key,$voti)= each($temp)) { 430 $temp2[$key]=(ceil($voti*1000/$sevaltot)-($voti*1000/$sevaltot)); 430 if($voti) 431 $temp2[$key]=(ceil($voti*10000/$sevaltot)-($voti*10000/$sevaltot)); 431 432 $valperc=number_format($voti*100/$sevaltot,2); 432 433 $temp3[$key]=$valperc;
Note:
See TracChangeset
for help on using the changeset viewer.