removed Samba 3 check
This commit is contained in:
parent
debf0cec26
commit
f4ae7efd39
|
@ -147,24 +147,11 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
|
||||||
else {
|
else {
|
||||||
// print success message
|
// print success message
|
||||||
StatusMessage("INFO", "", _("All changes were successful."));
|
StatusMessage("INFO", "", _("All changes were successful."));
|
||||||
if ($_SESSION['config']->is_samba3()) {
|
|
||||||
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_domainSuffix());
|
|
||||||
echo "<p> </p>\n";
|
|
||||||
if (sizeof($doms) == 0) {
|
|
||||||
echo "<a href=\"domain.php?action=new\">" . _("No domains found, please create one.") . "</a>\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
|
|
||||||
}
|
|
||||||
echo "</body></html>\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<p> </p>\n";
|
echo "<p> </p>\n";
|
||||||
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
|
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
|
||||||
echo "</body></html>\n";
|
echo "</body></html>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
// no suffixes were created
|
// no suffixes were created
|
||||||
StatusMessage("INFO", "", _("No changes were made."));
|
StatusMessage("INFO", "", _("No changes were made."));
|
||||||
|
|
|
@ -33,8 +33,7 @@ setlanguage();
|
||||||
echo $_SESSION['header'];
|
echo $_SESSION['header'];
|
||||||
|
|
||||||
// number of list views (users, groups, ...)
|
// number of list views (users, groups, ...)
|
||||||
$lists = 2;
|
$lists = 3;
|
||||||
if ($_SESSION['config']->is_samba3()) $lists++;
|
|
||||||
if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
|
if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -70,22 +69,12 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<?php
|
<?php
|
||||||
// Samba 3 has more list views
|
|
||||||
if ($_SESSION['config']->is_samba3()) {
|
|
||||||
echo '<td width="120" align="center"><a href="./lists/listdomains.php" target="mainpart"><big>' . _("Domains") . '</big></a></td>' . "\n";
|
echo '<td width="120" align="center"><a href="./lists/listdomains.php" target="mainpart"><big>' . _("Domains") . '</big></a></td>' . "\n";
|
||||||
echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
|
echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
|
||||||
echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
|
echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
|
||||||
if ($_SESSION['config']->get_Hostsuffix() != "") {
|
if ($_SESSION['config']->get_Hostsuffix() != "") {
|
||||||
echo '<td width="120" align="center"><a href="./lists/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</big></a></td>' . "\n";
|
echo '<td width="120" align="center"><a href="./lists/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</big></a></td>' . "\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo '<td width="200" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
|
|
||||||
echo '<td width="200" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
|
|
||||||
if ($_SESSION['config']->get_Hostsuffix() != "") {
|
|
||||||
echo '<td width="200" align="center"><a href="./lists/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</big></a></td>' . "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -435,7 +435,6 @@ function display_main() {
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
|
||||||
// domain OUs
|
// domain OUs
|
||||||
if ($_SESSION['config']->is_samba3()) {
|
|
||||||
echo ("<fieldset><legend><b>" . _("Domains") . "</b></legend>\n");
|
echo ("<fieldset><legend><b>" . _("Domains") . "</b></legend>\n");
|
||||||
echo ("<table border=0>\n");
|
echo ("<table border=0>\n");
|
||||||
// new OU
|
// new OU
|
||||||
|
@ -467,7 +466,6 @@ function display_main() {
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
}
|
|
||||||
|
|
||||||
echo ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">");
|
echo ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">");
|
||||||
echo ("</form>\n");
|
echo ("</form>\n");
|
||||||
|
|
|
@ -59,7 +59,6 @@ if ($_POST['forward'] == "yes") {
|
||||||
elseif($_POST['profile'] == "deluser") {
|
elseif($_POST['profile'] == "deluser") {
|
||||||
metaRefresh("profiledelete.php?type=user&del=" . $_POST['d_user']);
|
metaRefresh("profiledelete.php?type=user&del=" . $_POST['d_user']);
|
||||||
}
|
}
|
||||||
if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
|
|
||||||
// create new group profile
|
// create new group profile
|
||||||
if ($_POST['profile'] == "newgroup") {
|
if ($_POST['profile'] == "newgroup") {
|
||||||
metaRefresh("profilepage.php?type=group");
|
metaRefresh("profilepage.php?type=group");
|
||||||
|
@ -72,7 +71,6 @@ if ($_POST['forward'] == "yes") {
|
||||||
elseif($_POST['profile'] == "delgroup") {
|
elseif($_POST['profile'] == "delgroup") {
|
||||||
metaRefresh("profiledelete.php?type=group&del=" . $_POST['d_group']);
|
metaRefresh("profiledelete.php?type=group&del=" . $_POST['d_group']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// create new host profile
|
// create new host profile
|
||||||
if ($_POST['profile'] == "newhost") {
|
if ($_POST['profile'] == "newhost") {
|
||||||
metaRefresh("profilepage.php?type=host");
|
metaRefresh("profilepage.php?type=host");
|
||||||
|
@ -96,13 +94,11 @@ for ($i = 0; $i < sizeof($usrprof); $i++) {
|
||||||
$userprofiles = $userprofiles . "<option>" . $usrprof[$i] . "</option>\n";
|
$userprofiles = $userprofiles . "<option>" . $usrprof[$i] . "</option>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
|
// get list of group profiles and generate entries for dropdown box
|
||||||
// get list of group profiles and generate entries for dropdown box
|
$grpprof = getGroupProfiles();
|
||||||
$grpprof = getGroupProfiles();
|
$groupprofiles = "";
|
||||||
$groupprofiles = "";
|
for ($i = 0; $i < sizeof($grpprof); $i++) {
|
||||||
for ($i = 0; $i < sizeof($grpprof); $i++) {
|
|
||||||
$groupprofiles = $groupprofiles . "<option>" . $grpprof[$i] . "</option>\n";
|
$groupprofiles = $groupprofiles . "<option>" . $grpprof[$i] . "</option>\n";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get list of host profiles and generate entries for dropdown box
|
// get list of host profiles and generate entries for dropdown box
|
||||||
|
@ -165,51 +161,47 @@ echo $_SESSION['header'];
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
|
echo " <!-- group profile options -->";
|
||||||
echo " <!-- group profile options -->";
|
echo " <fieldset>";
|
||||||
echo " <fieldset>";
|
echo " <legend>";
|
||||||
echo " <legend>";
|
echo " <b>" . _("Group Profiles") . "</b>";
|
||||||
echo " <b>" . _("Group Profiles") . "</b>";
|
echo " </legend>";
|
||||||
echo " </legend>";
|
echo " <table border=0>";
|
||||||
echo " <table border=0>";
|
echo " <!-- new group profile -->";
|
||||||
echo " <!-- new group profile -->";
|
echo " <tr>";
|
||||||
echo " <tr>";
|
echo " <td>";
|
||||||
echo " <td>";
|
echo " <input type=\"radio\" name=\"profile\" value=\"newgroup\">";
|
||||||
echo " <input type=\"radio\" name=\"profile\" value=\"newgroup\">";
|
echo " </td>";
|
||||||
echo " </td>";
|
echo " <td colspan=2>" . _("Create a new Group Profile") . "</td>";
|
||||||
echo " <td colspan=2>" . _("Create a new Group Profile") . "</td>";
|
echo " </tr>";
|
||||||
echo " </tr>";
|
echo " <!-- edit group profile -->";
|
||||||
if ($groupprofiles != "") {
|
echo " <tr>";
|
||||||
echo " <!-- edit group profile -->";
|
echo " <td>";
|
||||||
echo " <tr>";
|
echo " <input type=\"radio\" name=\"profile\" value=\"editgroup\">";
|
||||||
echo " <td>";
|
echo " </td>";
|
||||||
echo " <input type=\"radio\" name=\"profile\" value=\"editgroup\">";
|
echo " <td>";
|
||||||
echo " </td>";
|
echo " <select name=\"e_group\" size=1>";
|
||||||
echo " <td>";
|
echo " " . $groupprofiles;
|
||||||
echo " <select name=\"e_group\" size=1>";
|
echo " </select>";
|
||||||
echo " " . $groupprofiles;
|
echo " </td>";
|
||||||
echo " </select>";
|
echo " <td>" . _("Edit Group Profile") . "</td>";
|
||||||
echo " </td>";
|
echo " </tr>";
|
||||||
echo " <td>" . _("Edit Group Profile") . "</td>";
|
echo " <!-- delete group profile -->";
|
||||||
echo " </tr>";
|
echo " <tr>";
|
||||||
echo " <!-- delete group profile -->";
|
echo " <td>";
|
||||||
echo " <tr>";
|
echo " <input type=\"radio\" name=\"profile\" value=\"delgroup\">";
|
||||||
echo " <td>";
|
echo " </td>";
|
||||||
echo " <input type=\"radio\" name=\"profile\" value=\"delgroup\">";
|
echo " <td>";
|
||||||
echo " </td>";
|
echo " <select name=\"d_group\" size=1>";
|
||||||
echo " <td>";
|
echo " " . $groupprofiles;
|
||||||
echo " <select name=\"d_group\" size=1>";
|
echo " </select>";
|
||||||
echo " " . $groupprofiles;
|
echo " </td>";
|
||||||
echo " </select>";
|
echo " <td>" . _("Delete Group Profile") . "</td>";
|
||||||
echo " </td>";
|
echo " </tr>";
|
||||||
echo " <td>" . _("Delete Group Profile") . "</td>";
|
echo " </table>";
|
||||||
echo " </tr>";
|
echo " </fieldset>";
|
||||||
}
|
|
||||||
echo " </table>";
|
|
||||||
echo " </fieldset>";
|
|
||||||
|
|
||||||
echo " <p></p>";
|
echo " <p></p>";
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- host profile options -->
|
<!-- host profile options -->
|
||||||
|
|
Loading…
Reference in New Issue