$file = $_FILES[$file_name_dynamic . $i]['name']; if (empty($url) && empty($file)) { $file_count--; } } $error = NULL; if ($file_count != $cnt) { $error_msg = __("Select any {$media_type} file to upload"); } if (empty(PA::$login_uid)) { $error_msg = __("You have to login before uploading {$media_type}"); } } if (!empty($_POST) && empty($error_msg)) { for ($k = 0; $k < $cnt; $k++) { $upload = uihelper_upload_gallery(PA::$login_uid, $_POST, $_FILES, $extention, $k); if ($upload[3] == TRUE) { if ($extra['network_content_moderation'] == NET_YES && PA::$network_info->owner_id != PA::$login_uid) { Network::moderate_network_content((int) $upload['album_id'], $upload[4]); // is_active = 2 for unverified content $moderation_msg = TRUE; } $uploaded = TRUE; $success = true; } else { $error_msg = $upload[1]; //index 1 has the error message during uploading } } } // Code for Re-Direction
$delete_videos_id[] = $k; } array_pop($delete_videos_id); foreach ($delete_videos_id as $id) { $new_image = new Video(); $new_image->content_id = $id; $new_image->delete($id); } } } catch (PAException $e) { $msg = "{$e->message}"; $error = TRUE; } // FOR VIDEO UPLOAD - START if ($_POST['submit_video'] && !empty($_FILES['userfile_video']['name'])) { $upload = uihelper_upload_gallery($uid, $_POST, $_FILES, '_video'); if ($upload[3] == TRUE) { $uploaded = TRUE; $msg1 = "Video Uploaded"; } } // Load Video Albums $video_albums = Album::load_all($uid, VIDEO_ALBUM); $video_data = array(); $j = 0; foreach ($video_albums as $albums) { $new_album = new Album(VIDEO_ALBUM); $video_data[$j]['album_name'] = $albums['description']; $video_data[$j]['album_id'] = $albums['collection_id']; $new_album->collection_id = $albums['collection_id']; $video_ids = $new_album->get_contents_for_collection();