Portions created by the Initial Developer are Copyright (C) 2008-2012 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ include "root.php"; require_once "includes/require.php"; //check the permissions require_once "includes/checkauth.php"; if (if_group("admin") || if_group("superadmin")) { //access allowed } else { echo "access denied"; return; } //show the header require_once "includes/header.php"; //show the content echo "
\n"; echo ""; echo ""; echo ""; echo "
"; echo ""; echo ""; echo "\n"; echo "
Group List"; if (permission_exists('user_view')) { echo " "; } echo "
"; $sql = "SELECT * FROM v_groups "; $sql .= "where domain_uuid = '$domain_uuid' "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; $strlist = "\n"; $strlist .= "\n"; $strlist .= " \n"; $strlist .= " \n"; $strlist .= " \n"; $strlist .= " \n"; $strlist .= "\n"; $count = 0; $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $group_name = $row["group_name"]; $group_uuid = $row["group_uuid"]; $group_description = $row["group_description"]; if (strlen($group_name) == 0) { $group_name = " "; } if (strlen($group_description) == 0) { $group_description = " "; } $group_description = wordwrap($group_description, 50, "
\n"); if (!if_group("superadmin") && $group_name == "superadmin") { //hide the superadmin group from non superadmin's } else { $strlist .= ""; $strlist .= "\n"; $strlist .= "\n"; $strlist .= "\n"; $strlist .= "\n"; $strlist .= "\n"; } if ($c==0) { $c=1; } else { $c=0; } $count++; } $strlist .= "\n"; $strlist .= "\n"; $strlist .= "\n"; $strlist .= "
  Group Name     Group Description    \n"; if (permission_exists('group_add')) { $strlist .= " $v_link_label_add\n"; } $strlist .= "
  $group_name     $group_description   \n"; if (permission_exists('group_add') || if_group("superadmin")) { $strlist .= " Permissions  "; } if (permission_exists('group_member_view') || if_group("superadmin")) { $strlist .= " Members "; } $strlist .= "\n"; $strlist .= "$v_link_label_delete\n"; $strlist .= "
\n"; if (permission_exists('group_add')) { $strlist .= " $v_link_label_add\n"; } $strlist .= "
\n"; if ($count > 0) { echo $strlist; } echo "
"; echo "
"; echo "
"; //show the footer require_once "includes/footer.php"; ?>