redirect(append_sid(album_append_uid(CMS_PAGE_LOGIN . '?redirect=album.' . PHP_EXT, true))); } else { $album_user_id = $user->data['user_id']; redirect(append_sid(album_append_uid('album.' . PHP_EXT, true))); } } if ($cat_id != ALBUM_ROOT_CATEGORY && $cat_id != album_get_personal_root_id($album_user_id)) { redirect(append_sid(album_append_uid('album_cat.' . PHP_EXT . album_build_url_parameters($_GET), false))); } } $catrows = array(); $options = $album_view_mode == ALBUM_VIEW_LIST ? ALBUM_READ_ALL_CATEGORIES | ALBUM_AUTH_VIEW : ALBUM_AUTH_VIEW; $catrows = album_read_tree($album_user_id, $options); // Mighty Gorgon: is this really needed? Maybe not... let's keep it commented until someone complains!!! //album_read_tree($album_user_id); $album_nav_cat_desc = album_make_nav_tree($cat_id, 'album_cat.' . PHP_EXT, 'nav', $album_user_id); if ($album_nav_cat_desc != '') { $nav_server_url = create_server_url(); $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc; $breadcrumbs['address'] = ALBUM_NAV_ARROW . '<a href="' . $nav_server_url . append_sid('album.' . PHP_EXT) . '">' . $lang['Album'] . '</a>' . $album_nav_cat_desc; } // -------------------------------- // Build allowed category-list (for recent pics after here) // $catrows array now stores all categories which this user can view. // -------------------------------- $allowed_cat = ''; // For Recent Public Pics below for ($i = 0; $i < sizeof($catrows); $i++) { // -------------------------------- // build list of allowd category id's // --------------------------------
// the pictures or a category, this is infact the 'main' difference betwwen // these tho 'view modes'.. the rest is done in 'album_build_picture_table' // ------------------------------------------------------------------------ if ($album_view_mode != ALBUM_VIEW_ALL) { $album_nav_cat_desc = album_make_nav_tree($cat_id, $album_page_url, 'nav', $album_user_id); if (!empty($album_nav_cat_desc)) { $nav_server_url = create_server_url(); $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc; $breadcrumbs['address'] = ALBUM_NAV_ARROW . '<a href="' . $nav_server_url . append_sid('album.' . PHP_EXT) . '">' . $lang['Album'] . '</a>' . $album_nav_cat_desc; } $cat_ids = $cat_id; $image_toggle_button = $images['all_pic_view_mode']; $view_mode_url = append_sid(album_append_uid($album_page_url . '?cat_id=' . intval($cat_id) . '&mode=' . ALBUM_VIEW_ALL)); $view_mode_text = $lang['Show_all_pic_view_mode']; } else { $album_nav_cat_desc = album_make_nav_tree(album_get_personal_root_id($album_user_id), $album_page_url, 'nav', $album_user_id); if (!empty($album_nav_cat_desc)) { $nav_server_url = create_server_url(); $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc; $breadcrumbs['address'] = ALBUM_NAV_ARROW . '<a href="' . $nav_server_url . append_sid('album.' . PHP_EXT) . '">' . $lang['Album'] . '</a>' . $album_nav_cat_desc; } if (album_get_personal_root_id($album_user_id) != $cat_id) { $allowed_cat = $cat_id; $tmp_array = array(); album_get_sub_cat_ids(album_get_personal_root_id($album_user_id), $tmp_array, ALBUM_AUTH_VIEW, true); reset($tmp_array); while (list($key, $id) = each($tmp_array)) { if ($id != $cat_id) { $allowed_cat .= ',' . $id; } }