From 3034f01a5eed4defbd0ad44cedb56a228fae0e98 Mon Sep 17 00:00:00 2001 From: guruevi Date: Fri, 19 Dec 2008 21:45:20 +0000 Subject: [PATCH] 2008-12-19 Evi Vanoost * general/footer.php: Updated print_timestamp to always print full. Removed the center tag (deprecated in HTML 4.01) * general/header.php: Fixed some CSS. * general/links_menu.php: Rewritten for new css style * general/main_menu.php: Rewritten for new css style and to avoid repetition in writing tags uses an array and functions * godmode/menu.php: Rewritten for new css style and to avoid repetition writing tags * include/functions_html.php: Added option to override prominent time * include/styles/link.css: Rewritten the whole CSS. Now all menu options are directly available through slide-outs (pure CSS, no JS) and avoids div for each single item. The pages renders quite a bit faster too. * include/styles/pandora.css: Fixed some bad tags and removed stuff that was for the rewritten menu. * index.php: Added   to div. IE will in some situations not render empty divs. * operation/menu.php: Rewritten for new CSS style * include/styles/god.css, include/styles/op.css: git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1297 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 31 ++ pandora_console/general/footer.php | 10 +- pandora_console/general/header.php | 2 +- pandora_console/general/links_menu.php | 14 +- pandora_console/general/main_menu.php | 76 +++- pandora_console/godmode/menu.php | 438 ++++++++------------- pandora_console/include/functions_html.php | 13 +- pandora_console/include/styles/god.css | 87 ---- pandora_console/include/styles/link.css | 169 +++++++- pandora_console/include/styles/op.css | 85 ---- pandora_console/include/styles/pandora.css | 22 +- pandora_console/index.php | 2 +- pandora_console/operation/menu.php | 433 ++++++++------------ 13 files changed, 602 insertions(+), 780 deletions(-) delete mode 100644 pandora_console/include/styles/god.css delete mode 100644 pandora_console/include/styles/op.css diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 704b3725a0..a259304894 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,34 @@ +2008-12-19 Evi Vanoost + + * general/footer.php: Updated print_timestamp to always print full. + Removed the center tag (deprecated in HTML 4.01) + + * general/header.php: Fixed some CSS. + + * general/links_menu.php: Rewritten for new css style + + * general/main_menu.php: Rewritten for new css style and to avoid + repetition in writing tags uses an array and functions + + * godmode/menu.php: Rewritten for new css style and to avoid repetition + writing tags + + * include/functions_html.php: Added option to override prominent time + + * include/styles/link.css: Rewritten the whole CSS. Now all menu options + are directly available through slide-outs (pure CSS, no JS) and avoids div + for each single item. The pages renders quite a bit faster too. + + * include/styles/pandora.css: Fixed some bad tags and removed stuff that + was for the rewritten menu. + + * index.php: Added   to div. IE will in some situations not render + empty divs. + + * operation/menu.php: Rewritten for new CSS style + + * include/styles/god.css, include/styles/op.css: + 2008-12-18 Jorge Gonzalez * pandoradb_data.sql, pandoradb.sql: removed extra '-' which made the diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php index fd8edf2e29..0acefe2cc6 100644 --- a/pandora_console/general/footer.php +++ b/pandora_console/general/footer.php @@ -23,18 +23,12 @@ if (isset($_SERVER['REQUEST_TIME'])) { $time = time(); } - -echo "
"; - - echo 'Pandora FMS '.$pandora_version.' - Build '.$build_version.'
'; -echo '
'. __('Page generated at') . ' '. print_timestamp ($time); +echo ''. __('Page generated at') . ' '. print_timestamp ($time, true, array ("prominent" => "timestamp")); //Always use timestamp here if ((isset($develop_bypass)) AND ($develop_bypass == 1)) { echo ' - Saved '.format_numeric ($sql_cache["saved"]).' Queries'; } -echo '
'; +echo '
'; echo ''; -echo "
"; - ?> diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 04daef350a..fd7fa9e1e5 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -22,7 +22,7 @@ echo 'logo'; +echo 'logo'; // Margin to logo echo ''; diff --git a/pandora_console/general/links_menu.php b/pandora_console/general/links_menu.php index 5e522279e4..413f587b55 100644 --- a/pandora_console/general/links_menu.php +++ b/pandora_console/general/links_menu.php @@ -15,16 +15,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -$sql='SELECT link,name FROM tlink ORDER BY name'; +$sql = 'SELECT link, name FROM tlink ORDER BY name'; $result = get_db_all_rows_sql ($sql); -if ($result !== false){ -?> -
:: ::
- '; + echo '"; + echo ''; } ?> diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index ed97d43f47..cd3ffa2b1c 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -16,11 +16,81 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -require ("operation/menu.php"); -if (! isset ($_SESSION["id_usuario"])) { +if (! isset ($config["id_user"])) { require ("general/login_page.php"); exit(); } + +//This is a helper function to print menu items +function temp_print_menu ($menu, $type) { + echo ''; +} + +echo '
:: '.__('Operation').' ::
'; +$menu = array (); +require ("operation/menu.php"); +temp_print_menu ($menu, "int"); + +echo '
:: '.__('Administration').' ::
'; +$menu = array (); require ("godmode/menu.php"); +temp_print_menu ($menu, "int"); +unset ($menu); + require ("links_menu.php"); -?> +?> \ No newline at end of file diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 88cfaf3af5..0ff3d46f1f 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -18,333 +18,203 @@ enterprise_include ('godmode/menu.php'); -if (comprueba_login ()) { - return; -} +check_login (); if ((! give_acl ($config['id_user'], 0, "LM")) && (! give_acl ($config['id_user'], 0, "AW")) && (! give_acl ($config['id_user'], 0, "PM")) && (! give_acl ($config['id_user'], 0, "DM")) && (! give_acl ($config['id_user'], 0, "UM"))) { return; } -?> -
:: ::
-