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,22 +147,9 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
else {
// print success message
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 "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
echo "</body></html>\n";
}
echo "<p>&nbsp;</p>\n";
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
echo "</body></html>\n";
}
}
else {

View File

@ -33,8 +33,7 @@ setlanguage();
echo $_SESSION['header'];
// number of list views (users, groups, ...)
$lists = 2;
if ($_SESSION['config']->is_samba3()) $lists++;
$lists = 3;
if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
?>
@ -70,21 +69,11 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
<tr>
<td></td>
<?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/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";
if ($_SESSION['config']->get_Hostsuffix() != "") {
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";
}
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/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
if ($_SESSION['config']->get_Hostsuffix() != "") {
echo '<td width="120" align="center"><a href="./lists/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</big></a></td>' . "\n";
}
?>
<td></td>

View File

@ -435,39 +435,37 @@ function display_main() {
echo ("<br>\n");
// domain OUs
if ($_SESSION['config']->is_samba3()) {
echo ("<fieldset><legend><b>" . _("Domains") . "</b></legend>\n");
echo ("<table border=0>\n");
// new OU
echo ("<tr>\n");
echo ("<td><input type=radio name=\"type\" value=\"new_dom\"></td>\n");
echo ("<td><b>" . _("New organizational unit") . ":</b></td>\n");
echo ("<td>&nbsp;</td>\n");
echo ("<td><select size=1 name=domsuff_n>");
for ($i = 0; $i < sizeof($dom_units); $i++) {
echo ("<option>" . $dom_units[$i] . "</option>\n");
}
echo ("</select><td>\n");
echo ("<td><input type=text name=newsuff_d></td>\n");
echo ("<td><a href=\"help.php?HelpNumber=601\" target=\"lamhelp\">". _("Help") ."</a></td>\n");
echo ("</tr>\n");
// delete OU
echo ("<tr>\n");
echo ("<td><input type=radio name=\"type\" value=\"del_dom\"></td>\n");
echo ("<td><b>" . _("Delete organizational unit") . ":</b></td>\n");
echo ("<td>&nbsp;</td>\n");
echo ("<td><select size=1 name=domsuff_d>");
for ($i = 0; $i < sizeof($dom_units); $i++) {
echo ("<option>" . $dom_units[$i] . "</option>\n");
}
echo ("</select><td>\n");
echo ("<td>&nbsp;</td>\n");
echo ("<td><a href=\"help.php?HelpNumber=602\" target=\"lamhelp\">". _("Help") ."</a></td>\n");
echo ("</tr>\n");
echo ("</table>\n");
echo ("</fieldset>\n");
echo ("<br>\n");
echo ("<fieldset><legend><b>" . _("Domains") . "</b></legend>\n");
echo ("<table border=0>\n");
// new OU
echo ("<tr>\n");
echo ("<td><input type=radio name=\"type\" value=\"new_dom\"></td>\n");
echo ("<td><b>" . _("New organizational unit") . ":</b></td>\n");
echo ("<td>&nbsp;</td>\n");
echo ("<td><select size=1 name=domsuff_n>");
for ($i = 0; $i < sizeof($dom_units); $i++) {
echo ("<option>" . $dom_units[$i] . "</option>\n");
}
echo ("</select><td>\n");
echo ("<td><input type=text name=newsuff_d></td>\n");
echo ("<td><a href=\"help.php?HelpNumber=601\" target=\"lamhelp\">". _("Help") ."</a></td>\n");
echo ("</tr>\n");
// delete OU
echo ("<tr>\n");
echo ("<td><input type=radio name=\"type\" value=\"del_dom\"></td>\n");
echo ("<td><b>" . _("Delete organizational unit") . ":</b></td>\n");
echo ("<td>&nbsp;</td>\n");
echo ("<td><select size=1 name=domsuff_d>");
for ($i = 0; $i < sizeof($dom_units); $i++) {
echo ("<option>" . $dom_units[$i] . "</option>\n");
}
echo ("</select><td>\n");
echo ("<td>&nbsp;</td>\n");
echo ("<td><a href=\"help.php?HelpNumber=602\" target=\"lamhelp\">". _("Help") ."</a></td>\n");
echo ("</tr>\n");
echo ("</table>\n");
echo ("</fieldset>\n");
echo ("<br>\n");
echo ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">");
echo ("</form>\n");

View File

@ -59,19 +59,17 @@ if ($_POST['forward'] == "yes") {
elseif($_POST['profile'] == "deluser") {
metaRefresh("profiledelete.php?type=user&del=" . $_POST['d_user']);
}
if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
// create new group profile
if ($_POST['profile'] == "newgroup") {
metaRefresh("profilepage.php?type=group");
}
// edit group profile
elseif($_POST['profile'] == "editgroup") {
metaRefresh("profilepage.php?type=group&amp;edit=" . $_POST['e_group']);
}
// delete group profile
elseif($_POST['profile'] == "delgroup") {
metaRefresh("profiledelete.php?type=group&del=" . $_POST['d_group']);
}
// create new group profile
if ($_POST['profile'] == "newgroup") {
metaRefresh("profilepage.php?type=group");
}
// edit group profile
elseif($_POST['profile'] == "editgroup") {
metaRefresh("profilepage.php?type=group&amp;edit=" . $_POST['e_group']);
}
// delete group profile
elseif($_POST['profile'] == "delgroup") {
metaRefresh("profiledelete.php?type=group&del=" . $_POST['d_group']);
}
// create new host profile
if ($_POST['profile'] == "newhost") {
@ -96,13 +94,11 @@ for ($i = 0; $i < sizeof($usrprof); $i++) {
$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
$grpprof = getGroupProfiles();
$groupprofiles = "";
for ($i = 0; $i < sizeof($grpprof); $i++) {
$groupprofiles = $groupprofiles . "<option>" . $grpprof[$i] . "</option>\n";
}
// get list of group profiles and generate entries for dropdown box
$grpprof = getGroupProfiles();
$groupprofiles = "";
for ($i = 0; $i < sizeof($grpprof); $i++) {
$groupprofiles = $groupprofiles . "<option>" . $grpprof[$i] . "</option>\n";
}
// get list of host profiles and generate entries for dropdown box
@ -165,51 +161,47 @@ echo $_SESSION['header'];
<p></p>
<?php
if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) {
echo " <!-- group profile options -->";
echo " <fieldset>";
echo " <legend>";
echo " <b>" . _("Group Profiles") . "</b>";
echo " </legend>";
echo " <table border=0>";
echo " <!-- new group profile -->";
echo " <tr>";
echo " <td>";
echo " <input type=\"radio\" name=\"profile\" value=\"newgroup\">";
echo " </td>";
echo " <td colspan=2>" . _("Create a new Group Profile") . "</td>";
echo " </tr>";
if ($groupprofiles != "") {
echo " <!-- edit group profile -->";
echo " <tr>";
echo " <td>";
echo " <input type=\"radio\" name=\"profile\" value=\"editgroup\">";
echo " </td>";
echo " <td>";
echo " <select name=\"e_group\" size=1>";
echo " " . $groupprofiles;
echo " </select>";
echo " </td>";
echo " <td>" . _("Edit Group Profile") . "</td>";
echo " </tr>";
echo " <!-- delete group profile -->";
echo " <tr>";
echo " <td>";
echo " <input type=\"radio\" name=\"profile\" value=\"delgroup\">";
echo " </td>";
echo " <td>";
echo " <select name=\"d_group\" size=1>";
echo " " . $groupprofiles;
echo " </select>";
echo " </td>";
echo " <td>" . _("Delete Group Profile") . "</td>";
echo " </tr>";
}
echo " </table>";
echo " </fieldset>";
echo " <!-- group profile options -->";
echo " <fieldset>";
echo " <legend>";
echo " <b>" . _("Group Profiles") . "</b>";
echo " </legend>";
echo " <table border=0>";
echo " <!-- new group profile -->";
echo " <tr>";
echo " <td>";
echo " <input type=\"radio\" name=\"profile\" value=\"newgroup\">";
echo " </td>";
echo " <td colspan=2>" . _("Create a new Group Profile") . "</td>";
echo " </tr>";
echo " <!-- edit group profile -->";
echo " <tr>";
echo " <td>";
echo " <input type=\"radio\" name=\"profile\" value=\"editgroup\">";
echo " </td>";
echo " <td>";
echo " <select name=\"e_group\" size=1>";
echo " " . $groupprofiles;
echo " </select>";
echo " </td>";
echo " <td>" . _("Edit Group Profile") . "</td>";
echo " </tr>";
echo " <!-- delete group profile -->";
echo " <tr>";
echo " <td>";
echo " <input type=\"radio\" name=\"profile\" value=\"delgroup\">";
echo " </td>";
echo " <td>";
echo " <select name=\"d_group\" size=1>";
echo " " . $groupprofiles;
echo " </select>";
echo " </td>";
echo " <td>" . _("Delete Group Profile") . "</td>";
echo " </tr>";
echo " </table>";
echo " </fieldset>";
echo " <p></p>";
}
echo " <p></p>";
?>
<!-- host profile options -->