Changeset 371
- Timestamp:
- Sep 3, 2022, 10:40:36 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/aggiornadb.php
r364 r371 102 102 if(controllo($prefix.'_authors','admincomune',++$num)) 103 103 { 104 $sql="update `".$prefix."_authors` set admincomune='1' where aid='admin'"; 105 $ret=aggiorna($sql,$dbi,'',$num); 106 $sql="update `".$prefix."_authors` set admincomune='0' where aid!='admin'"; 104 $sql="UPDATE `soraldo_authors` SET `adminop` = '1', `adminsuper` = '0',`admincomune` = '0' WHERE `soraldo_authors`.`aid` != 'admin' AND `soraldo_authors`.`aid` != 'suser'"; 105 $ret=aggiorna($sql,$dbi,'',$num); 106 $sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '1',`admincomune` = '0' WHERE `soraldo_authors`.`aid` = 'suser'"; 107 $ret=aggiorna($sql,$dbi,'',$num); 108 $sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '0',`admincomune` = '1' WHERE `soraldo_authors`.`aid` = 'admin'"; 107 109 $ret=aggiorna($sql,$dbi,'',$num); 108 110 echo "<br> La tabella dei permessi Ú stata aggiornata<br>"; … … 128 130 echo "<br>"; 129 131 } 132 ++$num; 133 $sql="ALTER TABLE `soraldo_ele_come` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 134 $ret=aggiorna($sql,$dbi,'',$num); 135 echo "<br>"; 136 ++$num; 137 $sql="ALTER TABLE `soraldo_ele_link` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 138 $ret=aggiorna($sql,$dbi,'',$num); 139 echo "<br>"; 140 ++$num; 141 $sql="ALTER TABLE `soraldo_ele_servizi` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 142 $ret=aggiorna($sql,$dbi,'',$num); 143 echo "<br>"; 130 144 131 145 if(controllo($prefix.'_ele_rilaff','data',++$num)) -
trunk/admin/modules/Elezioni/ele_controlli.php
r365 r371 383 383 $totsl+=$svl; 384 384 $tnl+=$nl; 385 if(($votig+$svl)<($votil+$svg+$nl) and $disg)385 if(($votig+$svl)<($votil+$svg+$nl) and ($solog or $disg)) 386 386 { $err=1; $tipo='lista'; break; } 387 387 } -
trunk/admin/modules/Elezioni/ele_sede.php
r344 r371 45 45 if (isset($param['filemappa'])) $filemappa=addslashes($param['filemappa']); else $filemappa=''; 46 46 if (isset($param['mappa'])) $mappa=addslashes($param['mappa']); else $mappa=''; 47 if (isset($param['delmap'])) $delmap=addslashes($param['delmap']); 47 48 48 49 … … 59 60 60 61 function all() { 61 global $bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min,$id_cons,$id_cons_gen,$do,$id_sede,$id_circ ;62 global $bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min,$id_cons,$id_cons_gen,$do,$id_sede,$id_circ,$delmap; 62 63 63 64 echo "<center><font class=\"title\"><br><b>"._SEDE."</b></font><br><br>"; … … 68 69 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._CIRCO."</b></td>" 69 70 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._INDIRIZZO."</b></td>" 70 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._MAPPA."</b></td>" 71 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._TEL."</b></td>" 71 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._MAPPA."</b>"; 72 if ($do=='modify') 73 echo "<br><input type=\"checkbox\" name=\"delmap\" value=\"false\"> "._DELETE; 74 echo "</td>"; 75 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._TEL."</b></td>" 72 76 ."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._FAX."</b></td>" 73 77 ."<td bgcolor=\"$bgcolor1\" align=\"center\"> <b>"._RESP."</b> </td>" … … 184 188 185 189 function sede($ok, $do,$id_circ, $id_sede,$indir, $tel1, $tel2, $fax, $resp, $mappa, $filemappa, $id_sede2) { 186 global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons, $id_cons,$id_cons_gen,$id_comune ;190 global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons, $id_cons,$id_cons_gen,$id_comune,$delmap; 187 191 $perms=ChiSei(0); 188 192 … … 253 257 $mappanome=addslashes($nomemappa); 254 258 $cond=", mappa='$mappablob', filemappa='$mappanome'"; 255 } else {$cond='';} 256 259 } else { 260 if ( $delmap=='false') {$cond=", mappa='', filemappa=''";} 261 else $cond=''; 262 } 257 263 $sql="update ".$prefix."_ele_sede set id_circ='$id_circ',indirizzo='$indir' , telefono1='$tel1', telefono2='$tel2',fax='$fax',responsabile='$resp' $cond where id_sede='$id_sede2' "; 258 264 $res = $dbi->prepare("$sql"); -
trunk/admin/modules/Elezioni/ele_spoglio.php
r369 r371 164 164 ."<input type=\"hidden\" name=\"id_gruppo\" value=\"$id_gruppo\"/>"; 165 165 $riga[$y].= "</span>"; 166 if (chisei($id_cons_gen)>=64 and ($y==$numril and $voti_t!='')) { $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\">"._DELETE." <input type=\"checkbox\" name=\"delete\" value=\"true\"/></span>";}166 if (chisei($id_cons_gen)>=64 and $y==$numril) { $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\">"._DELETE." <input type=\"checkbox\" name=\"delete\" value=\"true\"/></span>";} 167 167 else $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\"><input type=\"hidden\" name=\"delete\" value=\"\"/></span>"; 168 168 $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\"><input type=\"submit\" name=\"update\" value=\""._OK."\"/></span>"; -
trunk/admin/versione.php
r370 r371 1 1 <?php 2 2 3 $versione = "3.0 rev 37 0";3 $versione = "3.0 rev 371"; 4 4 $version_number = $versione; 5 $datarel = "0 1 giugno2022";5 $datarel = "03 settembre 2022"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7 -
trunk/client/modules/Elezioni/affluenze.php
r352 r371 224 224 # if(($data==$ultdata) and ($ora==$ultora)) 225 225 { 226 $tot[$data.$ora]="<table class=\"td-89\"><tr class=\"bggray2\"><td class=\"td-30\">227 <b>".number_format($votiu,0,',','.')."</b></td><td class=\"td-30\">228 <b>".number_format($votid,0,',','.')."</b></td><td >226 $tot[$data.$ora]="<table style=\"width:180px;\"><tr class=\"bggray2\"><td style=\"width:33%;text-align:center;\"> 227 <b>".number_format($votiu,0,',','.')."</b></td><td style=\"width:33%;text-align:center;\"> 228 <b>".number_format($votid,0,',','.')."</b></td><td style=\"width:33%;text-align:center;\"> 229 229 <b>".number_format($somma,0,',','.')."</b></td> 230 230 </tr></table>"; … … 243 243 $ora_ril=$hour.":".$minute; 244 244 $html .= "<td"; 245 if ($ud==$num_ril and ( $perc_u[$data1.$ora1] or $perc_d[$data1.$ora1])) {$ora_rif="$data1.$ora1";}245 if ($ud==$num_ril and (isset($perc_u[$data1.$ora1]) or isset($perc_d[$data1.$ora1]))) {$ora_rif="$data1.$ora1";} 246 246 $html .= ">"; 247 247 $data_a=form_data($data1); … … 253 253 $html .= "<br />"._SEZIONI." $num_scr "._SU." $num_sez"; 254 254 ## if ($ud==$num_ril and ($perc_u or $perc_d)) $html .= "<br /> 255 if ( ($perc_u[$data1.$ora1] or$perc_d[$data1.$ora1])) $html .= "<br />255 if (isset($perc_u[$data1.$ora1]) or isset($perc_d[$data1.$ora1])) $html .= "<br /> 256 256 257 257 <table style=\"width:180px;\"><tr class=\"bggray\"> … … 366 366 header ("Content-Type: application/vnd.ms-excel"); 367 367 header ("Content-Disposition: inline; filename=$nomefile"); 368 header("Pragma: no-cache"); 369 header("Expires: 0"); 370 $datipdf = mb_convert_encoding($datipdf , "HTML-ENTITIES", "UTF-8"); 368 371 echo "$datipdf"; 369 372 echo "$html \t\n $style"; -
trunk/client/modules/Elezioni/affluenzephp5.php
r348 r371 221 221 # if(($data==$ultdata) and ($ora==$ultora)) 222 222 { 223 $tot[$data.$ora]="<table class=\"td-89\" width=\"100%\"><tr class=\"bggray2\"><td class=\"td-30\">224 <b>".number_format($votiu,0,',','.')."</b></td><td class=\"td-30\">225 <b>".number_format($votid,0,',','.')."</b></td><td >223 $tot[$data.$ora]="<table style=\"width:180px;\"><tr class=\"bggray2\"><td style=\"width:33%;text-align:center;\"> 224 <b>".number_format($votiu,0,',','.')."</b></td><td style=\"width:33%;text-align:center;\"> 225 <b>".number_format($votid,0,',','.')."</b></td><td style=\"width:33%;text-align:center;\"> 226 226 <b>".number_format($somma,0,',','.')."</b></td> 227 227 </tr></table>"; … … 363 363 header ("Content-Type: application/vnd.ms-excel"); 364 364 header ("Content-Disposition: inline; filename=$nomefile"); 365 header("Pragma: no-cache"); 366 header("Expires: 0"); 367 $datipdf = mb_convert_encoding($datipdf , "HTML-ENTITIES", "UTF-8"); 365 368 echo "$datipdf"; 366 369 echo "$html \t\n $style"; -
trunk/client/modules/Elezioni/blocchi/00_affluenze.php
r279 r371 24 24 25 25 // barre 26 $l_size = getimagesize("modules/Elezioni/images/barre/leftbar. gif");27 $m_size = getimagesize("modules/Elezioni/images/barre/mainbar. gif");28 $r_size = getimagesize("modules/Elezioni/images/barre/rightbar. gif");29 $l_size2 = getimagesize("modules/Elezioni/images/barre/leftbar2. gif");30 $m_size2 = getimagesize("modules/Elezioni/images/barre/mainbar2. gif");31 $r_size2 = getimagesize("modules/Elezioni/images/barre/rightbar2. gif");26 $l_size = getimagesize("modules/Elezioni/images/barre/leftbar.jpg"); 27 $m_size = getimagesize("modules/Elezioni/images/barre/mainbar.jpg"); 28 $r_size = getimagesize("modules/Elezioni/images/barre/rightbar.jpg"); 29 $l_size2 = getimagesize("modules/Elezioni/images/barre/leftbar2.jpg"); 30 $m_size2 = getimagesize("modules/Elezioni/images/barre/mainbar2.jpg"); 31 $r_size2 = getimagesize("modules/Elezioni/images/barre/rightbar2.jpg"); 32 32 33 33 # $res = mysql_query("select orario,data from ".$prefix."_ele_rilaff where id_cons_gen='$id_cons_gen' order by data desc,orario DESC limit 1", $dbi); … … 75 75 76 76 while(list($voti_t, $num_gruppo,$id_gruppo) = $res1->fetch(PDO::FETCH_NUM)) { 77 if(!$id_gruppo) $id_gruppo=0; 77 78 // $res1 = mysql_query(,$dbi); 78 79 // $query="select sum(voti_complessivi) from ".$prefix."_ele_voti_parziale where orario='$orario' and data='$data' and id_cons='$id_cons'"; … … 109 110 110 111 echo "<table><tr><td><table><tr><td> </td><td> 111 <img src=\"modules/Elezioni/images/barre/leftbar2. gif\" height=\"$l_size2[1]\" width=\"$l_size2[0]\" alt=\"\" /><img src=\"modules/Elezioni/images/barre/mainbar2.gif\" alt=\"\" height=\"$m_size2[1]\" width=\"". ($perc * 1)."\" /><img src=\"modules/Elezioni/images/barre/rightbar2.gif\" height=\"$r_size2[1]\" width=\"$r_size2[0]\" alt=\"\" /><span class=\"red\"> $perc</span> % <br /></td></tr>\n";112 <img src=\"modules/Elezioni/images/barre/leftbar2.jpg\" height=\"$l_size2[1]\" width=\"$l_size2[0]\" alt=\"\" /><img src=\"modules/Elezioni/images/barre/mainbar2.jpg\" alt=\"\" height=\"$m_size2[1]\" width=\"". ($perc * 1)."\" /><img src=\"modules/Elezioni/images/barre/rightbar2.jpg\" height=\"$r_size2[1]\" width=\"$r_size2[0]\" alt=\"\" /><span class=\"red\"> $perc</span> % <br /></td></tr>\n"; 112 113 113 114 $tot_gen=$tot; 114 115 115 116 116 echo "<tr><td></td><td><img src=\"modules/Elezioni/images/barre/leftbar. gif\" height=\"$l_size[1]\" width=\"$l_size[0]\" alt=\"\" /><img src=\"modules/Elezioni/images/barre/mainbar.gif\" alt=\"\" height=\"$m_size[1]\" width=\"".(100 * 1)."\" /><img src=\"modules/Elezioni/images/barre/rightbar.gif\" height=\"$r_size[1]\" width=\"$r_size[0]\" alt=\"\" /> 100 % </td></tr></table>";117 echo "<tr><td></td><td><img src=\"modules/Elezioni/images/barre/leftbar.jpg\" height=\"$l_size[1]\" width=\"$l_size[0]\" alt=\"\" /><img src=\"modules/Elezioni/images/barre/mainbar.jpg\" alt=\"\" height=\"$m_size[1]\" width=\"".(100 * 1)."\" /><img src=\"modules/Elezioni/images/barre/rightbar.jpg\" height=\"$r_size[1]\" width=\"$r_size[0]\" alt=\"\" /> 100 % </td></tr></table>"; 117 118 echo "</td></tr></table>"; 118 119 -
trunk/client/modules/Elezioni/blocchi/cerca_candidato.php
r347 r371 13 13 die ("You can't access this file dirrectly..."); 14 14 } 15 global $id_comune,$id_cons_gen,$op ;16 15 global $id_comune,$id_cons_gen,$op,$genere; 16 if($genere>0){ 17 17 # validatore form 18 18 echo ' … … 122 122 echo $cerca_cand; 123 123 $_SESSION['cerca_cand']=''; 124 124 } 125 125 126 126 ?> -
trunk/client/modules/Elezioni/consiglieri.php
r364 r371 610 610 $z=0; 611 611 $arvin[$x][$pos++]=$desliste[$lst]; 612 $sql = "SELECT concat(substring(concat('0',t1.num_cand),-2),') ',t1.cognome,' ',substring(t1.nome from 1 for 1),'.') as descr,sum(t2.voti) as voti from ".$prefix."_ele_candidati as t1, ".$prefix."_ele_voti_candidati as t2 where t1.id_lista='$id_lista' and t1.id_cand=t2.id_cand GROUP BY descrorder by voti desc,t1.num_cand";612 $sql = "SELECT concat(substring(concat('0',t1.num_cand),-2),') ',t1.cognome,' ',substring(t1.nome from 1 for 1),'.') as descr,sum(t2.voti) as voti from ".$prefix."_ele_candidati as t1, ".$prefix."_ele_voti_candidati as t2 where t1.id_lista='$id_lista' and t1.id_cand=t2.id_cand GROUP BY t1.num_cand,t1.cognome,t1.nome order by voti desc,t1.num_cand"; 613 613 $res_can = $dbi->prepare("$sql"); 614 614 $res_can->execute(); -
trunk/client/modules/Elezioni/crea_pagina.php
r348 r371 115 115 116 116 117 $y=1;$i='';$e= '';117 $y=1;$i='';$e=0; 118 118 foreach ($ar as $riga) { 119 119 $e++; … … 133 133 134 134 if ($e==1){ 135 $t="<td ";$f="</td>";135 $t="<td style='text-align:left;'";$f="</td>"; 136 136 }else{ 137 137 $t="<td";$f="</td>"; -
trunk/client/modules/Elezioni/crea_paginaphp5.php
r354 r371 21 21 22 22 function crea_tabella($ar) { 23 24 25 global $prefix,$dbi,$pdf,$csv,$xls,$lang,$descr_cons,$prefix,$dbi,$id_comune,$descrizione,$siteistat,$min,$offset,$minsez,$offsetsez,$datipdf,$orienta,$formato; 26 $sql="SELECT descrizione,simbolo,stemma FROM ".$prefix."_ele_comuni where id_comune='$id_comune' "; 23 global $prefix,$dbi,$pdf,$csv,$xls,$lang,$descr_cons,$prefix,$dbi,$id_comune,$descrizione,$siteistat,$min,$offset,$minsez,$offsetsez,$datipdf,$orienta,$formato; 24 $sql="SELECT descrizione,simbolo,stemma FROM ".$prefix."_ele_comuni where id_comune='$id_comune' "; 27 25 $res = $dbi->prepare("$sql"); 28 26 $res->execute(); 29 30 27 list($descr_com,$simbolo,$stemma) = $res->fetch(PDO::FETCH_NUM); 31 32 33 34 $datipdf=stripslashes($datipdf); 35 36 $data=date("d-m-y G:i"); 37 38 if ($xls==1) { 39 40 $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls"); 41 # $nomefile=$_SESSION['nomefile'].".xls"; 42 header ("Content-Type: application/vnd.ms-excel"); 43 header ("Content-Disposition: inline; filename=$nomefile"); 44 45 $datipdf=str_replace("<br/>","\n",$datipdf); 46 47 $datipdf=strip_tags($datipdf); 48 // $cella=str_replace("</b>"," ",$cella); 49 // $cella=str_replace("<br />"," ",$cella); 50 51 52 echo "$datipdf"; 53 54 $y=1;$i='';$e=''; 28 $datipdf=stripslashes($datipdf); 29 $data=date("d-m-y G:i"); 30 if ($xls==1) { 31 $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls"); 32 header ("Content-Type: application/vnd.ms-excel"); 33 header ("Content-Disposition: inline; filename=$nomefile"); 34 $datipdf=str_replace("<br/>","\n",$datipdf); 35 $datipdf=strip_tags($datipdf); 36 echo "$datipdf"; 37 $y=1;$i='';$e=0; 55 38 foreach ($ar as $riga) { 56 $e++;57 39 $e++; 40 if($y) { 58 41 echo "\n"; 59 42 }else{ 60 61 echo "\n"; 62 63 } 64 65 43 echo "\n"; 44 } 66 45 foreach ($riga as $cella) { 67 $cella=str_replace("<b>"," ",$cella); 68 $cella=str_replace("</b>"," ",$cella); 69 $cella=str_replace("<br>"," ",$cella); 70 $cella=str_replace("<br />"," ",$cella); 71 $cella=str_replace("<span class=\"red\"><i>"," - ",$cella); 72 $cella=str_replace("<span class=\"red\" style=\"font-size:80%;\"><i>"," - ",$cella); 73 $cella=str_replace("</span>%</i>","%",$cella); 74 $cella=str_replace("</i></span>","",$cella); 75 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 76 $cella=str_replace("_SEZIONI","Sezione ",$cella); 77 $cella=str_replace("_TOT","Totale",$cella); 78 $cella=str_replace("_COMPLESSIVO","Complessivo",$cella); 79 80 echo "$cella \t"; 81 82 83 } 84 if ($y) $y=0; 85 86 } 87 88 echo"\n\n\nPowered by Eleonline http://www.eleonline.it \t \n"; 89 echo"by luciano apolito & roberto gigli - stampato: $data \t \n"; 90 die(); 91 92 }else{ 93 94 95 96 $bg='bgw'; 97 98 $tmpbg='bggray2'; 99 $tmpbg1='bgw'; 100 $tmpbg2='bggray'; 101 $tmpbg3='bggray2'; 102 103 $html =''; 104 if ($pdf!="1" && $csv=="1") 105 { 106 107 $html .="<center><table><tr><td> 108 <img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" align=\"left\" alt=\"logo\" /> "; 109 $html .= "</td><td>$datipdf</td></td></table>"; 46 $cella=str_replace("<b>"," ",$cella); 47 $cella=str_replace("</b>"," ",$cella); 48 $cella=str_replace("<br>"," ",$cella); 49 $cella=str_replace("<br />"," ",$cella); 50 $cella=str_replace("<span class=\"red\"><i>"," - ",$cella); 51 $cella=str_replace("<span class=\"red\" style=\"font-size:80%;\"><i>"," - ",$cella); 52 $cella=str_replace("</span>%</i>","%",$cella); 53 $cella=str_replace("</i></span>","",$cella); 54 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 55 $cella=str_replace("_SEZIONI","Sezione ",$cella); 56 $cella=str_replace("_TOT","Totale",$cella); 57 $cella=str_replace("_COMPLESSIVO","Complessivo",$cella); 58 echo "$cella \t"; 59 } 60 if ($y) $y=0; 61 } 62 echo"\n\n\nPowered by Eleonline http://www.eleonline.it \t \n"; 63 echo"by luciano apolito & roberto gigli - stampato: $data \t \n"; 64 die(); 65 }else{ 66 $bg='bgw'; 67 $tmpbg='bggray2'; 68 $tmpbg1='bgw'; 69 $tmpbg2='bggray'; 70 $tmpbg3='bggray2'; 71 $html =''; 72 if ($pdf!="1" && $csv=="1") 73 { 74 $html .="<center><table><tr><td> 75 <img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" align=\"left\" alt=\"logo\" /> "; 76 # $html .= "</td><td>$datipdf"; 77 $html .= "</td></tr></table>"; 110 78 } 111 112 113 114 $html .= "<table class=\"table-docs\">"; 115 116 117 118 119 $y=1;$i='';$e=''; 79 $html .= "<p style=\"text-align:center;\">$datipdf</p>"; 80 $html .= "<table class=\"table-docs\">"; 81 $y=1;$e=0; 120 82 foreach ($ar as $riga) { 121 $e++; 83 $e++; 84 $i=1; 122 85 if($y) { 123 86 $html .= "<tr class=\"bggray\">"; … … 125 88 $bg= ($bg==$tmpbg) ? $tmpbg1:$tmpbg3; 126 89 $html .= "<tr class=\"$bg\">"; 127 $i="class=\"td-150c\"";128 90 } 129 91 foreach ($riga as $cella) { 130 131 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 132 $cella=str_replace("_SEZIONI","Sezione ",$cella); 133 $cella=str_replace("_TOT","Totale",$cella); 134 $cella=str_replace("_COMPLESSIVO","",$cella); 135 136 if ($e==1){ 137 $t="<td";$f="</td>"; 138 }else{ 139 $t="<td";$f="</td>"; 140 } 141 $html .= "$t $i>$cella $f"; 142 $i="class=\"td-150b\""; 143 92 if($cella) { 93 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 94 $cella=str_replace("_SEZIONI","Sezione ",$cella); 95 $cella=str_replace("_TOT","Totale",$cella); 96 $cella=str_replace("_COMPLESSIVO","",$cella); 97 } 98 if ($e==1){ 99 $t="<td";$f="</td>"; 100 }elseif($i){ 101 $t="<td style='text-align:left;'";$f="</td>"; 102 }else{ 103 $t="<td";$f="</td>"; 104 } 105 $html .= "$t >$cella $f"; 106 $i=0; 144 107 } 145 108 if ($y) $y=0; … … 147 110 } 148 111 $html .= "</table>"; 149 150 151 112 if ($pdf!="1" && $csv=="1"){ 152 153 154 113 $html .="<br/><span class=\"copy\"><i>Stampato: $data</i></span>"; 114 $html .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>"; 115 $html .="</center><br />"; 155 116 } 156 117 157 118 # inizio stampa a video o pdf 158 159 160 119 if ($pdf!='1'){ 161 echo $html; 162 }else{ 163 164 $style =" 165 <style type=\"text/css\"> 166 <!-- 167 .table-docs { 168 font-size: 10px; 169 padding: 1px; 170 color: #000000; 171 /* margin: 4px 4px 40px;*/ 172 border: solid #666666; 173 text-align:center; 174 } 175 .bggray { 176 background: #d2d2d2; 177 FONT-SIZE: 13px; 178 FONT-FAMILY: Helvetica; 179 border: 1px; 180 } 181 182 .bggray2 { 183 background: #EFEFEF; 184 FONT-SIZE: 13px; 185 FONT-FAMILY: Helvetica; 186 border: 1px; 187 } 188 189 bggray3 { 190 background: #EFEFEF; 191 FONT-SIZE: 10px; 192 FONT-FAMILY: Helvetica; 193 text-align: left 194 } 195 196 .bgw { 197 background: #ffffff; 198 FONT-SIZE: 13px; 199 FONT-FAMILY: Helvetica; 200 border: 1px; 201 202 } 203 .td-130 { 204 float: right; 205 margin: 0px 0 0 1px; 206 width: 130px; 207 border: none; 208 background-color: #d2d2d2; 209 padding: 0px; 210 211 } 212 .td-130c { 213 float: right; 214 text-align:left; 215 margin: 0px 0 0 1px; 216 width: 130px; 217 border: none; 218 padding: 0px; 219 } 220 221 td { 222 border: .2px; 223 } 224 .red { 225 BACKGROUND: none; 226 COLOR: #ff0000; 227 FONT-SIZE: 12px; 228 FONT-FAMILY: Helvetica 229 } 230 .copy { 231 background: #d2d2d2; 232 FONT-SIZE: 8px; 233 FONT-FAMILY: Helvetica; 234 border: 1px; 235 } 236 .cen { 237 margin: 10px auto 0 auto; 238 } 239 --> 240 </style>"; 241 242 120 echo $html; 121 }else{ 122 $style =" 123 <style type=\"text/css\"> 124 <!-- 125 .table-docs { 126 font-size: 12px; 127 text-align:center; 128 border: 1px; 129 border-color: black; 130 margin: auto; 131 border-collapse: collapse; 132 } 133 .bggray { 134 background: #d2d2d2; 135 FONT-SIZE: 16px; 136 FONT-FAMILY: Helvetica; 137 border: 1px; 138 border-spacing: 5px; 139 } 140 141 .bggray2 { 142 background: #EFEFEF; 143 FONT-SIZE: 13px; 144 FONT-FAMILY: Helvetica; 145 text-align: center; 146 border-spacing: 5px; 147 } 148 149 bggray3 { 150 background: #EFEFEF; 151 FONT-SIZE: 10px; 152 FONT-FAMILY: Helvetica; 153 text-align: left 154 } 155 156 .bgw { 157 background: #ffffff; 158 FONT-SIZE: 13px; 159 FONT-FAMILY: Helvetica; 160 border: 1px; 161 text-align: center; 162 border-spacing: 5px; 163 } 164 .td-130 { 165 float: right; 166 margin: 0px 0 0 1px; 167 width: 130px; 168 border: 1px; 169 background-color: #d2d2d2; 170 padding: 0px; 171 } 172 .td-130c { 173 float: right; 174 text-align:left; 175 margin: 0px 0px 0px 1px; 176 width: 130px; 177 border: 1px; 178 179 } 180 181 td { 182 border: 2px; 183 } 184 .red { 185 BACKGROUND: none; 186 COLOR: #ff0000; 187 FONT-SIZE: 12px; 188 FONT-FAMILY: Helvetica 189 } 190 .copy { 191 background: #d2d2d2; 192 FONT-SIZE: 8px; 193 FONT-FAMILY: Helvetica; 194 border: 1px; 195 } 196 .cen { 197 margin: 10px auto 0 auto; 198 } 199 --> 200 </style>"; 243 201 # salva sull'hardisk lo stemma del comune 244 202 $logo=verificasimbolo(); 245 203 $immagine= "<img src=\"modules/Elezioni/images/$logo\" alt=\"logo\" align=\"left\"/>"; 246 247 248 $style .="<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>$immagine</td> "; 249 250 $style .= "<td border=0>$datipdf</td></tr></table><br/><br/>"; 251 $style .= "<table style=\"margin: auto;\"><tr><td>$html</td></tr></table>"; 252 $style .= "<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>"; 253 254 $data=date("d-m-y G:i"); 255 $style .="<br/><span class=\"copy\"><i>Stampato il $data</i></span>"; 256 $style .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>"; 257 $style .="</td></tr></table>"; 258 $nomefile=strip_tags($datipdf).".pdf"; 259 # $nomefile=$_SESSION['nomefile'].".pdf"; 260 $nomefile=str_replace(" ", "_",$nomefile); 261 // conversion HTML => PDF 262 //$nomefile="elezioni_tabelle.pdf"; 263 //$orienta="P"; 264 $html2pdf = new Html2Pdf($orienta,$formato, 'it'); 265 $html2pdf->WriteHTML($style, isset($_GET['vuehtml'])); 266 $html2pdf->Output($nomefile); 267 268 269 270 } 271 272 273 274 275 } 204 $style .="<table style=\"margin: auto;border-collapse: collapse;text-align: center;\"><tr><td border=0>$immagine</td></tr></table> "; 205 # $style .= "<tr style=\"border-spacing: 25px;\"><td>$datipdf</td></tr></table><br/><br/>"; 206 $style .= "<br/>".$html; 207 # $style .= "<table style=\"margin: auto;\"><tr><td>$html</td></tr></table>"; 208 $style .= "<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>"; 209 $data=date("d-m-y G:i"); 210 $style .="<br/><span class=\"copy\"><i>Stampato il $data</i></span>"; 211 $style .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>"; 212 $style .="</td></tr></table>"; 213 $nomefile=strip_tags($datipdf).".pdf"; 214 $nomefile=str_replace(" ", "_",$nomefile); 215 // conversion HTML => PDF 216 $html2pdf = new Html2Pdf($orienta,$formato, 'it'); 217 $html2pdf->WriteHTML($style, isset($_GET['vuehtml'])); 218 $html2pdf->Output($nomefile); 219 } 220 } 276 221 } 277 222 … … 280 225 281 226 227 282 228 ?> -
trunk/client/modules/Elezioni/crea_paginaphp7.php
r354 r371 24 24 25 25 function crea_tabella($ar) { 26 27 28 global $prefix,$dbi,$pdf,$csv,$xls,$lang,$descr_cons,$prefix,$dbi,$id_comune,$descrizione,$siteistat,$min,$offset,$minsez,$offsetsez,$datipdf,$orienta,$formato; 29 $sql="SELECT descrizione,simbolo,stemma FROM ".$prefix."_ele_comuni where id_comune='$id_comune' "; 26 global $prefix,$dbi,$pdf,$csv,$xls,$lang,$descr_cons,$prefix,$dbi,$id_comune,$descrizione,$siteistat,$min,$offset,$minsez,$offsetsez,$datipdf,$orienta,$formato; 27 $sql="SELECT descrizione,simbolo,stemma FROM ".$prefix."_ele_comuni where id_comune='$id_comune' "; 30 28 $res = $dbi->prepare("$sql"); 31 29 $res->execute(); 32 33 30 list($descr_com,$simbolo,$stemma) = $res->fetch(PDO::FETCH_NUM); 34 35 36 37 $datipdf=stripslashes($datipdf); 38 39 $data=date("d-m-y G:i"); 40 41 if ($xls==1) { 42 43 $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls"); 44 # $nomefile=$_SESSION['nomefile'].".xls"; 45 header ("Content-Type: application/vnd.ms-excel"); 46 header ("Content-Disposition: inline; filename=$nomefile"); 47 48 $datipdf=str_replace("<br/>","\n",$datipdf); 49 50 $datipdf=strip_tags($datipdf); 51 // $cella=str_replace("</b>"," ",$cella); 52 // $cella=str_replace("<br />"," ",$cella); 53 54 55 echo "$datipdf"; 56 57 $y=1;$i='';$e=''; 31 $datipdf=stripslashes($datipdf); 32 $data=date("d-m-y G:i"); 33 if ($xls==1) { 34 $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls"); 35 header ("Content-Type: application/vnd.ms-excel"); 36 header ("Content-Disposition: inline; filename=$nomefile"); 37 $datipdf=str_replace("<br/>","\n",$datipdf); 38 $datipdf=strip_tags($datipdf); 39 echo "$datipdf"; 40 $y=1;$i='';$e=0; 58 41 foreach ($ar as $riga) { 59 $e++;60 42 $e++; 43 if($y) { 61 44 echo "\n"; 62 45 }else{ 63 64 echo "\n"; 65 66 } 67 68 46 echo "\n"; 47 } 69 48 foreach ($riga as $cella) { 70 $cella=str_replace("<b>"," ",$cella); 71 $cella=str_replace("</b>"," ",$cella); 72 $cella=str_replace("<br>"," ",$cella); 73 $cella=str_replace("<br />"," ",$cella); 74 $cella=str_replace("<span class=\"red\"><i>"," - ",$cella); 75 $cella=str_replace("<span class=\"red\" style=\"font-size:80%;\"><i>"," - ",$cella); 76 $cella=str_replace("</span>%</i>","%",$cella); 77 $cella=str_replace("</i></span>","",$cella); 78 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 79 $cella=str_replace("_SEZIONI","Sezione ",$cella); 80 $cella=str_replace("_TOT","Totale",$cella); 81 $cella=str_replace("_COMPLESSIVO","Complessivo",$cella); 82 83 echo "$cella \t"; 84 85 86 } 87 if ($y) $y=0; 88 89 } 90 91 echo"\n\n\nPowered by Eleonline http://www.eleonline.it \t \n"; 92 echo"by luciano apolito & roberto gigli - stampato: $data \t \n"; 93 die(); 94 95 }else{ 96 97 98 99 $bg='bgw'; 100 101 $tmpbg='bggray2'; 102 $tmpbg1='bgw'; 103 $tmpbg2='bggray'; 104 $tmpbg3='bggray2'; 105 106 $html =''; 107 if ($pdf!="1" && $csv=="1") 108 { 109 110 $html .="<center><table><tr><td> 111 <img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" align=\"left\" alt=\"logo\" /> "; 112 $html .= "</td><td>$datipdf</td></td></table>"; 49 $cella=str_replace("<b>"," ",$cella); 50 $cella=str_replace("</b>"," ",$cella); 51 $cella=str_replace("<br>"," ",$cella); 52 $cella=str_replace("<br />"," ",$cella); 53 $cella=str_replace("<span class=\"red\"><i>"," - ",$cella); 54 $cella=str_replace("<span class=\"red\" style=\"font-size:80%;\"><i>"," - ",$cella); 55 $cella=str_replace("</span>%</i>","%",$cella); 56 $cella=str_replace("</i></span>","",$cella); 57 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 58 $cella=str_replace("_SEZIONI","Sezione ",$cella); 59 $cella=str_replace("_TOT","Totale",$cella); 60 $cella=str_replace("_COMPLESSIVO","Complessivo",$cella); 61 echo "$cella \t"; 62 } 63 if ($y) $y=0; 64 } 65 echo"\n\n\nPowered by Eleonline http://www.eleonline.it \t \n"; 66 echo"by luciano apolito & roberto gigli - stampato: $data \t \n"; 67 die(); 68 }else{ 69 $bg='bgw'; 70 $tmpbg='bggray2'; 71 $tmpbg1='bgw'; 72 $tmpbg2='bggray'; 73 $tmpbg3='bggray2'; 74 $html =''; 75 if ($pdf!="1" && $csv=="1") 76 { 77 $html .="<center><table><tr><td> 78 <img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" align=\"left\" alt=\"logo\" /> "; 79 # $html .= "</td><td>$datipdf"; 80 $html .= "</td></tr></table>"; 113 81 } 114 115 116 117 $html .= "<table class=\"table-docs\">"; 118 119 120 121 122 $y=1;$i='';$e=''; 82 $html .= "<p style=\"text-align:center;\">$datipdf</p>"; 83 $html .= "<table class=\"table-docs\">"; 84 $y=1;$e=0; 123 85 foreach ($ar as $riga) { 124 $e++; 86 $e++; 87 $i=1; 125 88 if($y) { 126 89 $html .= "<tr class=\"bggray\">"; … … 128 91 $bg= ($bg==$tmpbg) ? $tmpbg1:$tmpbg3; 129 92 $html .= "<tr class=\"$bg\">"; 130 $i="class=\"td-150c\"";131 93 } 132 94 foreach ($riga as $cella) { 133 134 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 135 $cella=str_replace("_SEZIONI","Sezione ",$cella); 136 $cella=str_replace("_TOT","Totale",$cella); 137 $cella=str_replace("_COMPLESSIVO","",$cella); 138 139 if ($e==1){ 140 $t="<td";$f="</td>"; 141 }else{ 142 $t="<td";$f="</td>"; 143 } 144 $html .= "$t $i>$cella $f"; 145 $i="class=\"td-150b\""; 146 95 if($cella) { 96 $cella=str_replace("_CIRCOS","Circoscrizione ",$cella); 97 $cella=str_replace("_SEZIONI","Sezione ",$cella); 98 $cella=str_replace("_TOT","Totale",$cella); 99 $cella=str_replace("_COMPLESSIVO","",$cella); 100 } 101 if ($e==1){ 102 $t="<td";$f="</td>"; 103 }elseif($i){ 104 $t="<td style='text-align:left;'";$f="</td>"; 105 }else{ 106 $t="<td";$f="</td>"; 107 } 108 $html .= "$t >$cella $f"; 109 $i=0; 147 110 } 148 111 if ($y) $y=0; … … 150 113 } 151 114 $html .= "</table>"; 152 153 154 115 if ($pdf!="1" && $csv=="1"){ 155 156 157 116 $html .="<br/><span class=\"copy\"><i>Stampato: $data</i></span>"; 117 $html .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>"; 118 $html .="</center><br />"; 158 119 } 159 120 160 121 # inizio stampa a video o pdf 161 162 163 122 if ($pdf!='1'){ 164 echo $html; 165 }else{ 166 167 # padding: 1px; 168 # border: solid #666666; border-color: black; 169 170 /* margin: 4px 4px 40px;*/ 171 172 $style =" 173 <style type=\"text/css\"> 174 <!-- 175 .table-docs { 176 font-size: 10px; 177 text-align:center; 178 border: 1px; 179 border-color: black; 180 } 181 .bggray { 182 background: #d2d2d2; 183 FONT-SIZE: 13px; 184 FONT-FAMILY: Helvetica; 185 } 186 187 .bggray2 { 188 background: #EFEFEF; 189 FONT-SIZE: 13px; 190 FONT-FAMILY: Helvetica; 191 } 192 193 bggray3 { 194 background: #EFEFEF; 195 FONT-SIZE: 10px; 196 FONT-FAMILY: Helvetica; 197 text-align: left 198 } 199 200 .bgw { 201 background: #ffffff; 202 FONT-SIZE: 13px; 203 FONT-FAMILY: Helvetica; 204 border: 1px; 205 206 } 207 .td-130 { 208 float: right; 209 margin: 0px 0 0 1px; 210 width: 130px; 211 border: 1px; 212 background-color: #d2d2d2; 213 padding: 0px; 214 } 215 .td-130c { 216 float: right; 217 text-align:left; 218 margin: 0px 0px 0px 1px; 219 width: 130px; 220 border: 1px; 221 222 } 223 224 td { 225 border: 2px; 226 } 227 .red { 228 BACKGROUND: none; 229 COLOR: #ff0000; 230 FONT-SIZE: 12px; 231 FONT-FAMILY: Helvetica 232 } 233 .copy { 234 background: #d2d2d2; 235 FONT-SIZE: 8px; 236 FONT-FAMILY: Helvetica; 237 border: 1px; 238 } 239 .cen { 240 margin: 10px auto 0 auto; 241 } 242 --> 243 </style>"; 244 245 123 echo $html; 124 }else{ 125 $style =" 126 <style type=\"text/css\"> 127 <!-- 128 .table-docs { 129 font-size: 12px; 130 text-align:center; 131 border: 1px; 132 border-color: black; 133 margin: auto; 134 border-collapse: collapse; 135 } 136 .bggray { 137 background: #d2d2d2; 138 FONT-SIZE: 16px; 139 FONT-FAMILY: Helvetica; 140 border: 1px; 141 border-spacing: 5px; 142 } 143 144 .bggray2 { 145 background: #EFEFEF; 146 FONT-SIZE: 13px; 147 FONT-FAMILY: Helvetica; 148 text-align: center; 149 border-spacing: 5px; 150 } 151 152 bggray3 { 153 background: #EFEFEF; 154 FONT-SIZE: 10px; 155 FONT-FAMILY: Helvetica; 156 text-align: left 157 } 158 159 .bgw { 160 background: #ffffff; 161 FONT-SIZE: 13px; 162 FONT-FAMILY: Helvetica; 163 border: 1px; 164 text-align: center; 165 border-spacing: 5px; 166 } 167 .td-130 { 168 float: right; 169 margin: 0px 0 0 1px; 170 width: 130px; 171 border: 1px; 172 background-color: #d2d2d2; 173 padding: 0px; 174 } 175 .td-130c { 176 float: right; 177 text-align:left; 178 margin: 0px 0px 0px 1px; 179 width: 130px; 180 border: 1px; 181 182 } 183 184 td { 185 border: 2px; 186 } 187 .red { 188 BACKGROUND: none; 189 COLOR: #ff0000; 190 FONT-SIZE: 12px; 191 FONT-FAMILY: Helvetica 192 } 193 .copy { 194 background: #d2d2d2; 195 FONT-SIZE: 8px; 196 FONT-FAMILY: Helvetica; 197 border: 1px; 198 } 199 .cen { 200 margin: 10px auto 0 auto; 201 } 202 --> 203 </style>"; 246 204 # salva sull'hardisk lo stemma del comune 247 205 $logo=verificasimbolo(); 248 206 $immagine= "<img src=\"modules/Elezioni/images/$logo\" alt=\"logo\" align=\"left\"/>"; 249 250 251 $style .="<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>$immagine</td> "; 252 253 $style .= "<td border=0>$datipdf</td></tr></table><br/><br/>"; 254 $style .= "<table style=\"margin: auto;\"><tr><td>$html</td></tr></table>"; 255 $style .= "<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>"; 256 257 $data=date("d-m-y G:i"); 258 $style .="<br/><span class=\"copy\"><i>Stampato il $data</i></span>"; 259 $style .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>"; 260 $style .="</td></tr></table>"; 261 $nomefile=strip_tags($datipdf).".pdf"; 262 # $nomefile=$_SESSION['nomefile'].".pdf"; 263 $nomefile=str_replace(" ", "_",$nomefile); 264 // conversion HTML => PDF 265 //$nomefile="elezioni_tabelle.pdf"; 266 //$orienta="P"; 267 $html2pdf = new Html2Pdf($orienta,$formato, 'it'); 268 $html2pdf->WriteHTML($style, isset($_GET['vuehtml'])); 269 $html2pdf->Output($nomefile); 270 271 272 273 } 274 275 276 277 278 } 207 $style .="<table style=\"margin: auto;border-collapse: collapse;text-align: center;\"><tr><td border=0>$immagine</td></tr></table> "; 208 # $style .= "<tr style=\"border-spacing: 25px;\"><td>$datipdf</td></tr></table><br/><br/>"; 209 $style .= "<br/>".$html; 210 # $style .= "<table style=\"margin: auto;\"><tr><td>$html</td></tr></table>"; 211 $style .= "<table style=\"margin: auto;border-collapse: collapse;\"><tr><td border=0>"; 212 $data=date("d-m-y G:i"); 213 $style .="<br/><span class=\"copy\"><i>Stampato il $data</i></span>"; 214 $style .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>"; 215 $style .="</td></tr></table>"; 216 $nomefile=strip_tags($datipdf).".pdf"; 217 $nomefile=str_replace(" ", "_",$nomefile); 218 // conversion HTML => PDF 219 $html2pdf = new Html2Pdf($orienta,$formato, 'it'); 220 $html2pdf->WriteHTML($style, isset($_GET['vuehtml'])); 221 $html2pdf->Output($nomefile); 222 } 223 } 279 224 } 280 225 -
trunk/client/modules/Elezioni/grafici.php
r368 r371 48 48 49 49 // barre 50 $l_size = getimagesize("modules/Elezioni/images/barre/leftbar. gif");51 $m_size = getimagesize("modules/Elezioni/images/barre/mainbar. gif");52 $r_size = getimagesize("modules/Elezioni/images/barre/rightbar. gif");53 $l_size2 = getimagesize("modules/Elezioni/images/barre/leftbar2. gif");54 $m_size2 = getimagesize("modules/Elezioni/images/barre/mainbar2. gif");55 $r_size2 = getimagesize("modules/Elezioni/images/barre/rightbar2. gif");50 $l_size = getimagesize("modules/Elezioni/images/barre/leftbar.jpg"); 51 $m_size = getimagesize("modules/Elezioni/images/barre/mainbar.jpg"); 52 $r_size = getimagesize("modules/Elezioni/images/barre/rightbar.jpg"); 53 $l_size2 = getimagesize("modules/Elezioni/images/barre/leftbar2.jpg"); 54 $m_size2 = getimagesize("modules/Elezioni/images/barre/mainbar2.jpg"); 55 $r_size2 = getimagesize("modules/Elezioni/images/barre/rightbar2.jpg"); 56 56 // totali 57 57 … … 98 98 echo "<td>$voti_t</td><td>$perc %</td><td>$numero</td></tr></table>"; 99 99 // barre 100 echo "<table><tr><td><table><tr><td> "._VOTANTI." : </td><td><img src=\"modules/Elezioni/images/barre/leftbar2. gif\" height=\"$l_size2[1]\" width=\"$l_size2[0]\" alt=\"votanti\" /><img src=\"modules/Elezioni/images/barre/mainbar2.gif\" alt=\"votanti\" height=\"$m_size2[1]\" width=\"". ($perc * 2)."\" /><img src=\"modules/Elezioni/images/barre/rightbar2.gif\" height=\"$r_size2[1]\" width=\"$r_size2[0]\" alt=\"votanti\" /><span class=\"red\"> $perc</span> % ($voti_t)<br /></td></tr>\n";100 echo "<table><tr><td><table><tr><td> "._VOTANTI." : </td><td><img src=\"modules/Elezioni/images/barre/leftbar2.jpg\" height=\"$l_size2[1]\" width=\"$l_size2[0]\" alt=\"votanti\" /><img src=\"modules/Elezioni/images/barre/mainbar2.jpg\" alt=\"votanti\" height=\"$m_size2[1]\" width=\"". ($perc * 2)."\" /><img src=\"modules/Elezioni/images/barre/rightbar2.jpg\" height=\"$r_size2[1]\" width=\"$r_size2[0]\" alt=\"votanti\" /><span class=\"red\"> $perc</span> % ($voti_t)<br /></td></tr>\n"; 101 101 $tot_gen=$tot; 102 echo "<tr><td> "._AVENTI.": </td><td><img src=\"modules/Elezioni/images/barre/leftbar. gif\" height=\"$l_size[1]\" width=\"$l_size[0]\" alt=\"elettori\" /><img src=\"modules/Elezioni/images/barre/mainbar.gif\" alt=\"elettori\" height=\"$m_size[1]\" width=\"".(100 * 2)."\" /><img src=\"modules/Elezioni/images/barre/rightbar.gif\" height=\"$r_size[1]\" width=\"$r_size[0]\" alt=\"elettori\" /> 100 % ($tot_gen)</td></tr></table>";102 echo "<tr><td> "._AVENTI.": </td><td><img src=\"modules/Elezioni/images/barre/leftbar.jpg\" height=\"$l_size[1]\" width=\"$l_size[0]\" alt=\"elettori\" /><img src=\"modules/Elezioni/images/barre/mainbar.jpg\" alt=\"elettori\" height=\"$m_size[1]\" width=\"".(100 * 2)."\" /><img src=\"modules/Elezioni/images/barre/rightbar.jpg\" height=\"$r_size[1]\" width=\"$r_size[0]\" alt=\"elettori\" /> 100 % ($tot_gen)</td></tr></table>"; 103 103 echo "</td></tr></table>"; 104 104 } … … 442 442 left join ".$prefix."_ele_voti_$tab as t2 on (t1.id_lista=t2.id_lista) 443 443 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1 444 group by t 2.id_lista444 group by t1.id_lista,t1.num_lista,t1.descrizione 445 445 order by somma desc"; 446 446 $res = $dbi->prepare("$sql"); -
trunk/client/modules/Elezioni/gruppo.php
r356 r371 252 252 $res_cand->execute(); 253 253 254 if ($circo) $condcirc="and t5.id_circ=$id_circ"; 254 if ($circo) {$condcirc="and t5.id_circ=$id_circ";$condcircdes="and t2.id_circ=$id_circ";} 255 $sqldesc="select '','', t1.num_cand, concat(t1.cognome,' ', t1.nome) as nome, '','','','','','' 256 from ".$prefix."_ele_candidati as t1, ".$prefix."_ele_lista as t2 257 where t1.id_lista=$id_lista 258 and t1.id_lista=t2.id_lista 259 and t1.id_cons=$id_cons 260 order by t1.num_cand"; 255 261 256 262 $sqlvoti="select $tab2, t1.num_cand, concat(t1.cognome,' ', t1.nome) as nome, sum(t2.voti),'','','','','' … … 310 316 if ($votog) $votigl=" (t3.validi_lista),(t3.nulli),(t3.bianchi),(t3.contestati),(t3.voti_nulli_lista+t3.voti_nulli)"; 311 317 else $votigl=" sum(t3.validi_lista),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati_lista),sum(t3.voti_nulli_lista+t3.voti_nulli)"; 318 319 $sqldesc="select '','', $t.num_$tab15, $t.descrizione, '', '','','','','' 320 from 321 ".$prefix."_ele_$tab as t1 322 where t1.id_cons=$id_cons 323 $condcirc 324 order by t1.num_$tab15"; 325 #include("TEST:$sqldesc"); 312 326 $sqlvoti="select $tab2, $t.num_$tab15, $t.descrizione, sum(t2.voti), $votigl 313 327 from … … 470 484 $_SESSION['nomefile']=strip_tags(str_replace(" ", "_", $nomefile)); 471 485 $datipdf="<b>"._COMUNE." $descr_comune</b> - "._RISULTATI.": $descr_cons<br/><b>$pagina</b><br/><br/> $list1 $list2 $list3 "; 486 $datipdf=str_replace("("," ",$datipdf); 487 $datipdf=str_replace(")"," ",$datipdf); 472 488 # verificare la stampa sulle circoscrizioni 473 489 echo "<div style=\"text-align:right;width:65%;margin-left:10px;margin-right:0px;font-size:12px; \">"; … … 653 669 # if($res_voti->rowCount()) { 654 670 $res_voti = $dbi->prepare("$sqlvoti"); 655 $res_voti->execute(); 671 $res_voti->execute(); 672 if (!$res_voti->rowCount()) { 673 $res_voti = $dbi->prepare("$sqldesc"); 674 $res_voti->execute(); 675 #include("TEST: $sqldesc"); 676 } 656 677 #} 657 678 658 while (list($num_circ,$desc_circ,$num_cand,$nome,$voti,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = $res_voti->fetch(PDO::FETCH_NUM)){ 679 while (list($num_circ,$desc_circ,$num_cand,$nome,$voti,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = $res_voti->fetch(PDO::FETCH_NUM)){ 659 680 if($num_cand<$min or $num_cand>$offset) continue; 660 681 if($genere==4) $sevalidi=$voti; 661 682 662 683 if (!isset($temp[$num_cand])) $temp[$num_cand]=0; 663 $temp[$num_cand]+= $voti;684 $temp[$num_cand]+=intval($voti); 664 685 $z=array_search($num_circ, $pos); 665 if (!$z) continue;686 if (!$z) $z=$minpos; #continue; 666 687 if ($num_cand>=$min and $num_cand<=$offset){ 667 if( $num_circ>=$minpos and $num_circ <=$maxpos){688 if(($num_circ>=$minpos and $num_circ <=$maxpos) or $num_circ==''){ 668 689 $ar[0][$num_cand]=$num_cand.") ".$nome; 669 690 if ($desc_circ && $onetime!=$desc_circ) {$ar[($z)][0].=") ".$desc_circ; $onetime=$desc_circ;} … … 679 700 if (!strstr( $op,'candidato')){ 680 701 if (!isset($tempar[$num_cand])) $tempar[$num_cand]=0; 681 $tempar[$num_cand]+= $voti;702 $tempar[$num_cand]+=intval($voti); 682 703 } 683 704 if ($visvot!='cand'){ … … 814 835 815 836 } 816 837 if(!$id_gruppo) $id_gruppo=0; 817 838 $sql="select num_gruppo,descrizione from ".$prefix."_ele_gruppo where id_gruppo=$id_gruppo"; 818 839 $res_ref = $dbi->prepare("$sql"); … … 833 854 $res->execute(); 834 855 835 if($res) $num_sez=$res->rowCount(); else $num_sez=0; 836 if($res_ref) list($num_gruppo,$descr)= $res_ref->fetch(PDO::FETCH_NUM); else {$num_gruppo=0;$descr='';} 837 856 if($res->rowCount()) $num_sez=$res->rowCount(); 857 else 858 { 859 $num_sez=0; 860 } 861 if($res_ref->rowCount()) list($num_gruppo,$descr)= $res_ref->fetch(PDO::FETCH_NUM); else {$num_gruppo=0;$descr='';} 838 862 if (!$csv){ 839 863 # stampa … … 841 865 $datipdf="<b>"._COMUNE." $descr_comune</b> - "._RISULTATI.": $descr_cons<br/><b>$pagina</b><br/><br/> "; 842 866 $datipdf .="<br/><b>Referendum n. ".$num_gruppo." </b><br/>".$descr.""; 867 $datipdf=str_replace('"',"'",$datipdf); 843 868 echo "<div style=\"text-align:right;width:900px;margin-left:10px;margin-right:20px;font-size:12px \">"; 844 869 echo "<table style=\"text-align:center;margin-right:0px;border-top : 1px solid Blue;width: 140px;\"><tr style=\" background:#eceff5;\"><td>"._ESPORTA."<br />"; … … 850 875 851 876 852 echo "<img class=\"image\" src=\"modules/Elezioni/images/rss.png\" alt=\"Export rss\" />";877 echo "<img class=\"image\" src=\"modules/Elezioni/images/rss.png\" alt=\"Export rss\" />"; 853 878 854 879 echo " </td></tr>"; … … 919 944 920 945 if (!$csv)echo "<b>Referendum n. ".$num_gruppo." </b><br />".$descr.""; 946 # die("TEST: $csv - $num_gruppo - $descr"); 921 947 922 948 $y=1; … … 928 954 $ar[0][5]=_BIANCHI; 929 955 $ar[0][6]=_CONTESTATI; 930 if($res_ref )956 if($res_ref->rowCount()) 931 957 while (list($num_gruppo,$desc_ref) = $res_ref->fetch(PDO::FETCH_NUM)){ 932 958 $ar[0][$i++]= $num_gruppo.") ".$desc_ref; … … 941 967 $tot_bi=0; 942 968 $tot_co=0; 943 if($res )969 if($res->rowCount()) 944 970 while (list($num_circ,$desc_circ,$num_gruppo,$desc_ref,$simbolo,$si,$no,$validi,$nulli,$bianchi, $contestati) = $res->fetch(PDO::FETCH_NUM)){ 945 971 $i=1; -
trunk/client/modules/Elezioni/index.php
r370 r371 153 153 echo "<img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" alt=\"logo\" />"; 154 154 }else{ 155 echo "<img src=\"modules/Elezioni/images/logo.gif\" alt=\"logo\" />";155 echo "<img src=\"modules/Elezioni/images/logo.gif\" alt=\"logo\" height=\"100\" />"; 156 156 } 157 157 … … 459 459 $res1->execute(); 460 460 list($ind) = $res1->fetch(PDO::FETCH_NUM); 461 $indir=str_replace(" ","+",$ind." +".$descr_com."+".$cap);461 $indir=str_replace(" ","+",$ind.",+".$descr_com.",+".$cap); 462 462 echo "<br /><div><a href=\"https://maps.google.it/maps/place/".$indir."\"><img src=\"modules.php?name=Elezioni&file=foto&id_sede=".$id_sede."\" alt=\"mappa\" /></a></div>"; 463 463 }elseif($id_sede!='0' && $googlemaps=='1'){ … … 790 790 }else {$var1="";} 791 791 }else{ //referendum 792 $sql="select sum(si),sum(no),sum(validi),sum(bianchi),sum(nulli),sum(contestati) 792 $sql="select sum(si),sum(no),sum(validi),sum(bianchi),sum(nulli),sum(contestati) from ".$prefix."_ele_voti_ref where id_cons='$id_cons' and id_gruppo='$id_gruppo2'"; 793 793 $res_ref = $dbi->prepare("$sql"); 794 794 $res_ref->execute(); 795 list($voti_si,$voti_no,$validi,$bianchi,$nulli,$conte) = $res_ref->fetch(PDO::FETCH_NUM); 796 $sql="select t3.orario,t3.data from ".$prefix."_ele_rilaff as t1 left join ".$prefix."_ele_cons_comune as t2 on t1.id_cons_gen=t2.id_cons_gen left join ".$prefix."_ele_voti_parziale as t3 on t2.id_cons=t3.id_cons where t1.id_cons_gen='$id_cons_gen' and t2.id_cons='$id_cons' order by t3.data desc, t3.orario desc limit 0,1"; 797 $aff = $dbi->prepare("$sql"); 798 $aff->execute(); 799 list($ora,$data) = $aff->fetch(PDO::FETCH_NUM); 800 $sql="select sum(voti_complessivi) from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' and orario='$ora' and data='$data' and id_gruppo='$id_gruppo2'"; 801 $tot_rel = $dbi->prepare("$sql"); 802 $tot_rel->execute(); 803 list($tot_relativo) = $tot_rel->fetch(PDO::FETCH_NUM); 795 if($res_ref->rowCount()) 796 list($voti_si,$voti_no,$validi,$bianchi,$nulli,$conte) = $res_ref->fetch(PDO::FETCH_NUM); 797 if(($voti_si+$voti_no+$validi+$bianchi+$nulli+$conte)>0) 798 { 799 $sql="select t3.orario,t3.data from ".$prefix."_ele_rilaff as t1 left join ".$prefix."_ele_cons_comune as t2 on t1.id_cons_gen=t2.id_cons_gen left join ".$prefix."_ele_voti_parziale as t3 on t2.id_cons=t3.id_cons where t1.id_cons_gen='$id_cons_gen' and t2.id_cons='$id_cons' order by t3.data desc, t3.orario desc limit 0,1"; 800 $aff = $dbi->prepare("$sql"); 801 $aff->execute(); 802 list($ora,$data) = $aff->fetch(PDO::FETCH_NUM); 803 $sql="select sum(voti_complessivi) from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' and orario='$ora' and data='$data' and id_gruppo='$id_gruppo2'"; 804 $tot_rel = $dbi->prepare("$sql"); 805 $tot_rel->execute(); 806 list($tot_relativo) = $tot_rel->fetch(PDO::FETCH_NUM); 807 }else{ 808 $voti_si=0;$voti_no=0;$validi=0;$bianchi=0;$nulli=0;$conte=0;$tot_relativo=0; 809 } 804 810 // totale assoluto 805 811 $sql="select sum(maschi+femmine) from ".$prefix."_ele_sezioni where id_cons='$id_cons'"; … … 811 817 if($tot_assoluto) 812 818 $perc_tot=number_format(($tot_relativo*100)/$tot_assoluto,2); 813 819 else $perc_tot=0; 814 820 815 $tot_ref= 0;$tot_ref=$voti_si+$voti_no;821 $tot_ref=$voti_si+$voti_no; 816 822 if($tot_ref){ 817 $perc_si=number_format(($voti_si*100)/$tot_ref,2);818 $perc_no=number_format(($voti_no*100)/$tot_ref,2);823 $perc_si=number_format(($voti_si*100)/$tot_ref,2); 824 $perc_no=number_format(($voti_no*100)/$tot_ref,2); 819 825 }else{ $perc_si=0;$perc_no=0;} 820 826 $var1="<table class=\"table-80\" style=\"text-align: center;\">"; 821 if( $ora){827 if(isset($ora)){ 822 828 list ($ore,$minuti,$secondi)=explode(':',$ora); 823 829 $var1.= "<tr> -
trunk/client/modules/Elezioni/votanti.php
r348 r371 249 249 if (!($genere==4) and $pag==0){ //se non e' una lista uninominale ed e' la prima pagina 250 250 251 $tab="SELECT 0,t2.id_sez,t2.num_sez,t2.validi,'0','0',t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,'0',t2.voti_nulli FROM ".$prefix."_ele_sezioni as t2 left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede) where t2.id_cons='$id_cons' and t2.validi+t2.nulli+t2.bianchi+t2.contestati>0 group by t2.id_sez order by t2.num_sez ";251 $tab="SELECT 0,t2.id_sez,t2.num_sez,t2.validi,'0','0',t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,'0',t2.voti_nulli FROM ".$prefix."_ele_sezioni as t2 left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede) where t2.id_cons='$id_cons' and t2.validi+t2.nulli+t2.bianchi+t2.contestati>0 group by t2.id_sez,t2.num_sez,t2.validi,t2.nulli,t2.bianchi,t2.contestati, t4.id_circ,t2.id_sede,t2.voti_nulli order by t2.num_sez "; 252 252 253 253 }else{ // e' una lista uninominale o la seconda pagina … … 260 260 FROM ".$prefix."_ele_sezioni as t1 left join ".$prefix.$tab3." as t2 on (t1.id_sez=t2.id_sez) 261 261 left join ".$prefix."_ele_sede as t4 on (t1.id_sede=t4.id_sede) 262 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons group by t 2.id_sezorder by t1.num_sez ";262 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons group by t1.id_sez,t1.num_sez,t1.solo_gruppo,t1.solo_lista,t1.validi,t1.nulli,t1.bianchi,t1.contestati,t4.id_circ,t1.id_sede,t1.voti_nulli order by t1.num_sez "; 263 263 }else{ 264 264 … … 266 266 FROM ".$prefix."_ele_sezioni as t1 left join ".$prefix.$tab3." as t2 on (t1.id_sez=t2.id_sez) 267 267 left join ".$prefix."_ele_sede as t4 on (t1.id_sede=t4.id_sede) 268 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons group by t 2.id_sezorder by t1.num_sez ";268 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons group by t1.id_sez,t1.num_sez,t1.solo_gruppo,t1.validi,t1.nulli,t1.bianchi,t1.contestati,t4.id_circ,t1.id_sede,t1.voti_nulli order by t1.num_sez "; 269 269 } 270 270 } … … 509 509 header ("Content-Type: application/vnd.ms-excel"); 510 510 header ("Content-Disposition: inline; filename=$nomefile"); 511 511 header("Pragma: no-cache"); 512 header("Expires: 0"); 513 $datipdf = mb_convert_encoding($datipdf , "HTML-ENTITIES", "UTF-8"); 512 514 echo "$datipdf"; 513 515 echo "$html \n"; -
trunk/client/temi/Futura2/index.php
r265 r371 112 112 113 113 while(list($id,$descrizione) = $res->fetch(PDO::FETCH_NUM)) { 114 $descrizione=substr(str_replace("+"," ",$descrizione),0,30);114 # $descrizione=substr(str_replace("+"," ",$descrizione),0,30); 115 115 $sel = ($id == $id_cons_gen) ? "selected=\"selected\"":""; 116 116 echo "<option style=\"font-size:12px;\" value=\"$id\" $sel >$descrizione</option>"; -
trunk/client/versione.php
r370 r371 1 1 <?php 2 2 3 $versione = "3.0 rev 37 0";3 $versione = "3.0 rev 371"; 4 4 $version_number = $versione; 5 $datarel = "0 1 giugno2022";5 $datarel = "03 settembre 2022"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.