Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.145.10.9
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Views/Components/Pagination/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Views/Components/Pagination/index.js
import PropTypes from 'prop-types';

import { __ } from '@wordpress/i18n'

const Pagination = ({currentPage = 1, totalPages = 0, disabled = false, setPage = () => {}}) => {
    if (1 >= totalPages) {
        return false;
    }

    const nextPage = parseInt(currentPage) + 1;
    const previousPage = parseInt(currentPage) - 1;

    return (
        <div className="tablenav bottom">
            <div className="tablenav-pages">
                <div className="pagination-links">
                    {previousPage > 0 ? (
                        <>
                            <a
                                href="#"
                                className="tablenav-pages-navspan button"
                                onClick={(e) => {
                                    e.preventDefault();
                                    if (!disabled) {
                                        setPage(1);
                                    }
                                }}
                            >
                                «
                            </a>{' '}
                            <a
                                href="#"
                                className="tablenav-pages-navspan button"
                                onClick={(e) => {
                                    e.preventDefault();
                                    if (!disabled) {
                                        setPage(parseInt(currentPage) - 1);
                                    }
                                }}
                            >
                                ‹
                            </a>
                        </>
                    ) : (
                        <span className="tablenav-pages-navspan button disabled">‹</span>
                    )}

                    <span className="screen-reader-text">{__('Current Page', 'give')}</span>
                    <span id="table-paging" className="paging-input">
                        <span className="tablenav-paging-text">
                            {' '}
                            {currentPage} {__('of', 'give')} <span className="total-pages">{totalPages}</span>{' '}
                        </span>
                    </span>

                    {nextPage <= totalPages ? (
                        <>
                            <a
                                href="#"
                                className="tablenav-pages-navspan button"
                                onClick={(e) => {
                                    e.preventDefault();
                                    if (!disabled) {
                                        setPage(parseInt(currentPage) + 1);
                                    }
                                }}
                            >
                                ›
                            </a>{' '}
                            <a
                                href="#"
                                className="tablenav-pages-navspan button"
                                onClick={(e) => {
                                    e.preventDefault();
                                    if (!disabled) {
                                        setPage(totalPages);
                                    }
                                }}
                            >
                                »
                            </a>
                        </>
                    ) : (
                        <span className="tablenav-pages-navspan button disabled">›</span>
                    )}
                </div>
            </div>
        </div>
    );
};

Pagination.propTypes = {
    // Current page
    currentPage: PropTypes.number.isRequired,
    // Total number of pages
    totalPages: PropTypes.number.isRequired,
    // Function to set the next/previous page
    setPage: PropTypes.func.isRequired,
    // Is pagination disabled
    disabled: PropTypes.bool.isRequired,
};

export default Pagination;

Youez - 2016 - github.com/yon3zu
LinuXploit