\n");
+}
+
+// compare function used for usort-method
+// rows are sorted with the first attribute entry of the sort column
+// if objects have attributes with multiple values the others are ignored
+function cmp_array($a, $b) {
+ // sort specifies the sort column
+ global $sort;
+ global $attr_array;
+ // sort by first attribute with name $sort
+ if (!$sort) $sort = strtolower($attr_array[0]);
+ if ($a[$sort][0] == $b[$sort][0]) return 0;
+ else if ($a[$sort][0] == max($a[$sort][0], $b[$sort][0])) return 1;
+ else return -1;
+}
+
+?>
diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php
index e2136f3a..faa5294d 100644
--- a/lam/templates/lists/listhosts.php
+++ b/lam/templates/lists/listhosts.php
@@ -77,7 +77,7 @@ $hash_table = $_SESSION["ldap"]->attributeHostArray();
// get current page
$page = $_GET["page"];
if (!$page) $page = 1;
-// take maximum count of user entries shown on one page out of session
+// take maximum count of host entries shown on one page out of session
if ($_SESSION["config"]->get_MaxListEntries() <= 0)
$max_pageentrys = 10; // default setting, if not yet set
else
diff --git a/lam/templates/main_header.php b/lam/templates/main_header.php
index 93d20860..21d2df70 100644
--- a/lam/templates/main_header.php
+++ b/lam/templates/main_header.php
@@ -22,6 +22,13 @@ $Id$
*/
+include_once ("../lib/config.inc");
+
+// start session
+session_save_path("../sess");
+@session_start();
+
+setlanguage();
echo ("\n");
echo ("\n");
@@ -38,8 +45,12 @@ echo ("
-
-
+
+
+ // Samba 3 has more list views
+ if ($_SESSION['config']->get_samba3() == "yes") echo "
\n";
+ else echo "
\n";
+ ?>
@@ -51,12 +62,30 @@ echo ("
-
+
+
+ // Samba 3 has more list views
+ if ($_SESSION['config']->get_samba3() == "yes") echo "
\n";
+ else echo "
\n";
+ ?>
+
-
-
-
+
+ // Samba 3 has more list views
+ if ($_SESSION['config']->get_samba3() == "yes") {
+ echo '