$db->sql_query($sql_update); $sql_update = 'UPDATE ' . GALLERY_IMAGES_TABLE . ' SET image_contest_end = ' . $contest_end_time . ', image_contest_rank = 3 WHERE image_id = ' . $third; $db->sql_query($sql_update); phpbb_gallery_config::inc('contests_ended', 1); $album_data['contest_marked'] = phpbb_gallery_image::NO_CONTEST; } /** * Build auth-list */ phpbb_gallery::$auth->gen_auth_level('album', $album_id, $album_data['album_status'], $album_data['album_user_id']); if (!phpbb_gallery::$auth->acl_check('i_view', $album_id, $album_data['album_user_id'])) { if ($user->data['is_bot']) { phpbb_gallery::redirect('index'); } if (!$user->data['is_registered']) { login_box(); } else { trigger_error('NOT_AUTHORISED'); } } // Build the navigation & display subalbums phpbb_gallery_album::generate_nav($album_data); phpbb_gallery_album::display_albums($album_data, $config['load_moderators']); // Set some variables to their defaults $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();
function info() { global $template, $user; if (!phpbb_gallery::$user->get_data('personal_album_id')) { // User will probally go to initialise_album() $template->assign_vars(array('S_INFO_CREATE' => true, 'S_UCP_ACTION' => $this->u_action . '&action=initialise', 'L_TITLE' => $user->lang['UCP_GALLERY_PERSONAL_ALBUMS'], 'L_TITLE_EXPLAIN' => $user->lang['NO_PERSONAL_ALBUM'])); } else { phpbb_gallery::redirect('phpbb', 'ucp', 'i=gallery&mode=manage_albums'); } }