Ignore:
Timestamp:
Mar 13, 2018, 9:26:23 PM (6 years ago)
Author:
roby
Message:

adeguata la funzione di installazione al php7

File:
1 edited

Legend:

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

    r163 r254  
    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;}
    163                 if ($voti==$controllo1 and $validi==$controllo2 and !$g_err){
     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;}
     163                $cerr=mysql_query("select stato_lis from ".$prefix."_ele_controllosez where id_cons='$id_cons' and id_sez='$id'", $dbi);
     164                list($crlis)=mysql_fetch_row($cerr);
     165                if ($voti==$controllo1 and $validi==$controllo2 and !$g_err and $crlis!=-1){
    164166                        $righe .= "<td>"._OK."</td></tr>\n";
    165167                }else{
     
    224226            echo "<b>"._NEXT_MATCH."</b></a></td>";
    225227        }
    226     }elseif(($genere==5 and $fascia>=$limite) or ($genere==3) or ($genere==2) or $genere==1){ //se vi sono raggruppamenti
     228    }elseif(($genere==5 and ($fascia>=$limite or $dettnulli)) or ($genere==3) or ($genere==2) or $genere==1){ //se vi sono raggruppamenti
    227229                $pag=($pag==0 ? 1:0);
    228230                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>";
Note: See TracChangeset for help on using the changeset viewer.