Changeset 273 for trunk/client


Ignore:
Timestamp:
Apr 20, 2019, 12:28:24 AM (6 years ago)
Author:
roby
Message:
 
Location:
trunk/client/modules/Elezioni/blocchi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/blocchi/01_votanti.php

    r265 r273  
    4545
    4646        list($tot_aventi)  = $res->fetch(PDO::FETCH_NUM);
    47                 $sql?"SELECT  sum(validi+nulli+bianchi+contestati) as tot,
     47                $sql="SELECT  sum(validi+nulli+bianchi+contestati) as tot,
    4848                sum(validi),sum(nulli),sum(bianchi),sum(contestati), id_gruppo, sum(si), sum(no)
    4949                from ".$prefix."_ele_voti_ref  where id_cons=$id_cons group by id_gruppo having tot>'0'";
     
    6262
    6363else $sql="select count(0) from ".$prefix."_ele_sezioni where id_cons='$id_cons' and validi+nulli+bianchi+contestati>0";
    64 $res = $dbi->prepare("$sql");
    65 $res->execute();
     64$res_sez = $dbi->prepare("$sql");
     65$res_sez->execute();
    6666
    67 if($res_sez)
     67if($res_sez->rowCount())
    6868        list($numero)=$res_sez->fetch(PDO::FETCH_NUM);
    6969else
  • trunk/client/modules/Elezioni/blocchi/bar_affluenze.php

    r265 r273  
    2121                $sezioni=$res2->fetch(PDO::FETCH_NUM);
    2222
    23     $sql="select orario,data  from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' order  by data desc,orario desc limit 1", $dbi);
     23    $sql="select orario,data  from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' order  by data desc,orario desc limit 1";
    2424        $res = $dbi->prepare("$sql");
    2525        $res->execute();
    26  if($res){
     26 if($res->rowCount()){
    2727
    2828        while(list($orario,$data) = $res->fetch(PDO::FETCH_NUM)) {
     
    5050else
    5151        $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";
    52 $resl = $dbi->prepare("$sql");
    53 $resl->execute();
     52$res1 = $dbi->prepare("$sql");
     53$res1->execute();
    5454
    5555#fine modifica
  • trunk/client/modules/Elezioni/blocchi/myrss.php

    r130 r273  
    3838fputs($fp, "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n");
    3939fputs($fp, "Keep-Alive: 300\r\n");
    40 
     40$cont=0;
    4141            $string     = "";
    4242            while(!feof($fp)) {
  • trunk/client/modules/Elezioni/blocchi/off_Votanti.php

    r265 r273  
    4343
    4444        $sql="SELECT sum(t1.maschi+t1.femmine) 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";
    45         $resl = $dbi->prepare("$sql");
    46         $resl->execute();
     45        $res1 = $dbi->prepare("$sql");
     46        $res1->execute();
    4747
    4848        list($tot_aventi)  = $res1->fetch(PDO::FETCH_NUM);
     
    5252                sum(t1.validi),sum(t1.nulli),sum(t1.bianchi),sum(t1.contestati), '0'
    5353                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 having tot>0";
    54         $resl = $dbi->prepare("$sql");
    55         $resl->execute();
     54        $res1 = $dbi->prepare("$sql");
     55        $res1->execute();
    5656
    5757        }else{
     
    5959                sum(validi),sum(nulli),sum(bianchi),sum(contestati), id_gruppo
    6060                from ".$prefix."_ele_voti_ref  where id_cons=$id_cons group by id_gruppo having tot>0";
    61         $resl = $dbi->prepare("$sql");
    62         $resl->execute();
     61        $res1 = $dbi->prepare("$sql");
     62        $res1->execute();
    6363
    6464        }
  • trunk/client/modules/Elezioni/blocchi/pie_affluenze.php

    r265 r273  
    4040
    4141                $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 ";
    42         $resl = $dbi->prepare("$sql");
    43         $resl->execute();
     42        $res1 = $dbi->prepare("$sql");
     43        $res1->execute();
    4444
    4545                $numero=$res1->rowCount();
Note: See TracChangeset for help on using the changeset viewer.