Ignore:
Timestamp:
Apr 15, 2017, 3:51:51 PM (7 years ago)
Author:
roby
Message:

admin: allargato lo spazio di lavoro
client: sistemato il tema Futura2 per il mobile

File:
1 edited

Legend:

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

    r225 r253  
    638638                                        $voticompl=$sevaltot+$senultot+$sebiatot+$secontot+$sevnutot;
    639639                                        $resvt = mysql_query("SELECT voti from ".$prefix."_ele_voti_$tab15 where id_cons='$id_cons'",$dbi);
    640                                         list($votlt)=mysql_fetch_row($resvt);
     640                                        if($resvt) list($votlt)=mysql_fetch_row($resvt); else $votlt=0;
    641641                                        $temp3=arrayperc($tempar,$sevaltot);
    642642                                        while (list($key,$voti)= each($temp)) {
     
    680680                }else{
    681681                        $res_lis = mysql_query("SELECT id_gruppo, descrizione,num_gruppo from ".$prefix."_ele_gruppo where id_cons=$id_cons order by num_gruppo",$dbi);
    682                         $numliste=mysql_num_rows($res_lis);
     682                        if($res_lis) $numliste=mysql_num_rows($res_lis); else $numliste=0;
    683683
    684684                        if (!isset($offset)) $offset=10;
     
    695695                                echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"></input>";                 
    696696                                echo ""._SCELTA." "._CONSULTAZIONE.": <select name=\"id_gruppo\">";
    697                                 while(list($id_rif,$descrizione,$num_lis) = mysql_fetch_row($res_lis)) {
     697                                if($res_lis)
     698                                    while(list($id_rif,$descrizione,$num_lis) = mysql_fetch_row($res_lis)) {
    698699                                        if (!$id_gruppo) $id_gruppo=$id_rif;
    699700                                        $sel = ($id_rif == $id_gruppo) ? "selected=\"selected\"" : "";
     
    701702                                        for ($j=strlen($num_lis);$j<2;$j++) { echo "&nbsp;&nbsp;";}
    702703                                        echo $num_lis.") ".strip_tags(substr($descrizione,0,50))."</option>";
    703                                 }
     704                                    }
    704705                                echo "</select>";
    705706                                echo "<br />"._VIS_PERC.": <input type=\"checkbox\" name=\"perc\" value=\"true\"";
     
    724725                        order by $tab3, t1.num_gruppo
    725726                        ", $dbi);
    726                         $num_sez=mysql_num_rows($res);
    727                         list($num_gruppo,$descr)= mysql_fetch_row($res_ref);
     727                        if($res) $num_sez=mysql_num_rows($res); else $num_sez=0;
     728                        if($res_ref) list($num_gruppo,$descr)= mysql_fetch_row($res_ref); else {$num_gruppo=0;$descr='';}
    728729                       
    729730                        if (!$csv){
     
    811812                $ar[0][5]=_BIANCHI;
    812813                $ar[0][6]=_CONTESTATI;
    813                
    814                 while (list($num_gruppo,$desc_ref) = mysql_fetch_row($res_ref)){
     814                if($res_ref)
     815                    while (list($num_gruppo,$desc_ref) = mysql_fetch_row($res_ref)){
    815816                        $ar[0][$i++]= $num_gruppo.") ".$desc_ref;
    816817                        $ar[1][$y++]= "SI";
    817818                        $ar[1][$y++]= "NO";
    818                 }
     819                    }
    819820                $num_sez++;
    820821                $tot_si=0;
     
    824825                $tot_bi=0;
    825826                $tot_co=0;
    826                 while (list($num_circ,$desc_circ,$num_gruppo,$desc_ref,$simbolo,$si,$no,$validi,$nulli,$bianchi, $contestati)  = mysql_fetch_row($res)){
     827                if($res)
     828                    while (list($num_circ,$desc_circ,$num_gruppo,$desc_ref,$simbolo,$si,$no,$validi,$nulli,$bianchi, $contestati)  = mysql_fetch_row($res)){
    827829                        $i=1;
    828830                        $votanti=$validi+$nulli+$bianchi+$contestati;
     
    852854                        $ar[$num_circ][$i++]= $perc=='true' ? $contestati."<br /><span class=\"red\"><i>0.00%</i></span>":$contestati;
    853855                        }
    854                 }
     856                    }
    855857                $i=1;
    856858                $tot_vo=$tot_va+$tot_nu+$tot_bi+$tot_co;
Note: See TracChangeset for help on using the changeset viewer.