+// Return values:
+// 'failed' = Something goes wrong (default)
+// 'agreed' = Has verified and and confirmed it to see them
+// 'forbidden' = Has not the proper right to alter them
+// 'update' = Need to update extension 'admins'
+// 'ask' = A form was send to the admin
+function doVerifyExpertSettings () {
+ // Default return status is failed
+ $return = 'failed';
+
+ // Is the extension installed and recent?
+ if (isExtensionInstalledAndNewer('admins', '0.7.3')) {
+ // Okay, load the status
+ $expertSettings = getAminsExpertSettings();
+
+ // Is he allowed?
+ if ($expertSettings == 'Y') {
+ // Okay, does he want to see them?
+ if (getAminsExpertWarning() == 'Y') {
+ // Ask for them
+ if (isFormSent()) {
+ // Is the element set, then we need to change the admin
+ if (isPostRequestParameterSet('expert_settings')) {
+ // Get it and prepare final post data array
+ $postData['login'][getCurrentAdminId()] = getAdminLogin(getCurrentAdminId());
+ $postData['expert_warning'][getCurrentAdminId()] = 'N';
+
+ // Change it in the admin
+ adminsChangeAdminAccount($postData, 'expert_warning');
+
+ // Clear form
+ unsetPostRequestParameter('ok');
+ } // END - if
+
+ // All fine!
+ $return = 'agreed';
+ } else {
+ // Send form
+ loadTemplate('admin_expert_settings_form');
+
+ // Asked for it
+ $return = 'ask';
+ }
+ } else {
+ // Do not display
+ $return = 'agreed';
+ }
+ } else {
+ // Forbidden
+ $return = 'forbidden';
+ }
+ } else {
+ // Out-dated extension or not installed
+ $return = 'update';
+ }
+
+ // Output message for other status than ask/agreed
+ if (($return != 'ask') && ($return != 'agreed')) {
+ // Output message
+ loadTemplate('admin_settings_saved', false, getMessage('ADMIN_EXPERT_SETTINGS_STATUS_' . strtoupper($return)));
+ } // END - if
+
+ // Return status
+ return $return;
+}
+
+// [EOF]