[231] | 1 | <?php
|
---|
| 2 | /************************************************************************/
|
---|
| 3 | /* Eleonline - Raccolta e diffusione dei dati elettorali */
|
---|
| 4 | /* by Luciano Apolito & Roberto Gigli */
|
---|
| 5 | /* http://www.eleonline.it */
|
---|
| 6 | /* info@eleonline.it luciano@aniene.net rgigli@libero.it */
|
---|
| 7 | /************************************************************************/
|
---|
| 8 |
|
---|
| 9 | $nometema=$tema;
|
---|
[265] | 10 | #require_once("class/db/db.php"); //classe db
|
---|
[231] | 11 | global $tema,$id_comune,$descr_cons,$genere,$tipo_cons,$multicomune;
|
---|
| 12 |
|
---|
| 13 | # colore tema mobile
|
---|
[253] | 14 |
|
---|
| 15 |
|
---|
[231] | 16 | include("temi/$tema/config.php");
|
---|
[253] | 17 |
|
---|
| 18 | #if($colortheme=='')$colortheme="c";
|
---|
[231] | 19 | # descrizione comune
|
---|
| 20 | if(!$id_comune or $id_comune=='') $id_comune=$siteistat;
|
---|
[265] | 21 | $sql="SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ";
|
---|
| 22 | $res = $dbi->prepare("$sql");
|
---|
| 23 | $res->execute();
|
---|
[231] | 24 |
|
---|
[265] | 25 | list($descr_com) = $res->fetch(PDO::FETCH_NUM);
|
---|
[231] | 26 |
|
---|
[265] | 27 |
|
---|
[231] | 28 | ####################################
|
---|
| 29 | function testata(){
|
---|
| 30 | ####################################
|
---|
| 31 |
|
---|
[265] | 32 | global $op,$tema,$dbi,$nometema,$file,$bgcolor,$sitename,$prefix,$blocco,$lang,$siteistat,$id_cons_gen,$descr_cons,$minsez,$offsetsez,$multicomune,$id_comune,$multicomune,$rss,$colortheme,$descr_com;
|
---|
[231] | 33 |
|
---|
| 34 | include("temi/$tema/function_theme.php");
|
---|
| 35 |
|
---|
| 36 | $numerodisezioni=numerodisezioni();
|
---|
| 37 |
|
---|
| 38 | $logo= "<img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" alt=\"logo\" width=\"70\" align=\"left\"/>";
|
---|
| 39 |
|
---|
[265] | 40 | $sql="SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ";
|
---|
| 41 | $res = $dbi->prepare("$sql");
|
---|
| 42 | $res->execute();
|
---|
| 43 |
|
---|
| 44 | list($descr_com) = $res->fetch(PDO::FETCH_NUM);
|
---|
[231] | 45 | $descr_com =stripslashes($descr_com);
|
---|
| 46 |
|
---|
| 47 | echo '
|
---|
| 48 | <div data-role="page" data-theme="a">
|
---|
| 49 | <div data-role="header" data-position="inline">';
|
---|
| 50 |
|
---|
| 51 | /*
|
---|
| 52 | if($op!="gruppo")
|
---|
| 53 | echo '<a href="#" onClick="javascript:history.back()" data-role="button" data-icon="arrow-left">indietro</a>';
|
---|
| 54 | else echo '<a href="modules.php?tema=facebook" target="_blank" data-icon="off" data-role="button">Vers Web</a>';
|
---|
| 55 | */
|
---|
| 56 | //
|
---|
| 57 | # se aperta o sezioni scrutinate
|
---|
| 58 | # se non Ú il menu di config o about sceglie elezione
|
---|
| 59 | if($numerodisezioni[0]>0 and $op!="conf_mob" and $op!="about"){
|
---|
| 60 | echo '<a href="#" data-role="button">sezioni <img src="modules/Elezioni/grafici/ledex1.php?sez='.$numerodisezioni[0].'&max='.$numerodisezioni[1].'" /></a><h2></h2>';
|
---|
| 61 | }else{
|
---|
| 62 | echo '<h2>Elezioni on line</h2>';
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | echo '<a href="modules.php?name=Elezioni&op=about&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-theme="c" data-icon="user">About</a>';
|
---|
| 66 |
|
---|
| 67 |
|
---|
| 68 | ####### menu in alto
|
---|
| 69 | # definizione attivo
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | if($op=="gruppo" ) $active_home=" class=\"ui-btn-active\""; else $active_home='';
|
---|
| 73 | if($op=="informazioni" || $op=="dati_generali" || $op=="come_si_vota" || $op=="numeri_mob" || $op=="servizi_mob") $active_info=" class=\"ui-btn-active\""; else $active_info='';
|
---|
| 74 | if($op=="risultati" || $op=="affluenze_all" || $op=="gruppo_mob" || $op=="candidato_mob" || $op=="liste_mob" || $op=="votanti_mob") $active_ris=" class=\"ui-btn-active\""; else $active_ris='';
|
---|
| 75 | if($op=="conf_mob" ) $active_conf=" class=\"ui-btn-active\""; else $active_conf='';
|
---|
| 76 | if($op=="grafica_mob" ) $active_graf=" class=\"ui-btn-active\""; else $active_graf='';
|
---|
| 77 |
|
---|
| 78 |
|
---|
| 79 |
|
---|
| 80 | echo ' <div data-role="navbar">
|
---|
| 81 | <ul>
|
---|
| 82 | <li><a href="modules.php?id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'?" data-icon="home" data-theme="'.$colortheme.'" '.$active_home.' >Home</a></li>
|
---|
| 83 | <li><a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-icon="file" data-theme="'.$colortheme.'" '.$active_info.' >Info</a></li>
|
---|
| 84 | <li><a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-icon="list" data-theme="'.$colortheme.'" '.$active_ris.' >Risultati</a></li>
|
---|
| 85 | <li><a href="modules.php?op=grafica_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'"" data-icon="th-large" data-theme="'.$colortheme.'" '.$active_graf.'>Grafica</a></li>
|
---|
| 86 | <li><a href="modules.php?op=conf_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-icon="cogs" data-theme="'.$colortheme.'" '.$active_conf.' >Opzioni</a></li>
|
---|
| 87 | </ul>
|
---|
| 88 | </div>
|
---|
| 89 | </div>';
|
---|
| 90 |
|
---|
| 91 |
|
---|
| 92 | # se non Ú il menu di config o about sceglie elezione
|
---|
| 93 | if($op!="conf_mob" and $op!="about"){
|
---|
| 94 | echo'<div data-role="fieldcontain" style="text-align:center;">
|
---|
| 95 | <span style="text-align:center;width:100%;height:110px;background-color:#fff;color:#000;">'.$logo.' Comune di '.$descr_com.'</span>';
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 |
|
---|
[265] | 99 | $sql="SELECT t1.id_cons_gen,t1.descrizione FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune='$id_comune' and t2.chiusa!='2' order by t1.data_fine desc";
|
---|
| 100 | $res = $dbi->prepare("$sql");
|
---|
| 101 | $res->execute();
|
---|
| 102 |
|
---|
| 103 | $esiste=$res->rowCount();
|
---|
[231] | 104 |
|
---|
| 105 | echo " <form method=\"post\" action=\"modules.php\">
|
---|
| 106 | <label for=\"consultazione\">
|
---|
| 107 |
|
---|
| 108 | <input id=\"modulo\" type=\"hidden\" name=\"name\" value=\"Elezioni\" />
|
---|
| 109 | <input type=\"hidden\" name=\"prima\" value=\"1\" />
|
---|
| 110 | <select name=\"id_cons_gen\" id=\"select-choice-a\"
|
---|
| 111 | onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen='+this.options[this.options.selectedIndex].value\">";
|
---|
| 112 |
|
---|
[265] | 113 | while(list($id,$descrizione) = $res->fetch(PDO::FETCH_NUM)) {
|
---|
[371] | 114 | # $descrizione=substr(str_replace("+"," ",$descrizione),0,30);
|
---|
[231] | 115 | $sel = ($id == $id_cons_gen) ? "selected=\"selected\"":"";
|
---|
| 116 | echo "<option style=\"font-size:12px;\" value=\"$id\" $sel >$descrizione</option>";
|
---|
| 117 | }
|
---|
| 118 |
|
---|
| 119 | echo '</select></label></form>
|
---|
| 120 |
|
---|
| 121 | </div>';
|
---|
| 122 | } # fine form scelta elezioni
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 |
|
---|
[249] | 126 | if($op=="gruppo")home();// leggi il file config.php
|
---|
[231] | 127 | elseif($op=="informazioni")info();
|
---|
| 128 | elseif($op=="affluenze")affluenze();
|
---|
| 129 | elseif($op=="dati_generali")dati_generali();
|
---|
| 130 | elseif($op=="risultati")risultati();
|
---|
| 131 | elseif($op=="grafica_mob")grafica_mob();
|
---|
| 132 | elseif($op=="come_si_vota")come_si_vota();
|
---|
| 133 | elseif($op=="numeri_mob")numeri_mob();
|
---|
| 134 | elseif($op=="servizi_mob")servizi_mob();
|
---|
| 135 | elseif($op=="affluenze_all")affluenze_all();
|
---|
| 136 | elseif($op=="gruppo_mob")gruppo_mob();
|
---|
| 137 | elseif($op=="candidato_mob")candidato_mob();
|
---|
| 138 | elseif($op=="liste_mob")liste_mob();
|
---|
| 139 | elseif($op=="votanti_mob")votanti_mob();
|
---|
| 140 | elseif($op=="conf_mob")conf_mob();
|
---|
| 141 | elseif($op=="about")about();
|
---|
| 142 | elseif($op=="grafvotanti_mob")grafvotanti_mob();
|
---|
| 143 | elseif($op=="grafgruppo")grafgruppo();
|
---|
| 144 | elseif($op=="grafsezione")grafsezione();
|
---|
| 145 |
|
---|
| 146 | footer_mon();
|
---|
| 147 |
|
---|
| 148 | die();
|
---|
| 149 | }
|
---|
| 150 |
|
---|
| 151 |
|
---|
| 152 | function footer_mon(){
|
---|
[407] | 153 | global $id_comune,$id_cons_gen,$tema,$colortheme,$rss,$prefix,$dbi;
|
---|
[231] | 154 |
|
---|
[407] | 155 | $sql="SELECT tema FROM `".$prefix."_config`";
|
---|
| 156 | $res = $dbi->prepare("$sql");
|
---|
| 157 | $res->execute();
|
---|
| 158 | list($deftema) = $res->fetch(PDO::FETCH_NUM);
|
---|
| 159 |
|
---|
[231] | 160 | echo '
|
---|
| 161 | <div data-role="footer" data-theme="a" style="marig:0 auto; text-align:center;">
|
---|
| 162 | <div data-role="footer" data-position="inline" data-icon="cogs">';
|
---|
| 163 |
|
---|
[244] | 164 | echo ' <h5><a href="http://www.eleonline.it" target="_blank">Eleonline</a> <span style="font-size:12px;"> di luciano apolito & roberto gigli</span></h5></div>';
|
---|
[251] | 165 |
|
---|
| 166 | if($tema=="Futura2")
|
---|
| 167 | //echo'<a href="backtoapp.html" data-rel="external" data-ajax="false">Chiudi</a>'; // per l'app precedente non piu usata
|
---|
[407] | 168 | echo ' <a href="modules.php?name=Elezioni&tema='.$deftema.'&nocell=1&op=gruppo&id_cons_gen='.$id_cons_gen.'" data-rel="external" data-ajax="false" >Versione Desktop</a>';
|
---|
[231] | 169 | else
|
---|
[407] | 170 | echo ' <a href="modules.php?name=Elezioni&tema=facebook&desktop=1&op=gruppo" data-rel="external" data-ajax="false" >Versione Desktop</a>';
|
---|
[251] | 171 | echo'</div>';
|
---|
[231] | 172 | }
|
---|
| 173 |
|
---|
| 174 |
|
---|
| 175 |
|
---|
| 176 | #######################################
|
---|
| 177 | ####################################### inizio funzioni menu
|
---|
| 178 | #######################################
|
---|
| 179 |
|
---|
| 180 |
|
---|
| 181 |
|
---|
| 182 | ############################ menu home page
|
---|
| 183 | function home(){
|
---|
| 184 | global $id_comune,$id_cons_gen,$tema,$colortheme;
|
---|
| 185 | //include("temi/$tema/config.php");
|
---|
| 186 |
|
---|
| 187 | echo '<div data-role="content" data-theme="a">
|
---|
| 188 | <a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Informazioni Elettorali</a>
|
---|
| 189 | <!-- <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="heart">Ultima Affluenza</a> -->
|
---|
| 190 | <a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Risultati Elettorali</a>
|
---|
| 191 | </div>';
|
---|
| 192 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 193 | //graf_gruppo_mob();
|
---|
| 194 | echo "</ul>";
|
---|
| 195 | echo '';
|
---|
| 196 |
|
---|
| 197 | }
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 |
|
---|
| 201 |
|
---|
| 202 |
|
---|
| 203 | ############################### menu informazioni
|
---|
| 204 | function info(){
|
---|
| 205 | global $id_comune,$id_cons_gen,$colortheme;
|
---|
| 206 | echo '
|
---|
| 207 | <div data-role="content" data-theme="a">
|
---|
| 208 | <a href="modules.php?op=dati_generali&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
| 209 | Dati Generali</a>
|
---|
| 210 | <a href="modules.php?op=come_si_vota&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
| 211 | Come si Vota</a>
|
---|
| 212 | <a href="modules.php?op=numeri_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
| 213 | Numeri Utili</a>
|
---|
| 214 | <a href="modules.php?op=servizi_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
| 215 | Servizi Utili</a>
|
---|
| 216 | </div>
|
---|
| 217 | ';
|
---|
| 218 |
|
---|
| 219 | }
|
---|
| 220 |
|
---|
| 221 | ####################################### menu risultati
|
---|
| 222 | function risultati(){
|
---|
[256] | 223 | global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme,$votoc;
|
---|
[231] | 224 | echo '<div data-role="content" data-theme="'.$colortheme.'">
|
---|
| 225 | <a href="modules.php?op=affluenze_all&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Affluenze</a>
|
---|
| 226 | <a href="modules.php?op=votanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Votanti</a>
|
---|
| 227 | <a href="modules.php?op=gruppo_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._GRUPPO.'</a>';
|
---|
| 228 |
|
---|
| 229 | if($genere==3 OR $genere==5)
|
---|
| 230 | echo '<a href="modules.php?op=liste_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._LISTA.'</a>';
|
---|
[256] | 231 | if(($genere==3 OR $genere==5) and !$votoc)
|
---|
[231] | 232 | echo '<a href="modules.php?op=candidato_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._CANDIDATO.'</a>';
|
---|
| 233 |
|
---|
| 234 |
|
---|
| 235 | echo'</div>
|
---|
| 236 | ';
|
---|
| 237 |
|
---|
| 238 | }
|
---|
| 239 |
|
---|
| 240 | ####################################### menu grafica
|
---|
| 241 | function grafica_mob(){
|
---|
| 242 | global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme;
|
---|
| 243 | echo '<div data-role="content" data-theme="'.$colortheme.'">
|
---|
| 244 |
|
---|
| 245 | <a href="modules.php?op=grafsezione&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Elenco Sezioni scrutinate</a>
|
---|
| 246 |
|
---|
| 247 | <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Affluenze</a>
|
---|
| 248 | <a href="modules.php?op=grafvotanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Votanti</a>';
|
---|
| 249 | /*
|
---|
| 250 | <a href="modules.php?op=grafgruppo&grafica=0&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._GRUPPO.'</a>';
|
---|
| 251 |
|
---|
| 252 | if($genere==3 OR $genere==5)
|
---|
| 253 | echo '<a href="modules.php?op=liste_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._LISTA.'</a>';
|
---|
| 254 | if(($genere==3 OR $genere==5) and $tipo_cons!="1" or $tipo_cons>="11")
|
---|
| 255 | echo '<a href="modules.php?op=candidato_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._CANDIDATO.'</a>';
|
---|
| 256 | */
|
---|
| 257 |
|
---|
| 258 | echo'</div>';
|
---|
| 259 |
|
---|
| 260 |
|
---|
| 261 | }
|
---|
| 262 |
|
---|
| 263 |
|
---|
| 264 | #######################################
|
---|
| 265 | ####################################### inizio funzioni visualizzazione
|
---|
| 266 | #######################################
|
---|
| 267 |
|
---|
| 268 |
|
---|
| 269 | # affluenza unica x grafica
|
---|
| 270 | function affluenze(){
|
---|
| 271 | global $tema;
|
---|
| 272 | affluenza_unica();
|
---|
| 273 | grafica_mob();
|
---|
| 274 | }
|
---|
| 275 |
|
---|
| 276 | # votanti x menu grafica
|
---|
| 277 |
|
---|
| 278 | function grafvotanti_mob(){
|
---|
[265] | 279 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 280 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 281 |
|
---|
| 282 | votanti_mobile();
|
---|
| 283 | echo "</ul>";
|
---|
| 284 | grafica_mob();
|
---|
| 285 |
|
---|
| 286 | }
|
---|
| 287 |
|
---|
| 288 | # gruppo per menu grafica
|
---|
| 289 | function grafgruppo(){
|
---|
[265] | 290 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 291 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 292 | graf_gruppo_mob();
|
---|
| 293 | echo "</ul>";
|
---|
| 294 | grafica_mob();
|
---|
| 295 |
|
---|
| 296 | }
|
---|
| 297 |
|
---|
| 298 | # gruppo per menu grafica
|
---|
| 299 | function grafsezione(){
|
---|
[265] | 300 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 301 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 302 | graf_sezioni();
|
---|
| 303 | echo "</ul>";
|
---|
| 304 | grafica_mob();
|
---|
| 305 |
|
---|
| 306 | }
|
---|
| 307 |
|
---|
| 308 |
|
---|
| 309 |
|
---|
| 310 |
|
---|
| 311 | ############ menu informazioni
|
---|
| 312 | ############
|
---|
| 313 |
|
---|
| 314 | function dati_generali(){
|
---|
| 315 | global $tema,$colortheme;
|
---|
| 316 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 317 |
|
---|
| 318 | dati_mob_fun();
|
---|
| 319 | echo "</ul>";
|
---|
| 320 | info();
|
---|
| 321 | }
|
---|
| 322 |
|
---|
| 323 | function come_si_vota(){
|
---|
| 324 | global $tema,$colortheme;
|
---|
| 325 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 326 | come_mob("come");
|
---|
| 327 | echo "</ul>";
|
---|
| 328 | info();
|
---|
| 329 | }
|
---|
| 330 |
|
---|
| 331 | function numeri_mob(){
|
---|
| 332 | global $tema,$colortheme;
|
---|
| 333 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 334 | come_mob("numeri");
|
---|
| 335 | echo "</ul>";
|
---|
| 336 | info();
|
---|
| 337 | }
|
---|
| 338 |
|
---|
| 339 | function servizi_mob(){
|
---|
| 340 | global $tema,$colortheme;
|
---|
| 341 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 342 | come_mob("servizi");
|
---|
| 343 | echo "</ul>";
|
---|
| 344 | info();
|
---|
| 345 | }
|
---|
| 346 |
|
---|
| 347 |
|
---|
| 348 |
|
---|
| 349 |
|
---|
| 350 |
|
---|
| 351 | ######## menu risultati
|
---|
| 352 | ########
|
---|
| 353 |
|
---|
| 354 | function affluenze_all(){
|
---|
| 355 | global $tema,$colortheme;
|
---|
| 356 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 357 |
|
---|
| 358 | affluenze_mob();
|
---|
| 359 | echo "</ul>";
|
---|
| 360 | risultati();
|
---|
| 361 | }
|
---|
| 362 |
|
---|
| 363 | function votanti_mob(){
|
---|
[265] | 364 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 365 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 366 | votanti_tabella();
|
---|
| 367 | risultati();
|
---|
| 368 | echo "</ul>";
|
---|
| 369 | }
|
---|
| 370 |
|
---|
| 371 |
|
---|
| 372 | # risultati semplici gruppo
|
---|
| 373 | function gruppo_mob(){
|
---|
| 374 | global $tema,$colortheme;
|
---|
| 375 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 376 | graf_gruppo_mob();
|
---|
| 377 | //graf_risultati();
|
---|
| 378 | echo "</ul>";
|
---|
| 379 | risultati();
|
---|
| 380 | }
|
---|
| 381 |
|
---|
| 382 | function liste_mob(){
|
---|
| 383 | global $tema,$colortheme;
|
---|
| 384 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 385 | //echo '<div data-role="content" data-theme="a"><p>';
|
---|
| 386 | graf_liste_mob();
|
---|
| 387 | echo "</ul>";
|
---|
| 388 | risultati();
|
---|
| 389 | }
|
---|
| 390 |
|
---|
| 391 |
|
---|
| 392 | function candidato_mob(){
|
---|
| 393 | global $tema,$colortheme;
|
---|
| 394 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 395 | graf_candidato_mob();
|
---|
| 396 | echo "</ul>";
|
---|
| 397 | risultati();
|
---|
| 398 | }
|
---|
| 399 |
|
---|
| 400 |
|
---|
| 401 | function conf_mob(){
|
---|
| 402 | ###############################################
|
---|
| 403 | # scelta comune in caso di multicomune tema
|
---|
[265] | 404 | global $multicomune,$tema,$prefix,$dbi,$colortheme,$id_cons_gen,$info,$id_comune,$rss;
|
---|
[231] | 405 |
|
---|
| 406 | echo "<center>
|
---|
| 407 | <div data-role=\"fieldcontain\" style=\"margin:0 auto;text-align:center;\">
|
---|
| 408 | <form method=\"post\" action=\"modules.php\">";
|
---|
| 409 |
|
---|
| 410 |
|
---|
| 411 |
|
---|
| 412 | if ($multicomune=='1')
|
---|
| 413 | {
|
---|
| 414 |
|
---|
[265] | 415 | $sql="select t1.id_comune,t1.descrizione,count(0) from ".$prefix."_ele_comuni as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_comune=t2.id_comune and t2.chiusa!='2' group by t1.id_comune,t1.descrizione order by t1.descrizione asc";
|
---|
| 416 | $rescomu = $dbi->prepare("$sql");
|
---|
| 417 | $rescomu->execute();
|
---|
| 418 | $esiste_multi=$rescomu->rowCount();
|
---|
[231] | 419 | if ($esiste_multi>=1) {
|
---|
| 420 |
|
---|
| 421 | echo " <input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\" />
|
---|
| 422 | <input type=\"hidden\" name=\"id_cos_gen\" value=\"$id_cons_gen\" />
|
---|
| 423 | <input type=\"hidden\" name=\"op\" value=\"gruppo\" />
|
---|
| 424 | <select name=\"id_comune\" data-native-menu=\"false\">
|
---|
| 425 | <option>Scegli il comune</option>";
|
---|
| 426 |
|
---|
[265] | 427 | while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){
|
---|
| 428 | $sel=($id == $id_comune) ? "selected=\"selected\"":"";
|
---|
[231] | 429 | echo "<option value=\"$id\" $sel >$descrizione</option>";
|
---|
| 430 | }
|
---|
| 431 |
|
---|
| 432 | echo "</select>";
|
---|
| 433 | }
|
---|
| 434 | }
|
---|
| 435 |
|
---|
| 436 | ### colore tema
|
---|
| 437 | # colore del tema
|
---|
| 438 | # la variabile rss, non usta in questo tema, Ú stata presa in prestito per determinare il colore del tema
|
---|
[265] | 439 | $selez='';
|
---|
[231] | 440 | echo "<select name=\"rss\" data-native-menu=\"false\" > ";
|
---|
| 441 | echo "<option>Scegli il colore del tema</option>";
|
---|
| 442 | echo "<option value=\"2\" $selez >Blu</option>";
|
---|
| 443 | echo "<option value=\"3\" $selez >Rosso</option>";
|
---|
| 444 | echo "<option value=\"4\" $selez >Verde</option>";
|
---|
| 445 | echo "<option value=\"5\" $selez >Ciano</option>";
|
---|
| 446 | echo "<option value=\"6\" $selez >Giallo</option>";
|
---|
| 447 | echo "<option value=\"7\" $selez >Grigio</option>";
|
---|
| 448 | echo '</select><p>
|
---|
| 449 | <fieldset class="ui-grid-a" >
|
---|
| 450 | <div class="ui-block-b" style=width:100%;><button type="submit" data-theme="'.$colortheme.'">Conferma</button></div></fieldset>
|
---|
| 451 | </p></form></div></center>';
|
---|
| 452 | }
|
---|
| 453 |
|
---|
| 454 | function about(){
|
---|
| 455 | ###############################################
|
---|
| 456 | # scelta comune in caso di multicomune tema
|
---|
[265] | 457 | global $tema,$dbi,$prefix,$colortheme,$id_comune,$descr_com;
|
---|
[231] | 458 |
|
---|
| 459 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 460 | echo "<li style=\"text-align:center;\" data-role=\"list-divider\" data-icon=\"arrow-up\" >";
|
---|
| 461 | echo "<b>About e Credits</b></li>";
|
---|
| 462 | echo "<div data-role=\"content\" data-theme=\"$colortheme\">";
|
---|
| 463 | echo "<a href=\"http://www.eleonline.it\">
|
---|
| 464 | <img src=\"temi/$tema/images/mobile.jpg\" align=\"left\">EleONLine</a><br/>
|
---|
| 465 |
|
---|
| 466 | Software Open Source per ogni elezione<br/>
|
---|
| 467 | di <a href=\"mailto:luciano@linuxap.it\">Luciano Apolito</a> &
|
---|
| 468 | <a href=\"mailto:rgigli@libero.it\">Roberto Gigli</a><br/>
|
---|
| 469 | <i>stai usando lo \"Smartphone theme <b>FUTURA n.2</b>\"<br/>
|
---|
| 470 | </div>";
|
---|
| 471 | echo "<li style=\"text-align:center;\" data-role=\"list-divider\" data-icon=\"arrow-up\" >";
|
---|
| 472 | echo "<b>Gruppo di Lavoro Comune di $descr_com</b></li></ul>";
|
---|
| 473 | include ("pagine/gruppo.html");
|
---|
| 474 | //echo "</div>aaa";
|
---|
| 475 |
|
---|
| 476 |
|
---|
| 477 |
|
---|
| 478 | }
|
---|
| 479 |
|
---|
| 480 | ?>
|
---|