function ldapauth_admin_list in LDAP integration 5
Same name and namespace in other branches
- 5.2 ldapauth.module \ldapauth_admin_list()
- 6 ldapauth.admin.inc \ldapauth_admin_list()
1 string reference to 'ldapauth_admin_list'
- ldapauth_menu in ./
ldapauth.module - Implements hook_menu()
File
- ./
ldapauth.module, line 163
Code
function ldapauth_admin_list() {
$sql = "SELECT sid, name, status FROM {ldapauth} ORDER BY sid";
$result = db_query($sql);
$rows = array();
while ($row = db_fetch_object($result)) {
if ($row->status) {
$link_text = "de-activate";
$link_comp = "deactivate";
}
else {
$link_text = "activate";
$link_comp = "activate";
}
$rows[] = array(
$row->name,
l(t('edit'), 'admin/settings/ldapauth/edit/' . $row->sid),
l(t('!link_text', array(
'!link_text' => $link_text,
)), 'admin/settings/ldapauth/' . $link_comp . '/' . $row->sid),
l(t('delete'), 'admin/settings/ldapauth/delete/' . $row->sid),
);
}
$header = array(
t('LDAP Config'),
array(
'data' => t('Operations'),
'colspan' => '3',
),
);
return theme('table', $header, $rows);
}