From 9e0cbf03c0d0130f706ad30785d209f308eebf91 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Wed, 28 Oct 2009 19:03:02 +0000 Subject: [PATCH] Fixed: FS#795 - Do not show the version number if the user is not logged in. --- interface/web/help/lib/module.conf.php | 20 ++ interface/web/help/version.php | 50 ++++ interface/web/js/scrigo.js.php | 3 +- .../web/themes/default/templates/main.tpl.htm | 246 +++++++++--------- 4 files changed, 195 insertions(+), 124 deletions(-) create mode 100644 interface/web/help/version.php diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php index 36696ffbe..4af598d5b 100644 --- a/interface/web/help/lib/module.conf.php +++ b/interface/web/help/lib/module.conf.php @@ -37,4 +37,24 @@ $module['nav'][] = array( 'title' => 'Support', 'open' => 1, 'items' => $items); + +if($_SESSION['s']['user']['typ'] == 'admin') { +//* make sure that the items array is empty +$items = array(); + +//* Add a menu item with the label 'View messages' +$items[] = array( 'title' => 'Version', + 'target' => 'content', + 'link' => 'help/version.php'); + + +//* Add the menu items defined above to a menu section labeled 'Support' +$module['nav'][] = array( 'title' => 'About ISPConfig', + 'open' => 1, + 'items' => $items); + +} + + + ?> \ No newline at end of file diff --git a/interface/web/help/version.php b/interface/web/help/version.php new file mode 100644 index 000000000..e53143c21 --- /dev/null +++ b/interface/web/help/version.php @@ -0,0 +1,50 @@ +auth->check_module_permissions('admin'); + +echo '

 

 

'.$app->lng('ISPConfig Version:').' '.ISPC_APP_VERSION.'

'; + +?> \ No newline at end of file diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 92eb74768..3232f5073 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -84,8 +84,9 @@ function submitLoginForm(formname) { loadContent(redirect); redirect = ''; } + document.getElementById('footer').innerHTML = 'Powered by ISPConfig'; */ - document.getElementById('footer').innerHTML = 'Powered by ISPConfig '; + } function submitForm(formname,target) { diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 49a89d155..d7aad2f11 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -1,123 +1,123 @@ - - - - <tmpl_var name="app_title"> <tmpl_var name="app_version"> - "/> - - - - - - - - - - - - - -
-
- - - - - -
- -
-
-
 
-
-
- - -
-
- - -
-
-
-
-
 
- -
- -
- - - -
- - + + + + <tmpl_var name="app_title"> <tmpl_var name="app_version"> + "/> + + + + + + + + + + + + + +
+
+ + + + + +
+ +
+
+
 
+
+
+ + +
+
+ + +
+
+
+
+
 
+ +
+ +
+ + + +
+ + -- GitLab