Changeset 138 for trunk/client
- Timestamp:
- Jun 13, 2011, 10:16:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/blocchi/01_votanti.php
r73 r138 16 16 else $circos=''; 17 17 18 //if ($genere==0) $tab="ref";elseif($genere=='4' || $votog) $tab="lista";19 18 if($genere=='4' || $votog) $tab="lista"; 20 19 else $tab="gruppo"; 21 20 if ($genere==0) $tab="ref"; 22 21 23 $res = mysql_query("select t3.* from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez ",$dbi);24 $numero=mysql_num_rows($res);25 $res = mysql_query("select t1.* from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' $circos",$dbi);26 $sezioni=mysql_num_rows($res);27 28 if ($numero!=0){29 22 30 31 echo "<h5><b>"._DETTAGLIO." "._VOTIE."</b> - </h5>"; 32 echo "<div style=\"text-align:center;\"><i> "._SEZSCRU." $numero "._SU." $sezioni </i></div>"; 33 34 35 36 37 if ($genere!=0) { 23 if ($genere!=0) { // referendum 38 24 39 25 $res = mysql_query("select sum(t1.maschi+t1.femmine) from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' and validi>0 $circos",$dbi); … … 45 31 46 32 }else{ 33 34 35 47 36 $res = mysql_query("SELECT sum(maschi+femmine) FROM ".$prefix."_ele_sezioni where id_cons='$id_cons'",$dbi); 48 37 list($tot_aventi) = mysql_fetch_row($res); … … 52 41 } 53 42 43 $i=0; 44 54 45 while (list($tot_votanti,$validi,$nulli,$bianchi,$contestati,$id,$si,$no) = mysql_fetch_row($res)){ 46 47 # calcolo sezioni 48 $res_sez = mysql_query("select count(0) from ".$prefix."_ele_voti_".$tab." where id_cons='$id_cons' and id_gruppo='$id'", $dbi); 49 list($numero)=mysql_fetch_row($res_sez); 50 $res_sez = mysql_query("select t3.* from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join 51 ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez ",$dbi); 52 $res_sez = mysql_query("select t1.* from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' $circos",$dbi); 53 $sezioni=mysql_num_rows($res_sez); 54 55 55 $tot_votanti=$validi+$bianchi+$nulli+$contestati; 56 56 $arvoti=array($validi,$nulli,$bianchi,$contestati); … … 75 75 } 76 76 77 78 77 $i++; 78 if($i==1)echo "<h5><b>"._DETTAGLIO." "._VOTIE."</b></h5>"; 79 if($i==1)echo "<div style=\"text-align:center;\">[ <i>Percentuali Relative</i> ]</div>"; 79 80 81 if ($genere==0) {echo "<br><div style=\"text-align:center;\">Referendum n. <b>[$num_gruppo]</b></div>";} 82 echo "<div style=\"text-align:center;\"><i> "._SEZSCRU." $numero "._SU." $sezioni </i></div>"; 80 83 echo "<table bgcolor=\"gray\" width=\"100%\" cellspacing=\"1\">"; 81 if ($genere==0) {echo "<br/>Referendum n. <b>[$num_gruppo]</b><br/>";}82 84 echo " 83 85 <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> … … 99 101 </table>"; 100 102 101 }103 102 104 } 103 105 104 105 106 107 108 109 110 106 ?>
Note:
See TracChangeset
for help on using the changeset viewer.