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 |
|
---|
9 | # linguaggio x demo
|
---|
10 | ###########################
|
---|
11 | if(!function_exists("language")){
|
---|
12 |
|
---|
13 | function language(){
|
---|
14 | ###########################
|
---|
15 |
|
---|
16 | global $lang,$name,$op,$file,$filelang,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
17 | $filename=$filelang;
|
---|
18 | // linguaggio
|
---|
19 |
|
---|
20 | $menulist='';
|
---|
21 | // scelta linguaggio
|
---|
22 | $langdir = dir("modules/Elezioni/language");
|
---|
23 | while($func=$langdir->read()) {
|
---|
24 | if(substr($func, 0, 5) == "lang-") {
|
---|
25 | $menulist .= "$func ";
|
---|
26 | }
|
---|
27 | }
|
---|
28 | closedir($langdir->handle);
|
---|
29 | $menulist = explode(" ", $menulist);
|
---|
30 | sort($menulist);
|
---|
31 | for ($i=0; $i < sizeof($menulist); $i++) {
|
---|
32 | if($menulist[$i]!="") {
|
---|
33 | $tl = preg_replace("lang-","",$menulist[$i]);
|
---|
34 | $tl = preg_replace(".php","",$tl);
|
---|
35 | $altlang = ucfirst($tl);
|
---|
36 |
|
---|
37 | if ($lang==$tl) $bordo="class=\"bordo\"";else $bordo="class=\"nobordo\"";
|
---|
38 | echo "<a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&newl=$tl\"><img $bordo src=\"modules/Elezioni/images/$tl.gif\" alt=\"$altlang\" title=\"$altlang\" /></a> ";
|
---|
39 | }
|
---|
40 | }
|
---|
41 |
|
---|
42 | }
|
---|
43 | }
|
---|
44 | # flash x demo
|
---|
45 |
|
---|
46 | ###############################
|
---|
47 | if(!function_exists("flash")){
|
---|
48 | function flash(){
|
---|
49 | ###############################
|
---|
50 | global $flash,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
51 |
|
---|
52 | if ($flash=='1'){
|
---|
53 | echo "<a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&flash=0\"><img class=\"nobordo\" src=\"modules/Elezioni/images/flashno.gif\" alt=\"NoFlash\" title=\"NoFlash\" /></a>";
|
---|
54 |
|
---|
55 | }else{
|
---|
56 |
|
---|
57 | echo "<a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&flash=1\"><img class=\"nobordo\" src=\"modules/Elezioni/images/flashyes.gif\" alt=\"YesFlash\" title=\"YesFlash\" /></a>";
|
---|
58 |
|
---|
59 | }
|
---|
60 |
|
---|
61 | }
|
---|
62 | }
|
---|
63 |
|
---|
64 | # blocco no
|
---|
65 | ############################
|
---|
66 | if(!function_exists("noblocco")){
|
---|
67 | function noblocco(){
|
---|
68 | ############################
|
---|
69 | global $blocco,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
70 |
|
---|
71 | if ($blocco=='1'){
|
---|
72 | 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=\"nobordo\" src=\"modules/Elezioni/images/close.gif\" alt=\"NoBlocco\" title=\"NoBlocco\" /></a>";
|
---|
73 |
|
---|
74 | }else{
|
---|
75 |
|
---|
76 | echo "<a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&block=1\"><img class=\"nobordo\" src=\"modules/Elezioni/images/open.gif\" alt=\"YesBlocco\" title=\"YesBlocco\" /></a>";
|
---|
77 |
|
---|
78 | }
|
---|
79 |
|
---|
80 | }
|
---|
81 | }
|
---|
82 |
|
---|
83 | # tour
|
---|
84 |
|
---|
85 |
|
---|
86 | ############################
|
---|
87 | if(!function_exists("tour")){
|
---|
88 | function tour(){
|
---|
89 | ############################
|
---|
90 | global $tour,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
91 |
|
---|
92 | if ($tour=='1'){
|
---|
93 |
|
---|
94 | echo "<a href=\"modules.php?name=$name&op=$op&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&tour=0&csv=0&block=1\">
|
---|
95 | <img class=\"nobordo\" src=\"modules/Elezioni/images/stop.gif\" alt=\"NoBlocco\" title=\"Stop\" /></a>";
|
---|
96 |
|
---|
97 | }else{
|
---|
98 |
|
---|
99 |
|
---|
100 |
|
---|
101 | echo "<a href=\"modules.php?name=$name&csv=1&block=0&id_comune=$id_comune&id_cons=$id_cons&id_cons_gen=$id_cons_gen&tour=1\">
|
---|
102 |
|
---|
103 |
|
---|
104 | <img class=\"nobordo\" src=\"modules/Elezioni/images/play.gif\" alt=\"YesBlocco\" title=\"Play\" /></a>";
|
---|
105 |
|
---|
106 | }
|
---|
107 |
|
---|
108 | }
|
---|
109 | }
|
---|
110 |
|
---|
111 | ?>
|
---|