made user and group list optional
This commit is contained in:
		
							parent
							
								
									e6beeaa933
								
							
						
					
					
						commit
						667e849002
					
				|  | @ -148,23 +148,17 @@ if ($_POST['add_suff'] || $_POST['cancel']) { | ||||||
| 			for ($i = 0; $i < sizeof($fail); $i++) { | 			for ($i = 0; $i < sizeof($fail); $i++) { | ||||||
| 				StatusMessage("ERROR", _("Failed to create entry!") . "<br>" . $error[$i], $fail[$i]); | 				StatusMessage("ERROR", _("Failed to create entry!") . "<br>" . $error[$i], $fail[$i]); | ||||||
| 			} | 			} | ||||||
| 			echo "<p> </p>\n"; |  | ||||||
| 			echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n"; |  | ||||||
| 			echo "</body></html>\n"; | 			echo "</body></html>\n"; | ||||||
| 		} | 		} | ||||||
| 		else { | 		else { | ||||||
| 			// print success message
 | 			// print success message
 | ||||||
| 			StatusMessage("INFO", "", _("All changes were successful.")); | 			StatusMessage("INFO", "", _("All changes were successful.")); | ||||||
| 			echo "<p> </p>\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.")); | ||||||
| 		echo "<p> </p>\n"; |  | ||||||
| 		echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n"; |  | ||||||
| 		echo "</body></html>\n"; | 		echo "</body></html>\n"; | ||||||
| 	} | 	} | ||||||
| 	exit; | 	exit; | ||||||
|  |  | ||||||
|  | @ -40,7 +40,9 @@ setlanguage(); | ||||||
| echo $_SESSION['header']; | echo $_SESSION['header']; | ||||||
| 
 | 
 | ||||||
| // number of list views (users, groups, ...)
 | // number of list views (users, groups, ...)
 | ||||||
| $lists = 2; | $lists = 0; | ||||||
|  | if ($_SESSION['config']->get_Usersuffix() != "") $lists++; | ||||||
|  | if ($_SESSION['config']->get_Groupsuffix() != "") $lists++; | ||||||
| if ($_SESSION['config']->get_Hostsuffix() != "") $lists++; | if ($_SESSION['config']->get_Hostsuffix() != "") $lists++; | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
|  | @ -71,8 +73,12 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++; | ||||||
| 	<tr> | 	<tr> | ||||||
| 		<td></td> | 		<td></td> | ||||||
| 		<?php | 		<?php | ||||||
|  | 			if ($_SESSION['config']->get_Usersuffix() != "") { | ||||||
| 				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"; | ||||||
|  | 			} | ||||||
|  | 			if ($_SESSION['config']->get_Groupsuffix() != "") { | ||||||
| 				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"; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue