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

Last change on this file since 64 was 61, checked in by roby, 15 years ago

In client: sistemata la rotazione delle pagine per il tema tour - replica per errore.

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