Changeset 279 for trunk/client


Ignore:
Timestamp:
Apr 20, 2019, 8:32:48 PM (6 years ago)
Author:
roby
Message:
 
Location:
trunk/client/modules/Elezioni
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/blocchi/00_affluenze.php

    r269 r279  
    4545                $tot_v_m=0;$tot_v_d=0;$tot_t=0;
    4646       
    47                 $sql="select t3.* from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
     47                $sql="select t3.id_sez from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
    4848                $res1 = $dbi->prepare("$sql");
    4949                $res1->execute();
     
    6666else
    6767        $sql="select sum(t3.voti_complessivi),0,0  from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos";
    68 $resl = $dbi->prepare("$sql");
    69 $resl->execute();
     68$res1 = $dbi->prepare("$sql");
     69$res1->execute();
    7070
    7171#fine modifica
  • trunk/client/modules/Elezioni/blocchi/01_votanti.php

    r273 r279  
    6969else
    7070        $numero=0;
    71 $sql="select t3.* from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join
    72 ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez ";
    73         $res_sez = $dbi->prepare("$sql");
    74         $res_sez->execute();
     71#$sql="select t3.* from ".$prefix."_ele_voti_".$tab." as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.id_sez ";
     72#       $res_sez = $dbi->prepare("$sql");
     73#       $res_sez->execute();
    7574
    76 $sql="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' $circos";
     75$sql="select t1.id_sez 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' $circos";
    7776        $res_sez = $dbi->prepare("$sql");
    7877        $res_sez->execute();
  • trunk/client/modules/Elezioni/blocchi/bar_affluenze.php

    r276 r279  
    3232       
    3333
    34                 $sql="select t3.*  from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
     34                $sql="select t3.id_sez  from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
    3535                $res1 = $dbi->prepare("$sql");
    3636                $res1->execute();
  • trunk/client/modules/Elezioni/blocchi/gom_affluenze.php

    r278 r279  
    3333       
    3434
    35                 $sql="select t3.*  from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
     35                $sql="select t3.id_sez from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
    3636        $res1 = $dbi->prepare("$sql");
    3737        $res1->execute();
     
    5151else
    5252        $sql="select sum(t3.voti_complessivi),0,0  from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos";
    53 $resl = $dbi->prepare("$sql");
    54 $resl->execute();
     53$res1 = $dbi->prepare("$sql");
     54$res1->execute();
    5555
    5656#fine modifica
  • trunk/client/modules/Elezioni/blocchi/pie_affluenze.php

    r273 r279  
    3939       
    4040
    41                 $sql="select t3.* from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
     41                $sql="select t3.id_sez from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos  group by t3.id_sez ";
    4242        $res1 = $dbi->prepare("$sql");
    4343        $res1->execute();
     
    5454#modifica del 26giugno 09 per gestione circoscrizionali
    5555if($genere==0)  {       $sql="select sum(t1.voti_complessivi), t2.num_gruppo , t2.id_gruppo from ".$prefix."_ele_voti_parziale as t1 left join ".$prefix."_ele_gruppo as t2 on (t1.id_gruppo=t2.id_gruppo) where t1.id_cons='$id_cons' and t1.orario='$orario' and t1.data='$data' group by t2.num_gruppo,t2.id_gruppo order by t2.num_gruppo " ;
    56         $resl = $dbi->prepare("$sql");
    57         $resl->execute();
     56        $res1 = $dbi->prepare("$sql");
     57        $res1->execute();
    5858
    5959                }else{
    6060                $sql="select sum(t3.voti_complessivi),0,0  from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' and t3.data='$data' and t3.orario='$orario' $circos";
    61         $resl = $dbi->prepare("$sql");
    62         $resl->execute();
     61        $res1 = $dbi->prepare("$sql");
     62        $res1->execute();
    6363                }
    6464#fine modifica
  • trunk/client/modules/Elezioni/funzioni.php

    r274 r279  
    259259     
    260260 
    261         $sql="select * from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";
     261        $sql="select id_cons from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";
    262262        $res = $dbi->prepare("$sql");
    263263        $res->execute();
    264264
    265265       
    266         if ($res) $numero=$res->rowCount();else $numero=0;
     266        $numero=$res->rowCount();
    267267        $sql="select t2.*  from ".$prefix."_ele_sezioni as t2, ".$prefix."_ele_sede as t1 where t2.id_cons='$id_cons' and t1.id_sede=t2.id_sede $circondt1";
    268268        $res = $dbi->prepare("$sql");
  • trunk/client/modules/Elezioni/index.php

    r278 r279  
    713713                $numero_l=$res_num_list->rowCount();
    714714                // verifica delle sezioni in relazione ai candidati (comuni >=15000)  non c'e' il voto di lista e quindi ci metto se scrutinate le preferenze sulla lista [$numero_c] - 5/5/2009
    715                 $sql="select * from ".$prefix."_ele_voti_candidati where id_cons='$id_cons' group by id_sez ";
     715                $sql="select id_sez from ".$prefix."_ele_voti_candidati where id_cons='$id_cons' group by id_sez ";
    716716        $res_num_list = $dbi->prepare("$sql");
    717717        $res_num_list->execute();
Note: See TracChangeset for help on using the changeset viewer.