2014-06-02 Ramon Novoa <rnovoa@artica.es>
* godmode/setup/license.php: Added to repository. License configuration screen. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10078 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8c76fb5b67
commit
60c12b91a5
|
@ -1,3 +1,8 @@
|
||||||
|
2014-06-02 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* godmode/setup/license.php: Added to repository. License configuration
|
||||||
|
screen.
|
||||||
|
|
||||||
2014-06-02 Ramon Novoa <rnovoa@artica.es>
|
2014-06-02 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* extensions/update_manager/settings.php
|
* extensions/update_manager/settings.php
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
<?php
|
||||||
|
//Pandora FMS- http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
|
|
||||||
|
// 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 for version 2.
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Load global vars
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
check_login ();
|
||||||
|
|
||||||
|
if (! check_acl ($config['id_user'], 0, 'PM')) {
|
||||||
|
db_pandora_audit("ACL Violation", "Trying to change License settings");
|
||||||
|
include ("general/noaccess.php");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$update_settings = (bool) get_parameter_post ('update_settings');
|
||||||
|
|
||||||
|
ui_print_page_header (__('License management'), "images/extensions.png", false, "", true);
|
||||||
|
|
||||||
|
if ($update_settings) {
|
||||||
|
foreach ($_POST['keys'] as $key => $value) {
|
||||||
|
um_db_update_setting ($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_print_success_message(__('License updated'));
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_require_javascript_file_enterprise('load_enterprise');
|
||||||
|
enterprise_include_once('include/functions_license.php');
|
||||||
|
$license = enterprise_hook('license_get_info');
|
||||||
|
|
||||||
|
$settings = null;
|
||||||
|
$settings = um_db_load_settings ();
|
||||||
|
|
||||||
|
echo '<script type="text/javascript">';
|
||||||
|
print_js_var_enteprise();
|
||||||
|
echo '</script>';
|
||||||
|
|
||||||
|
echo '<form method="post">';
|
||||||
|
|
||||||
|
$table->width = '95%';
|
||||||
|
$table->data = array ();
|
||||||
|
|
||||||
|
$table->data[0][0] = '<strong>'.__('Customer key').'</strong>';
|
||||||
|
$table->data[0][1] = html_print_input_text ('keys[customer_key]', $settings->customer_key, '', 81, 255, true);
|
||||||
|
|
||||||
|
$table->data[1][0] = '<strong>'.__('Expires').'</strong>';
|
||||||
|
$table->data[1][1] = html_print_input_text('expires', $license['expiry_date'], '', 10, 255, true, true);
|
||||||
|
|
||||||
|
$table->data[2][0] = '<strong>'.__('Platform Limit').'</strong>';
|
||||||
|
$table->data[2][1] = html_print_input_text('expires', $license['max_agents'], '', 10, 255, true, true);
|
||||||
|
|
||||||
|
$table->data[3][0] = '<strong>'.__('Current Platform Count').'</strong>';
|
||||||
|
$table->data[3][1] = html_print_input_text('expires', $license['agent_count'], '', 10, 255, true, true);
|
||||||
|
|
||||||
|
$table->data[4][0] = '<strong>'.__('License Mode').'</strong>';
|
||||||
|
$table->data[4][1] = html_print_input_text('expires', $license['license_mode'], '', 10, 255, true, true);
|
||||||
|
|
||||||
|
html_print_table ($table);
|
||||||
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
|
html_print_input_hidden ('update_settings', 1);
|
||||||
|
html_print_submit_button (__('Validate'), 'update_button', false, 'class="sub upd"');
|
||||||
|
html_print_button(__('Request new license'), '', false, 'generate_request_code()', 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub next"');
|
||||||
|
echo '</div>';
|
||||||
|
echo '</form>';
|
||||||
|
echo '<div id="code_license_dialog" style="display: none; text-align: left;" title="' . __('Request new license') . '">';
|
||||||
|
echo '<div id="logo">';
|
||||||
|
html_print_image('images/pandora_tinylogo.png');
|
||||||
|
echo '</div>';
|
||||||
|
echo '' . __('To get your <b>Pandora FMS Enterprise License</b>:') . '<br />';
|
||||||
|
echo '<ul>';
|
||||||
|
echo '<li>';
|
||||||
|
echo '' . __('Go to <a target="_blank" href="http://artica.es/pandoraupdate5/request/index.php">http://artica.es/pandoraupdate5/request/index.php</a>');
|
||||||
|
echo '</li>';
|
||||||
|
echo '<li>';
|
||||||
|
echo '' .__('Enter the <b>auth key</b> and the following <b>request key</b>:');
|
||||||
|
echo '</li>';
|
||||||
|
echo '</ul>';
|
||||||
|
echo '<div id="code"></div>';
|
||||||
|
echo '<ul>';
|
||||||
|
echo '<li>';
|
||||||
|
echo '' . __('Enter your name (or a company name) and a contact email address.');
|
||||||
|
echo '</li>';
|
||||||
|
echo '<li>';
|
||||||
|
echo '' .__('Click on <b>Generate</b>.');
|
||||||
|
echo '</li>';
|
||||||
|
echo '<li>';
|
||||||
|
echo '' . __('Click <a href="javascript: close_code_license_dialog();">here</a>, enter the generated license key and click on <b>Validate</b>.');
|
||||||
|
echo '</li>';
|
||||||
|
echo '</ul>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
?>
|
Loading…
Reference in New Issue