2 // vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
3 // +--------------------------------------------------------------------+
4 // | Ministerio de EconomÃa |
5 // | AI (Administrador de Intranet) |
6 // +--------------------------------------------------------------------+
7 // | This file is part of AI. |
9 // | AI is free software; you can redistribute it and/or modify |
10 // | it under the terms of the GNU General Public License as published |
11 // | by the Free Software Foundation; either version 2 of the License, |
12 // | or (at your option) any later version. |
14 // | AI is distributed in the hope that it will be useful, but |
15 // | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 // | General Public License for more details. |
19 // | You should have received a copy of the GNU General Public License |
20 // | along with Hooks; if not, write to the Free Software Foundation, |
21 // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 // +--------------------------------------------------------------------+
23 // | Creado: Thu Jul 24 20:17:47 2003 |
24 // | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
25 // +--------------------------------------------------------------------+
30 // +X2C Class 532 :general
32 * Funciones generales.
41 * Lista archivos devolviendo un array apropiado para un SELECT.
43 * @param string $dir Directorio donde estan las imagenes.
44 * @param string $prepend Prefijo del archivo.
45 * @param string $append Postfijo del archivo.
49 function listarArchivos($dir = '.', $prepend = '', $append = '') // ~X2C
51 $lista = array('' => '--');
53 while (($file = $d->read()) !== false) {
54 if (preg_match("/$prepend(.*)$append/", $file, $m)) {
55 $nombre = ucwords(join(' ', preg_split('/_/', $m[1])));
56 $lista[$file] = $nombre;
63 // -X2C Class :general