summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorkanazuchi <kanazuchi@localhost.localdomain>2014-11-15 12:21:54 -0200
committerkanazuchi <kanazuchi@localhost.localdomain>2014-11-15 12:21:54 -0200
commita0f9f9f7545d00b78cbca1af70ae02fea7413374 (patch)
tree99e7a84e4989539c2bb3ad8f33e2edd65bc7e84c /usr
parent0c50e94bacbe5fb020fa6b09b4520184d82dd9fc (diff)
downloadpfsense-a0f9f9f7545d00b78cbca1af70ae02fea7413374.zip
pfsense-a0f9f9f7545d00b78cbca1af70ae02fea7413374.tar.gz
Changes in the test page of user manager
Diffstat (limited to 'usr')
-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