display new domain page if no domains were found
This commit is contained in:
parent
22c6022186
commit
8cc946ab87
|
@ -66,7 +66,7 @@ if (($_GET['action'] == "edit") || ($_GET['action'] == "new")) {
|
|||
echo "</head>\n";
|
||||
echo "<body>\n";
|
||||
// print message, if needed
|
||||
if ($_SESSION['domain_message']) echo "<p><font color=\"red\"><b>" . $_SESSION['domain_message'] . "</b></font></p><p> </p>";
|
||||
if ($_SESSION['domain_message']) StatusMessage("INFO", $_SESSION['domain_message'], "");
|
||||
// print fieldset
|
||||
echo "<form action=\"domain.php\" method=\"post\">\n";
|
||||
echo "<p> </p>\n";
|
||||
|
|
|
@ -52,6 +52,8 @@ if ($conf->Suff_map && ($conf->Suff_map != "")) {
|
|||
if (!$res) $new_suffs[] = $conf->Suff_map;
|
||||
}
|
||||
|
||||
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_domainSuffix());
|
||||
|
||||
echo $_SESSION['header'];
|
||||
echo ("<html>\n");
|
||||
echo ("<head>\n");
|
||||
|
@ -60,9 +62,13 @@ echo ("<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">"
|
|||
echo ("</head>\n");
|
||||
echo ("<frameset rows=\"130,*\">\n");
|
||||
echo ("<frame src=\"./main_header.php\" name=\"head\" frameborder=\"0\" scrolling=\"no\" noresize>\n");
|
||||
// display page to add suffixes, if needed
|
||||
// display page to add suffixes or add domain, if needed
|
||||
if (sizeof($new_suffs) > 0) echo ("<frame src=\"initsuff.php?suffs='" . implode(";", $new_suffs) .
|
||||
"'\" name=\"mainpart\" frameborder=\"0\" scrolling=\"yes\">\n");
|
||||
elseif (sizeof($doms) < 1) {
|
||||
$_SESSION['domain_message'] = _("No domains found, please create one.");
|
||||
echo ("<frame src=\"domain.php?action=new\" name=\"mainpart\" frameborder=\"0\" scrolling=\"yes\">\n");
|
||||
}
|
||||
else echo ("<frame src=\"./lists/listusers.php\" name=\"mainpart\" frameborder=\"0\" scrolling=\"yes\">\n");
|
||||
echo ("<noframes>\n");
|
||||
echo ("This page requires a browser that can show frames!\n");
|
||||
|
|
Loading…
Reference in New Issue