function uc_roles_expiration in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_roles/uc_roles.module \uc_roles_expiration()
- 7.3 uc_roles/uc_roles.admin.inc \uc_roles_expiration()
Menu callback for viewing expirations.
4 string references to 'uc_roles_expiration'
- uc_roles_ca_action in uc_roles/
uc_roles.ca.inc - Implements hook_ca_action().
- uc_roles_ca_condition in uc_roles/
uc_roles.ca.inc - Implements hook_ca_condition().
- uc_roles_ca_trigger in uc_roles/
uc_roles.ca.inc - Implements hook_ca_trigger().
- uc_roles_menu in uc_roles/
uc_roles.module - Implements hook_menu().
File
- uc_roles/
uc_roles.admin.inc, line 23 - Roles administration menu items.
Code
function uc_roles_expiration() {
// Create the header for the pager.
$header = _uc_roles_expiration_header();
// Grab all the info to build the pager.
$sql = 'SELECT * FROM {uc_roles_expirations} AS e INNER JOIN {users} AS u ON e.uid = u.uid';
$sql .= tablesort_sql($header);
$result = pager_query($sql, 50, 0, NULL);
// Stick the expirations into the form.
while ($row = db_fetch_object($result)) {
$form['name'][$row->uid . ' ' . $row->rid] = array(
'#value' => theme('username', $row),
);
$form['role'][$row->uid . ' ' . $row->rid] = array(
'#value' => check_plain(_uc_roles_get_name($row->rid)),
);
$form['expiration'][$row->uid . ' ' . $row->rid] = array(
'#value' => format_date($row->expiration, 'small'),
);
$form['operations'][$row->uid . ' ' . $row->rid] = array(
'#value' => l(t('delete'), 'admin/user/user/expiration/delete/' . $row->uid . '/' . $row->rid) . ' ' . l(t('edit'), 'user/' . $row->uid . '/edit', array(
'fragment' => 'role-expiration-' . $row->rid,
'query' => 'destination=admin%2Fuser%2Fuser%2Fexpiration',
)),
);
}
return $form;
}