Changeset:
        0cbeff4bdbd3
        
https://sourceforge.net/p/mrbs/hg-code/ci/0cbeff4bdbd3bf6c863e543ffc286536006ddcb9
Author:
        Campbell Morrison <cimorri...@hg.code.sf.net>
Date:
        Sat Mar 04 11:35:13 2017 +0000
Log message:

Added some configuration information to the Help page (for admins only)

diffstat:

 web/css/mrbs.css.php |  33 ++++++++++++++++++++++++++++++---
 web/help.php         |  26 ++++++++++++++++++++------
 web/lang/lang.en     |   3 +++
 3 files changed, 53 insertions(+), 9 deletions(-)

diffs (102 lines):

diff -r 316e73eb000e -r 0cbeff4bdbd3 web/css/mrbs.css.php
--- a/web/css/mrbs.css.php      Sat Mar 04 10:00:51 2017 +0000
+++ b/web/css/mrbs.css.php      Sat Mar 04 11:35:13 2017 +0000
@@ -1027,9 +1027,36 @@
 .banner .outstanding a {color: <?php echo $outstanding_color ?>}
 
 /* ------------ HELP.PHP ------------------------*/
-table#version_info {border-spacing: 0; border-collapse: collapse}
-#version_info td {padding: 0 1.0em 0 0; vertical-align: bottom}
-#version_info td:first-child {text-align: right}
+
+table.details {
+  border-spacing: 0;
+  border-collapse: collapse;
+  margin-bottom: 1.5em;
+}
+
+table.details:first-child {
+  margin-bottom: 0;
+}
+
+table.details.has_caption {
+  margin-left: 2em;
+}
+
+.details caption {
+  text-align: left;
+  font-weight: bold;
+  margin-left: -2em;
+  margin-bottom: 0.2em;
+}
+
+.details td {
+  padding: 0 1.0em 0 0;
+  vertical-align: bottom;
+}
+
+.details td:first-child {
+  text-align: right;
+}
 
 
 /* ------------ IMPORT.PHP ------------------------*/
diff -r 316e73eb000e -r 0cbeff4bdbd3 web/help.php
--- a/web/help.php      Sat Mar 04 10:00:51 2017 +0000
+++ b/web/help.php      Sat Mar 04 11:35:13 2017 +0000
@@ -13,22 +13,36 @@
 print_header($day, $month, $year, $area, isset($room) ? $room : "");
 
 echo "<h3>" . get_vocab("about_mrbs") . "</h3>\n";
-echo "<table id=\"version_info\">\n";
-echo "<tr><td><a href=\"http://mrbs.sourceforge.net\";>" . get_vocab("mrbs") . 
"</a>:</td><td>" . get_mrbs_version() . "</td></tr>\n";
 
-if ($is_admin)
+if (!$is_admin)
 {
-  // Restrict the server and configuration details to admins, for security 
reasons.
+  echo "<table class=\"details\">\n";
+  echo "<tr><td><a href=\"http://mrbs.sourceforge.net\";>" . get_vocab("mrbs") 
. "</a>:</td><td>" . get_mrbs_version() . "</td></tr>\n";
+  echo "</table>\n";
+}
+else
+{
+  // Restrict the configuration and server details to admins, for security 
reasons.
+  echo "<table class=\"details has_caption\">\n";
+  echo "<caption>" . get_vocab("config_details") . "</caption>\n";
+  echo "<tr><td>" . get_vocab("mrbs_version") . ":</td><td>" . 
get_mrbs_version() . "</td></tr>\n";
+  echo '<tr><td>$auth[\'type\']:</td><td>' . htmlspecialchars($auth['type']) . 
"</td></tr>\n";
+  echo '<tr><td>$auth[\'session\']:</td><td>' . 
htmlspecialchars($auth['session']) . "</td></tr>\n";
+  echo "</table>\n";
+
+
+  echo "<table class=\"details has_caption\">\n";
+  echo "<caption>" . get_vocab("server_details") . "</caption>\n";
   echo "<tr><td>" . get_vocab("database") . ":</td><td>" . db()->version() . 
"</td></tr>\n";
   echo "<tr><td>" . get_vocab("system") . ":</td><td>" . php_uname() . 
"</td></tr>\n";
-  echo "<tr><td>" . get_vocab("server_software") . ":</td><td>" . 
htmlspecialchars(get_server_software()) . "</td></tr>\n";
   echo "<tr><td>" . get_vocab("servertime") . ":</td><td>" .
        utf8_strftime($strftime_format['datetime'], time()) .
        "</td></tr>\n";
+  echo "<tr><td>" . get_vocab("server_software") . ":</td><td>" . 
htmlspecialchars(get_server_software()) . "</td></tr>\n";
   echo "<tr><td>PHP:</td><td>" . phpversion() . "</td></tr>\n";
+  echo "</table>\n";
 }
 
-echo "</table>\n";
 
 echo "<p>\n" . get_vocab("browserlang") .":\n";
 
diff -r 316e73eb000e -r 0cbeff4bdbd3 web/lang/lang.en
--- a/web/lang/lang.en  Sat Mar 04 10:00:51 2017 +0000
+++ b/web/lang/lang.en  Sat Mar 04 11:35:13 2017 +0000
@@ -447,6 +447,9 @@
 
 // Used in help.php
 $vocab["about_mrbs"]         = "About MRBS";
+$vocab["mrbs_version"]       = "MRBS version";
+$vocab["config_details"]     = "Configuration details";
+$vocab["server_details"]     = "Server details";
 $vocab["database"]           = "Database";
 $vocab["system"]             = "System";
 $vocab["servertime"]         = "Server time";

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to