* * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ $mapa = array('Propriedade de'=>'NOME', 'Data de nascimento'=>'NASCIMENTO', 'Cpf'=>'CPF', 'e-mail'=>'EMAIL', 'Identidade(RG)'=>'RG', 'Orgão expedidor'=>'ORGAOUF', 'PIS/PASEP (NIS)'=>'NIS', 'Título de Eleitor'=>'TITULO', 'Zona'=>'ZONA', 'Seção'=>'SECAO', 'Cidade/UF'=>'TITULO_CIDADE_UF', 'Cadastro INSS'=>'CADINSS', 'Início Validade'=>'INICIO_VALIDADE', 'Término Validade'=>'FIM_VALIDADE', 'Outros dados'=>'SUBJECT'); $GLOBALS['phpgw_info']['flags'] = array( 'noheader' => True, 'nonavbar' => True, 'currentapp' => 'preferences' ); include('../header.inc.php'); if(!isset($_SERVER['HTTPS'])) { $GLOBALS['phpgw']->redirect_link('../preferences'); } if(!$GLOBALS['phpgw_info']['server']['certificado']==1) { $GLOBALS['phpgw']->redirect_link('../preferences'); } require_once('../seguranca/certificado.php'); $cert = new certificado; if(!$cert->apresentado) { $GLOBALS['phpgw']->redirect_link('../preferences'); } /* if(!$cert->dados['CPF']) { $GLOBALS['phpgw']->redirect_link('../preferences'); } */ $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Dados do Certificado Digital'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); if($cert-apresentado) { echo '
'; $L=0; foreach($mapa as $item => $valor) { $val = $cert->dados[$valor]; if ($valor == 'ORGAOUF' || $valor =='TITULO_CIDADE_UF') { $aux1 = substr($cert->dados[$valor],strlen($cert->dados[$valor])-2,2); $aux2 = substr($cert->dados[$valor],0,strlen($cert->dados[$valor])-2); $val=$aux2.'/'.$aux1; } if($valor== 'SUBJECT' ) { $aux1 = explode('subject= ',$cert->dados[$valor]); $aux1 = explode('/',$aux1[1]); array_shift ($aux1); $val = implode('
',$aux1); } echo ''; } echo '
Item:Conteúdo:
'.$item.' '.$val.'


Voltar


'; } else { $GLOBALS['phpgw']->redirect_link('../preferences'); } $GLOBALS['phpgw']->common->phpgw_footer(); unset($cert); ?>