true, 'message' => ''); if ($register_pandora) { // Pandora register update $um_message = update_manager_register_instance (); $ui_feedback['message'] .= $um_message['message'] . '

'; if ($um_message['success']) { config_update_value ('instance_registered', 1); $ui_feedback['status'] = true && $ui_feedback['status']; } else { $ui_feedback['status'] = false; } } elseif (!$forced) { config_update_value ('identification_reminder_timestamp', $future_8_days); } if ($newsletter) { // Pandora newsletter update $email = get_parameter ('email', ''); $um_message = update_manager_insert_newsletter ($email); $ui_feedback['message'] .= $um_message['message']; if ($um_message['success']) { db_process_sql_update ('tusuario', array ('middlename' => 1), array('id_user' => $config['id_user'])); $ui_feedback['status'] = true && $ui_feedback['status']; } else { $ui_feedback['status'] = false; } } elseif (!$forced) { db_process_sql_update ('tusuario', array ('lastname' => $future_8_days), array('id_user' => $config['id_user'])); } // Form answer JSON $ui_feedback['status'] = $ui_feedback['status'] ? 1 : 0; echo io_json_mb_encode($ui_feedback); } if (!$not_return) { return; } } //Check if user is admin if (!license_free()) return; if (!users_is_admin ($config['id_user'])) return; // Get data to display properly the wizard $wizard_data = array (); $wizard_data['newsletter_subscribed'] = db_get_value ('middlename', 'tusuario', 'id_user', $config['id_user']); // force_* = 1 -> force show // force_* = 0 -> force hide // force_* = -1 -> show or hide depends reminder and timestamp $wizard_data['force_newsletter'] = get_parameter ('force_newsletter', -1); $wizard_data['newsletter_reminder'] = db_get_value ('firstname', 'tusuario', 'id_user', $config['id_user']); $wizard_data['newsletter_reminder_timestamp'] = db_get_value ('lastname', 'tusuario', 'id_user', $config['id_user']); $wizard_data['instance_registered'] = $config['instance_registered']; $wizard_data['force_register'] = get_parameter ('force_register', -1); $wizard_data['identification_reminder'] = $config['identification_reminder']; $wizard_data['identification_reminder_timestamp'] = $config['identification_reminder_timestamp']; $display_newsletter = display_newsletter ($wizard_data); $display_register = display_register ($wizard_data); $display_forced = ($wizard_data['force_newsletter'] != -1) || ($wizard_data['force_register'] != -1); // Return if it is fully completed if ((!$display_register) && (!$display_newsletter)) return false; $return_button = get_parameter ('return_button', 0) == 1; $email = db_get_value ('email', 'tusuario', 'id_user', $config['id_user']); //Avoid to show default email if ($email == 'admin@example.com') $email = ''; // Prints accept register license echo '
'; echo '
'; echo html_print_image ('images/pandora_circle_big.png', true); echo '
'; echo '
'; echo __('Stay up to date with the Pandora FMS community') . "."; echo '
'; echo '
'; echo '

' . __("When you subscribe to the Pandora FMS Update Manager service, you accept that we register your Pandora instance as an identifier on the database owned by Artica TS. This data will solely be used to provide you with information about Pandora FMS and will not be conceded to third parties. You'll be able to unregister from said database at any time from the Update Manager options") . '.

'; echo '

' . __("In the same fashion, when subscribed to the newsletter you accept that your email will pass on to a database property of Artica TS. This data will solely be used to provide you with information about Pandora FMS and will not be conceded to third parties. You'll be able to unregister from said database at any time from the newsletter subscription options") . '.

'; echo '
'; echo '
'; echo '
'; html_print_submit_button(__("Finish"), 'finish_dialog_button', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok" style="width:100px;"'); echo '
'; $display_status_return = $return_button ? 'block' : 'none'; echo '
'; html_print_submit_button(__("Return"), 'return_dialog_button', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd" style="width:100px;"'); echo '
'; echo '
'; html_print_checkbox('register', 1, false, false, false, 'cursor: \'pointer\''); echo ' ' .__("Join the Pandora FMS community") . '!
'; html_print_checkbox('newsletter', 1, false, false, false, 'cursor: \'pointer\''); echo ' ' .__("Subscribe to our newsletter") . ''; echo "
"; echo '
'; echo ' '; html_print_input_text_extended ('email-newsletter', $email, 'text-email-newsletter', '', 30, 255, false, '', array ("style" => "display:none; width: 200px;")); echo ' '; echo ' *'.__("Required") .' '; echo '
'; echo '
'; echo '
'; echo '
'; // Print yes or not dialog echo '
'; echo '
'; echo __("Do you want to continue without any registration") . "?"; echo '
'; echo '
'; html_print_submit_button(__("No"), 'no_registration', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub cancel" style="width:100px;"'); echo '
'; echo '
'; html_print_submit_button(__("Yes"), 'yes_registration', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd" style="width:100px;"'); echo '
'; echo '
'; // Print feedback user dialog echo '
'; echo '
'; echo html_print_image ('images/success_circle_big.png', true); echo '
'; echo '
'; echo '
'; ?>