You are here

function getlocations_box in Get Locations 7.2

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_box()
  2. 6 getlocations.module \getlocations_box()
  3. 7 getlocations.module \getlocations_box()

Function for colorbox and suchlike

Return value

Returns themed content

2 string references to 'getlocations_box'
getlocations_menu in ./getlocations.module
Implements hook_menu().
getlocations_theme in ./getlocations.module
Implements hook_theme().

File

./getlocations.module, line 1977
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

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 (getlocations_check_entity_type($a1)) {
    $content .= getlocations_entity_type_map($a1, $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', array(
    'content' => $content,
  ));
  print $output;
  exit;
}