function imagepicker_user_page in Image Picker 6.2
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_user_page()
- 5 imagepicker.module \imagepicker_user_page()
- 7 imagepicker.user.inc \imagepicker_user_page()
@file my imagepicker in my account
1 string reference to 'imagepicker_user_page'
- imagepicker_menu in ./
imagepicker.module - Implementation of hook_menu().
File
- ./
imagepicker.user.inc, line 7 - my imagepicker in my account
Code
function imagepicker_user_page($uid, $path = "", $func = "", $id = 0) {
drupal_add_css(IMAGEPICKER_PATH . '/imagepicker.css');
drupal_add_js(IMAGEPICKER_PATH . '/imagepicker.js');
$content = '';
// path/func/id
if ($path == 'images') {
if (($func == 'browse' || $func == 'browseadmin') && is_numeric($id) && $id > 0) {
$content .= imagepicker_user_view($id);
}
elseif ($func == 'edit' && is_numeric($id) && $id > 0) {
module_load_include('inc', 'imagepicker', 'imagepicker.edit');
$content .= imagepicker_user_image_edit($id);
}
elseif ($func == 'browse') {
$content .= imagepicker_user_browse();
}
elseif ($func == 'browse_public') {
if (is_numeric($id) && $id > 0) {
$content .= imagepicker_user_view_public($id);
}
else {
$content .= imagepicker_user_browse_public();
}
}
elseif ($func == 'browseadmin') {
$content .= imagepicker_user_browse_admin();
}
elseif ($func == 'delete' && is_numeric($id) && $id > 0) {
imagepicker_image_delete($id, FALSE, 'account');
}
}
elseif (variable_get('imagepicker_groups_enabled', 1) && $path == 'groups') {
module_load_include('inc', 'imagepicker', 'imagepicker.group');
if ($func == 'edit' && is_numeric($id) && $id > 0) {
$content .= imagepicker_user_groups($func, $id);
}
elseif ($func == 'browse' && is_numeric($id) && $id > 0) {
imagepicker_set_user_group_state(1, $id);
$content .= imagepicker_user_browse();
}
elseif ($func == 'browse') {
$content .= imagepicker_user_groups();
}
elseif ($func == 'delete') {
$content .= drupal_get_form('imagepicker_group_delete_form', $id);
}
}
elseif ($path == 'stats') {
$content .= imagepicker_group_stats(-1);
}
elseif ($path == 'config') {
$content .= imagepicker_user_config_admin();
}
else {
module_load_include('inc', 'imagepicker', 'imagepicker.upload');
$content .= imagepicker_user_upload();
}
return $content;
}