Changeset 163


Ignore:
Timestamp:
Feb 2, 2013, 7:00:04 PM (11 years ago)
Author:
roby
Message:

controlli di congruenza

Location:
trunk/admin/modules/Elezioni
Files:
3 edited

Legend:

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

    r139 r163  
    159159                $controllo1=$validi+$nulli+$bianchi+$contestati+$voti_nulli+$solol; #prova
    160160                $controllo2=$si+$no;
    161                 if($genere==5) #$validi+$nulli+$bianchi+$vcont+$vn
     161                if($genere==5 and !$votog) #$validi+$nulli+$bianchi+$vcont+$vn
    162162                        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;}
    163163                if ($voti==$controllo1 and $validi==$controllo2 and !$g_err){
  • trunk/admin/modules/Elezioni/ele_riepilogo.php

    r139 r163  
    4343//**************************************************************************
    4444 
    45     global $prefix, $dbi,$fascia,$limite;
     45    global $prefix, $dbi,$fascia,$limite,$genere,$votog;
    4646        $res = mysql_query("SELECT sum(maschi),sum(femmine) FROM ".$prefix."_ele_sezioni where id_cons='$id_cons'", $dbi);
    4747        list($totm,$totf) = mysql_fetch_row($res);
     
    6565        $totnullil=$nullilista+$contestatilista;
    6666        echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
    67         echo "<table border=\"1\" width=\"100%\"><tr><th>"._VALIDI."</th><th>"._VOTINULLI."</th><th>"._CONTESTATI."</th><th>"._SOLO_GRUPPO."</th><th>"._TOTNON."</th></TR>";
    68         ECHO "<TR><TH>".number_format($validilista,0,',','.')."</TH><TH>".number_format($nullilista,0,',','.')."</TH><TH>".number_format($contestatilista,0,',','.')."</TH><TH>".number_format($sg,0,',','.')."</TH><TH>".number_format($totnullil,0,',','.')."</TH></TR></table><br/>";
     67        echo "<table border=\"1\" width=\"100%\"><tr><th>"._VALIDI."</th><th>"._VOTINULLI."</th><th>"._CONTESTATI."</th>";
     68        if ($genere==5 and !$votog)
     69                echo "<th>"._SOLO_GRUPPO."</th>";
     70        echo "<th>"._TOTNON."</th></TR>";
     71        ECHO "<TR><TH>".number_format($validilista,0,',','.')."</TH><TH>".number_format($nullilista,0,',','.')."</TH><TH>".number_format($contestatilista,0,',','.')."</TH>";
     72        if($genere==5 and !$votog)
     73                echo "<TH>".number_format($sg,0,',','.')."</TH>";
     74        echo "<TH>".number_format($totnullil,0,',','.')."</TH></TR></table><br/>";
    6975        ECHO "</fieldset>";
    7076        echo "</center>";
  • trunk/admin/modules/Elezioni/ele_voti.php

    r151 r163  
    166166                                        list($votils)=mysql_fetch_row($res4);
    167167                                        if($votils>0) {
    168                                                 if (($votils+$sologruppo+$contestatilista+$votinullilista)==($validi+$sololista) and $validilista==$votils)
     168                                                if (($votils+$sologruppo+$votinullilista)==($validi+$sololista) and $validilista==$votils)
    169169                                                        {$status=1;$ops=-3;}
    170170                                                else {return 3;}
     
    545545
    546546                if ((!$id_lista)){$tab="_ele_voti_lista";} else {$tab="_ele_voti_candidati";}
    547 if($genere==4 and !$id_lista)   
    548                 $result = mysql_query("SELECT sum(t1.voti),t2.validi, t2.solo_gruppo,t2.contestati,t2.voti_nulli from ".$prefix."_ele_sezioni as t2 left join ".$prefix.$tab." as t1 on (t1.id_sez=t2.id_sez) where t2.id_sez=$id_sez group by t1.id_sez",$dbi);
     547if(($genere==4 or ($genere==5 and $votog)) and !$id_lista)     
     548                $result = mysql_query("SELECT sum(t1.voti),t2.validi, t2.solo_gruppo,t2.contestati_lista,t2.voti_nulli,t2.bianchi,t2.nulli from ".$prefix."_ele_sezioni as t2 left join ".$prefix.$tab." as t1 on (t1.id_sez=t2.id_sez) where t2.id_sez=$id_sez group by t1.id_sez",$dbi);
    549549else
    550550                $result = mysql_query("SELECT sum(t1.voti),t2.validi_lista, t2.solo_gruppo,t2.contestati_lista,t2.voti_nulli_lista,t2.bianchi,t2.nulli,t2.contestati,t2.voti_nulli from ".$prefix."_ele_sezioni as t2 left join ".$prefix.$tab." as t1 on (t1.id_sez=t2.id_sez) where t2.id_sez=$id_sez group by t1.id_sez",$dbi);
Note: See TracChangeset for help on using the changeset viewer.