3 <link rel
="stylesheet" type
="text/css" href
="fsbrowser.css"/>
9 function fsbrowser_init()
13 if (strlen($_GET["dir"]) > 0)
14 $directory = $_GET["dir"];
17 function remove_file()
19 $file = $_GET["remove"];
25 function is_image($file)
27 $images = array("gif", "png", "jpg", "jpeg", "bmp", "svg");
29 foreach($images as $i)
30 if (strstr($file, "." . $i))
35 function is_php($fname)
37 if (strstr($fname, ".php"))
42 function put_icon($icon)
44 printf(" <td><img src=%s /></td>\n", $icon);
59 printf("<tr class='%s'>\n", $name);
62 function make_link($fname)
71 $fpath = $directory . "/" . $fname;
73 put_icon("folder-icon.gif");
75 echo("<a class='dir' href=fsbrowser.php?dir=" . $fpath . ">");
76 echo($fname . "</a></td>\n");
80 put_icon("image-icon.gif");
81 else if (is_php($fname))
82 put_icon("php-icon.gif");
85 echo(" <td>" . $fname . "</td>\n");
86 echo(" <td class='del'>");
87 printf("<a class='del' href=fsbrowser.php?dir=%s", $directory);
88 printf("&remove=%s>apagar</a>", $fpath);
98 printf("<h3>Caminho: %s/</h3>\n", $directory);
100 $files = scandir($directory);
102 echo("Diretorio vazio\n");
106 echo("<table border='0'>\n");
108 foreach($files as $f)