From a8ed81e26fb1ce5d1283781abad96364c92ffd4b Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 3 Feb 2015 09:47:17 +0100 Subject: [PATCH] Add clippy help for all servers down --- pandora_console/general/header.php | 41 ++++++------- .../include/help/clippy/servers_down.php | 57 +++++++++++++++++++ 2 files changed, 79 insertions(+), 19 deletions(-) create mode 100644 pandora_console/include/help/clippy/servers_down.php diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 9c1524aabf..b8062771c1 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -27,7 +27,7 @@ $_SESSION["alert_msg"] = ""; // Global errors/warnings checking. config_check(); - +$login = get_parameter('login', 0); ?> @@ -82,6 +82,9 @@ config_check(); $servers["up"] = (int) servers_check_status (); $servers["down"] = $servers["all"] - $servers["up"]; if ($servers["up"] == 0) { + if (!$login){ + $server_clippy = clippy_context_help("servers_down"); + } //All Servers down or no servers at all $servers_check_img = html_print_image("images/header_down.png", true, array("alt" => 'cross', "class" => 'bot', 'title' => __('All systems').': '.__('Down'))); } @@ -232,40 +235,40 @@ config_check(); } $table->data[0][3] = $maintenance_img; - + $table->data[0][4] = $server_clippy; // Main help icon - $table->data[0][4] = ui_print_help_icon ("main_help", true, '', 'images/header_help.png'); + $table->data[0][5] = ui_print_help_icon ("main_help", true, '', 'images/header_help.png'); // Logout - $table->data[0][5] = ''; - $table->data[0][5] .= html_print_image("images/header_logout.png", true, array("alt" => __('Logout'), "class" => 'bot', "title" => __('Logout'))); - $table->data[0][5] .= ''; + $table->data[0][6] = ''; + $table->data[0][6] .= html_print_image("images/header_logout.png", true, array("alt" => __('Logout'), "class" => 'bot', "title" => __('Logout'))); + $table->data[0][6] .= ''; // User if (is_user_admin ($config["id_user"]) == 1) - $table->data[0][6] = html_print_image("images/header_user_admin.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user')); + $table->data[0][7] = html_print_image("images/header_user_admin.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user')); else - $table->data[0][6] = html_print_image("images/header_user.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user')); + $table->data[0][7] = html_print_image("images/header_user.png" , true, array("title" => __('Edit my user'), "class" => 'bot', "alt" => 'user')); - $table->data[0][6] = '' . $table->data[0][6] . ''; + $table->data[0][7] = '' . $table->data[0][7] . ''; - $table->data[0][7] = ' (' . $config["id_user"] . ')'; + $table->data[0][8] = ' (' . $config["id_user"] . ')'; // Chat messages - $table->data[0][8] = ""; + $table->data[0][9] = ""; // Messages $msg_cnt = messages_get_count ($config["id_user"]); if ($msg_cnt > 0) { echo ''; - $table->data[0][9] = ''; - $table->data[0][9] .= html_print_image ("images/header_email.png", true, array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot", 'style' => 'width:24px;')); - $table->data[0][9] .= ''; + $table->data[0][10] = ''; + $table->data[0][10] .= html_print_image ("images/header_email.png", true, array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot", 'style' => 'width:24px;')); + $table->data[0][10] .= ''; } @@ -301,7 +304,7 @@ config_check(); $table->data[0]['searchbar'] = $search_bar; - $table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true); + $table->data[0][12] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true); html_print_table($table); diff --git a/pandora_console/include/help/clippy/servers_down.php b/pandora_console/include/help/clippy/servers_down.php new file mode 100644 index 0000000000..bc1261c8e8 --- /dev/null +++ b/pandora_console/include/help/clippy/servers_down.php @@ -0,0 +1,57 @@ + true, + 'intro' => '
' . + '' . + '' . + '' . + '' . + '' . + '' . + '
' . + __('All servers down') . + '
' . + __('For example its world') . + '
' + ); + $return_tours['tours']['servers_all_down']['conf'] = array(); + $return_tours['tours']['servers_all_down']['conf']['autostart'] = true; + $return_tours['tours']['servers_all_down']['conf']['show_bullets'] = 0; + $return_tours['tours']['servers_all_down']['conf']['show_step_numbers'] = 0; + //================================================================== + + return $return_tours; +} +?>