$pids = explode(',', $_POST['TB_gallerylist']);
        foreach ($pids as $pid) {
            CvgCore::delete_video_files($pid);
            videoDB::delete_video($pid);
        }
        CvgCore::xml_playlist($_GET['gid']);
        _e('<div class="clear"><div class="wrap"><div id="message" class="updated fade below-h2"><p>Video(s) deleted successfully.</p></div></div></div>');
    }
}
if (isset($_POST['move_video_list']) && !empty($_POST['move_video_list'])) {
    // wp_nonce_field('cvg_details_move_video_nonce','cvg_details_move_video_nonce_csrf');
    if (check_admin_referer('cvg_details_move_video_nonce', 'cvg_details_move_video_nonce_csrf')) {
        $pids = explode(',', $_POST['move_video_list']);
        foreach ($pids as $pid) {
            CvgCore::move_video($pid, $_POST['galleryselect']);
            videoDB::move_video($pid, $_POST['galleryselect']);
        }
        CvgCore::xml_playlist($_GET['gid']);
        _e('<div class="clear"><div class="wrap"><div id="message" class="updated fade below-h2"><p>Video(s) moved successfully.</p></div></div></div>');
    }
}
//Section to delete a single video.
if (isset($_POST['TB_videosingle']) && !empty($_POST['TB_videosingle'])) {
    // wp_nonce_field('cvg_details_delete_single_video_nonce','cvg_details_delete_single_video_nonce_csrf');
    if (check_admin_referer('cvg_details_delete_single_video_nonce', 'cvg_details_delete_single_video_nonce_csrf')) {
        $pid = $_POST['TB_videosingle'];
        CvgCore::delete_video_files($pid);
        videoDB::delete_video($pid);
        CvgCore::xml_playlist($_GET['gid']);
        _e('<div class="clear"><div class="wrap"><div id="message" class="updated fade below-h2"><p>Video deleted successfully.</p></div></div></div>');
    }