function system_ip_blocking

7.x system_ip_blocking($default_ip = '')

Menu callback. Display blocked IP addresses.


$default_ip: Optional IP address to be passed on to drupal_get_form() for use as the default value of the IP address form field.

1 string reference to 'system_ip_blocking'
system_menu in drupal/modules/system/system.module
Implements hook_menu().


drupal/modules/system/, line 1380
Admin page callbacks for the system module.


function system_ip_blocking($default_ip = '') {
  $rows = array();
  $header = array(t('Blocked IP addresses'), t('Operations'));
  $result = db_query('SELECT * FROM {blocked_ips}');
  foreach ($result as $ip) {
    $rows[] = array(
      l(t('delete'), "admin/config/people/ip-blocking/delete/$ip->iid"),

  $build['system_ip_blocking_form'] = drupal_get_form('system_ip_blocking_form', $default_ip);

  $build['system_ip_blocking_table'] = array(
    '#theme' => 'table',
    '#header' => $header,
    '#rows' => $rows,
    '#empty' => t('No blocked IP addresses available.'),

  return $build;