You are here

function getlocations_box in Get Locations 6

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_box()
  2. 7.2 getlocations.module \getlocations_box()
  3. 7 getlocations.module \getlocations_box()
2 string references to 'getlocations_box'
getlocations_menu in ./getlocations.module
Implementation of hook_menu().
getlocations_theme in ./getlocations.theme.inc
Implementation of hook_theme().

File

./getlocations.module, line 1013
Displays locations on a map. for Drupal 6 using version 3 googlemaps API

Code

function getlocations_box() {
  $a1 = FALSE;
  $a2 = FALSE;
  $a3 = FALSE;
  $a4 = FALSE;
  if (arg(1)) {
    $a1 = arg(1);
  }
  if (arg(2)) {
    $a2 = arg(2);
  }
  if (arg(3)) {
    $a3 = arg(3);
  }
  if (arg(4)) {
    $a4 = arg(4);
  }
  $content = '';

  // $a1 can be node, user, users, type, lids, nids
  if ($a1 == 'node' && $a2) {
    $content .= getlocations_nodemap($a2);
  }
  elseif ($a1 == 'user' && $a2) {
    $content .= getlocations_usermap($a2);
  }
  elseif ($a1 == 'users') {
    $content .= getlocations_usersmap();
  }
  elseif ($a1 == 'type' && $a2) {
    $content .= getlocations_typemap($a2, $a3, $a4);
  }
  elseif ($a1 == 'lids' && $a2) {
    $content .= getlocations_lids($a2);
  }
  elseif ($a1 == 'nids' && $a2) {
    $content .= getlocations_nids($a2);
  }
  $output = theme('getlocations_box', $content);
  print $output;
  exit;
}