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 { else {
// print success message // print success message
StatusMessage("INFO", "", _("All changes were successful.")); StatusMessage("INFO", "", _("All changes were successful."));
if ($_SESSION['config']->is_samba3()) { echo "<p>&nbsp;</p>\n";
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_domainSuffix()); echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
echo "<p>&nbsp;</p>\n"; echo "</body></html>\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";
}
} }
} }
else { else {

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,21 +69,11 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
<tr> <tr>
<td></td> <td></td>
<?php <?php
// Samba 3 has more list views echo '<td width="120" align="center"><a href="./lists/listdomains.php" target="mainpart"><big>' . _("Domains") . '</big></a></td>' . "\n";
if ($_SESSION['config']->is_samba3()) { 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/listdomains.php" target="mainpart"><big>' . _("Domains") . '</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/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n"; if ($_SESSION['config']->get_Hostsuffix() != "") {
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/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</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";
}
} }
?> ?>
<td></td> <td></td>

View File

@ -435,39 +435,37 @@ 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 echo ("<tr>\n");
echo ("<tr>\n"); echo ("<td><input type=radio name=\"type\" value=\"new_dom\"></td>\n");
echo ("<td><input type=radio name=\"type\" value=\"new_dom\"></td>\n"); echo ("<td><b>" . _("New organizational unit") . ":</b></td>\n");
echo ("<td><b>" . _("New organizational unit") . ":</b></td>\n"); echo ("<td>&nbsp;</td>\n");
echo ("<td>&nbsp;</td>\n"); echo ("<td><select size=1 name=domsuff_n>");
echo ("<td><select size=1 name=domsuff_n>"); for ($i = 0; $i < sizeof($dom_units); $i++) {
for ($i = 0; $i < sizeof($dom_units); $i++) { echo ("<option>" . $dom_units[$i] . "</option>\n");
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 ("</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 ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">");
echo ("</form>\n"); echo ("</form>\n");

View File

@ -59,19 +59,17 @@ 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"); }
} // edit group profile
// edit group profile elseif($_POST['profile'] == "editgroup") {
elseif($_POST['profile'] == "editgroup") { metaRefresh("profilepage.php?type=group&amp;edit=" . $_POST['e_group']);
metaRefresh("profilepage.php?type=group&amp;edit=" . $_POST['e_group']); }
} // delete group profile
// delete group profile 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") {
@ -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 -->