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