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