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 | if (!defined('ADMIN_FILE')) {
|
---|
10 | die ("You can't access this file directly...");
|
---|
11 | }
|
---|
12 |
|
---|
13 | /************************
|
---|
14 | Funzione Menu a cascata
|
---|
15 | *************************/
|
---|
16 |
|
---|
17 |
|
---|
18 | // definizione variabile per button 'ok' nei form per il noscript
|
---|
19 | $button="<br /><object><noscript><div><input name=\"vai\" type=\"image\" src=\"modules/Elezioni/images/ok2.jpg\" alt=\"ok\" title=\"ok\" /></div></noscript></object>";
|
---|
20 |
|
---|
21 | $sql="select descrizione,fascia from ".$prefix."_ele_comuni where id_comune=$id_comune";
|
---|
22 | $sth = $dbi->prepare("$sql");
|
---|
23 | $sth->execute();
|
---|
24 | $row = $sth->fetch(PDO::FETCH_BOTH);
|
---|
25 | list($descr_com,$fascia)=explode($row);
|
---|
26 | echo '<style type="text/css">
|
---|
27 | html,body{margin:0;padding:0}
|
---|
28 | body{background:#FFF;color:#333}
|
---|
29 | div#contiene{width:999px;margin:0 auto;background: #3B5998;color:#fff}
|
---|
30 | </style>
|
---|
31 | <link rel="stylesheet" type="text/css" href="temi/facebook/menu/menu-dd.css">
|
---|
32 | <script type="text/javascript" src="temi/facebook/menu/jquery-1.2.6.pack.js"></script>
|
---|
33 | <script type="text/javascript" src="temi/facebook/menu/jquery.hoverIntent.minified.js"></script>
|
---|
34 | <script type="text/javascript" src="temi/facebook/menu/jquery-ddi2.js"></script>
|
---|
35 | <div id="contiene">
|
---|
36 |
|
---|
37 |
|
---|
38 | <ul id="nav"><li>
|
---|
39 | <a href="http://www.eleonline.it"><span style="font-size:18px;font: Comics;"><strong>elebook</strong></span></a>
|
---|
40 | </li>
|
---|
41 | <li>
|
---|
42 | <a href="index.php"><strong>Home</strong></a>
|
---|
43 | </li>';
|
---|
44 |
|
---|
45 |
|
---|
46 |
|
---|
47 | // inizio tabella
|
---|
48 |
|
---|
49 |
|
---|
50 | /***********************************
|
---|
51 | Scelta Comune
|
---|
52 | ***********************************/
|
---|
53 |
|
---|
54 | if ($multicomune=='1')
|
---|
55 | {
|
---|
56 | $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 group by t1.id_comune,t1.descrizione order by t1.descrizione asc";
|
---|
57 | $sth = $dbi->prepare("$sql");
|
---|
58 | $sth->execute();
|
---|
59 | $row = $sth->fetch(PDO::FETCH_BOTH);
|
---|
60 | $esiste_multi=$sth->rowCount();
|
---|
61 | if ($esiste_multi>=1) {
|
---|
62 | echo " <li>
|
---|
63 | <a href=\"#\"><strong>"._COMUNI."</strong></a>
|
---|
64 |
|
---|
65 | <ul>";
|
---|
66 |
|
---|
67 | while (list($id,$descrizione,)=$sth->fetch(PDO::FETCH_NUM)){
|
---|
68 | echo "<li><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id&file=index\">$descrizione</a></li>";
|
---|
69 | }
|
---|
70 | echo "</ul></li>";
|
---|
71 |
|
---|
72 | }
|
---|
73 | } // fine scelta comune
|
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 | /***********************************
|
---|
78 | Scelta Consultazione
|
---|
79 | ***********************************/
|
---|
80 |
|
---|
81 | $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";
|
---|
82 | $sth = $dbi->prepare("$sql");
|
---|
83 | $sth->execute();
|
---|
84 | $esiste=$sth->rowCount();
|
---|
85 | //se esiste consultazione fa vedere i dati
|
---|
86 | if ($esiste>=1) {
|
---|
87 | echo " <li>
|
---|
88 | <a href=\"#\"><strong>"._ELEZIONI."</strong></a>
|
---|
89 | <ul>";
|
---|
90 |
|
---|
91 | while(list($id,$descrizione) = $sth->fetch(PDO::FETCH_NUM)) {
|
---|
92 | echo "<li><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id\">
|
---|
93 | ".substr($descrizione,0,31)."</a></li>";
|
---|
94 |
|
---|
95 | }
|
---|
96 |
|
---|
97 |
|
---|
98 | echo "</ul></li>";
|
---|
99 |
|
---|
100 |
|
---|
101 |
|
---|
102 |
|
---|
103 |
|
---|
104 | /***********************************
|
---|
105 | Scelta Info
|
---|
106 | ***********************************/
|
---|
107 | //$temp = array('confronti'=>'','come'=>'','numeri'=>'','servizi'=>'','link'=>'','dati'=>'','affluenze_sez'=>'','votanti'=>'');
|
---|
108 |
|
---|
109 | echo " <li><a href=\"#\"><strong>"._INFO."</strong></a>
|
---|
110 | <ul>";
|
---|
111 | echo "
|
---|
112 | <li class=\"sep\"><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=confronti\">"._CONFRONTI."</a><span></span></li>
|
---|
113 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=come\">"._COME."</a></li>
|
---|
114 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=numeri\">"._NUMERI."</a></li>
|
---|
115 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=servizi\">"._SERVIZI."</a></li>
|
---|
116 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=link\">"._LINK."</a></li>
|
---|
117 | <li class=\"sep\"><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=dati\">"._DATI."</a><span></span></li>
|
---|
118 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=affluenze_sez\">"._AFFLUENZE."</a></li>
|
---|
119 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&op=come&id_comune=$id_comune&file=index&info=votanti\">"._VOTANTI."</a></li>
|
---|
120 |
|
---|
121 | ";
|
---|
122 |
|
---|
123 |
|
---|
124 | echo "</ul></li>";
|
---|
125 |
|
---|
126 |
|
---|
127 | /***********************************
|
---|
128 | Scelta Dati
|
---|
129 | ***********************************/
|
---|
130 |
|
---|
131 | $sql = "SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons'";
|
---|
132 | $sth = $dbi->prepare("$sql");
|
---|
133 | $sth->execute();
|
---|
134 | list($num_circ) = $sth->fetch(PDO::FETCH_NUM);
|
---|
135 | echo " <li><a href=\"#\"><strong>"._RISULTATI."</strong></a>
|
---|
136 | <ul>";
|
---|
137 | if ($genere!=4) {
|
---|
138 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=gruppo_circo\">".substr(_GRUPPO." "._PER." "._CIRCO,0,33)."</a></li>
|
---|
139 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=gruppo_sezione\">".substr(_GRUPPO." "._PER." "._SEZIONI,0,33)."</a></li>";
|
---|
140 | }
|
---|
141 |
|
---|
142 | if (!$votol and $fascia>$limite){ // si vota per la lista
|
---|
143 | if ($genere>2) {
|
---|
144 | if (!$circo and $num_circ>1)
|
---|
145 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=lista_circo\">".substr(_LISTA." "._PER." "._CIRCO,0,33)."</a></li>
|
---|
146 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=lista_sezione\">".substr(_LISTA." "._PER." "._SEZIONI,0,33)."</a></li>";
|
---|
147 |
|
---|
148 |
|
---|
149 | }
|
---|
150 |
|
---|
151 | }
|
---|
152 | if ($genere>3 and !$votoc) {
|
---|
153 | if (!$votoc){
|
---|
154 | if(!$circo and $num_circ>1)
|
---|
155 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=candidato_circo\">".substr(_CONSI." "._PER." "._CIRCO,0,33)."</a></li>
|
---|
156 | <li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=candidato_sezione\">".substr(_CONSI." "._PER." "._SEZIONI,0,33)."</a></li>";
|
---|
157 |
|
---|
158 | }
|
---|
159 | }
|
---|
160 | if ($tipo_cons==3 and $hondt>=1) {
|
---|
161 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=consiglieri\">"._CALCONS."</a></li>";
|
---|
162 | }
|
---|
163 |
|
---|
164 |
|
---|
165 | echo "</ul></li>";
|
---|
166 |
|
---|
167 |
|
---|
168 |
|
---|
169 |
|
---|
170 | /***********************************
|
---|
171 | Scelta Grafici
|
---|
172 | ***********************************/
|
---|
173 |
|
---|
174 | echo " <li><a href=\"#\"><strong>"._GRAFICI."</strong></a>
|
---|
175 | <ul>";
|
---|
176 |
|
---|
177 |
|
---|
178 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=affluenze_graf\">"._AFFLUENZE."</a></li>";
|
---|
179 |
|
---|
180 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=graf_votanti\">"._VOTI."</a></li>";
|
---|
181 | if($genere!=4){
|
---|
182 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=graf_gruppo\">"._GRUPPO."</a></li>";
|
---|
183 | }
|
---|
184 | if ($genere>2){
|
---|
185 | if (!$circo && !$votog) {
|
---|
186 | echo "<li><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=graf_candidato\">"._CONSI."</a></li>";
|
---|
187 | }
|
---|
188 | }
|
---|
189 |
|
---|
190 | echo "</ul></li>";
|
---|
191 |
|
---|
192 |
|
---|
193 | } // fine verifica esistenza consultazione : variabile $esiste
|
---|
194 |
|
---|
195 |
|
---|
196 |
|
---|
197 | ################ tema #####
|
---|
198 | if ($tema_on=="1"){
|
---|
199 |
|
---|
200 |
|
---|
201 | include("temi/facebook/tema.php");
|
---|
202 |
|
---|
203 | }
|
---|
204 | //echo "</div>";
|
---|
205 | echo " <li><a href=\"#\"><strong>"._OPTIONS."</strong></a>
|
---|
206 | <ul>";
|
---|
207 |
|
---|
208 | language();
|
---|
209 |
|
---|
210 | flash();
|
---|
211 |
|
---|
212 | noblocco();
|
---|
213 | echo "</ul></li>";
|
---|
214 | echo "</div>";
|
---|
215 |
|
---|
216 |
|
---|
217 | # linguaggio x demo
|
---|
218 |
|
---|
219 | function language(){
|
---|
220 | global $lang,$name,$op,$file,$filelang,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
221 | $filename=$filelang;
|
---|
222 | // linguaggio
|
---|
223 |
|
---|
224 | $menulist='';
|
---|
225 | // scelta linguaggio
|
---|
226 | $langdir = dir("modules/Elezioni/language");
|
---|
227 | while($func=$langdir->read()) {
|
---|
228 | if(substr($func, 0, 5) == "lang-") {
|
---|
229 | $menulist .= "$func ";
|
---|
230 | }
|
---|
231 | }
|
---|
232 | closedir($langdir->handle);
|
---|
233 | $menulist = explode(" ", $menulist);
|
---|
234 | sort($menulist);
|
---|
235 | for ($i=0; $i < sizeof($menulist); $i++) {
|
---|
236 | if($menulist[$i]!="") {
|
---|
237 | $tl = preg_replace("/lang-/","",$menulist[$i]);
|
---|
238 | $tl = preg_replace("/.php/","",$tl);
|
---|
239 | $altlang = ucfirst($tl);
|
---|
240 |
|
---|
241 | if ($lang==$tl) $bordo="class=\"bordo\"";else $bordo="class=\"nobordo\"";
|
---|
242 | echo "<li><a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&newl=$tl\"><img $bordo src=\"modules/Elezioni/images/$tl.gif\" alt=\"$altlang\" title=\"$altlang\" width=\"15\" /> "._LINGUA." $tl</a></li>";
|
---|
243 | }
|
---|
244 | }
|
---|
245 |
|
---|
246 | }
|
---|
247 |
|
---|
248 |
|
---|
249 |
|
---|
250 |
|
---|
251 |
|
---|
252 |
|
---|
253 | ########################### Blocchi
|
---|
254 | # flash x demo
|
---|
255 | function flash(){
|
---|
256 | global $flash,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
257 |
|
---|
258 | if ($flash=='1'){
|
---|
259 | echo "<li><a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&flash=0\"><img class=\"nobordo\" src=\"modules/Elezioni/images/flashno.gif\" alt=\"NoFlash\" title=\"NoFlash\" width=\"15\"/> "._OFF." Flash</a></li>";
|
---|
260 |
|
---|
261 | }else{
|
---|
262 |
|
---|
263 | echo "<li><a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&flash=1\"><img class=\"nobordo\" src=\"modules/Elezioni/images/flashyes.gif\" alt=\"YesFlash\" title=\"YesFlash\" width=\"15\" /> "._ON." Flash</a></li>";
|
---|
264 |
|
---|
265 |
|
---|
266 | }
|
---|
267 |
|
---|
268 | }
|
---|
269 |
|
---|
270 |
|
---|
271 | # blocco no
|
---|
272 | function noblocco(){
|
---|
273 | global $blocco,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
274 |
|
---|
275 | if ($blocco=='1'){
|
---|
276 | echo "<li><a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&block=0\"><img class=\"nobordo\" src=\"modules/Elezioni/images/close.gif\" alt=\"NoBlocco\" title=\"NoBlocco\" width=\"15\"/> "._OFF." "._BLOCCO."</a></li>";
|
---|
277 |
|
---|
278 | }else{
|
---|
279 |
|
---|
280 | echo "<li><a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&block=1\"><img class=\"nobordo\" src=\"modules/Elezioni/images/open.gif\" alt=\"YesBlocco\" title=\"YesBlocco\" width=\"15\" /> "._ON." "._BLOCCO."</a></li>";
|
---|
281 |
|
---|
282 | }
|
---|
283 |
|
---|
284 | }
|
---|
285 |
|
---|
286 |
|
---|
287 |
|
---|
288 |
|
---|
289 |
|
---|
290 |
|
---|
291 |
|
---|
292 | ?>
|
---|