removed Samba 3 check
This commit is contained in:
		
							parent
							
								
									debf0cec26
								
							
						
					
					
						commit
						f4ae7efd39
					
				|  | @ -147,24 +147,11 @@ 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> </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 "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n"; | ||||
| 			echo "</body></html>\n"; | ||||
| 		} | ||||
| 	} | ||||
| 	} | ||||
| 	else { | ||||
| 		// no suffixes were created
 | ||||
| 		StatusMessage("INFO", "", _("No changes were made.")); | ||||
|  |  | |||
|  | @ -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,22 +69,12 @@ 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"; | ||||
| 				} | ||||
| 			} | ||||
| 		?>
 | ||||
| 		<td></td> | ||||
| 	</tr> | ||||
|  |  | |||
|  | @ -435,7 +435,6 @@ 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
 | ||||
|  | @ -467,7 +466,6 @@ function display_main() { | |||
| 	echo ("</table>\n"); | ||||
| 	echo ("</fieldset>\n"); | ||||
| 	echo ("<br>\n"); | ||||
| 	} | ||||
| 
 | ||||
| 	echo ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">"); | ||||
| 	echo ("</form>\n"); | ||||
|  |  | |||
|  | @ -59,7 +59,6 @@ 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"); | ||||
|  | @ -72,7 +71,6 @@ if ($_POST['forward'] == "yes") { | |||
| 		elseif($_POST['profile'] == "delgroup") { | ||||
| 			metaRefresh("profiledelete.php?type=group&del=" . $_POST['d_group']); | ||||
| 		} | ||||
| 		} | ||||
| 		// create new host profile
 | ||||
| 		if ($_POST['profile'] == "newhost") { | ||||
| 			metaRefresh("profilepage.php?type=host"); | ||||
|  | @ -96,14 +94,12 @@ 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 host profiles and generate entries for dropdown box
 | ||||
| $hstprof = getHostProfiles(); | ||||
|  | @ -165,7 +161,6 @@ echo $_SESSION['header']; | |||
| 		<p></p> | ||||
| 
 | ||||
| <?php | ||||
| if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) { | ||||
| echo "		<!-- group profile options -->"; | ||||
| echo "		<fieldset>"; | ||||
| echo "			<legend>"; | ||||
|  | @ -179,7 +174,6 @@ if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) { | |||
| echo "					</td>"; | ||||
| echo "					<td colspan=2>" . _("Create a new Group Profile") . "</td>"; | ||||
| echo "				</tr>"; | ||||
| 	if ($groupprofiles != "") { | ||||
| echo "				<!-- edit group profile -->"; | ||||
| echo "				<tr>"; | ||||
| echo "					<td>"; | ||||
|  | @ -204,12 +198,10 @@ if ($_SESSION['config']->is_samba3() || $_SESSION['config']->get_scriptPath()) { | |||
| echo "					</td>"; | ||||
| echo "					<td>" . _("Delete Group Profile") . "</td>"; | ||||
| echo "				</tr>"; | ||||
| 	} | ||||
| echo "			</table>"; | ||||
| echo "		</fieldset>"; | ||||
| 
 | ||||
| echo "		<p></p>"; | ||||
| } | ||||
| ?>
 | ||||
| 
 | ||||
| 		<!-- host profile options --> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue