($tab === 'setup') ? true : false, 'text' => ''.html_print_image('images/gm_setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'', ]; $buttons['history'] = [ 'active' => ($tab === 'history') ? true : false, 'text' => ''.html_print_image('images/gm_db.png', true, ['title' => __('Journal'), 'class' => 'invert_filter']).'', ]; $buttons['offline'] = [ 'active' => ($tab === 'offline') ? true : false, 'text' => ''.html_print_image('images/box.png', true, ['title' => __('Offline update'), 'class' => 'invert_filter']).'', ]; $buttons['online'] = [ 'active' => ($tab === 'online') ? true : false, 'text' => ''.html_print_image('images/op_gis.png', true, ['title' => __('Online update'), 'class' => 'invert_filter']).'', ]; switch ($tab) { case 'history': $title = __('Journal'); break; case 'setup': $title = __('Setup'); break; case 'offline': $title = __('Offline'); break; case 'online': default: $title = __('Online'); break; } ui_print_standard_header( $title, 'images/gm_setup.png', false, '', true, $buttons, [ [ 'link' => '', 'label' => 'Warp Update', ], ] ); switch ($tab) { case 'history': include $config['homedir'].'/godmode/update_manager/update_manager.history.php'; break; case 'setup': include $config['homedir'].'/godmode/update_manager/update_manager.setup.php'; break; case 'offline': $mode = \UpdateManager\UI\Manager::MODE_OFFLINE; include $config['homedir'].'/godmode/um_client/index.php'; break; case 'online': default: if (is_metaconsole() === false && has_metaconsole() === true) { $meta_puid = null; $server_id = $config['metaconsole_node_id']; $dbh = (object) $config['dbconnection']; // Connect to metaconsole. $result_code = metaconsole_load_external_db( [ 'dbhost' => $config['replication_dbhost'], 'dbuser' => $config['replication_dbuser'], 'dbpass' => io_output_password($config['replication_dbpass']), 'dbname' => $config['replication_dbname'], ] ); if ($result_code < 0) { break; } $value = db_get_value('value', 'tconfig', 'token', 'pandora_uid'); $meta_puid = $value; // Return connection to node. metaconsole_restore_db(); if ($meta_puid === false || $meta_puid === null) { ui_print_warning_message(__('Please register on metaconsole first.')); break; } } $mode = \UpdateManager\UI\Manager::MODE_ONLINE; include $config['homedir'].'/godmode/um_client/index.php'; break; }