/** * Copyright (C) 2014-2023 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ if ( ! defined( 'ABSPATH' ) ) { die( 'Kangaroos cannot jump here' ); } class Ai1wmve_Reset_Media { public static function execute( $params ) { // Skip reset step if ( ! isset( $params['ai1wm_reset_media'] ) ) { return $params; } // Flag to hold if file data has been processed $completed = true; // Start time $start = microtime( true ); // Iterate over content directory $iterator = new Ai1wm_Recursive_Directory_Iterator( ai1wm_get_uploads_dir() ); // Recursively iterate over directory $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD ); // Get media files foreach ( $iterator as $item ) { if ( $item->isDir() ) { @rmdir( $item->getPathname() ); } else { @unlink( $item->getPathname() ); } // More than 10 seconds have passed, break and do another request if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { if ( ( microtime( true ) - $start ) > $timeout ) { $completed = false; break; } } } if ( is_multisite() ) { foreach ( ai1wmme_get_sites() as $site ) { static::delete_media_from_db( $site['BlogID'] ); } } else { static::delete_media_from_db(); } if ( $completed ) { // Set progress if ( ! isset( $params['ai1wm_reset_plugins'], $params['ai1wm_reset_themes'], $params['ai1wm_reset_media'], $params['ai1wm_reset_database'] ) ) { $message = __( 'The reset of your media files has been successfully completed. Your site\'s media library is now empty, and you can start afresh with new uploads.', AI1WM_PLUGIN_NAME ); if ( defined( 'WP_CLI' ) && WP_CLI ) { WP_CLI::success( $message ); } else { Ai1wm_Status::done( __( 'Reset Successful' ), $message ); } exit; } // Unset completed flag unset( $params['completed'] ); } else { // Set completed flag $params['completed'] = $completed; } return $params; } protected static function delete_media_from_db( $blog_id = null ) { global $wpdb; $wpdb->query( sprintf( "DELETE FROM `%s` WHERE `post_type` = 'attachment'", ai1wm_table_prefix( $blog_id ) . 'posts' ) ); $wpdb->query( sprintf( "DELETE FROM `%s` WHERE `meta_key` = '_wp_attached_file' OR `meta_key` = '_wp_attachment_metadata'", ai1wm_table_prefix( $blog_id ) . 'postmeta' ) ); } } Terms and conditions - A1 Cashback

Terms and conditions

These Terms of Use govern your access to our financial education services. When you subscribe to our financial education platform, you must accept these Terms of Use in order for your access to be validated and properly processed. The service provider will only agree to review your platform subscription request if you accept these Terms of Use. Despite compliance with these Terms of Use, the service provider is under no obligation to accept your access request. Whether or not you grant access to the platform and maintain continued access is at the sole discretion of the service provider. A debtor’s account may be deactivated at any time, at the sole discretion of the service provider, without any applicable damages against the service provider. These Terms of Use supplement any other applicable agreement between the parties and remain valid throughout the subscription service granted by the company providing the services.

WHO CAN SUBSCRIBE TO OUR SERVICES?

You must be at least 18 years old and not be considered incapacitated or subject to guardianship.

The purpose of your request for access to the financial education platform must not be made, directly or indirectly, for an illegal, prohibited, criminal, fraudulent purpose, for money laundering purposes or as part of any other act considered in bad faith by the company providing the services, at its sole and exclusive discretion.

You are required to reveal your full identity.

You may not impersonate another.

You have not been the subject of a denied request or account closure with our company within thirty (30) days prior to this request for access to our financial education platform.

COLLECTION AND USE OF INFORMATION

To process your request for access to our financial education platform, as mentioned above, the company providing the services must verify the information about you. The type of information collected depends on the information you provide and how you use the Service Provider’s website.

You hereby understand and agree that when a request for access to the Financial Education Platform is made, the Service Provider collects the content of the request, communications, and other information you provide, including when you create an account, create or share content, or when you communicate with or send messages to members, officers, administrators, agents, or partners of the Service Provider.

This may include information in or about the content you provide (e.g., metadata), such as the location of a photo or the date a file was created. You formally consent that all information collected may be used by the company providing the services in the context of managing your request for access to the financial education platform and may be transmitted to any other affiliated company, service provider or other related companies for the purpose of investigating or aggregating data concerning you.

Your data may be part of a database managed by the company providing the services, by any other affiliated company, service provider or other related companies for the purpose of processing and investigating access requests, under the conditions mentioned above or otherwise, and may be retained for an indefinite period by the company providing the services and by any other affiliated company, service provider or other related companies for this purpose. The data may be shared with public or legal authorities, when ordered by law and/or a court of law.

JURISDICTION OF APPLICATIONS FOR OUR SERVICES AND DISPUTE MANAGEMENT

The company providing the services is a company doing business in the province of Quebec, Canada, and any acceptance of the application for access to the financial education platform will be deemed to have been made in the province of Quebec, Canada, regardless of your place of residence or the location where your application was made. You agree that, in the event of a dispute, the laws of Quebec and Canada will apply and that any dispute will be heard in the jurisdiction of the province of Quebec, Canada, in the legal district of Montreal, to the exclusion of any other jurisdiction or district.

UPDATING THESE TERMS OF USE

The company providing the services may modify its services and regulations, and it may be necessary to make changes to these Terms of Use. The service provider will notify you before modifying these Terms of Use and give you an opportunity to review them before they become effective. If you continue to use the services provided by the service provider, you will be bound by the revised Terms of Use.