コード例 #1
0
ファイル: album.php プロジェクト: phpbbgallery/phpbb-gallery
$allowed_create = false;
$image_counter = 0;
$l_moderator = $moderators_list = $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
$grouprows = $album_moderators = array();
$images_per_page = phpbb_gallery_config::get('album_rows') * phpbb_gallery_config::get('album_columns');
/**
* We have album_type so that there may be images ...
*/
if ($album_data['album_type'] != phpbb_gallery_album::TYPE_CAT) {
    if (phpbb_gallery::$auth->acl_check('m_', $album_id, $album_data['album_user_id'])) {
        $template->assign_var('U_MCP', phpbb_gallery_url::append_sid('mcp', "album_id={$album_id}"));
    }
    // When we do the slideshow, we don't need the moderators
    if ($mode != 'slide_show') {
        if ($config['load_moderators']) {
            phpbb_gallery_album::get_moderators($album_moderators, $album_id);
        }
        if (!empty($album_moderators[$album_id])) {
            $l_moderator = sizeof($album_moderators[$album_id]) == 1 ? $user->lang['MODERATOR'] : $user->lang['MODERATORS'];
            $moderators_list = implode(', ', $album_moderators[$album_id]);
        }
    }
    /**
     * Build the sort options
     */
    $limit_days = array(0 => $user->lang['ALL_IMAGES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
    $sort_by_text = array('t' => $user->lang['TIME'], 'n' => $user->lang['IMAGE_NAME'], 'vc' => $user->lang['VIEWS']);
    $sort_by_sql = array('t' => 'image_time', 'n' => 'image_name_clean', 'vc' => 'image_view_count');
    // Do not sort images after upload-username on running contests, and of course ratings aswell!
    if ($album_data['contest_marked'] != phpbb_gallery_image::IN_CONTEST) {
        $sort_by_text['u'] = $user->lang['SORT_USERNAME'];