diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index ab832bbf4f8..dfc4772c583 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -51,6 +51,18 @@ if ($_GET["action"] == 'set_main_upload_doc') } } +if ($_GET["action"] == 'activate_captcha') +{ + dolibarr_set_const($db, "MAIN_SECURITY_ENABLECAPTCHA", '1'); + Header("Location: security_other.php"); + exit; +} +else if ($_GET["action"] == 'disable_captcha') +{ + dolibarr_del_const($db, "MAIN_SECURITY_ENABLECAPTCHA"); + Header("Location: security_other.php"); + exit; +} /* @@ -111,7 +123,47 @@ print ''; print ''; print ''; -//print '
| '.$langs->trans("Parameters").' | '; +print ''.$langs->trans("Activated").' | '; +print ''.$langs->trans("Action").' | '; +print '||
| '.$langs->trans("UseCaptchaCode").' | '; + print ''; + if($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 1) + { + print img_tick(); + } + print ' | '; + print ''; + if ($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 0) + { + print ''.$langs->trans("Activate").''; + } + if($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 1) + { + print ''.$langs->trans("Disable").''; + } + print " | "; + + print ""; + print '||