1 | <?php
|
---|
2 | # bottoni
|
---|
3 |
|
---|
4 | # linguaggio x demo
|
---|
5 |
|
---|
6 | function language(){
|
---|
7 | global $lang,$name,$op,$file,$filelang,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
8 | $filename=$filelang;
|
---|
9 | // linguaggio
|
---|
10 |
|
---|
11 | $menulist='';
|
---|
12 | // scelta linguaggio
|
---|
13 | $langdir = dir("modules/Elezioni/language");
|
---|
14 | while($func=$langdir->read()) {
|
---|
15 | if(substr($func, 0, 5) == "lang-") {
|
---|
16 | $menulist .= "$func ";
|
---|
17 | }
|
---|
18 | }
|
---|
19 | closedir($langdir->handle);
|
---|
20 | $menulist = explode(" ", $menulist);
|
---|
21 | sort($menulist);
|
---|
22 | for ($i=0; $i < sizeof($menulist); $i++) {
|
---|
23 | if($menulist[$i]!="") {
|
---|
24 | $tl = preg_replace("lang-","",$menulist[$i]);
|
---|
25 | $tl = preg_replace(".php","",$tl);
|
---|
26 | $altlang = ucfirst($tl);
|
---|
27 |
|
---|
28 | if ($lang==$tl) $bordo="class=\"bordo\"";else $bordo="class=\"nobordo\"";
|
---|
29 | 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> ";
|
---|
30 | }
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
34 |
|
---|
35 | # flash x demo
|
---|
36 | function flash(){
|
---|
37 | global $flash,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
38 |
|
---|
39 | if ($flash=='1'){
|
---|
40 | 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>";
|
---|
41 |
|
---|
42 | }else{
|
---|
43 |
|
---|
44 | 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>";
|
---|
45 |
|
---|
46 | }
|
---|
47 |
|
---|
48 | }
|
---|
49 |
|
---|
50 | # blocco no
|
---|
51 | function noblocco(){
|
---|
52 | global $blocco,$name,$id_comune,$op,$id_cons,$id_cons_gen;
|
---|
53 |
|
---|
54 | if ($blocco=='1'){
|
---|
55 | 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>";
|
---|
56 |
|
---|
57 | }else{
|
---|
58 |
|
---|
59 | 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>";
|
---|
60 |
|
---|
61 | }
|
---|
62 |
|
---|
63 | }
|
---|
64 | ?>
|
---|