$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : (!empty($_GET['event_id']) ? $_GET['event_id'] : NULL); // DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION if (!$user->user_exists && !$setting['setting_permission_event']) { exit; } // ENSURE EVENTS ARE ENABLED FOR THIS USER if (1 & ~$user->level_info['level_event_allow']) { exit; } // INITIALIZE EVENT OBJECT $event = new se_event($user->user_info['user_id'], $event_id); if (!$event->event_exists) { exit; } // CHECK IF USER IS ALLOWED TO UPLOAD PHOTOS $privacy_max = $event->event_privacy_max($user); if ($privacy_max & ~$event->event_info['event_privacy']) { exit; } if ($privacy_max & ~$event->event_info['event_upload']) { exit; } // GET ALBUM INFO $sql = "SELECT * FROM se_eventalbums WHERE eventalbum_event_id='{$event->event_info['event_id']}' LIMIT 1"; $resource = $database->database_query($sql); $eventalbum_info = $database->database_fetch_assoc($resource); // SET RESULT AND ERROR VARS $result = FALSE; $is_error = FALSE; $show_uploader = TRUE; $file_result = array();