$value) { db_process_sql_update( 'tupdate_settings', [db_escape_key_identifier('value') => $value], [db_escape_key_identifier('key') => $key] ); } ui_print_success_message(__('License updated')); } } $license = enterprise_hook('license_get_info'); $rows = db_get_all_rows_in_table('tupdate_settings'); $settings = new StdClass; foreach ($rows as $row) { $settings->{$row['key']} = $row['value']; } echo ''; echo '
'; // Retrieve UM url configured (or default). $url = get_um_url(); $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; if (is_metaconsole()) { $table->head[0] = __('Licence'); $table->head_colspan[0] = 3; $table->headstyle[0] = 'text-align: center'; $table->style[0] = 'font-weight: bold;'; } $table->data = []; $table->data[0][0] = ''.__('Customer key').''; $table->data[0][1] = html_print_textarea('keys[customer_key]', 10, 255, $settings->customer_key, 'style="width: 450px" class="height_50px w450px"', true); $table->data[1][0] = ''.__($license['expiry_caption']).''; $table->data[1][1] = html_print_input_text('expires', $license['expiry_date'], '', 10, 255, true, true); $table->data[2][0] = ''.__('Platform Limit').''; $table->data[2][1] = html_print_input_text('expires', $license['limit'], '', 10, 255, true, true).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules')); $table->data[3][0] = ''.__('Current Platform Count').''; $table->data[3][1] = html_print_input_text('expires', $license['count'], '', 10, 255, true, true).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules')); $table->data[4][0] = ''.__('Current Platform Count (enabled: items)').''; $table->data[4][1] = html_print_input_text('expires', $license['count_enabled'], '', 10, 255, true, true).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules')); $table->data[5][0] = ''.__('Current Platform Count (disabled: items)').''; $table->data[5][1] = html_print_input_text('expires', $license['count_disabled'], '', 10, 255, true, true).' '.($license['limit_mode'] == 0 ? __('agents') : __('modules')); $table->data[6][0] = ''.__('License Mode').''; $table->data[6][1] = html_print_input_text('expires', $license['license_mode'], '', 10, 255, true, true); $table->data[7][0] = ''.__('NMS').''; $table->data[7][1] = html_print_input_text('expires', ($license['nms'] == 1 ? __('enabled') : __('disabled')), '', 10, 255, true, true); $table->data[8][0] = ''.__('Satellite').''; $table->data[8][1] = html_print_input_text('expires', ($license['dhpm'] == 1 ? __('enabled') : __('disabled')), '', 10, 255, true, true); $table->data[9][0] = ''.__('Licensed to').''; $table->data[9][1] = html_print_input_text('licensed_to', $license['licensed_to'], '', 64, 255, true, true); html_print_table($table); // If DESTDIR is defined the enterprise license is expired. if (enterprise_installed() || defined('DESTDIR')) { echo '
'; html_print_input_hidden('update_settings', 1); html_print_submit_button(__('Validate'), 'update_button', false, 'class="sub upd"'); echo '  '; html_print_button(__('Request new license'), '', false, 'generate_request_code()', 'class="sub next"'); echo '
'; } if (is_metaconsole()) { ui_require_css_file('pandora_enterprise', '../../'.ENTERPRISE_DIR.'/include/styles/'); ui_require_css_file('register', '../../include/styles/'); } else { ui_require_css_file('pandora'); ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/'); ui_require_css_file('register'); } if (enterprise_hook('print_activate_licence_dialog') == ENTERPRISE_NOT_HOOK) { echo '
'; echo ''; }