You are here

function imagepicker_box in Image Picker 7

Same name and namespace in other branches
  1. 6.2 imagepicker.functions.inc \imagepicker_box()
1 string reference to 'imagepicker_box'
imagepicker_menu in ./imagepicker.module
Implement hook_menu().

File

./imagepicker.functions.inc, line 2978
@author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function imagepicker_box() {
  $a1 = FALSE;
  $a2 = 0;
  $a3 = FALSE;
  if (arg(1)) {
    $a1 = arg(1);
  }
  if (arg(2)) {
    $a2 = arg(2);
  }
  if (arg(3) && $a2) {
    $a3 = arg(3);
  }
  if ($a1 == 'browse') {
    $content = imagepicker_browse($a2);
  }
  elseif ($a1 == 'browse_public') {
    $content = imagepicker_browse_public($a2);
  }
  elseif ($a1 == 'groups') {
    $content = imagepicker_groups($a2, $a3);
  }
  elseif ($a1 == 'edit') {
    $content = imagepicker_image_edit($a2);
  }
  elseif ($a1 == 'image') {
    $content = imagepicker_image_page($a2, $a3);
  }
  elseif ($a1 == 'upload_postlet') {
    $content = imagepicker_postlet_page();
  }
  else {
    $content = imagepicker_upload();
  }
  drupal_add_css(IMAGEPICKER_PATH . '/imagepicker.css');
  $output = theme('imagepicker', array(
    'content' => $content,
  ));
  print $output;
  exit;
}