function imagepicker_user_page in Image Picker 5.2
Same name and namespace in other branches
- 5 imagepicker.module \imagepicker_user_page()
- 6.2 imagepicker.user.inc \imagepicker_user_page()
- 7 imagepicker.user.inc \imagepicker_user_page()
Account functions
1 string reference to 'imagepicker_user_page'
- imagepicker_menu in ./
imagepicker.module - Implementation of hook_menu().
File
- ./
imagepicker.module, line 1924 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_user_page($path = '', $func = '', $id = 0) {
drupal_add_css(drupal_get_path('module', 'imagepicker') . '/imagepicker.css');
$content .= theme_imagepicker_user_menu($func == 'browse' ? 'browse' : 'browseadmin');
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) {
$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') {
imagepicker_image_delete($id, FALSE, 'account');
}
}
elseif ($path == 'groups') {
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 ($path == 'stats') {
$content .= imagepicker_group_stats(-1);
}
else {
$content .= imagepicker_user_upload();
}
return $content;
}