Changeset 142


Ignore:
Timestamp:
May 7, 2012, 4:01:07 PM (12 years ago)
Author:
roby
Message:

segue aggiornamento per sicilia

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/votanti.php

    r139 r142  
    225225                if (!($genere==4) and $pag==0){  //se non e' una lista uninominale ed e' la prima pagina
    226226                       
    227                         $tab="SELECT 0,t2.id_sez,t2.num_sez,t2.validi,'0','0',t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,'0' FROM ".$prefix."_ele_sezioni as t2 left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede) where t2.id_cons='$id_cons' and t2.validi+t2.nulli+t2.bianchi+t2.contestati>0 group by t2.id_sez order by t2.num_sez ";
     227                        $tab="SELECT 0,t2.id_sez,t2.num_sez,t2.validi,'0','0',t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,'0',t2.voti_nulli FROM ".$prefix."_ele_sezioni as t2 left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede) where t2.id_cons='$id_cons' and t2.validi+t2.nulli+t2.bianchi+t2.contestati>0 group by t2.id_sez order by t2.num_sez ";
    228228               
    229229                }else{ // e' una lista uninominale o la seconda pagina
     
    233233                        # voto disgiunto regione sicilia aggiunge il campo solo lista
    234234                    if(isdisgiunto()){
    235                         $tab="SELECT '0',t1.id_sez,t1.num_sez,sum(t2.voti),t1.solo_gruppo,t1.solo_lista,t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t1.id_sede,'0'
     235                        $tab="SELECT '0',t1.id_sez,t1.num_sez,sum(t2.voti),t1.solo_gruppo,t1.solo_lista,t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t1.id_sede,'0',t1.voti_nulli
    236236                        FROM ".$prefix."_ele_sezioni as t1 left join ".$prefix.$tab3." as t2 on (t1.id_sez=t2.id_sez)
    237237                        left join ".$prefix."_ele_sede as t4 on (t1.id_sede=t4.id_sede)
     
    239239                     }else{
    240240                       
    241                         $tab="SELECT '0',t1.id_sez,t1.num_sez,sum(t2.voti),t1.solo_gruppo,'0',t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t1.id_sede,'0'
     241                        $tab="SELECT '0',t1.id_sez,t1.num_sez,sum(t2.voti),t1.solo_gruppo,'0',t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t1.id_sede,'0',t1.voti_nulli
    242242                        FROM ".$prefix."_ele_sezioni as t1 left join ".$prefix.$tab3." as t2 on (t1.id_sez=t2.id_sez)
    243243                        left join ".$prefix."_ele_sede as t4 on (t1.id_sede=t4.id_sede)
     
    253253               
    254254        }else{ // e' un referendum --> t3.id_gruppo vuota per allineare il while (da rifare con array)
    255                 $tab="SELECT t1.id_gruppo,t1.id_sez,t2.num_sez,t1.si,t1.no,'0',t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t2.id_sede,t3.num_gruppo
     255                $tab="SELECT t1.id_gruppo,t1.id_sez,t2.num_sez,t1.si,t1.no,'0',t1.validi,t1.nulli,t1.bianchi,t1.contestati, t4.id_circ,t2.id_sede,t3.num_gruppo,t1.voti_nulli
    256256                FROM ".$prefix."_ele_voti_ref as t1 left join ".$prefix."_ele_sezioni as t2 on (t1.id_sez=t2.id_sez)
    257257                left join  ".$prefix."_ele_gruppo as t3 on (t1.id_gruppo=t3.id_gruppo) left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede)
     
    296296        $tot_sololista=0;$tot_gruppo=0;
    297297        #$si e $no sono valide anche per voti lista e solo gruppo per i non referendum
    298         while (list($id_gruppo,$id,$num,$si,$no,$sololista,$validi,$nulli,$bianchi,$contestati,$id_circ,$id_sede,$gruppo) = mysql_fetch_row($res)){
     298        while (list($id_gruppo,$id,$num,$si,$no,$sololista,$validi,$nulli,$bianchi,$contestati,$id_circ,$id_sede,$gruppo,$votinulli) = mysql_fetch_row($res)){
     299        $nulli+=$votinulli;
    299300        // inserimento numeri di sez non scrutinate
    300301                while ($scrutinate < $num) {
Note: See TracChangeset for help on using the changeset viewer.