Ignore:
Timestamp:
Jul 31, 2021, 1:41:30 PM (3 years ago)
Author:
roby
Message:

Segue adattamento per php7
modifica gestione consultazioni con e senza voto nullo di lista

Location:
trunk/client/modules/Elezioni
Files:
8 edited

Legend:

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

    r350 r352  
    224224#               if(($data==$ultdata) and ($ora==$ultora))
    225225                {
    226                         $tot[$data.$ora]="<table class=\"td-89\" width=\"100%\"><tr class=\"bggray2\"><td class=\"td-30\">
     226                        $tot[$data.$ora]="<table class=\"td-89\"><tr class=\"bggray2\"><td class=\"td-30\">
    227227                        <b>".number_format($votiu,0,',','.')."</b></td><td class=\"td-30\">
    228228                        <b>".number_format($votid,0,',','.')."</b></td><td>
  • trunk/client/modules/Elezioni/blocchi/off_Votanti.php

    r278 r352  
    8484
    8585                   
    86                
    87                 echo "<table bgcolor=\"gray\" class=\"modulo\" width=\"100%\" cellspacing=\"1\">";
     86                echo "<table style=\"width=100%;border-collapse: collapse;background-gcolor:gray\" class=\"modulo\">";
    8887                if ($genere==0) {echo "<br/>Referendum n. <b>[$num_gruppo]</b><br/>";}
    8988                echo "
    90                 <tr bgcolor=\"#ffffff\"><td ><b>"._AVENTI."</b></td><td>$tot_aventi</td><td><span class=\"red\">100%</span></td></tr>
     89                <tr bgcolor=\"#ffffff\"><td style=\"padding: 1px;\"><b>"._AVENTI."</b></td><td>$tot_aventi</td><td><span class=\"red\">100%</span></td></tr>
    9190
    92                 <tr bgcolor=\"#ffffff\"><td><b>"._VOTANTI."</b></td><td>$tot_votanti</td><td><span class=\"red\">$perc_votanti%</span></td></tr>
     91                <tr bgcolor=\"#ffffff\"><td style=\"padding: 1px;\"><b>"._VOTANTI."</b></td><td>$tot_votanti</td><td><span class=\"red\">$perc_votanti%</span></td></tr>
    9392               
    94                 <tr bgcolor=\"#ffffff\"><td>"._VALIDI."</td><td>$validi</td><td><span class=\"red\">$perc_validi%</span></td></tr>
     93                <tr bgcolor=\"#ffffff\"><td style=\"padding: 1px;\">"._VALIDI."</td><td>$validi</td><td><span class=\"red\">$perc_validi%</span></td></tr>
    9594               
    96                 <tr bgcolor=\"#ffffff\"><td>"._NULLI."</td><td>$nulli</td><td><span class=\"red\">$perc_nulli%</span></td></tr>
     95                <tr bgcolor=\"#ffffff\"><td style=\"padding: 1px;\">"._NULLI."</td><td>$nulli</td><td><span class=\"red\">$perc_nulli%</span></td></tr>
    9796               
    98                 <tr bgcolor=\"#ffffff\"><td>"._BIANCHI."</td><td>$bianchi</td><td><span class=\"red\">$perc_bianchi%</span></td></tr>
     97                <tr bgcolor=\"#ffffff\"><td style=\"padding: 1px;\">"._BIANCHI."</td><td>$bianchi</td><td><span class=\"red\">$perc_bianchi%</span></td></tr>
    9998               
    100                 <tr bgcolor=\"#ffffff\"><td>"._CONTESTATI."</td><td>$contestati</td><td><span class=\"red\">$perc_conte%</span></td></tr>
     99                <tr bgcolor=\"#ffffff\"><td style=\"padding: 1px;\">"._CONTESTATI."</td><td>$contestati</td><td><span class=\"red\">$perc_conte%</span></td></tr>
    101100
    102101                </table>";
  • trunk/client/modules/Elezioni/confronti.php

    r265 r352  
    183183                if($grp3)echo "<input type=\"hidden\" name=\"grp3\" value=\"$grp3\"/>";
    184184                echo "<br/>";
    185                 echo "<table cellspacing=\"0\" cellpadding=\"2\" border=\"1\"><tr class=\"bggray\"><td bgcolor=\"$bgcolor1\" colspan=\"5\">"._CONSULTAZIONE.": <b>$descr</b><br/>"._SCELTA_LISTE."</td></tr><tr class=\"bggray\"><td bgcolor=\"$bgcolor1\" colspan=\"2\"></td>";
    186                 if($grp1)echo "<td bgcolor=\"$bgcolor1\"><b>$grp1</b></td>";
    187                 if($grp2)echo "<td bgcolor=\"$bgcolor1\"><b>$grp2</b></td>";
    188                 echo "<td bgcolor=\"$bgcolor1\"><b>"._ALTROGRP."</b></td>";
     185                echo "<table style=\"border-collapse: collapse; border: 2px solid black;\"><tr class=\"bggray\"><td style=\"padding:5px;background-color:$bgcolor1;\">"._CONSULTAZIONE.": <b>$descr</b><br/>"._SCELTA_LISTE."</td></tr><tr class=\"bggray\"><td style=\"padding:2px;background-color:$bgcolor1;\"></td>";
     186                if($grp1)echo "<td style=\"background-color:$bgcolor1;\"><b>$grp1</b></td>";
     187                if($grp2)echo "<td style=\"background-color:$bgcolor1;\"><b>$grp2</b></td>";
     188                echo "<td style=\"background-color:$bgcolor1;\"><b>"._ALTROGRP."</b></td>";
    189189                echo "</tr>";
    190190                        $z=1;
  • trunk/client/modules/Elezioni/crea_paginaphp5.php

    r348 r352  
    112112
    113113       
    114         $html .= "<table class=\"table-docs\" cellspacing=\"0\" cellpadding=\"2\" border=\"1\" rules=\"all\">";
     114        $html .= "<table class=\"table-docs\" style=\"border-collapse: collapse;border:=1px solid black;\">";
    115115       
    116116
     
    246246
    247247
    248                 $style .="<table style=\"margin: auto;\" cellspace=0 border=0 cellpadding=0><tr><td border=0>$immagine</td> "; 
     248                $style .="<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>$immagine</td> ";   
    249249       
    250250                $style .= "<td border=0>$datipdf</td></tr></table><br/><br/>";
    251251                $style .= "<table style=\"margin: auto;\"><tr><td>$html</td></tr></table>";
    252                 $style .= "<table style=\"margin: auto;\" cellspace=0 border=0 cellpadding=0><tr><td border=0>";
     252                $style .= "<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>";
    253253
    254254                $data=date("d-m-y G:i");
  • trunk/client/modules/Elezioni/crea_paginaphp7.php

    r348 r352  
    115115
    116116       
    117         $html .= "<table class=\"table-docs\" cellspacing=\"0\" cellpadding=\"2\" border=\"1\" rules=\"all\">";
     117        $html .= "<table class=\"table-docs\" style=\"border-collapse: collapse;border:=1px solid black;\">";
    118118       
    119119
     
    143143                        }                                       
    144144                                $html .= "$t $i>$cella $f";
    145                                         $i='';
     145                                        $i="class=\"td-130b\"";
    146146                               
    147147                        }
     
    164164                  echo $html;
    165165                }else{
     166
     167#                       padding: 1px;
     168#                       border: solid  #666666;
     169                        /* margin: 4px 4px 40px;*/
    166170
    167171                $style ="     
     
    170174                .table-docs {
    171175                        font-size: 10px;
    172                         padding: 1px;
    173176                        color: #000000;
    174                         /* margin: 4px 4px 40px;*/
    175                         border: solid  #666666;
    176177                        text-align:center;
     178                        border: 1px solid black;
    177179                }
    178180                .bggray         {
     
    180182                        FONT-SIZE: 13px;
    181183                        FONT-FAMILY: Helvetica;
    182                         border: 1px;
    183184                }
    184185
     
    187188                        FONT-SIZE: 13px;
    188189                        FONT-FAMILY: Helvetica;
    189                         border: 1px;
    190190                        }
    191191
     
    216216                        float: right;
    217217                        text-align:left;
    218                         margin: 0px 0 0 1px;
     218                        margin: 0px 0px 0px 1px;
    219219                        width: 130px;   
    220                         border: none;
    221                         padding: 0px;
     220                        border: 1px solid black;
    222221                }               
    223222
    224223                td {
    225                     border: .2px;
     224                    border: 2px solid black;
    226225                }
    227226                .red    {
     
    249248
    250249
    251                 $style .="<table style=\"margin: auto;\" cellspace=0 border=0 cellpadding=0><tr><td border=0>$immagine</td> "; 
     250                $style .="<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>$immagine</td> ";   
    252251       
    253252                $style .= "<td border=0>$datipdf</td></tr></table><br/><br/>";
    254253                $style .= "<table style=\"margin: auto;\"><tr><td>$html</td></tr></table>";
    255                 $style .= "<table style=\"margin: auto;\" cellspace=0 border=0 cellpadding=0><tr><td border=0>";
     254                $style .= "<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>";
    256255
    257256                $data=date("d-m-y G:i");
  • trunk/client/modules/Elezioni/grafici.php

    r350 r352  
    499499                        <tr>
    500500                                <td><br />
    501                                         <table cellspacing=\"0\" cellpadding=\"2\" rules=\"cols\">";
     501                                        <table style=\"border-collapse: collapse;\" rules=\"cols\">";
    502502                                        // inizio tabella dati
    503503                                        // variabili stampa flash
     
    564564                                $bgcolor1= ($bgcolor1=="#cacaca") ? "#ffffff":"#cacaca";
    565565                                echo "<tr valign=\"top\">
    566                                 <td valign=\"top\"><b><img src=\"modules.php?name=Elezioni&amp;file=foto&amp;$cosa=$id\" class=\"stemmapic\" alt=\"descrizione\" /></b></td>
     566                                <td style=\"vertical-align=:top;\"><b><img src=\"modules.php?name=Elezioni&amp;file=foto&amp;$cosa=$id\" class=\"stemmapic\" alt=\"descrizione\" /></b></td>
    567567                        <td><b>$descrizione</b></td>
    568568                        <td>"._VOTI."</td><td align=\"right\">$votiv</td><td align=\"right\"> <i>($prov%)</i></td>
     
    601601                global $tema;
    602602                if($tema!="tour") echo "</tr><tr>";
    603                 echo "<td valign=\"top\"><br />";
     603                echo "<td style=\"vertical-align=:top;\"><br />";
    604604                # grafico statico
    605605                echo "<img  src='modules/Elezioni/grafici/barre.php?dati1=$dati1&amp;dati2=$dati2&amp;i=$i&amp;cop=$copy&amp;titolo=$titolo&amp;descr=$descr_cons&amp;l=$l&amp;w=$w&amp;logo=$logo'  alt=\"Grafico\" />";
  • trunk/client/modules/Elezioni/gruppo.php

    r351 r352  
    299299
    300300                        if ($circo) $condcirc="and t5.id_circ=$id_circ";                       
    301                         if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog))
     301                        if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog) or defined('_NULLISTA'))
    302302                                        $votigl=" sum(t3.validi),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli)";
    303303                        else
    304                                 if ($votog) $votigl=" (t3.validi_lista),(t3.nulli),(t3.bianchi),(t3.contestati),(t3.voti_nulli)";
     304                                if ($votog) $votigl=" (t3.validi_lista),(t3.nulli),(t3.bianchi),(t3.contestati),(t3.voti_nulli_lista+t3.voti_nulli)";
    305305                                else $votigl=" sum(t3.validi_lista),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati_lista),sum(t3.voti_nulli_lista+t3.voti_nulli)";
    306306                        $sqlvoti="select $tab2, $t.num_$tab15, $t.descrizione, sum(t2.voti), $votigl
     
    576576                        $maxpos=max($pos);
    577577                        ////////////////////////////////////////////////////////////////////
    578                         if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog))
     578                        if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog) or defined('_NULLISTA'))
    579579                                        $sqlvoti2="select $tab3, sum(t3.validi),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t5, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t5.id_cons=$id_cons and t5.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by $tab3";
    580580                        else
    581                                 if (strstr( $op,'circo')) $sqlvoti2="select t1.num_circ, sum(t3.validi_lista),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t1.id_cons=$id_cons and t1.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by t1.num_circ";
     581                                if (strstr( $op,'circo')) $sqlvoti2="select t1.num_circ, sum(t3.validi_lista),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli_lista+t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t1.id_cons=$id_cons and t1.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by t1.num_circ";
    582582
    583583                else $sqlvoti2="select t3.num_sez, (t3.validi_lista),(t3.nulli),(t3.bianchi),(t3.contestati_lista),(t3.voti_nulli_lista+t3.voti_nulli) from ".$prefix."_ele_sezioni as t3 where t3.id_cons=$id_cons ";
     
    612612                        }
    613613                        $piuvot=0;
    614                         if ($visvot!='cand') $piuvot=5;
     614                        if ($visvot!='cand') if(!defined('_NULLISTA')) $piuvot=5; else $piuvot=4;
    615615                        for ($y=$min;$y<=($offset+$piuvot);$y++) $ar[0][$y]="&nbsp;";
    616616                        if (strstr( $op,'circo'))
     
    678678                                                        $ar[0][$posvoti+3]='<b>Schede Bianche</b>';
    679679                                                        $ar[0][$posvoti+4]='<b>Voti Contestati</b>';
    680                                                         $ar[0][$posvoti+5]='<b>Voti Nulli</b>';
     680                                                        if(!defined('_NULLISTA')) $ar[0][$posvoti+5]='<b>Voti Nulli</b>';
    681681                                                        if (($maxpos)>=$num_circ and $minpos<=$num_circ){
    682682                                                        //$posvoti++;
     
    685685                                                                $ar[($z)][$posvoti+3]="<b>$biasez[$z]</b>";
    686686                                                                $ar[($z)][$posvoti+4]="<b>$consez[$z]</b>";
    687                                                                 $ar[($z)][$posvoti+5]="<b>$vonsez[$z]</b>";
     687                                                                if(!defined('_NULLISTA')) $ar[($z)][$posvoti+5]="<b>$vonsez[$z]</b>";
    688688                                                        }
    689689                                                }
     
    695695                                        if(isset($temp)) {
    696696                                        if (!isset($tab15) or !$tab15) $tab15="candidati";
    697                     if($tab15=="gruppo" or $genere==4){
     697                    if($tab15=="gruppo" or $genere==4 or defined('_NULLISTA')){
    698698                                                if($votog) $tab15="lista";
    699699                                                $votigl=" sum(validi),sum(nulli),sum(bianchi),sum(contestati),sum(voti_nulli)";
     
    702702                    }else{
    703703                        if($dettnulli) $votigl=" sum(validi_lista),sum(nulli),sum(bianchi),sum(contestati_lista),sum(voti_nulli_lista+voti_nulli)";
    704                                                 else $votigl=" sum(validi_lista),sum(nulli),sum(bianchi),sum(contestati_lista),sum(voti_nulli)";
     704                                                else $votigl=" sum(validi_lista),sum(nulli),sum(bianchi),sum(contestati_lista),sum(voti_nulli_lista+voti_nulli)";
    705705                    }
    706706                    if($circo)
     
    729729                                if ($visvot!='cand') {
    730730                                $key=$offset+1;
    731                                 $tmp=array($sevaltot,$senultot,$sebiatot,$secontot,$sevnutot);
     731                                if(!defined('_NULLISTA')) $tmp=array($sevaltot,$senultot,$sebiatot,$secontot,$sevnutot);
     732                                else  $tmp=array($sevaltot,$senultot,$sebiatot,$secontot);
    732733                                if($perc) $temp3=arrayperc($tmp,$voticompl);
    733734
  • trunk/client/modules/Elezioni/language/lang-it.php

    r340 r352  
    488488                define("_DESCRCONS","CAMERA");
    489489                define("_CONSI","Candidato");
     490                define("_NULLISTA",0);
    490491                break;
    491492    case 19:
     
    501502                define("_DESCRCONS","CAMERA");
    502503                define("_CONSI","Candidato");
     504                define("_NULLISTA",0);
    503505                break;
    504506
Note: See TracChangeset for help on using the changeset viewer.