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 | /* tema tour per far girare le pagine in automatico */
|
---|
9 | /* le pagine vanno messe nel file config,php */
|
---|
10 |
|
---|
11 | global $tour;
|
---|
12 | include("config.php");
|
---|
13 | $param=strip_tags(strtolower($_SERVER['REQUEST_METHOD'])) == 'get' ? $_GET : $_POST;
|
---|
14 |
|
---|
15 | ####################################
|
---|
16 | // rotazione pagina
|
---|
17 | // bottone file button.php
|
---|
18 | ####################################
|
---|
19 |
|
---|
20 | if (isset($param['tour'])){
|
---|
21 | $tour=$param['tour'];
|
---|
22 | $_SESSION['newtour']="$tour";
|
---|
23 | }
|
---|
24 | if (isset($_SESSION['newtour'])) $tour=$_SESSION['newtour'];
|
---|
25 |
|
---|
26 |
|
---|
27 | if($tour=='1'){
|
---|
28 |
|
---|
29 | $max_ruota=count($lista_ruota)-1;
|
---|
30 | if (isset($_SESSION['ruota'])) { $ruota=$_SESSION['ruota'];}
|
---|
31 | else {$ruota=0;$_SESSION['ruota']=0;}
|
---|
32 | if ($ruota>=$max_ruota) {$ruota=0;}
|
---|
33 | else {$ruota++;}
|
---|
34 | $_SESSION['ruota']=$ruota;
|
---|
35 | $op=$lista_ruota[$ruota];
|
---|
36 | }else{
|
---|
37 | if (isset($_SESSION['ruota'])) unset($_SESSION['ruota']);
|
---|
38 | }
|
---|
39 | //fine rotazione pagine
|
---|
40 | $nometema=$tema;
|
---|
41 | if (isset($_SESSION['ruota'])){ include("temi/$tema/button.php");tour();
|
---|
42 | echo "<span class=\"piccolo\"> eleonline by l.apolito & r.gigli - www.eleonline.it</span>";} #bottone stop
|
---|
43 |
|
---|
44 |
|
---|
45 | ####################################
|
---|
46 | function testata(){
|
---|
47 | ####################################
|
---|
48 |
|
---|
49 | global $nometema,$file,$bgcolor,$sitename,$dbi,$prefix,$blocco,$lang,$siteistat;
|
---|
50 | if (isset($param['id_comune'])) $id_comune=intval($param['id_comune']); else $id_comune=$siteistat;
|
---|
51 |
|
---|
52 | $res = mysql_query("SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi);
|
---|
53 | list($descr_com) = mysql_fetch_row($res);
|
---|
54 |
|
---|
55 |
|
---|
56 | // logo
|
---|
57 | echo '
|
---|
58 | <div id="header">
|
---|
59 | <div>
|
---|
60 | <h1>';
|
---|
61 | echo "$descr_com";
|
---|
62 | echo '</a></h1>
|
---|
63 | <b>consultazioni elettorali on line </b> <a href="http://www.eleonline.it"> <i>by l.apolito e r.gigli</i></a>
|
---|
64 | <br/>
|
---|
65 | <div id="bottoni"> ';
|
---|
66 | language();
|
---|
67 | flash();
|
---|
68 | noblocco();
|
---|
69 | tour();
|
---|
70 | echo ' </div>
|
---|
71 |
|
---|
72 | </div>
|
---|
73 | </div>
|
---|
74 |
|
---|
75 | ';
|
---|
76 |
|
---|
77 | // menu
|
---|
78 | echo '<div id="menu"><br/>';
|
---|
79 | if ($file=="index") menu();
|
---|
80 |
|
---|
81 | echo "</div>";
|
---|
82 |
|
---|
83 | echo '
|
---|
84 | <div id="page">
|
---|
85 | <div class="table-main">';
|
---|
86 |
|
---|
87 | if($blocco==1) echo '<div id="content">';
|
---|
88 |
|
---|
89 | }
|
---|
90 | ##################################
|
---|
91 | function piede(){
|
---|
92 | ##################################
|
---|
93 | global $nometema,$blocco,$lang;
|
---|
94 | //echo "<div></div>";
|
---|
95 |
|
---|
96 |
|
---|
97 | // carica i blocchi
|
---|
98 | if($blocco==1) blocco();
|
---|
99 | echo "</div></div>";
|
---|
100 | // carica il file foooter
|
---|
101 | $tmpl_file = "temi/language/$lang/footer.html";
|
---|
102 | $thefile = implode("", file($tmpl_file));
|
---|
103 | $thefile = addslashes($thefile);
|
---|
104 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
105 | eval($thefile);
|
---|
106 | print $r_file;
|
---|
107 | die();
|
---|
108 | }
|
---|
109 |
|
---|
110 | ####################################
|
---|
111 | function blocco(){
|
---|
112 | ####################################
|
---|
113 | global $name,$blocco,$bgcolor, $nometema,$id_comune,$tipo_cons,$id_cons_gen,$id_cons,$prefix,$dbi, $votog,$votol,$votoc,$circo,$genere,$lang,$op,$id_circ;
|
---|
114 |
|
---|
115 | if ($blocco==1) echo "</div><div class=\"td-149\">";
|
---|
116 |
|
---|
117 | echo "<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=\"noblocco\" src=\"modules/Elezioni/images/close.gif\" alt=\"NoBlocco\" title=\"NoBlocco\" /></a>";
|
---|
118 |
|
---|
119 |
|
---|
120 |
|
---|
121 | // Blocco generale
|
---|
122 |
|
---|
123 |
|
---|
124 | $tmpl_file = "temi/language/$lang/bloccogen.html";
|
---|
125 | $thefile = implode("", file($tmpl_file));
|
---|
126 | $thefile = addslashes($thefile);
|
---|
127 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
128 | eval($thefile);
|
---|
129 | print $r_file;
|
---|
130 |
|
---|
131 | caricablocchi();
|
---|
132 |
|
---|
133 | // Blocco consultazioni
|
---|
134 | if ($genere>2){
|
---|
135 | $tmpl_file = "temi/language/$lang/bloccocand.html";
|
---|
136 | $thefile = implode("", file($tmpl_file));
|
---|
137 | $thefile = addslashes($thefile);
|
---|
138 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
139 | eval($thefile);
|
---|
140 | print $r_file;
|
---|
141 | }else{
|
---|
142 | if ($genere==0){
|
---|
143 | //Blocco Referendum
|
---|
144 | $tmpl_file = "temi/language/$lang/bloccoref.html";
|
---|
145 | $thefile = implode("", file($tmpl_file));
|
---|
146 | $thefile = addslashes($thefile);
|
---|
147 | $thefile = "\$r_file=\"".$thefile."\";";
|
---|
148 | eval($thefile);
|
---|
149 | print $r_file;
|
---|
150 | }
|
---|
151 | }
|
---|
152 | // Blocco link
|
---|
153 |
|
---|
154 | $result = mysql_query("select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid ", $dbi);
|
---|
155 | if (mysql_num_rows($result) == 0) {
|
---|
156 | //echo "</div></td></tr></table>";
|
---|
157 |
|
---|
158 |
|
---|
159 |
|
---|
160 | } else {
|
---|
161 | echo "<h5>"._LINK."</h5><p>";
|
---|
162 | while (list($mid, $title, $preamble,$content, $editimage) = mysql_fetch_row($result)) {
|
---|
163 | if ($title != "" && $content != "") {
|
---|
164 | $content = stripslashes($content);
|
---|
165 | $content = substr($content,0,45);
|
---|
166 | echo "<b><a href=\"$preamble\">
|
---|
167 | $title</a></b><br />
|
---|
168 |
|
---|
169 | $content<br/>";
|
---|
170 | }
|
---|
171 | }
|
---|
172 |
|
---|
173 | }
|
---|
174 |
|
---|
175 |
|
---|
176 | ######## footer ######################################
|
---|
177 |
|
---|
178 | echo "<h5>Note</h5>
|
---|
179 | <h6><a href=\"modules.php?name=Elezioni&file=index&op=contatti\"> Contatti</a> </h6>";
|
---|
180 |
|
---|
181 | include_once("versione.php");
|
---|
182 |
|
---|
183 | echo "<br />[<a href=\"http://www.eleonline.it\"><b>Eleonline $versione</b></a> - "._GESRIS." ]
|
---|
184 | ";
|
---|
185 | echo '<br/><br/>
|
---|
186 |
|
---|
187 | <!-- w3c -->
|
---|
188 | <div class="w3cbutton3">
|
---|
189 | <a href="http://www.w3.org/WAI/WCAG1AA-Conformance" title="pagina di spiegazione degli standard">
|
---|
190 | <span class="w3c">W3C</span>
|
---|
191 | <span class="spec">WAI-<span class="specRed">AA</span></span>
|
---|
192 | </a>
|
---|
193 | </div>
|
---|
194 | <div class="w3cbutton3">
|
---|
195 | <a href="http://jigsaw.w3.org/css-validator/" title="Validatore css">
|
---|
196 | <span class="w3c">W3C</span>
|
---|
197 | <span class="spec">CSS</span>
|
---|
198 | </a>
|
---|
199 | </div>
|
---|
200 | <div class="w3cbutton3">
|
---|
201 | <a href="http://validator.w3.org/" title="Validatore XHTML ">
|
---|
202 | <span class="w3c">W3C</span>
|
---|
203 | <span class="spec">XHTML 1.0</span>
|
---|
204 | </a>
|
---|
205 | </div>';
|
---|
206 |
|
---|
207 | echo "
|
---|
208 | </div>";
|
---|
209 |
|
---|
210 |
|
---|
211 | }
|
---|
212 |
|
---|
213 | include("temi/tour/button.php");
|
---|
214 | //if (isset($_SESSION['ruota'])){ echo "<div style:\"margin auto; text-align:center\">Eleonline</div>";}
|
---|
215 | ?>
|
---|