source:
trunk/client/modules/Elezioni/tema.php@
430
Last change on this file since 430 was 17, checked in by , 15 years ago | |
---|---|
File size: 1.2 KB |
Line | |
---|---|
1 | <?php |
2 | if (!defined('MODULE_FILE')) { |
3 | die ("Non puoi accedere al file direttamente..."); |
4 | } |
5 | global $id_circ; |
6 | |
7 | if (! isset($content)) $content=""; |
8 | if (! isset($tlist)) $tlist=""; |
9 | |
10 | $content .=" |
11 | <div class=\"form\"> |
12 | <form action=\"modules.php\" method=\"post\"> |
13 | <select name=\"tema\" class=\"moduloform\" onchange=\"javascript:top.location.href='modules.php?name=Elezioni&id_comune=$id_comune&id_cons_gen=$id_cons_gen&op=$op&id_circ=$id_circ&tema='+this.options[this.options.selectedIndex].value\">"; |
14 | |
15 | |
16 | $path = "temi/"; |
17 | $handle=opendir($path); |
18 | while ($file = readdir($handle)) { |
19 | |
20 | if ( (preg_match('/^([_0-9a-zA-Z]+)([_0-9a-zA-Z]{3})$/',$file)) ) { |
21 | |
22 | $tlist .= "$file "; |
23 | } |
24 | } |
25 | |
26 | closedir($handle); |
27 | $tlist = explode(" ", $tlist); |
28 | sort($tlist); |
29 | for ($i=0; $i < sizeof($tlist); $i++) { |
30 | if(($tlist[$i]!="") && ($tlist[$i]!="language")) { |
31 | if ($tema == $tlist[$i]) { |
32 | $sel = "selected"; |
33 | } else { |
34 | $sel = ""; |
35 | } |
36 | |
37 | $files=$tlist[$i]; |
38 | $content .="<option name=\"tema\" value=\"$tlist[$i]\" $sel>Tema--->$files\n"; |
39 | |
40 | } |
41 | } |
42 | $content .="</select> |
43 | |
44 | </form> |
45 | </div>"; |
46 | echo $content; |
47 | |
48 | |
49 | ?> |
Note:
See TracBrowser
for help on using the repository browser.