Changeset 262


Ignore:
Timestamp:
May 31, 2017, 6:33:49 PM (7 years ago)
Author:
roby
Message:

ulteriori correzioni alla rev 259

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/modules/Elezioni/ele_riepilogo.php

    r261 r262  
    2626$perms=ChiSei($id_cons_gen);
    2727if ($perms<16 or !$id_cons_gen) die("$perms Non hai i permessi per inserire dati, o non hai scelto la consultazione!");
    28 $res = mysql_query("SELECT t1.tipo_cons,t2.id_cons FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.id_comune='$id_comune'" , $dbi);
    29 list($tipo_cons,$id_cons) = mysql_fetch_row($res);
     28$res = mysql_query("SELECT t1.tipo_cons,t2.id_cons,t2.solo_gruppo,t2.disgiunto FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.id_comune='$id_comune'" , $dbi);
     29list($tipo_cons,$id_cons,$dettnulli,$disgiunto) = mysql_fetch_row($res);
    3030$res = mysql_query("SELECT genere,voto_g,voto_l FROM ".$prefix."_ele_tipo where tipo_cons='$tipo_cons' " , $dbi);
    3131        list($genere,$votog,$votol) = mysql_fetch_row($res);
     
    102102       
    103103        }else{
    104         if ($dettnulli){
     104        if ($dettnulli or $disgiunto){
    105105                        $res = mysql_query("SELECT id_gruppo,num_gruppo,descrizione from ".$prefix."_ele_gruppo where id_cons='$id_cons' order by num_gruppo", $dbi);
    106106
    107107        echo "<fieldset><legend>"._GRUPPO."</legend>";
    108         echo "<table border=\"1\" width=\"100%\"><tr><th colspan=\"2\" rowspan=\"2\" ALIGN=\"CENTER\"><b>Candidato</b></th><th rowspan=\"2\" ALIGN=\"CENTER\">"._VALIDI."</th><th colspan=\"2\" ALIGN=\"CENTER\">"._SOLO_GRUPPO."</th></tr><tr><th ALIGN=\"CENTER\">Senza indicazione di lista</th><th>"._VOTINULLI." di Lista</th></TR>";
     108        echo "<table border=\"1\" width=\"100%\"><tr><th colspan=\"2\" rowspan=\"2\" ALIGN=\"CENTER\"><b>Candidato</b></th><th rowspan=\"2\" ALIGN=\"CENTER\">"._VALIDI."</th><th colspan=\"2\" ALIGN=\"CENTER\">"._SOLO_GRUPPO."</th></tr><tr><th ALIGN=\"CENTER\">Senza indicazione di lista</th>";
     109        if ($disgiunto) echo "<th>"._SOLOLIS."</th>"; else echo "<th>"._VOTINULLI." di Lista</th>";
     110        echo "</TR>";
    109111        $t_voti=0;$t_solo_gruppo=0;$t_nulli_lista=0;
    110112        while(list($id_gruppo,$num_gruppo,$desc) = mysql_fetch_row($res)){
    111113                $resv = mysql_query("SELECT sum(voti),sum(solo_gruppo) from ".$prefix."_ele_voti_gruppo where id_gruppo='$id_gruppo'", $dbi);
    112114                list($voti,$solo_gruppo)=mysql_fetch_row($resv);
    113                 $resv = mysql_query("SELECT sum(t1.nulli_lista) from ".$prefix."_ele_voti_lista as t1 left join ".$prefix."_ele_lista as t2 on t1.id_lista=t2.id_lista where t2.id_gruppo='$id_gruppo'", $dbi);
    114                 list($nulli_lista)=mysql_fetch_row($resv);
    115                 $t_voti+=$voti;$t_solo_gruppo+=$solo_gruppo;$t_nulli_lista+=$nulli_lista;       
    116                 ECHO "<TR><TD>".$num_gruppo."</TD><TD>".$desc."</TD><TD ALIGN=\"RIGHT\">".number_format($voti,0,',','.')."</TD><TD ALIGN=\"RIGHT\">".number_format($solo_gruppo,0,',','.')."</TD><TD ALIGN=\"RIGHT\">".number_format($nulli_lista,0,',','.')."</TD></TD></TR>";
     115                if($disgiunto){
     116                        $resv = mysql_query("SELECT sum(t1.solo_lista) from ".$prefix."_ele_voti_lista as t1 left join ".$prefix."_ele_lista as t2 on t1.id_lista=t2.id_lista where t2.id_gruppo='$id_gruppo'", $dbi);         
     117                }else{
     118                        $resv = mysql_query("SELECT sum(t1.nulli_lista) from ".$prefix."_ele_voti_lista as t1 left join ".$prefix."_ele_lista as t2 on t1.id_lista=t2.id_lista where t2.id_gruppo='$id_gruppo'", $dbi);
     119                }
     120                list($perlista)=mysql_fetch_row($resv);
     121                $t_voti+=$voti;$t_solo_gruppo+=$solo_gruppo;$t_perlista+=$perlista;     
     122                ECHO "<TR><TD>".$num_gruppo."</TD><TD>".$desc."</TD><TD ALIGN=\"RIGHT\">".number_format($voti,0,',','.')."</TD><TD ALIGN=\"RIGHT\">".number_format($solo_gruppo,0,',','.')."</TD><TD ALIGN=\"RIGHT\">".number_format($perlista,0,',','.')."</TD></TD></TR>";
    117123        }
    118         echo "<tr><th colspan=\"2\" rowspan=\"2\" ALIGN=\"CENTER\"><b>Totale</b></th><th rowspan=\"2\"  ALIGN=\"RIGHT\">$t_voti</th><th ALIGN=\"RIGHT\">$t_solo_gruppo</th><th ALIGN=\"RIGHT\">$t_nulli_lista</th></tr>";
     124        echo "<tr><th colspan=\"2\" rowspan=\"2\" ALIGN=\"CENTER\"><b>Totale</b></th><th rowspan=\"2\"  ALIGN=\"RIGHT\">$t_voti</th><th ALIGN=\"RIGHT\">$t_solo_gruppo</th><th ALIGN=\"RIGHT\">$t_perlista</th></tr>";
    119125        ECHO "</table><br/></fieldset><br/><br/><br/>";
    120126
  • trunk/admin/versione.php

    r261 r262  
    11<?php
    22
    3 $versione = "2.0 rev 261";
     3$versione = "2.0 rev 262";
    44$version_number = $versione;
    5 $version = "Eleonline $version_number (<i>Data Release: 27 maggio 2017</i>)";
     5$version = "Eleonline $version_number (<i>Data Release: 31 maggio 2017</i>)";
    66
    77?>
  • trunk/client/modules/Elezioni/index.php

    r261 r262  
    534534        $NicolaSezTot = mysql_fetch_row($NicolaSez);
    535535       
    536                 $resperc=mysql_query("select sum(validi),sum(nulli+bianchi+contestati+voti_nulli+solo_lista) from ".$prefix."_ele_sezioni where id_cons='$id_cons'",$dbi);
     536                $resperc=mysql_query("select sum(validi),sum(nulli+bianchi+contestati+voti_nulli) from ".$prefix."_ele_sezioni where id_cons='$id_cons'",$dbi);
    537537                list($scruvalidi,$scrunulli)=mysql_fetch_row($resperc);
    538538                $resperc = mysql_query("select sum(voti_complessivi) from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' group by data,orario order by data desc, orario desc limit 0,1 ",$dbi);
  • trunk/client/versione.php

    r261 r262  
    11<?php
    22
    3 $versione = "2.0 rev 261";
     3$versione = "2.0 rev 262";
    44$version_number = $versione;
    5 $version = "Eleonline $version_number (<i>Data Release: 27 maggio 2017</i>)";
     5$version = "Eleonline $version_number (<i>Data Release: 31 maggio 2017</i>)";
    66
    77
Note: See TracChangeset for help on using the changeset viewer.