source: trunk/client/modules/Elezioni/tema.php@ 430

Last change on this file since 430 was 17, checked in by roby, 15 years ago

Sostituite le funzioni del gruppo ereg perché divenute "deprecate" con il php 5.3

File size: 1.2 KB
RevLine 
[2]1<?php
2if (!defined('MODULE_FILE')) {
3 die ("Non puoi accedere al file direttamente...");
4}
5global $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&amp;id_comune=$id_comune&amp;id_cons_gen=$id_cons_gen&amp;op=$op&amp;id_circ=$id_circ&amp;tema='+this.options[this.options.selectedIndex].value\">";
14
15
16 $path = "temi/";
17 $handle=opendir($path);
18 while ($file = readdir($handle)) {
19
[17]20 if ( (preg_match('/^([_0-9a-zA-Z]+)([_0-9a-zA-Z]{3})$/',$file)) ) {
[2]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>";
46echo $content;
47
48
49?>
Note: See TracBrowser for help on using the repository browser.