<?php 
}
?>

<?php 
// List the access control groups if phpgacl installed
if (isset($phpgacl_location) && acl_check('admin', 'acl')) {
    ?>
  <tr>
  <td class='text'><?php 
    xl('Access Control', 'e');
    ?>
:</td>
  <td><select name="access_group[]" multiple style="width:120px;">
  <?php 
    $list_acl_groups = acl_get_group_title_list();
    $default_acl_group = 'Administrators';
    foreach ($list_acl_groups as $value) {
        if ($default_acl_group == $value) {
            // Modified 6-2009 by BM - Translate group name if applicable
            echo " <option value='{$value}' selected>" . xl_gacl_group($value) . "</option>\n";
        } else {
            // Modified 6-2009 by BM - Translate group name if applicable
            echo " <option value='{$value}'>" . xl_gacl_group($value) . "</option>\n";
        }
    }
    ?>
  </select></td>
  <td><span class="text"><?php 
    xl('Additional Info', 'e');
    ?>
Example #2
0
function return_values_xml($err)
{
    global $phpgacl_location;
    include_once "{$phpgacl_location}/gacl_api.class.php";
    $gacl = new gacl_api();
    $returns = array();
    $message = "<?xml version=\"1.0\"?>\n" . "<response>\n";
    foreach (acl_get_group_title_list() as $value) {
        $acl_id = $gacl->search_acl(FALSE, FALSE, FALSE, FALSE, $value, FALSE, FALSE, FALSE, FALSE);
        foreach ($acl_id as $value2) {
            $acl = $gacl->get_acl($value2);
            $ret = $acl["return_value"];
            if (!in_array($ret, $returns)) {
                // Modified 6-2009 by BM - Translate return value
                $message .= "\t<return>\n";
                $message .= "\t\t<returnid>" . $ret . "</returnid>\n";
                $message .= "\t\t<returntitle>" . xl($ret) . "</returntitle>\n";
                $message .= "\t</return>\n";
                array_push($returns, $ret);
            }
        }
    }
    if (isset($err)) {
        foreach ($err as $value) {
            $message .= "\t<error>" . $value . "</error>\n";
        }
    }
    $message .= "</response>\n";
    return $message;
}