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

Last change on this file since 242 was 212, checked in by roby, 11 years ago

client:
proiezione consiglio visibile solo per consultazioni chiuse
impostata lettura del file config per tema tour

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