summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-17 14:48:06 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-11-17 14:48:06 -0200
commitd33e6008400bbb588c91e81fa4c55ef422906f55 (patch)
tree6ca547735a3b12e45a441ff318dc4e9348bb6caf
parenta5a0f61503735d930cda5d2e01f41f7c1ed55c0c (diff)
parenta0f9f9f7545d00b78cbca1af70ae02fea7413374 (diff)
downloadpfsense-d33e6008400bbb588c91e81fa4c55ef422906f55.zip
pfsense-d33e6008400bbb588c91e81fa4c55ef422906f55.tar.gz
Merge pull request #1338 from SilvioGiunge/change_system_usermanager_settings_test_page
-rwxr-xr-xusr/local/www/system_usermanager_settings_test.php35
1 files changed, 22 insertions, 13 deletions
diff --git a/usr/local/www/system_usermanager_settings_test.php b/usr/local/www/system_usermanager_settings_test.php
index 78e0272..6b5b59e 100755
--- a/usr/local/www/system_usermanager_settings_test.php
+++ b/usr/local/www/system_usermanager_settings_test.php
@@ -4,6 +4,7 @@
part of pfSense (https://www.pfsense.org/)
Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2013-2014 Electric Sheep Fencing, LP
+ Copyright (C) 2014 Silvio Giunge <desenvolvimento@bluepex.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -41,8 +42,11 @@
require("guiconfig.inc");
require_once("auth.inc");
-$authserver = $_GET['authserver'];
-$authcfg = auth_get_authserver($authserver);
+if(isset($config['system']['authserver'][0]['host'])){
+ $auth_server = $config['system']['authserver'][0]['host'];
+ $authserver = $_GET['authserver'];
+ $authcfg = auth_get_authserver($authserver);
+}
?>
@@ -50,7 +54,7 @@ $authcfg = auth_get_authserver($authserver);
<HEAD>
<STYLE type="text/css">
TABLE {
- border-width: 1px 1px 1px 1px;
+ border-width: 1px;
border-spacing: 0px;
border-style: solid solid solid solid;
border-color: gray gray gray gray;
@@ -63,7 +67,7 @@ $authcfg = auth_get_authserver($authserver);
border-style: solid solid solid solid;
border-color: gray gray gray gray;
border-collapse: collapse;
- background-color: white;
+ background-color: #dddddd;
}
</STYLE>
</HEAD>
@@ -71,32 +75,37 @@ $authcfg = auth_get_authserver($authserver);
<form method="post" name="iform" id="iform">
<?php
+$theme = $config['theme'];
if (!$authcfg) {
printf(gettext("Could not find settings for %s%s"), htmlspecialchars($authserver), "<p/>");
} else {
- echo sprintf(gettext("Testing %s LDAP settings... One moment please..."), $g['product_name']) . "<p/>";
+ if($theme != "" && file_exists("/usr/local/www/themes/{$theme}/images/logo.gif")){
+ echo "<p><img src='/themes/{$theme}/images/logo.gif' style='float: left'><br/><br/><br/></p>";
+ }
+ echo "<b>" . sprintf(gettext("Testing %s LDAP settings... One moment please..."), $g['product_name']) . "</b>";
echo "<table width='100%'>";
- echo "<tr><td>" . gettext("Attempting connection to") . " " . $ldapserver . "</td><td>";
+ echo "<tr><td>" . gettext("Attempting connection to") . " " . "<td><center>$auth_server</b></center></td>";
if(ldap_test_connection($authcfg)) {
- echo "<td><font color=green>OK</td></tr>";
+ echo "<td><center><font color=green>OK</center></td></tr>";
- echo "<tr><td>" . gettext("Attempting bind to") . " " . $ldapserver . "</td><td>";
+ echo "<tr><td>" . gettext("Attempting bind to") . " " . "<td><center>$auth_server</b></center></td>";
if(ldap_test_bind($authcfg)) {
- echo "<td><font color=green>OK</td></tr>";
+ echo "<td><center><font color=green>OK</center></td></tr>";
- echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . $ldapserver . "</td><td>";
+ echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . "<td><center>$auth_server</b></center></td>";
$ous = ldap_get_user_ous(true, $authcfg);
if(count($ous)>1) {
- echo "<td><font color=green>OK</td></tr>";
+ echo "<td><center><font color=green>OK</center></td></tr>";
echo "</table>";
if(is_array($ous)) {
- echo gettext("Organization units found") . ":<p/>";
+ echo "<br/>";
+ echo "<b>" . gettext("Organization units found") . "</b>";
echo "<table width='100%'>";
foreach($ous as $ou) {
- echo "<tr><td>" . $ou . "</td></tr>";
+ echo "<tr><td onmouseover=\"this.style.backgroundColor='#ffffff';\" onmouseout=\"this.style.backgroundColor='#dddddd';\">" . $ou . "</td></tr>";
}
}
} else
OpenPOWER on IntegriCloud