/** * Copyright (C) 2014-2020 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 Ai1wm_Export_Content { public static function execute( $params ) { // Set archive bytes offset if ( isset( $params['archive_bytes_offset'] ) ) { $archive_bytes_offset = (int) $params['archive_bytes_offset']; } else { $archive_bytes_offset = ai1wm_archive_bytes( $params ); } // Set file bytes offset if ( isset( $params['file_bytes_offset'] ) ) { $file_bytes_offset = (int) $params['file_bytes_offset']; } else { $file_bytes_offset = 0; } // Set content bytes offset if ( isset( $params['content_bytes_offset'] ) ) { $content_bytes_offset = (int) $params['content_bytes_offset']; } else { $content_bytes_offset = 0; } // Get processed files size if ( isset( $params['processed_files_size'] ) ) { $processed_files_size = (int) $params['processed_files_size']; } else { $processed_files_size = 0; } // Get total content files size if ( isset( $params['total_content_files_size'] ) ) { $total_content_files_size = (int) $params['total_content_files_size']; } else { $total_content_files_size = 1; } // Get total content files count if ( isset( $params['total_content_files_count'] ) ) { $total_content_files_count = (int) $params['total_content_files_count']; } else { $total_content_files_count = 1; } // What percent of files have we processed? $progress = (int) min( ( $processed_files_size / $total_content_files_size ) * 100, 100 ); // Set progress Ai1wm_Status::info( sprintf( __( 'Archiving %d content files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_content_files_count, $progress ) ); // Flag to hold if file data has been processed $completed = true; // Start time $start = microtime( true ); // Get content list file $content_list = ai1wm_open( ai1wm_content_list_path( $params ), 'r' ); // Set the file pointer at the current index if ( fseek( $content_list, $content_bytes_offset ) !== -1 ) { // Open the archive file for writing $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); // Set the file pointer to the one that we have saved $archive->set_file_pointer( $archive_bytes_offset ); // Loop over files while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $content_list ) ) { $file_bytes_written = 0; // Add file to archive if ( ( $completed = $archive->add_file( $file_abspath, $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) { $file_bytes_offset = 0; // Get content bytes offset $content_bytes_offset = ftell( $content_list ); } // Increment processed files size $processed_files_size += $file_bytes_written; // What percent of files have we processed? $progress = (int) min( ( $processed_files_size / $total_content_files_size ) * 100, 100 ); // Set progress Ai1wm_Status::info( sprintf( __( 'Archiving %d content files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_content_files_count, $progress ) ); // 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; } } } // Get archive bytes offset $archive_bytes_offset = $archive->get_file_pointer(); // Truncate the archive file $archive->truncate(); // Close the archive file $archive->close(); } // End of the content list? if ( feof( $content_list ) ) { // Unset archive bytes offset unset( $params['archive_bytes_offset'] ); // Unset file bytes offset unset( $params['file_bytes_offset'] ); // Unset content bytes offset unset( $params['content_bytes_offset'] ); // Unset processed files size unset( $params['processed_files_size'] ); // Unset total content files size unset( $params['total_content_files_size'] ); // Unset total content files count unset( $params['total_content_files_count'] ); // Unset completed flag unset( $params['completed'] ); } else { // Set archive bytes offset $params['archive_bytes_offset'] = $archive_bytes_offset; // Set file bytes offset $params['file_bytes_offset'] = $file_bytes_offset; // Set content bytes offset $params['content_bytes_offset'] = $content_bytes_offset; // Set processed files size $params['processed_files_size'] = $processed_files_size; // Set total content files size $params['total_content_files_size'] = $total_content_files_size; // Set total content files count $params['total_content_files_count'] = $total_content_files_count; // Set completed flag $params['completed'] = $completed; } // Close the content list file ai1wm_close( $content_list ); return $params; } } Kiến Thức Tài Chính - Trang 30 trên 53 - Vay Tài Chính 247

Category Archives: Kiến Thức Tài Chính

Hướng Dẫn Đăng Ký Mở Thẻ ATM MSB Từ A-Z

Nếu đã và đang lựa chọn sử dụng dịch vụ, sản phẩm của ngân hàng MSB thì chắc chắn trong ví không thể thiếu thẻ ATM MSB bởi thẻ này có quá nhiều tính năng tiện ích giúp việc thực hiện các giao dịch trở nên nhanh chóng hơn. Vậy thẻ ATM MSB hiện nay […]

T99 Là Gì? Hệ Thống Cầm Đồ T99 Có Ưu Điểm Nổi Bật Nào?

Tuy chỉ mới được cho ra mắt vào năm 2021 nhưng T99 đã nhanh chóng thu hút được đông đảo khách hàng trên toàn quốc với các dịch vụ cầm đồ uy tín và còn hỗ trợ đăng ký online. Vậy T99 là gì? Lãi suất cầm đồ T99 ra sao> Hãy cùng VayOnlineNhanh tìm […]

Vay Thế Chấp Sổ Đỏ BIDV Lãi Suất Thấp Ưu Đãi T9/2022

Vay thế chấp sổ đỏ BIDV là 1 trong những sản phẩm chủ lục của ngân hàng nên thường xuyên được áp dụng các chương trình ưu đãi với mức lãi suất rất cạnh tranh và hạn mức tối đa lên đến 90% giá trị sổ. Hãy cùng tìm hiểu chi tiêt về sản phẩm […]

Hướng Dẫn Cách Xóa Tài Khoản Momo Trên Điện Thoại

Vì một lý do cá nhân nào đó mà bạn đang muốn xóa tài khoản Momo những không biết thực hiện như thế nào? VayOnlineNhanh sẽ hướng dẫn cho bạn cách xóa tài khoản Momo nhanh chóng với các bước vô cùng đơn giản trong bài viết sau. Hãy cùng theo dõi nhé! 1 Số Lưu […]

Nợ Xấu Có Vay Thế Chấp Được Không? Vay Ngân Hàng Nào?

Nợ xấu có vay thế chấp được không? Đây là câu hỏi được nhiều người quan tâm. Để đáp ứng nhu cầu sinh hoạt hay kinh doanh trong giai đoạn khó khăn, vay vốn là cách tốt nhất. Dù vậy, tình trạng nợ xấu khiến nhiều người lo lắng khi tiến hành thủ tục vay […]

Tổng Đài VPBank – Số Điện Thoại Hotline Hỗ Trợ CSKH 24/24

Nếu bạn gặp phải các vấn đề như: giao dịch bị lỗi nhưng vẫn trừ tiền trong tài khoản, mất thẻ ATM, bị lộ thông tin tài khoản… thì hãy liên hệ ngay đến tổng đài VPBank 24/7 để được hỗ trợ xử lý kịp thời. Vậy số tổng đài VPBank là bao nhiêu? Cùng […]

VPBank Neo Là Gì? Hướng Dẫn Mở Tài Khoản VPBank Neo

Là một ứng dụng được tích hợp rất nhiều công nghệ hiện đại như: nhận diện sinh trắc học, bảo mật giao dịch với Smart OTP…. VPBank Neo mang lại vô vàn lợi ích cho người sử dụng. Vậy VPBank NEO là gì? Có những tinh năng nào? Cùng theo dõi bài viết sau của VayOnlineNhanh […]

Ví ShopeePay Là Gì? Cách Tạo Và Kích Hoạt Ví ShopeePay

Chắc hẳn bạn đã quá quen thuộc với hoạt động mua sắm trên Shopee nhưng khi sử dụng ví điện tử ShopeePay đẻ thanh toán sẽ nhận được rất nhiều ưu đãi mà hình thức thanh toán bình thường không có. Hãy cùng tìm hiểu ví ShopeePay là gì cũng như cách tạo ví ShopeePay […]

Mẫu Giấy Ủy Quyền Vay Vốn Ngân Hàng Agribank [Mới 2023]

Mẫu giấy ủy quyền vay vốn ngân hàng Agribank là 1 loại giấy tờ không thể thiếu khi muốn vay vốn tại ngân hàng Agribank. Mẫu giấy này có vai trò rất quan trọng khi bạn vay vốn với tài sản thế chấp. Vậy mẫu giấy này được cập nhật mới nhất năm 2021 là […]

Danh sách khách hàng đã kết thúc hợp đồng và có tiền dư tháng 3/2023

Trường hợp khách hàng thanh toán nhiều hơn so với số tiền trả hàng tháng, khách hàng đồng ý rằng khoản thanh toán dư này sẽ được giữ lại để khấu trừ cho các kỳ thanh toán ngay tiếp sau đó theo thứ tự ưu tiên thanh toán. Khi hết thời hạn hợp đồng , […]