removed Samba 3 check

This commit is contained in:
Roland Gruber 2004-05-30 12:14:31 +00:00
parent debf0cec26
commit f4ae7efd39
4 changed files with 95 additions and 129 deletions

View File

@ -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>&nbsp;</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>&nbsp;</p>\n"; echo "<p>&nbsp;</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."));

View File

@ -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>

View File

@ -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");

View File

@ -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,14 +94,12 @@ 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
$hstprof = getHostProfiles(); $hstprof = getHostProfiles();
@ -165,7 +161,6 @@ 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>";
@ -179,7 +174,6 @@ if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
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>";
if ($groupprofiles != "") {
echo " <!-- edit group profile -->"; echo " <!-- edit group profile -->";
echo " <tr>"; echo " <tr>";
echo " <td>"; echo " <td>";
@ -204,12 +198,10 @@ if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
echo " </td>"; echo " </td>";
echo " <td>" . _("Delete Group Profile") . "</td>"; echo " <td>" . _("Delete Group Profile") . "</td>";
echo " </tr>"; echo " </tr>";
}
echo " </table>"; echo " </table>";
echo " </fieldset>"; echo " </fieldset>";
echo " <p></p>"; echo " <p></p>";
}
?> ?>
<!-- host profile options --> <!-- host profile options -->