$grouprows[] = $row; } if (sizeof($grouprows) > 0) { for ($j = 0; $j < sizeof($grouprows); $j++) { $group_link = '<a href="' . append_sid(CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $grouprows[$j]['group_id']) . '">' . $grouprows[$j]['group_name'] . '</a>'; $moderators_list .= $moderators_list == '' ? $group_link : ', ' . $group_link; } } } // END Moderator List // Update the naVigation tree $album_nav_cat_desc = album_make_nav_tree($cat_id, 'album_cat.' . PHP_EXT, 'nav', $album_user_id); if ($album_nav_cat_desc != '') { $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc; } $cat_desc = album_get_object_lang($cat_id, 'desc'); // ------------------------------------ // Build the thumbnail page // ------------------------------------ $start = request_var('start', 0); $start = $start < 0 ? 0 : $start; $sort_method = request_var('sort_method', $album_config['sort_method']); $sort_method = check_var_value($sort_method, array('pic_time', 'pic_title', 'username', 'pic_view_count', 'rating', 'comments', 'new_comment')); $sort_order = request_var('sort_order', $album_config['sort_order']); $sort_order = check_var_value($sort_order, array('DESC', 'ASC')); $sort_append = '&sort_method=' . $sort_method . '&sort_order=' . $sort_order; switch ($sort_method) { case 'pic_time': $sort_method_sql = 'p.pic_time'; break; case 'pic_title':
function album_get_full_tree_option() { global $album_data, $lang, $album_user_id; $all = checkFlag($options, ALBUM_SELECTBOX_INCLUDE_ALL); $include_root = checkFlag($options, ALBUM_SELECTBOX_INCLUDE_ROOT); $keys = array(); $keys = album_get_auth_keys(ALBUM_PUBLIC_GALLERY, ALBUM_AUTH_VIEW, $all, -1, -1); $delete_res = ''; $public_res = ''; $personal_res = ''; for ($i = $offset; $i < sizeof($keys['id']); $i++) { if ($keys['id'][$i] == ALBUM_ROOT_CATEGORY && !$include_root) { $cat_id = ALBUM_ROOT_CATEGORY; } else { $cat_id = $keys['id'][$i]; } $res = ''; if ($cat_id != ALBUM_ROOT_CATEGORY) { $selected = $selected_cat_id == $cat_id ? ' selected="selected"' : ''; $res .= '<option value="' . $cat_id . '"' . $selected . '>'; // get category name.. $name = album_get_object_lang($cat_id, 'name'); // increment $inc = ''; for ($k = 1; $k <= $keys['real_level'][$i] - $offset; $k++) { $inc .= '| '; } if ($keys['level'][$i] >= $offset) { $inc .= '|--'; } $name = $inc . $name; $res .= $name . '</option>'; // it's a personal gallery if (1 == $album_data['personal'][$cat_id]) { $personal_res .= $res; } else { $public_res .= $res; } } } return $delete_res . $public_res . $personal_res; }