';
ldap_close($ds);
exit();
}
if($info[0]["userCertificate"][0] && $cert == $info[0]["userCertificate"][0] )
{
//echo '0'.chr(0x0D).chr(0x0A).$info[0]["uid"][0].chr(0x0D).chr(0x0A).$info[0]["cryptpassword"][0];
echo '
'.lang('Certificate already registered').'
';
ldap_close($ds);
exit();
}
$user_info = array();
$aux1 = $info[0]["dn"];
$user_info['userCertificate'] = $cert;
if(isset($GLOBALS['phpgw_info']['server']['atributoexpiracao']) && $GLOBALS['phpgw_info']['server']['atributoexpiracao'])
{
if(substr($info[0][$GLOBALS['phpgw_info']['server']['atributoexpiracao']][0],-1,1)=="Z")
{
$user_info[$GLOBALS['phpgw_info']['server']['atributoexpiracao']] = '19800101000000Z';
}
else
{
$user_info[$GLOBALS['phpgw_info']['server']['atributoexpiracao']] = '0';
}
}
else
{
$user_info['phpgwlastpasswdchange'] = '0';
}
if(!ldap_modify($ds,$aux1,$user_info))
{
echo '
'.lang('Error in Certificate registration'). ' - ' . $aux1.'
';
}
else
{
echo '
';
$GLOBALS['phpgw']->common->phpgw_footer();
ldap_close($ds);
exit();
}
else
{
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Digital Certificate Registration');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
if ($GLOBALS['phpgw_info']['server']['certificado']==1)
{
$var_tokens = '';
for($ii = 1; $ii < 11; $ii++)
{
if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'])
$var_tokens .= $GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'] . ',';
}
if(!$var_tokens)
{
$var_tokens = 'ePass2000Lx;/usr/lib/libepsng_p11.so,ePass2000Win;c:/windows/system32/ngp11v211.dll';
}
$param1 = "
'
' +
";
$param2 = "
'token=\"" . substr($var_tokens,0,strlen($var_tokens)) . "\" ' +
";
$cod_applet =
/* // com debug ativado
'';
*/
// sem debug ativado
'';
echo $cod_applet;
echo '
';
$GLOBALS['phpgw']->common->phpgw_footer();
}
}
?>