Skip to content

Commit 9e0cbf0

Browse files
committed
Fixed: FS#795 - Do not show the version number if the user is not logged in.
1 parent 66c3bc2 commit 9e0cbf0

File tree

4 files changed

+195
-124
lines changed

4 files changed

+195
-124
lines changed

interface/web/help/lib/module.conf.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,24 @@
3737
'open' => 1,
3838
'items' => $items);
3939

40+
41+
if($_SESSION['s']['user']['typ'] == 'admin') {
42+
//* make sure that the items array is empty
43+
$items = array();
44+
45+
//* Add a menu item with the label 'View messages'
46+
$items[] = array( 'title' => 'Version',
47+
'target' => 'content',
48+
'link' => 'help/version.php');
49+
50+
51+
//* Add the menu items defined above to a menu section labeled 'Support'
52+
$module['nav'][] = array( 'title' => 'About ISPConfig',
53+
'open' => 1,
54+
'items' => $items);
55+
56+
}
57+
58+
59+
4060
?>

interface/web/help/version.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
32+
/******************************************
33+
* Begin Form configuration
34+
******************************************/
35+
36+
$tform_def_file = "form/user_settings.tform.php";
37+
38+
/******************************************
39+
* End Form configuration
40+
******************************************/
41+
42+
require_once('../../lib/config.inc.php');
43+
require_once('../../lib/app.inc.php');
44+
45+
//* Check permissions for module
46+
$app->auth->check_module_permissions('admin');
47+
48+
echo '<p>&nbsp;</p><p>&nbsp;</p><p class="frmTextHead" style="text-align:center;">'.$app->lng('ISPConfig Version:').' '.ISPC_APP_VERSION.'</p>';
49+
50+
?>

interface/web/js/scrigo.js.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ function submitLoginForm(formname) {
8484
loadContent(redirect);
8585
redirect = '';
8686
}
87+
document.getElementById('footer').innerHTML = 'Powered by <a href="http://www.ispconfig.org" target="_blank">ISPConfig</a>';
8788
*/
88-
document.getElementById('footer').innerHTML = 'Powered by <a href="http://www.ispconfig.org" target="_blank">ISPConfig <?php echo ISPC_APP_VERSION ?></a>';
89+
8990
}
9091

9192
function submitForm(formname,target) {
Lines changed: 123 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,123 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4-
<head>
5-
<title><tmpl_var name="app_title"> <tmpl_var name="app_version"></title>
6-
<meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/>
7-
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
8-
<!--[if lte IE 7]>
9-
<link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" />
10-
<![endif]-->
11-
<!--[if lte ie 6]>
12-
<style type="text/css" media="screen">
13-
/*
14-
Move these to your IE specific stylesheet if possible
15-
*/
16-
.uniForm,
17-
.uniForm fieldset,
18-
.uniForm .ctrlHolder,
19-
.uniForm .formHint,
20-
.uniForm .buttonHolder,
21-
.uniForm .ctrlHolder .multiField,
22-
.uniForm .inlineLabel{ zoom:1; }
23-
24-
.uniForm .inlineLabels label, .uniForm .inlineLabels .label,
25-
.uniForm .blockLabels label, .uniForm .blockLabels .label,
26-
.uniForm .inlineLabel span{ padding-bottom: .2em; }
27-
28-
.uniForm .inlineLabel input,
29-
.uniForm .inlineLabels .inlineLabel input,
30-
.uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; }
31-
</style>
32-
<![endif]-->
33-
<!--[if gt ie 6]>
34-
<style type="text/css" media="screen">
35-
/*
36-
Move these to your IE specific stylesheet if possible
37-
*/
38-
.uniForm,
39-
.uniForm fieldset,
40-
.uniForm .ctrlHolder,
41-
.uniForm .formHint,
42-
.uniForm .buttonHolder,
43-
.uniForm .ctrlHolder .multiField,
44-
.uniForm .inlineLabel{ zoom:1; }
45-
46-
.uniForm .inlineLabels label, .uniForm .inlineLabels .label,
47-
.uniForm .blockLabels label, .uniForm .blockLabels .label,
48-
.uniForm .inlineLabel span{ padding-bottom: .2em; }
49-
50-
.uniForm .inlineLabel input,
51-
.uniForm .inlineLabels .inlineLabel input,
52-
.uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; }
53-
</style>
54-
<![endif]-->
55-
<link rel="shortcut icon" href="/themes/default/images/favicon.ico" />
56-
<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script>
57-
<script type="text/javascript" src="js/yui/connection/connection-min.js"></script>
58-
<script type="text/javascript" src="js/scrigo.js.php"></script>
59-
<script type="text/javascript" src="js/uni-form/jquery.js"></script>
60-
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
61-
<script language="JavaScript" type="text/javascript">
62-
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
63-
if(!is_chrome) {
64-
var style = document.createElement('style');
65-
style.innerHTML = '#page_margins { min-width: 980px; max-width: 80%; background: #fff; display: table;}';
66-
document.getElementsByTagName("head")[0].appendChild(style);
67-
}
68-
</script>
69-
</head>
70-
<body onload="loadInitContent()">
71-
<div id="page_margins">
72-
<div id="page">
73-
<div id="header">
74-
<div id="topsubnav">
75-
<!-- start: skip link navigation -->
76-
<a class="skip" href="#navigation" title="skip link">Skip to the navigation</a><span class="hideme">.</span>
77-
<a class="skip" href="#content" title="skip link">Skip to the content</a><span class="hideme">.</span>
78-
<!-- end: skip link navigation -->
79-
<span><a href="#logout" onclick="loadContent('login/logout.php');">LOGOUT</a><!-- | <a href="#" onclick="capp('help')">Help</a> | <a href="#">Imprint</a>--></span>
80-
</div>
81-
<h1 id="ir-HeaderLogo" class="swap"><span>ISPConfig 3</span></h1>
82-
<span>hosting control panel</span>
83-
</div>
84-
<!-- begin: main navigation #nav -->
85-
<div id="nav">
86-
<a id="navigation" name="navigation"></a>
87-
<!-- skiplink anchor: navigation -->
88-
<div id="nav_main">
89-
<div id="topNav">&nbsp;</div>
90-
</div>
91-
</div>
92-
<!-- end: main navigation -->
93-
<!-- begin: main content area #main -->
94-
<div id="main">
95-
<!-- begin: #col1 - first float column -->
96-
<div id="col1">
97-
<div id="col1_content" class="clearfix">
98-
<div id="sideNav">&nbsp;</div>
99-
</div>
100-
</div>
101-
<!-- end: #col1 -->
102-
<!-- begin: #col3 static column -->
103-
<div id="col3">
104-
<div id="col3_content" class="clearfix">
105-
<a id="content" name="content"></a>
106-
<!-- skiplink anchor: Content -->
107-
<form method="post" action="" id="pageForm" name="pageForm" enctype="multipart/form-data" class="uniForm">
108-
<div id="pageContent"><!-- AJAX CONTENT --></div>
109-
</form>
110-
</div>
111-
<div id="ie_clearing">&nbsp;</div>
112-
<!-- End: IE Column Clearing -->
113-
</div>
114-
<!-- end: #col3 -->
115-
</div>
116-
<!-- end: #main -->
117-
<!-- begin: #footer -->
118-
<div id="footer">
119-
Powered by <a href="<tmpl_var name="app_link">" target="_blank"><tmpl_var name="app_title"> <tmpl_var name="app_version"></a>
120-
</div><!-- end: #footer -->
121-
</div>
122-
</body>
123-
</html>
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title><tmpl_var name="app_title"> <tmpl_var name="app_version"></title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/>
7+
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
8+
<!--[if lte IE 7]>
9+
<link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" />
10+
<![endif]-->
11+
<!--[if lte ie 6]>
12+
<style type="text/css" media="screen">
13+
/*
14+
Move these to your IE specific stylesheet if possible
15+
*/
16+
.uniForm,
17+
.uniForm fieldset,
18+
.uniForm .ctrlHolder,
19+
.uniForm .formHint,
20+
.uniForm .buttonHolder,
21+
.uniForm .ctrlHolder .multiField,
22+
.uniForm .inlineLabel{ zoom:1; }
23+
24+
.uniForm .inlineLabels label, .uniForm .inlineLabels .label,
25+
.uniForm .blockLabels label, .uniForm .blockLabels .label,
26+
.uniForm .inlineLabel span{ padding-bottom: .2em; }
27+
28+
.uniForm .inlineLabel input,
29+
.uniForm .inlineLabels .inlineLabel input,
30+
.uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; }
31+
</style>
32+
<![endif]-->
33+
<!--[if gt ie 6]>
34+
<style type="text/css" media="screen">
35+
/*
36+
Move these to your IE specific stylesheet if possible
37+
*/
38+
.uniForm,
39+
.uniForm fieldset,
40+
.uniForm .ctrlHolder,
41+
.uniForm .formHint,
42+
.uniForm .buttonHolder,
43+
.uniForm .ctrlHolder .multiField,
44+
.uniForm .inlineLabel{ zoom:1; }
45+
46+
.uniForm .inlineLabels label, .uniForm .inlineLabels .label,
47+
.uniForm .blockLabels label, .uniForm .blockLabels .label,
48+
.uniForm .inlineLabel span{ padding-bottom: .2em; }
49+
50+
.uniForm .inlineLabel input,
51+
.uniForm .inlineLabels .inlineLabel input,
52+
.uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; }
53+
</style>
54+
<![endif]-->
55+
<link rel="shortcut icon" href="/themes/default/images/favicon.ico" />
56+
<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script>
57+
<script type="text/javascript" src="js/yui/connection/connection-min.js"></script>
58+
<script type="text/javascript" src="js/scrigo.js.php"></script>
59+
<script type="text/javascript" src="js/uni-form/jquery.js"></script>
60+
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
61+
<script language="JavaScript" type="text/javascript">
62+
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
63+
if(!is_chrome) {
64+
var style = document.createElement('style');
65+
style.innerHTML = '#page_margins { min-width: 980px; max-width: 80%; background: #fff; display: table;}';
66+
document.getElementsByTagName("head")[0].appendChild(style);
67+
}
68+
</script>
69+
</head>
70+
<body onload="loadInitContent()">
71+
<div id="page_margins">
72+
<div id="page">
73+
<div id="header">
74+
<div id="topsubnav">
75+
<!-- start: skip link navigation -->
76+
<a class="skip" href="#navigation" title="skip link">Skip to the navigation</a><span class="hideme">.</span>
77+
<a class="skip" href="#content" title="skip link">Skip to the content</a><span class="hideme">.</span>
78+
<!-- end: skip link navigation -->
79+
<span><a href="#logout" onclick="loadContent('login/logout.php');">LOGOUT</a><!-- | <a href="#" onclick="capp('help')">Help</a> | <a href="#">Imprint</a>--></span>
80+
</div>
81+
<h1 id="ir-HeaderLogo" class="swap"><span>ISPConfig 3</span></h1>
82+
<span>hosting control panel</span>
83+
</div>
84+
<!-- begin: main navigation #nav -->
85+
<div id="nav">
86+
<a id="navigation" name="navigation"></a>
87+
<!-- skiplink anchor: navigation -->
88+
<div id="nav_main">
89+
<div id="topNav">&nbsp;</div>
90+
</div>
91+
</div>
92+
<!-- end: main navigation -->
93+
<!-- begin: main content area #main -->
94+
<div id="main">
95+
<!-- begin: #col1 - first float column -->
96+
<div id="col1">
97+
<div id="col1_content" class="clearfix">
98+
<div id="sideNav">&nbsp;</div>
99+
</div>
100+
</div>
101+
<!-- end: #col1 -->
102+
<!-- begin: #col3 static column -->
103+
<div id="col3">
104+
<div id="col3_content" class="clearfix">
105+
<a id="content" name="content"></a>
106+
<!-- skiplink anchor: Content -->
107+
<form method="post" action="" id="pageForm" name="pageForm" enctype="multipart/form-data" class="uniForm">
108+
<div id="pageContent"><!-- AJAX CONTENT --></div>
109+
</form>
110+
</div>
111+
<div id="ie_clearing">&nbsp;</div>
112+
<!-- End: IE Column Clearing -->
113+
</div>
114+
<!-- end: #col3 -->
115+
</div>
116+
<!-- end: #main -->
117+
<!-- begin: #footer -->
118+
<div id="footer">
119+
Powered by <a href="<tmpl_var name="app_link">" target="_blank"><tmpl_var name="app_title"></a>
120+
</div><!-- end: #footer -->
121+
</div>
122+
</body>
123+
</html>

0 commit comments

Comments
 (0)