Ignore:
Timestamp:
Apr 13, 2019, 8:05:15 PM (5 years ago)
Author:
roby
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/blocchi/04_sezioni.php

    r241 r265  
    1111}
    1212global  $prefix, $dbi,$id_cons_gen;
    13 $sql = mysql_query("select chiusa  from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen'",$dbi);
    14                 list($chiusa) = mysql_fetch_row($sql);
     13$sql = "select chiusa  from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen'";
     14        $res = $dbi->prepare("$sql");
     15        $res->execute();
     16
     17                list($chiusa) = $res->fetch(PDO::FETCH_NUM);
    1518               
    1619                //if($chiusa!='1') numeri_sezione(); # se la consultazione non Ú chiusa
     
    3336
    3437                # numero sezioni
    35                 $res = mysql_query("select t1.id_sez,t1.num_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 order by t1.num_sez",$dbi);
    36                 $max = mysql_num_rows($res);
     38                $sql="select t1.id_sez,t1.num_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 order by t1.num_sez";
     39                $res = $dbi->prepare("$sql");
     40                $res->execute();
     41
     42                $max = $res->rowCount();
    3743                if(!isset($html)) $html='';
    3844                $html = "\n<table  style=\"margin:0px auto;border:0px; width:90%\"><tr>";
    3945               
    4046                $i=0;$id_circ_old=0;$e=0;
    41                 while(list($sez_id, $sez_num) = mysql_fetch_row($res)) {
     47                while(list($sez_id, $sez_num) = $res->fetch(PDO::FETCH_NUM)) {
    4248                        $i++;
    4349                        /****************************************************************/     
     
    5763                        #colora la sezione
    5864                        # verifica se la sezione Ú scrutinata
    59                          $res2 = mysql_query("select *  from ".$prefix."_ele_voti_".$tab." where   id_sez='$sez_id'",$dbi);
    60                          $numero=mysql_num_rows($res2);
     65                         $sql="select *  from ".$prefix."_ele_voti_".$tab." where   id_sez='$sez_id'";
     66        $res2 = $dbi->prepare("$sql");
     67        $res2->execute();
     68
     69                         $numero=$res2->rowCount();
    6170                         if ($numero!=0){$e++;$bgsez="#FFFF00";}else{$bgsez="";}
    6271                       
Note: See TracChangeset for help on using the changeset viewer.