source: sandbox/2.2.0.2/security/lista_pasta.php @ 3232

Revision 3232, 1.4 KB checked in by rafaelraymundo, 14 years ago (diff)

Ticket #1237 - Atualizados componentes de suporte ao uso do Certificado Digital.

  • Property svn:executable set to *
Line 
1<?php
2        $GLOBALS['phpgw_info'] = array();
3        $GLOBALS['phpgw_info']['flags'] = array('noheader'   => True,'nonavbar'   => True,'currentapp' => 'admin');
4        include('../header.inc.php');
5        require_once('classes/CertificadoB.php');
6        require_once('security-lib.php');
7        $xml  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
8       
9        if($_POST['caminho'])
10            {
11                $dir = dirname($_POST['caminho']);
12            }
13        else
14            {   
15                $Linhas = explode(chr(0x0A),file_get_contents($_SERVER["DOCUMENT_ROOT"] . '/security/crl_admin/crl_admin_confg.py'));
16                foreach($Linhas as $linha)
17                    {
18                        $path = pega_path(array( 'CAfile =', 'CAfile='),$linha);
19                        if($path)
20                            {
21                                $path3 = $path;
22                                break;
23                            }
24                    }
25                $dir = dirname($path3);
26            }
27
28        if(!is_dir(dirname($dir))) exit();
29
30        $ret = ler_arquivos_de_uma_pasta($dir);
31        sort($ret);
32        $xml .= '<arquivos>';
33        foreach($ret as $file)
34            {
35                if($file[0] != '.')  $xml .= '<arq>' . $file . '</arq>';
36            }
37        $xml .= '</arquivos>';
38        Header('Content-type: application/xml; charset=utf-8');
39        echo $xml;
40?>
Note: See TracBrowser for help on using the repository browser.