Changeset 266 for trunk


Ignore:
Timestamp:
Jun 13, 2017, 1:12:01 PM (7 years ago)
Author:
roby
Message:

Client: visualizzazione dei risultati in presenza di sezioni soppresse. Completamento delle modifiche

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/versione.php

    r265 r266  
    11<?php
    2 $versione = "2.0 rev 265";
     2$versione = "2.0 rev 266";
    33$version_number = $versione;
    4 $version = "Eleonline $version_number (<i>Data Release: 11 giugno 2017</i>)";
     4$version = "Eleonline $version_number (<i>Data Release: 13 giugno 2017</i>)";
    55
    66?>
  • trunk/client/modules/Elezioni/gruppo.php

    r265 r266  
    6363$res = mysql_query("SELECT t1.descrizione, t1.tipo_cons,t2.genere, t2.voto_g, t2.voto_l, t2.voto_c, t2.circo FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_tipo as t2 where t1.tipo_cons=t2.tipo_cons and t1.id_cons_gen='$id_cons_gen' ", $dbi);
    6464list($descr_cons,$tipo_cons,$genere,$votog,$votol,$votoc,$circo) = mysql_fetch_row($res);
    65 $res = mysql_query("SELECT t2.id_cons,t2.solo_gruppo,0 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);
     65$res = mysql_query("SELECT 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);
    6666list($id_cons,$dettnulli,$disgiunto) = mysql_fetch_row($res);
    6767
     
    147147                if (!($offset)) $offset=25;
    148148                if (!($min)) $min=1;
    149                 if (!($offsetsez)) $offsetsez=20;
     149                if (!($offsetsez)) $offsetsez=22;
    150150                if (!($minsez)) $minsez=1;
    151151                if ($min>$offset) {
     
    182182                        $res_sez = mysql_query("SELECT count(num_sez),min(num_sez),max(num_sez) from ".$prefix."_ele_sezioni where id_cons=$id_cons",$dbi);
    183183                list($tot_sez,$numsezmin,$numsezmax)=mysql_fetch_row($res_sez);
     184                $res_sez = mysql_query("SELECT count(num_sez) from ".$prefix."_ele_sezioni where id_cons=$id_cons",$dbi);
     185                list($tuttelesez)=mysql_fetch_row($res_sez);
     186
    184187                $num_sez=$tot_sez;//mysql_data_seek($res_sez,0);
    185188                if ($circo) $offsetsez=$numsezmax; //$num_sez+$minsez-1;//setta offsetsez sull'ultima sezione della circoscrizione
     
    231234                                $res_cand = mysql_query("SELECT id_cand, concat(cognome,' ', nome), num_cand from ".$prefix."_ele_$tab where id_cons=$id_cons and id_lista=$id_lista order by num_cand",$dbi);
    232235                                if ($circo) $condcirc="and t5.id_circ=$id_circ";
     236
    233237                                $res_voti = mysql_query("select $tab2, t1.num_cand, concat(t1.cognome,' ', t1.nome), sum(t2.voti),'','','','',''
    234238                                from ".$prefix."_ele_candidati as t1, ".$prefix."_ele_voti_candidati as t2, "
     
    279283
    280284
    281 
    282 
    283285                                $res_voti = mysql_query("select $tab2, $t.num_$tab15, $t.descrizione, sum(t2.voti), $votigl
    284286                                from
     
    396398                                //echo "</tr><tr><td><b>"._COMUNE." $descr_comune</b> - "._RISULTATI.": $descr_cons <br/>";
    397399                                //echo "tot:$tot_scr";
    398                                 //if ($tipo_cons!=4 && $tot_scr) echo " - Sezioni scrutinate: $tot_scr su $tot_sez";
     400                                //if ($tipo_cons!=4 && $tot_scr) echo " - Sezioni scrutinate: $tot_scr su $tuttelez";
    399401
    400402                                # liste e gruppi da.... a         
     
    497499                        if (!$csv){
    498500                                echo "<h5> Sezioni scrutinate";
    499                                 if ($tipo_cons!=4) echo ": $tot_scr su $tot_sez &nbsp;&nbsp;&nbsp;  ";
     501                                if ($tipo_cons!=4) echo ": $tot_scr su $tuttelesez &nbsp;&nbsp;&nbsp;  ";
    500502                                echo "</h5>&nbsp;";
    501503                        }
     
    608610                                         if(mysql_num_rows($res_voti)) mysql_data_seek($res_voti,0);           
    609611                        while (list($num_circ,$desc_circ,$num_cand,$nome,$voti,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = mysql_fetch_row($res_voti)){
    610                                 if (!isset($temp[$num_cand])) $temp[$num_cand]=0;$temp[$num_cand]+=$voti;
     612                                        if($num_cand<$min or $num_cand>$offset) continue;
     613
     614                                if (!isset($temp[$num_cand])) $temp[$num_cand]=0;
     615                                $temp[$num_cand]+=$voti;
    611616                                $z=array_search($num_circ, $pos); if (!$z) continue;
    612617                                if ($num_cand>=$min and $num_cand<=$offset){
     
    625630                                       
    626631                                }
     632                                if (!strstr( $op,'candidato')){
    627633                                if (!isset($tempar[$num_cand])) $tempar[$num_cand]=0;
    628                                 $tempar[$num_cand]+=$voti;
    629                                 if ($visvot!='cand'){
     634                                $tempar[$num_cand]+=$voti;}
     635                                if ($visvot!='cand'){ 
    630636                                $posvoti=($offset);
    631637                                $ar[0][$posvoti+1]='<b>Voti Validi</b>';
     
    634640                                $ar[0][$posvoti+4]='<b>Voti Contestati</b>';
    635641                                $ar[0][$posvoti+5]='<b>Voti Nulli</b>';
    636                                 if (($maxpos)>=$num_circ and $minpos<=$num_circ){  
     642                                if (($maxpos)>=$num_circ and $minpos<=$num_circ){
    637643                                //$posvoti++;
    638644                                $ar[($z)][$posvoti+1]="<b>$sevalidi</b>";
     
    645651                        }
    646652                        }
    647                         if (($offsetsez+1)>=$num_sez){
     653
     654                        if (($offsetsez+1)>=$num_sez){ 
    648655                                $ar[(1+$numsezmax)][0]="<b>"._TOT."<br />"._COMPLESSIVO."</b>";
    649656                                if(isset($temp)) {
     
    660667                        $resv = mysql_query("SELECT $votigl from ".$prefix."_ele_sezioni AS t1
    661668LEFT JOIN soraldo_ele_sede AS t2 ON t1.id_sede = t2.id_sede WHERE t1.id_cons='$id_cons' and t2.id_circ=$id_circ",$dbi);
    662                     else
     669                    else 
    663670                                                $resv = mysql_query("SELECT $votigl from ".$prefix."_ele_sezioni as t1 where t1.id_cons='$id_cons' and  t1.id_sez=(select t2.id_sez from ".$prefix."_ele_voti_$tab15 as t2 where t2.id_sez=t1.id_sez group by t2.id_sez)",$dbi);
     671
    664672                                        list ($sevaltot,$senultot,$sebiatot,$secontot,$sevnutot)= mysql_fetch_row($resv);
    665673                                        $voticompl=$sevaltot+$senultot+$sebiatot+$secontot+$sevnutot;
     
    818826        $res5 = 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' ",$dbi);
    819827        $sezioni=mysql_num_rows($res5);
    820        
    821828        if ($numero!=0) echo "<h5><i> "._SEZSCRU." $numero "._SU." $sezioni </i></h5>";
    822829
  • trunk/client/versione.php

    r265 r266  
    11<?php
    22
    3 $versione = "2.0 rev 265";
     3$versione = "2.0 rev 266";
    44$version_number = $versione;
    5 $version = "Eleonline $version_number (<i>Data Release: 11 giugno 2017</i>)";
     5$version = "Eleonline $version_number (<i>Data Release: 13 giugno 2017</i>)";
    66
    77?>
Note: See TracChangeset for help on using the changeset viewer.