[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 |
|
---|
[426] | 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,$circo,$id_circ;
|
---|
[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>
|
---|
[426] | 82 | <li><a href="modules.php?id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'?" 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.'&id_circ='.$id_circ.'" 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.'&id_circ='.$id_circ.'" 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.'&id_circ='.$id_circ.'"" 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.'&id_circ='.$id_circ.'" data-icon="cogs" data-theme="'.$colortheme.'" '.$active_conf.' >Opzioni</a></li>
|
---|
[231] | 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\"
|
---|
[426] | 111 | onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&id:circ=$id_circ&file=index&id_cons_gen='+this.options[this.options.selectedIndex].value\">";
|
---|
[231] | 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 |
|
---|
[426] | 119 | echo '</select></label>';
|
---|
| 120 | #####
|
---|
| 121 | if($circo)
|
---|
| 122 | {
|
---|
| 123 | $sql="SELECT t1.id_circ,t1.descrizione FROM ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons=t2.id_cons and t2.id_cons_gen=$id_cons_gen and t2.id_comune='$id_comune' order by t1.num_circ";
|
---|
| 124 | $rescirc = $dbi->prepare("$sql");
|
---|
| 125 | $rescirc->execute();
|
---|
| 126 | $esistecirc=$rescirc->rowCount();
|
---|
| 127 | echo "<label forcirc=\"circoscrizione\">
|
---|
| 128 | <select name=\"id_circ\" id=\"select-choice-b\"
|
---|
| 129 | onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id_cons_gen&id_circ='+this.options[this.options.selectedIndex].value\">";
|
---|
| 130 | while(list($idc,$desc_circ) = $rescirc->fetch(PDO::FETCH_NUM)) {
|
---|
| 131 | # $descrizione=substr(str_replace("+"," ",$descrizione),0,30);
|
---|
| 132 | $sel = ($idc == $id_circ) ? "selected=\"selected\"":"";
|
---|
| 133 | echo "<option style=\"font-size:12px;\" value=\"$idc\" $sel >$desc_circ</option>";
|
---|
| 134 | }
|
---|
| 135 | echo '</select></label>';
|
---|
| 136 | }
|
---|
| 137 | #####
|
---|
| 138 | echo '</form>
|
---|
[231] | 139 |
|
---|
| 140 | </div>';
|
---|
| 141 | } # fine form scelta elezioni
|
---|
| 142 |
|
---|
| 143 |
|
---|
| 144 |
|
---|
[249] | 145 | if($op=="gruppo")home();// leggi il file config.php
|
---|
[231] | 146 | elseif($op=="informazioni")info();
|
---|
| 147 | elseif($op=="affluenze")affluenze();
|
---|
| 148 | elseif($op=="dati_generali")dati_generali();
|
---|
| 149 | elseif($op=="risultati")risultati();
|
---|
| 150 | elseif($op=="grafica_mob")grafica_mob();
|
---|
| 151 | elseif($op=="come_si_vota")come_si_vota();
|
---|
| 152 | elseif($op=="numeri_mob")numeri_mob();
|
---|
| 153 | elseif($op=="servizi_mob")servizi_mob();
|
---|
| 154 | elseif($op=="affluenze_all")affluenze_all();
|
---|
| 155 | elseif($op=="gruppo_mob")gruppo_mob();
|
---|
| 156 | elseif($op=="candidato_mob")candidato_mob();
|
---|
| 157 | elseif($op=="liste_mob")liste_mob();
|
---|
| 158 | elseif($op=="votanti_mob")votanti_mob();
|
---|
| 159 | elseif($op=="conf_mob")conf_mob();
|
---|
| 160 | elseif($op=="about")about();
|
---|
| 161 | elseif($op=="grafvotanti_mob")grafvotanti_mob();
|
---|
| 162 | elseif($op=="grafgruppo")grafgruppo();
|
---|
| 163 | elseif($op=="grafsezione")grafsezione();
|
---|
| 164 |
|
---|
| 165 | footer_mon();
|
---|
| 166 |
|
---|
| 167 | die();
|
---|
| 168 | }
|
---|
| 169 |
|
---|
| 170 |
|
---|
| 171 | function footer_mon(){
|
---|
[426] | 172 | global $id_comune,$id_cons_gen,$tema,$colortheme,$rss,$prefix,$dbi,$id_circ;
|
---|
[231] | 173 |
|
---|
[407] | 174 | $sql="SELECT tema FROM `".$prefix."_config`";
|
---|
| 175 | $res = $dbi->prepare("$sql");
|
---|
| 176 | $res->execute();
|
---|
| 177 | list($deftema) = $res->fetch(PDO::FETCH_NUM);
|
---|
| 178 |
|
---|
[231] | 179 | echo '
|
---|
| 180 | <div data-role="footer" data-theme="a" style="marig:0 auto; text-align:center;">
|
---|
| 181 | <div data-role="footer" data-position="inline" data-icon="cogs">';
|
---|
| 182 |
|
---|
[244] | 183 | 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] | 184 |
|
---|
| 185 | if($tema=="Futura2")
|
---|
| 186 | //echo'<a href="backtoapp.html" data-rel="external" data-ajax="false">Chiudi</a>'; // per l'app precedente non piu usata
|
---|
[426] | 187 | echo ' <a href="modules.php?name=Elezioni&tema='.$deftema.'&nocell=1&op=gruppo&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-rel="external" data-ajax="false" >Versione Desktop</a>';
|
---|
[231] | 188 | else
|
---|
[407] | 189 | echo ' <a href="modules.php?name=Elezioni&tema=facebook&desktop=1&op=gruppo" data-rel="external" data-ajax="false" >Versione Desktop</a>';
|
---|
[251] | 190 | echo'</div>';
|
---|
[231] | 191 | }
|
---|
| 192 |
|
---|
| 193 |
|
---|
| 194 |
|
---|
| 195 | #######################################
|
---|
| 196 | ####################################### inizio funzioni menu
|
---|
| 197 | #######################################
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 |
|
---|
| 201 | ############################ menu home page
|
---|
| 202 | function home(){
|
---|
[426] | 203 | global $id_comune,$id_cons_gen,$tema,$colortheme,$id_circ;
|
---|
[231] | 204 | //include("temi/$tema/config.php");
|
---|
| 205 |
|
---|
| 206 | echo '<div data-role="content" data-theme="a">
|
---|
[426] | 207 | <a href="modules.php?op=informazioni&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Informazioni Elettorali</a>
|
---|
| 208 | <!-- <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="heart">Ultima Affluenza</a> -->
|
---|
| 209 | <a href="modules.php?op=risultati&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Risultati Elettorali</a>
|
---|
[231] | 210 | </div>';
|
---|
| 211 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 212 | //graf_gruppo_mob();
|
---|
| 213 | echo "</ul>";
|
---|
| 214 | echo '';
|
---|
| 215 |
|
---|
| 216 | }
|
---|
| 217 |
|
---|
| 218 |
|
---|
| 219 |
|
---|
| 220 |
|
---|
| 221 |
|
---|
| 222 | ############################### menu informazioni
|
---|
| 223 | function info(){
|
---|
[426] | 224 | global $id_comune,$id_cons_gen,$colortheme,$id_circ;
|
---|
[231] | 225 | echo '
|
---|
| 226 | <div data-role="content" data-theme="a">
|
---|
[426] | 227 | <a href="modules.php?op=dati_generali&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
[231] | 228 | Dati Generali</a>
|
---|
[426] | 229 | <a href="modules.php?op=come_si_vota&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
[231] | 230 | Come si Vota</a>
|
---|
[426] | 231 | <a href="modules.php?op=numeri_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
[231] | 232 | Numeri Utili</a>
|
---|
[426] | 233 | <a href="modules.php?op=servizi_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">
|
---|
[231] | 234 | Servizi Utili</a>
|
---|
| 235 | </div>
|
---|
| 236 | ';
|
---|
| 237 |
|
---|
| 238 | }
|
---|
| 239 |
|
---|
| 240 | ####################################### menu risultati
|
---|
| 241 | function risultati(){
|
---|
[426] | 242 | global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme,$votoc,$id_circ;
|
---|
[231] | 243 | echo '<div data-role="content" data-theme="'.$colortheme.'">
|
---|
[426] | 244 | <a href="modules.php?op=affluenze_all&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Affluenze</a>
|
---|
| 245 | <a href="modules.php?op=votanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Votanti</a>
|
---|
| 246 | <a href="modules.php?op=gruppo_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._GRUPPO.'</a>';
|
---|
[231] | 247 |
|
---|
| 248 | if($genere==3 OR $genere==5)
|
---|
[426] | 249 | echo '<a href="modules.php?op=liste_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._LISTA.'</a>';
|
---|
[256] | 250 | if(($genere==3 OR $genere==5) and !$votoc)
|
---|
[426] | 251 | echo '<a href="modules.php?op=candidato_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" " data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">'._CANDIDATO.'</a>';
|
---|
[231] | 252 |
|
---|
| 253 |
|
---|
| 254 | echo'</div>
|
---|
| 255 | ';
|
---|
| 256 |
|
---|
| 257 | }
|
---|
| 258 |
|
---|
| 259 | ####################################### menu grafica
|
---|
| 260 | function grafica_mob(){
|
---|
[426] | 261 | global $id_comune,$id_cons_gen,$genere,$tipo_cons,$colortheme,$id_circ;
|
---|
[231] | 262 | echo '<div data-role="content" data-theme="'.$colortheme.'">
|
---|
| 263 |
|
---|
[426] | 264 | <a href="modules.php?op=grafsezione&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Elenco Sezioni scrutinate</a>
|
---|
[231] | 265 |
|
---|
[426] | 266 | <a href="modules.php?op=affluenze&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Affluenze</a>
|
---|
| 267 | <a href="modules.php?op=grafvotanti_mob&id_comune='.$id_comune.'&id_cons_gen='.$id_cons_gen.'&id_circ='.$id_circ.'" data-role="button" data-theme="'.$colortheme.'" data-icon="arrow-right" data-iconpos="right">Grafica Votanti</a>';
|
---|
[231] | 268 | /*
|
---|
| 269 | <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>';
|
---|
| 270 |
|
---|
| 271 | if($genere==3 OR $genere==5)
|
---|
| 272 | 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>';
|
---|
| 273 | if(($genere==3 OR $genere==5) and $tipo_cons!="1" or $tipo_cons>="11")
|
---|
| 274 | 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>';
|
---|
| 275 | */
|
---|
| 276 |
|
---|
| 277 | echo'</div>';
|
---|
| 278 |
|
---|
| 279 |
|
---|
| 280 | }
|
---|
| 281 |
|
---|
| 282 |
|
---|
| 283 | #######################################
|
---|
| 284 | ####################################### inizio funzioni visualizzazione
|
---|
| 285 | #######################################
|
---|
| 286 |
|
---|
| 287 |
|
---|
| 288 | # affluenza unica x grafica
|
---|
| 289 | function affluenze(){
|
---|
[426] | 290 | global $tema;
|
---|
[231] | 291 | affluenza_unica();
|
---|
| 292 | grafica_mob();
|
---|
| 293 | }
|
---|
| 294 |
|
---|
| 295 | # votanti x menu grafica
|
---|
| 296 |
|
---|
| 297 | function grafvotanti_mob(){
|
---|
[265] | 298 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 299 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 300 |
|
---|
| 301 | votanti_mobile();
|
---|
| 302 | echo "</ul>";
|
---|
| 303 | grafica_mob();
|
---|
| 304 |
|
---|
| 305 | }
|
---|
| 306 |
|
---|
| 307 | # gruppo per menu grafica
|
---|
| 308 | function grafgruppo(){
|
---|
[265] | 309 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 310 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 311 | graf_gruppo_mob();
|
---|
| 312 | echo "</ul>";
|
---|
| 313 | grafica_mob();
|
---|
| 314 |
|
---|
| 315 | }
|
---|
| 316 |
|
---|
| 317 | # gruppo per menu grafica
|
---|
| 318 | function grafsezione(){
|
---|
[265] | 319 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 320 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 321 | graf_sezioni();
|
---|
| 322 | echo "</ul>";
|
---|
| 323 | grafica_mob();
|
---|
| 324 |
|
---|
| 325 | }
|
---|
| 326 |
|
---|
| 327 |
|
---|
| 328 |
|
---|
| 329 |
|
---|
| 330 | ############ menu informazioni
|
---|
| 331 | ############
|
---|
| 332 |
|
---|
| 333 | function dati_generali(){
|
---|
| 334 | global $tema,$colortheme;
|
---|
| 335 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 336 |
|
---|
| 337 | dati_mob_fun();
|
---|
| 338 | echo "</ul>";
|
---|
| 339 | info();
|
---|
| 340 | }
|
---|
| 341 |
|
---|
| 342 | function come_si_vota(){
|
---|
| 343 | global $tema,$colortheme;
|
---|
| 344 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 345 | come_mob("come");
|
---|
| 346 | echo "</ul>";
|
---|
| 347 | info();
|
---|
| 348 | }
|
---|
| 349 |
|
---|
| 350 | function numeri_mob(){
|
---|
| 351 | global $tema,$colortheme;
|
---|
| 352 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 353 | come_mob("numeri");
|
---|
| 354 | echo "</ul>";
|
---|
| 355 | info();
|
---|
| 356 | }
|
---|
| 357 |
|
---|
| 358 | function servizi_mob(){
|
---|
| 359 | global $tema,$colortheme;
|
---|
| 360 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 361 | come_mob("servizi");
|
---|
| 362 | echo "</ul>";
|
---|
| 363 | info();
|
---|
| 364 | }
|
---|
| 365 |
|
---|
| 366 |
|
---|
| 367 |
|
---|
| 368 |
|
---|
| 369 |
|
---|
| 370 | ######## menu risultati
|
---|
| 371 | ########
|
---|
| 372 |
|
---|
| 373 | function affluenze_all(){
|
---|
| 374 | global $tema,$colortheme;
|
---|
| 375 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 376 |
|
---|
| 377 | affluenze_mob();
|
---|
| 378 | echo "</ul>";
|
---|
| 379 | risultati();
|
---|
| 380 | }
|
---|
| 381 |
|
---|
| 382 | function votanti_mob(){
|
---|
[265] | 383 | global $tema,$dbi,$prefix,$colortheme;
|
---|
[231] | 384 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 385 | votanti_tabella();
|
---|
| 386 | risultati();
|
---|
| 387 | echo "</ul>";
|
---|
| 388 | }
|
---|
| 389 |
|
---|
| 390 |
|
---|
| 391 | # risultati semplici gruppo
|
---|
| 392 | function gruppo_mob(){
|
---|
| 393 | global $tema,$colortheme;
|
---|
| 394 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 395 | graf_gruppo_mob();
|
---|
| 396 | //graf_risultati();
|
---|
| 397 | echo "</ul>";
|
---|
| 398 | risultati();
|
---|
| 399 | }
|
---|
| 400 |
|
---|
| 401 | function liste_mob(){
|
---|
| 402 | global $tema,$colortheme;
|
---|
| 403 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 404 | //echo '<div data-role="content" data-theme="a"><p>';
|
---|
| 405 | graf_liste_mob();
|
---|
| 406 | echo "</ul>";
|
---|
| 407 | risultati();
|
---|
| 408 | }
|
---|
| 409 |
|
---|
| 410 |
|
---|
| 411 | function candidato_mob(){
|
---|
| 412 | global $tema,$colortheme;
|
---|
| 413 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 414 | graf_candidato_mob();
|
---|
| 415 | echo "</ul>";
|
---|
| 416 | risultati();
|
---|
| 417 | }
|
---|
| 418 |
|
---|
| 419 |
|
---|
| 420 | function conf_mob(){
|
---|
| 421 | ###############################################
|
---|
| 422 | # scelta comune in caso di multicomune tema
|
---|
[265] | 423 | global $multicomune,$tema,$prefix,$dbi,$colortheme,$id_cons_gen,$info,$id_comune,$rss;
|
---|
[231] | 424 |
|
---|
| 425 | echo "<center>
|
---|
| 426 | <div data-role=\"fieldcontain\" style=\"margin:0 auto;text-align:center;\">
|
---|
| 427 | <form method=\"post\" action=\"modules.php\">";
|
---|
| 428 |
|
---|
| 429 |
|
---|
| 430 |
|
---|
| 431 | if ($multicomune=='1')
|
---|
| 432 | {
|
---|
| 433 |
|
---|
[265] | 434 | $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";
|
---|
| 435 | $rescomu = $dbi->prepare("$sql");
|
---|
| 436 | $rescomu->execute();
|
---|
| 437 | $esiste_multi=$rescomu->rowCount();
|
---|
[231] | 438 | if ($esiste_multi>=1) {
|
---|
| 439 |
|
---|
| 440 | echo " <input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\" />
|
---|
| 441 | <input type=\"hidden\" name=\"id_cos_gen\" value=\"$id_cons_gen\" />
|
---|
| 442 | <input type=\"hidden\" name=\"op\" value=\"gruppo\" />
|
---|
| 443 | <select name=\"id_comune\" data-native-menu=\"false\">
|
---|
| 444 | <option>Scegli il comune</option>";
|
---|
| 445 |
|
---|
[265] | 446 | while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){
|
---|
| 447 | $sel=($id == $id_comune) ? "selected=\"selected\"":"";
|
---|
[231] | 448 | echo "<option value=\"$id\" $sel >$descrizione</option>";
|
---|
| 449 | }
|
---|
| 450 |
|
---|
| 451 | echo "</select>";
|
---|
| 452 | }
|
---|
| 453 | }
|
---|
| 454 |
|
---|
| 455 | ### colore tema
|
---|
| 456 | # colore del tema
|
---|
| 457 | # la variabile rss, non usta in questo tema, Ú stata presa in prestito per determinare il colore del tema
|
---|
[265] | 458 | $selez='';
|
---|
[231] | 459 | echo "<select name=\"rss\" data-native-menu=\"false\" > ";
|
---|
| 460 | echo "<option>Scegli il colore del tema</option>";
|
---|
| 461 | echo "<option value=\"2\" $selez >Blu</option>";
|
---|
| 462 | echo "<option value=\"3\" $selez >Rosso</option>";
|
---|
| 463 | echo "<option value=\"4\" $selez >Verde</option>";
|
---|
| 464 | echo "<option value=\"5\" $selez >Ciano</option>";
|
---|
| 465 | echo "<option value=\"6\" $selez >Giallo</option>";
|
---|
| 466 | echo "<option value=\"7\" $selez >Grigio</option>";
|
---|
| 467 | echo '</select><p>
|
---|
| 468 | <fieldset class="ui-grid-a" >
|
---|
| 469 | <div class="ui-block-b" style=width:100%;><button type="submit" data-theme="'.$colortheme.'">Conferma</button></div></fieldset>
|
---|
| 470 | </p></form></div></center>';
|
---|
| 471 | }
|
---|
| 472 |
|
---|
| 473 | function about(){
|
---|
| 474 | ###############################################
|
---|
| 475 | # scelta comune in caso di multicomune tema
|
---|
[265] | 476 | global $tema,$dbi,$prefix,$colortheme,$id_comune,$descr_com;
|
---|
[231] | 477 |
|
---|
| 478 | echo '<ul data-role="listview" data-inset="true" data-divider-theme="'.$colortheme.'">';
|
---|
| 479 | echo "<li style=\"text-align:center;\" data-role=\"list-divider\" data-icon=\"arrow-up\" >";
|
---|
| 480 | echo "<b>About e Credits</b></li>";
|
---|
| 481 | echo "<div data-role=\"content\" data-theme=\"$colortheme\">";
|
---|
| 482 | echo "<a href=\"http://www.eleonline.it\">
|
---|
| 483 | <img src=\"temi/$tema/images/mobile.jpg\" align=\"left\">EleONLine</a><br/>
|
---|
| 484 |
|
---|
| 485 | Software Open Source per ogni elezione<br/>
|
---|
| 486 | di <a href=\"mailto:luciano@linuxap.it\">Luciano Apolito</a> &
|
---|
| 487 | <a href=\"mailto:rgigli@libero.it\">Roberto Gigli</a><br/>
|
---|
| 488 | <i>stai usando lo \"Smartphone theme <b>FUTURA n.2</b>\"<br/>
|
---|
| 489 | </div>";
|
---|
| 490 | echo "<li style=\"text-align:center;\" data-role=\"list-divider\" data-icon=\"arrow-up\" >";
|
---|
| 491 | echo "<b>Gruppo di Lavoro Comune di $descr_com</b></li></ul>";
|
---|
| 492 | include ("pagine/gruppo.html");
|
---|
| 493 | //echo "</div>aaa";
|
---|
| 494 |
|
---|
| 495 |
|
---|
| 496 |
|
---|
| 497 | }
|
---|
| 498 |
|
---|
| 499 | ?>
|
---|