source: trunk/client/temi/tour/index.php@ 398

Last change on this file since 398 was 352, checked in by roby, 3 years ago

Segue adattamento per php7
modifica gestione consultazioni con e senza voto nullo di lista

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