Changeset 261 for trunk/admin


Ignore:
Timestamp:
May 27, 2017, 9:20:05 PM (7 years ago)
Author:
roby
Message:

ulteriori correzioni alla rev 259

Location:
trunk/admin
Files:
3 edited

Legend:

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

    r163 r261  
    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);
     
    120120                $scrutinate++;
    121121        // fine inserimento     
    122                 if (($genere==2 or $genere==3 or $genere==5) and !$votog) {
     122                if (($genere==2 or $genere==3 or $genere==5) and !$votog and !$dettnulli) {
    123123                        $respref = mysql_query("select sum(voti) from ".$prefix."_ele_voti_gruppo where id_sez='$id'", $dbi);
    124124                        list ($gruppref) = mysql_fetch_row($respref);
     
    151151                $righe .= "<td>".number_format($validi,0,',','.')."</td><td>$nulli</td><td>$bianchi</td><td>$contestati</td>";
    152152                $g_err=0;
    153                 if (($genere==2 or $genere==3 or $genere==5) and $pag==1 and !$votog) {
     153                if (($genere==2 or $genere==3 or $genere==5) and $pag==1 and !$votog and !$dettnulli) {
    154154                        if ($gruppref!=$validi) {
    155155                                $g_err=1;
     
    157157                        }
    158158                }
    159                 $controllo1=$validi+$nulli+$bianchi+$contestati+$voti_nulli+$solol; #prova
    160                 $controllo2=$si+$no;
     159                $controllo1=$validi+$nulli+$bianchi+$contestati+$voti_nulli; #prova
     160                if($pag==0) $controllo2=$si+$no; else $controllo2=$si+$no+$vot_nul_lis+$cont_lis;
    161161                if($genere==5 and !$votog) #$validi+$nulli+$bianchi+$vcont+$vn
    162                         if($pag==0 and !$votog or $fascia<=$limite) {$controllo1=$validi+$nulli+$bianchi+$contestati+$voti_nulli+$solol;} else { $controllo1=$val_lista+$nulli+$bianchi+$contestati+$voti_nulli+$cont_lis+$vot_nul_lis+$solog;$controllo2=$si+$no-$solol+$cont_lis+$vot_nul_lis;}
     162                        if($pag==0 and !$votog or $fascia<=$limite) {$controllo1=$validi+$nulli+$bianchi+$contestati+$voti_nulli;} else { $controllo1=$val_lista+$nulli+$bianchi+$contestati+$voti_nulli+$cont_lis+$vot_nul_lis+$solog;$controllo2=$si+$no-$solol+$cont_lis+$vot_nul_lis;}
    163163                if ($voti==$controllo1 and $validi==$controllo2 and !$g_err){
    164164                        $righe .= "<td>"._OK."</td></tr>\n";
     
    224224            echo "<b>"._NEXT_MATCH."</b></a></td>";
    225225        }
    226     }elseif(($genere==5 and $fascia>=$limite) or ($genere==3) or ($genere==2) or $genere==1){ //se vi sono raggruppamenti
     226    }elseif(($genere==5 and ($fascia>=$limite or $dettnulli)) or ($genere==3) or ($genere==2) or $genere==1){ //se vi sono raggruppamenti
    227227                $pag=($pag==0 ? 1:0);
    228228                echo "<td colspan=\"5\" align=\"center\" bgcolor=\"$bgcolor1\"><a href=\"admin.php?op=controllo_voti&amp;id_cons_gen=$id_cons_gen&amp;pag=$pag\"><b>";
  • trunk/admin/modules/Elezioni/ele_riepilogo.php

    r250 r261  
    107107        echo "<fieldset><legend>"._GRUPPO."</legend>";
    108108        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>";
     109        $t_voti=0;$t_solo_gruppo=0;$t_nulli_lista=0;
    109110        while(list($id_gruppo,$num_gruppo,$desc) = mysql_fetch_row($res)){
    110111                $resv = mysql_query("SELECT sum(voti),sum(solo_gruppo) from ".$prefix."_ele_voti_gruppo where id_gruppo='$id_gruppo'", $dbi);
     
    112113                $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);
    113114                list($nulli_lista)=mysql_fetch_row($resv);
    114                        
     115                $t_voti+=$voti;$t_solo_gruppo+=$solo_gruppo;$t_nulli_lista+=$nulli_lista;       
    115116                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>";
    116117        }
     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>";
    117119        ECHO "</table><br/></fieldset><br/><br/><br/>";
    118120
  • trunk/admin/versione.php

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