Changeset 250 for trunk/admin/modules/Elezioni
- Timestamp:
- Mar 20, 2016, 5:40:41 PM (9 years ago)
- Location:
- trunk/admin/modules/Elezioni
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_riepilogo.php
r235 r250 51 51 $res = mysql_query("SELECT sum(voti_donne),sum(voti_uomini),sum(voti_complessivi) FROM ".$prefix."_ele_voti_parziale where id_cons='$id_cons' and data='$giorno' and orario='$ora'", $dbi); 52 52 list($votf,$votm,$votc) = mysql_fetch_row($res); 53 $res = mysql_query("SELECT sum(solo_gruppo),sum(validi),sum(nulli),sum(bianchi),sum(contestati), sum(voti_nulli),sum(validi_lista),sum(voti_nulli_lista),sum(contestati_lista),sum(solo_lista) FROM ".$prefix."_ele_sezioni where id_cons=$id_cons", $dbi); 53 if($genere!=0){ 54 $res = mysql_query("SELECT sum(solo_gruppo),sum(validi),sum(nulli),sum(bianchi),sum(contestati), sum(voti_nulli),sum(validi_lista),sum(voti_nulli_lista),sum(contestati_lista),sum(solo_lista) FROM ".$prefix."_ele_sezioni where id_cons=$id_cons", $dbi); 54 55 list($sg,$validi,$nulli,$bianchi,$contestati,$votinulli,$validilista,$nullilista,$contestatilista,$sl)=mysql_fetch_row($res); 55 56 echo "<center>"; … … 63 64 if ($votog) echo "<fieldset><legend>"._VOTI_LISTA."</legend>"; 64 65 else echo "<fieldset><legend>"._GRUPPO."</legend>"; 66 65 67 echo "<table border=\"1\" width=\"100%\"><tr><th><b>"._VALIDI."</b></th><th>"._NULLI."</th><th>"._BIANCHI."</th><th>"._CONTESTATI."</th><th>"._VOTINULLI."</th><th>"._TOTNON."</th></TR>"; 66 68 ECHO "<TR><TH>".number_format($validi,0,',','.')."</TH><TH>".number_format($nulli,0,',','.')."</TH><TH>".number_format($bianchi,0,',','.')."</TH><TH>".number_format($contestati,0,',','.')."</TH><TH>".number_format($votinulli,0,',','.')."</TH><TH>".number_format($totnulli,0,',','.')."</TH></TR></table><br/>"; 67 ECHO "</fieldset><br/><br/><br/>"; 68 69 ECHO "</fieldset><br/><br/><br/>"; 70 }else{ 71 $res = mysql_query("SELECT sum(si),sum(no),sum(validi),sum(nulli),sum(bianchi),sum(contestati),id_gruppo FROM ".$prefix."_ele_voti_ref where id_cons='$id_cons' group by id_gruppo", $dbi); 72 while (list($si,$no,$validi,$nulli,$bianchi,$contestati,$idg) = mysql_fetch_row($res)){ 73 $resref = mysql_query("SELECT num_gruppo,descrizione from ".$prefix."_ele_gruppo where id_gruppo='$idg'", $dbi); 74 list($numgruppo,$descrizione) = mysql_fetch_row($resref); 75 echo "<fieldset><legend>"._GRUPPO."N. $numgruppo - $descrizione</legend>"; 76 echo "<table border=\"1\" width=\"100%\"><tr><th><b> "._SI." </b></th><th><b>"._NO."</b></th><th><b>"._VALIDI."</b></th><th>"._NULLI."</th><th>"._BIANCHI."</th><th>"._CONTESTATI."</th><th>"._TOTNON."</th></TR>"; 77 ECHO "<TR><TH>".number_format($si,0,',','.')."</TH><TH>".number_format($no,0,',','.')."</TH><TH>".number_format($validi,0,',','.')."</TH><TH>".number_format($nulli,0,',','.')."</TH><TH>".number_format($bianchi,0,',','.')."</TH><TH>".number_format($contestati,0,',','.')."</TH><TH>".number_format($nulli+$bianchi+$contestati,0,',','.')."</TH></TR></table><br/>"; 78 # votanti-------------- <th><b>"._GRUPPO."</b></th><th><b>"._DESCR."</b></th> --- <TH>".$numgruppo."</TH><TH>".$descrizione."</TH> 79 $resv = mysql_query("SELECT sum(voti_donne),sum(voti_uomini),sum(voti_complessivi) FROM ".$prefix."_ele_voti_parziale where id_cons='$id_cons' and data='$giorno' and orario='$ora' and id_gruppo='$idg'", $dbi); 80 list($votf,$votm,$votc) = mysql_fetch_row($resv); 81 82 echo "<fieldset><legend>"._VOTANTI."</legend>"; 83 echo "<table border=\"1\" width=\"100%\"><tr><th>"._ISCRITTI."</TH><TH>"._UOMINI."</TH><TH>"._DONNE."</TH><TH>"._VOTIU."</TH><TH>"._VOTID."</TH><TH>"._VOTIE."</TH></TR>"; 84 ECHO "<TR><TH>".number_format($totel,0,',','.')."</TH><TH>".number_format($totm,0,',','.')."</TH><TH>".number_format($totf,0,',','.')."</TH><TH>".number_format($votm,0,',','.')."</TH><TH>".number_format($votf,0,',','.')."</TH><TH>".number_format($votc,0,',','.')."</TH></TR></table>"; 85 ECHO "</fieldset><br/>"; 86 ECHO "</fieldset><br/><br/><br/>"; 87 88 #----------- 89 } 90 } 69 91 70 92 if ($genere==5 and !$votog) { -
trunk/admin/modules/Elezioni/ele_voti.php
r239 r250 1293 1293 ."<td><b>"._CONTESTATI."</b></td>" 1294 1294 ."<td><b>"._NULLI."</b></td>" 1295 ."<td><b>"._TOTNON."</b></td>"; 1295 ."<td><b>"._TOTNON."</b></td>" 1296 ."<td><b>"._TOTALEVOTI."</b></td>" 1297 ."<td><b>"._VOTANTI."</b></td>"; 1296 1298 }else{ 1297 1299 echo "<td width=\"5%\"><b>"._VOTI."</b></td>"; … … 1333 1335 $pro['nulli']=(isset($pro['nulli']) and $pro['nulli']>=0) ? $pro['nulli']:''; 1334 1336 $tot_nulli=$pro['nulli']+$pro['bianchi']+$pro['contestati']; 1337 $tot_voti=$pro['validi']+$tot_nulli; 1335 1338 echo "</td><td align=\"right\" width=\"3%\"><input name=\"si$i\" value=\"".$pro['si']."\" size=\"7\" style=\"text-align:right\"></td>"; 1336 1339 echo "</td><td align=\"right\" width=\"3%\"><input name=\"no$i\" value=\"".$pro['no']."\" size=\"7\" style=\"text-align:right\"></td>"; … … 1340 1343 echo "</td><td align=\"right\"><input name=\"nul$i\" value=\"".$pro['nulli']."\" size=\"7\" style=\"text-align:right\"></td>"; 1341 1344 echo "</td><td align=\"right\">$tot_nulli</td>"; 1345 echo "</td><td align=\"right\">$tot_voti</td>"; 1346 echo "</td><td align=\"right\">$tot</td>"; 1342 1347 }else{ 1343 1348 echo "<tr style=\"background-color: $bgcolor2; text-align:center\"><td align=\"center\"><input type=\"hidden\" name=\"id_gruppo$i\" value=\"$id_gruppo\"><b>$num_gruppo</b>"
Note:
See TracChangeset
for help on using the changeset viewer.