You are here

function ldapdata_admin_list in LDAP integration 6

Same name and namespace in other branches
  1. 5.2 ldapdata.module \ldapdata_admin_list()
  2. 5 ldapdata.module \ldapdata_admin_list()

Implements the LDAP servers list.

Return value

The HTML table with the servers list.

1 call to ldapdata_admin_list()
ldapdata_admin_settings in ./ldapdata.admin.inc
Implements the settings page.

File

./ldapdata.admin.inc, line 72
Module admin page callbacks.

Code

function ldapdata_admin_list() {
  $rows = array();
  $result = db_query("SELECT sid, name, status FROM {ldapauth} ORDER BY weight");
  while ($row = db_fetch_object($result)) {
    $rows[] = array(
      'data' => array(
        $row->name,
        l(t('edit'), 'admin/settings/ldap/ldapdata/edit/' . $row->sid),
        l(t('reset'), 'admin/settings/ldap/ldapdata/reset/' . $row->sid),
      ),
      'class' => $row->status ? 'menu-enabled' : 'menu-disabled',
    );
  }
  $header = array(
    t('Server'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  return theme('table', $header, $rows);
}