diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 4f62b4a7..e0b03c5a 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -384,9 +384,9 @@ class lamList { echo " type . "')\"" . " type=\"checkbox\" name=\"" . $info[$i]['LAM_ID'] . "\">\n"; } - echo " type . "&DN='" . $info[$i]['dn'] . "'\">"; - echo "\"""; - echo "\n"; + echo " "; + $this->listPrintToolLinks($info[$i]); + echo "\n"; for ($k = 0; $k < sizeof($this->attrArray); $k++) { echo (""); $attrName = strtolower($this->attrArray[$k]); @@ -406,6 +406,22 @@ class lamList { echo (""); } + /** + * Prints the tool image links (e.g. edit and delete) for each account. + * + * $account array LDAP attributes + */ + function listPrintToolLinks($account) { + // edit image + echo "type . "&DN='" . $account['dn'] . "'\">"; + echo "\"""; + echo ""; + // delete image + echo "type . "&DN='" . $account['dn'] . "'\">"; + echo "\"""; + echo ""; + } + /** * Prints the content of a cell in the account list for a given LDAP entry and attribute. * diff --git a/lam/templates/delete.php b/lam/templates/delete.php index fd7689bc..efd79732 100644 --- a/lam/templates/delete.php +++ b/lam/templates/delete.php @@ -61,7 +61,7 @@ setlanguage(); if (!isset($_SESSION['cache'])) { $_SESSION['cache'] = new cache(); } -if ($_GET['type']) { +if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) { // Create account list foreach ($_SESSION['delete_dn'] as $dn) { $start = strpos ($dn, "=")+1; diff --git a/lam/templates/lists/deletelink.php b/lam/templates/lists/deletelink.php new file mode 100644 index 00000000..7e41b282 --- /dev/null +++ b/lam/templates/lists/deletelink.php @@ -0,0 +1,67 @@ +userlink\n"; + echo "\n"; + echo "\n"; + StatusMessage("ERROR", "No account or type given."); + echo ("\n"); +} + +?> diff --git a/lam/templates/main_header.php b/lam/templates/main_header.php index 223b7dc8..5eb2d2ce 100644 --- a/lam/templates/main_header.php +++ b/lam/templates/main_header.php @@ -66,7 +66,7 @@ $types = $_SESSION['config']->get_ActiveTypes(); LDAP Account Manager - logout  + logout