/** * 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 36 trên 53 - Vay Tài Chính 247

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

SHB là ngân hàng gì? SHB và Shinhan Bank có phải là 1 không?

SHB là một trong những ngân hàng có lịch sử xây dưng và phát triển lâu đời nhất, có thể xếp vào hàng ngũ những cái tên kỳ cựu trong ngành ngân hàng tại Việt Nam. Vậy ngân hàng SHB là ngân hàng gì? Của nhà nước hay tư nhân? SHB có phải là Shinhan […]

Hướng Dẫn Vay Tiền Theo Hợp Đồng Tín Dụng Cũ Chi Tiết

Điều kiện vay tiền theo hợp đồng tín dụng cũ ra sao? Cần chuẩn bị giáy tờ gì nếu muốn đăng ký vay theo hợp đồng cũ? Lãi suất là bao nhiêu? Ở đâu hỗ trợ vay theo hợp đồng đang vay lãi suất thấp, uy tín nhất hiện nay? Mọi thắc mắc của bạn […]

Logo MB Bank – Ý nghĩa thiết kế biểu tượng ngân hàng Quân Đội

Vì MB Bank có mạng luói chi nhánh, phòng giao dịch vô cùng rộng lớn trải dài từ Nam ra Bắc nên bạn sẽ dễ dàng bắt gặp logo MB Bank khi di chuyển, đi lại hằng ngày. Tuy nhiên, bạn có hiểu được ý nghĩa thiết kế đằng sau biểu tượng ngân hàng Quân […]

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

Tổng đài Jaccs là một công thông tin giúp bạn giải đáp những thắc mắc về các sản phẩm, dịch vụ hoặc gửi đóng góp ý kiến, khiếu nại một cách tiện lợi nhất giúp bạn tiết kiệm được nhiều thời gian. Hãy cập nhật ngay số tổng đài Jaccs trong bài viết sau của […]

Cách Vay 5 Triệu Online Trả Góp 6 -12 Tháng Chỉ Cần CMND

Bạn đang cần vay 5 triệu trả góp 6 tháng – 12 tháng để trang trải các khoản phí sinh hoạt hằng ngày thì giải pháp hiệu quả nhất lúc này là đăng ký vay 5 triệu online chỉ cần CMND. Vậy có thể vay 5 triệu chỉ cần CMND ở đâu an toàn? Cùng […]

Mã Khách Hàng ZaloPay Là Gì? Có Thể Xem ở Đâu?

Mã khách hàng ZaloPay là một thông tin cần thiết để có thể đăng nhập vào ví diện tử này và sử dụng những tính tiện ích mà nó đem lại. Vậy mã khách hàng ZaloPay là gì? Có thể xem mã khách hàng ZaloPay ở đâu? Mọi thông tin đều được tổng hợp trong […]

Cầm sổ hộ khẩu được bao nhiêu? Địa chỉ nào hỗ trợ cầm uy tín?

Trong số các giải pháp xoay sở tiền bạc nhanh chóng đang có mặt trên thị trường hiện nay, cầm sổ hộ khẩu là hình thức đang được sử dụng phổ biến hiện nay . Vạy cầm số hộ khẩu được bao nhiêu tiền? Lãi suất ra sao? Có những địa chỉ cầm sổ hộ […]

Vay tiền HD Saison giải ngân trong bao lâu? Lãi suất ra sao?

Có các sản phẩm vay tiền HD Saison nào? HD Saison giải ngân trong bao lâu? Quy trình thẩm định HD Saison ra sao? Đây là những vấn đề được khách hàng quan tâm tìm hiểu nhiều nhất khi có nhu cầu đăng ký vay vốn tại HD Saison. Hãy cùng VayOnlineNhanh theo dõi bài […]

Top 5+ Địa Chỉ Vay 3 Triệu Chỉ Cần CMND Duyệt Nhanh, Uy Tín

Vay 3 triệu chỉ cần CMND  trực tuyến sẽ giúp bạn xoay sở được số tiền mong muốn một cách nhanh chóng mà không cần phải làm phiền đến bạn bè hay người thân trong gia đình. Vậy làm sao để đăng ký vay nhanh 3 triệu online? Cần vay gấp 3 triệu online thì […]

Thẻ ATM hết hạn có rút tiền hay chuyển tiền vào được không?

Thẻ ATM ngân hàng hết hạn có rút tiền được không? Thẻ ngân hàng hết hạn có chuyển khoản được không? Thẻ ngân hàng hết hạn có chuyển tiền vào được không? Làm cách nào để gia hạn thẻ ATM? Hãy theo dõi ngay bài viết sau của VayOnlineNhanh để được giải đáp chi tiết […]