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

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 5.8 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;
12include("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
20if (isset($param['tour'])){
21 $tour=$param['tour'];
22 $_SESSION['newtour']="$tour";
23 }
24if (isset($_SESSION['newtour'])) $tour=$_SESSION['newtour'];
25
26
27if($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{
37if (isset($_SESSION['ruota'])) unset($_SESSION['ruota']);
38}
39//fine rotazione pagine
40$nometema=$tema;
41if (isset($_SESSION['ruota'])){ include("temi/$tema/button.php");tour();
42echo "<span class=\"piccolo\"> eleonline by l.apolito & r.gigli - www.eleonline.it</span>";} #bottone stop
43
44
45####################################
46function testata(){
47####################################
48
49global $nometema,$file,$bgcolor,$sitename,$dbi,$prefix,$blocco,$lang,$siteistat;
50if (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
57echo '
58<div id="header">
59 <div>
60 <h1>';
61 echo "$descr_com";
62echo '</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">&nbsp;';
66 language();
67 flash();
68 noblocco();
69 tour();
70echo ' </div>
71
72 </div>
73</div>
74
75';
76
77// menu
78echo '<div id="menu"><br/>';
79 if ($file=="index") menu();
80
81echo "</div>";
82
83echo '
84 <div id="page">
85 <div class="table-main">';
86
87if($blocco==1) echo '<div id="content">';
88
89}
90##################################
91function piede(){
92##################################
93global $nometema,$blocco,$lang;
94//echo "<div></div>";
95
96
97// carica i blocchi
98if($blocco==1) blocco();
99echo "</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."\";";
105eval($thefile);
106print $r_file;
107die();
108}
109
110####################################
111function blocco(){
112####################################
113global $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
115if ($blocco==1) echo "</div><div class=\"td-149\">";
116
117echo "<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>";
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."\";";
128eval($thefile);
129print $r_file;
130
131caricablocchi();
132
133// Blocco consultazioni
134if ($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."\";";
139eval($thefile);
140print $r_file;
141}else{
142if ($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."\";";
148eval($thefile);
149print $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
178echo "<h5>Note</h5>
179<h6><a href=\"modules.php?name=Elezioni&amp;file=index&amp;op=contatti\"> Contatti</a> </h6>";
180
181include_once("versione.php");
182
183 echo "<br />[<a href=\"http://www.eleonline.it\"><b>Eleonline $versione</b></a> - "._GESRIS." ]
184";
185echo '<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
207echo "
208</div>";
209
210
211}
212
213include("temi/tour/button.php");
214//if (isset($_SESSION['ruota'])){ echo "<div style:\"margin auto; text-align:center\">Eleonline</div>";}
215?>
Note: See TracBrowser for help on using the repository browser.