You are here

function autoban_menu in Automatic IP ban (Autoban) 7

Implements hook_menu().

File

./autoban.module, line 63
Main file for autoban module.

Code

function autoban_menu() {
  $items[AUTOBAN_BASE_URL] = array(
    'title' => 'Autoban',
    'description' => 'Configure automatic ban settings.',
    'page callback' => 'autoban_page',
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/list'] = array(
    'title' => 'Autoban rules',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items[AUTOBAN_BASE_URL . '/add'] = array(
    'title' => 'Add rule',
    'type' => MENU_LOCAL_ACTION,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_form',
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/ban_all'] = array(
    'title' => 'Ban all',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_ban_all_form',
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/clear'] = array(
    'title' => 'Clear tables',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_clear_tables_form',
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/analyze'] = array(
    'title' => 'Log analyze',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'autoban_analyze',
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/export'] = array(
    'title' => 'Export',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_export_form',
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/import'] = array(
    'title' => 'Import',
    'type' => MENU_LOCAL_ACTION,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_import_form',
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/edit/%'] = array(
    'title' => 'Edit autoban rule',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_form',
      5,
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/delete/%'] = array(
    'title' => 'Delete autoban rule',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_delete',
      5,
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/test/%'] = array(
    'title' => 'Test autoban rule',
    'page callback' => 'autoban_test',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  $items[AUTOBAN_BASE_URL . '/ban/%/%'] = array(
    'title' => 'IP ban',
    'type' => MENU_CALLBACK,
    'page callback' => 'autoban_ban_manual',
    'page arguments' => array(
      5,
      6,
    ),
    'access arguments' => array(
      'administer autoban',
    ),
  );
  $items[AUTOBAN_BASE_URL . '/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'autoban_settings_form',
    ),
    'access arguments' => array(
      'administer autoban',
    ),
    'file' => 'autoban.admin.inc',
  );
  return $items;
}