source: trunk/client/temi/inc/button.php@ 64

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

Continua sostituzione funzioni ereg

File size: 2.3 KB
RevLine 
[2]1<?php
2# bottoni
3
4# linguaggio x demo
5
6function language(){
7global $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]!="") {
[25]24 $tl = preg_replace("/lang-/","",$menulist[$i]);
25 $tl = preg_replace("/.php/","",$tl);
[2]26 $altlang = ucfirst($tl);
27
28 if ($lang==$tl) $bordo="class=\"bordo\"";else $bordo="class=\"nobordo\"";
29 echo "<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;newl=$tl\"><img $bordo src=\"modules/Elezioni/images/$tl.gif\" alt=\"$altlang\" title=\"$altlang\" /></a> ";
30 }
31 }
32
33}
34
35# flash x demo
36function flash(){
37global $flash,$name,$id_comune,$op,$id_cons,$id_cons_gen;
38
39if ($flash=='1'){
40 echo "<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;flash=0\"><img class=\"nobordo\" src=\"modules/Elezioni/images/flashno.gif\" alt=\"NoFlash\" title=\"NoFlash\" /></a>";
41
42}else{
43
44echo "<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;flash=1\"><img class=\"nobordo\" src=\"modules/Elezioni/images/flashyes.gif\" alt=\"YesFlash\" title=\"YesFlash\" /></a>";
45
46}
47
48}
49
50# blocco no
51function noblocco(){
52global $blocco,$name,$id_comune,$op,$id_cons,$id_cons_gen;
53
54if ($blocco=='1'){
55 echo "<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=\"nobordo\" src=\"modules/Elezioni/images/close.gif\" alt=\"NoBlocco\" title=\"NoBlocco\" /></a>";
56
57}else{
58
59 echo "<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=1\"><img class=\"nobordo\" src=\"modules/Elezioni/images/open.gif\" alt=\"YesBlocco\" title=\"YesBlocco\" /></a>";
60
61}
62
63}
[17]64?>
Note: See TracBrowser for help on using the repository browser.