Changeset 253 for trunk/client/modules/Elezioni
- Timestamp:
- Apr 15, 2017, 3:51:51 PM (7 years ago)
- Location:
- trunk/client/modules/Elezioni
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/grafici.php
r229 r253 657 657 658 658 function graf_candidato(){ 659 global $ bgcolor1, $bgcolor5,$bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons, $id_cons,$tipo_cons,$copy,$id_comune,$id_istat,$genere,$votog,$votol,$votoc,$circo,$siteistat;659 global $descr_com, $bgcolor1, $bgcolor5,$bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons, $id_cons,$tipo_cons,$copy,$id_comune,$id_istat,$genere,$votog,$votol,$votoc,$circo,$siteistat; 660 660 661 661 $logo=verificasimbolo(); // carica_logo da funzioni.php … … 700 700 while (list($id_lista,$id_cand,$nome,$cognome,$voti) = mysql_fetch_row($res)){ 701 701 $candidato[$i]=$cognome; 702 $pro[$i]=number_format($voti*100/$tot,2);702 if ($tot) $pro[$i]=number_format($voti*100/$tot,2); else $pro[$i]=0; 703 703 // sviluppo tabella dati 704 704 $e=$i+1; -
trunk/client/modules/Elezioni/gruppo.php
r225 r253 638 638 $voticompl=$sevaltot+$senultot+$sebiatot+$secontot+$sevnutot; 639 639 $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; 641 641 $temp3=arrayperc($tempar,$sevaltot); 642 642 while (list($key,$voti)= each($temp)) { … … 680 680 }else{ 681 681 $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; 683 683 684 684 if (!isset($offset)) $offset=10; … … 695 695 echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"></input>"; 696 696 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)) { 698 699 if (!$id_gruppo) $id_gruppo=$id_rif; 699 700 $sel = ($id_rif == $id_gruppo) ? "selected=\"selected\"" : ""; … … 701 702 for ($j=strlen($num_lis);$j<2;$j++) { echo " ";} 702 703 echo $num_lis.") ".strip_tags(substr($descrizione,0,50))."</option>"; 703 }704 } 704 705 echo "</select>"; 705 706 echo "<br />"._VIS_PERC.": <input type=\"checkbox\" name=\"perc\" value=\"true\""; … … 724 725 order by $tab3, t1.num_gruppo 725 726 ", $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='';} 728 729 729 730 if (!$csv){ … … 811 812 $ar[0][5]=_BIANCHI; 812 813 $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)){ 815 816 $ar[0][$i++]= $num_gruppo.") ".$desc_ref; 816 817 $ar[1][$y++]= "SI"; 817 818 $ar[1][$y++]= "NO"; 818 }819 } 819 820 $num_sez++; 820 821 $tot_si=0; … … 824 825 $tot_bi=0; 825 826 $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)){ 827 829 $i=1; 828 830 $votanti=$validi+$nulli+$bianchi+$contestati; … … 852 854 $ar[$num_circ][$i++]= $perc=='true' ? $contestati."<br /><span class=\"red\"><i>0.00%</i></span>":$contestati; 853 855 } 854 }856 } 855 857 $i=1; 856 858 $tot_vo=$tot_va+$tot_nu+$tot_bi+$tot_co; -
trunk/client/modules/Elezioni/language/lang-it.php
r230 r253 272 272 //global $tipo_cons; 273 273 switch ($tipo_cons){ 274 case '': 275 define("_CONSULTAZIONE","Consultazione"); 276 break; 274 277 case 1: 275 278 define("_SCELTA_CIR","Scegli la Circoscrizione");
Note:
See TracChangeset
for help on using the changeset viewer.