68 lines
3.1 KiB
PHP
68 lines
3.1 KiB
PHP
<?php
|
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
|
Agence Agerix
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
@version 1.x.x
|
|
@build 2nd June, 2022
|
|
@created 12th December, 2020
|
|
@package Extension Distributor
|
|
@subpackage importfiles.php
|
|
@author Emmanuel Danan <https://agerix.fr>
|
|
@copyright Copyright (C) 2021. All Rights Reserved.
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
|
|
|
/------------------------------------------------------------------------------------------------------*/
|
|
|
|
// No direct access to this file
|
|
defined('JPATH_BASE') or die('Restricted access');
|
|
|
|
$files = $displayData[0];
|
|
$return = 'index.php?option=com_extensiondistributor&view=import';
|
|
$redirect = base64_encode($return);
|
|
JHtml::_('bootstrap.tooltip', '.hasTooltip', ['placement' => 'left']);
|
|
|
|
|
|
?>
|
|
<?php if (ExtensiondistributorHelper::checkArray($files)) : ?>
|
|
<h4>Files ready to import</h4>
|
|
<table class="table table-striped">
|
|
<tbody>
|
|
<?php foreach ($files as $file) : ?>
|
|
<tr>
|
|
<td class="nowrap">
|
|
<div class="btn-group">
|
|
<a href="index.php?option=com_extensiondistributor&task=extension.importExtensions&file=<?= base64_encode($file) ?>&return=<?= $redirect ?>&<?= JSession::getFormToken() ?>=1" title="Import file" class="btn btn-micro btn-success hasTooltip">
|
|
<span class="icon-download"></span>
|
|
</a>
|
|
<a href="index.php?option=com_extensiondistributor&task=extension.deleteImportFiles&file=<?= base64_encode($file) ?>&return=<?= $redirect ?>&<?= JSession::getFormToken() ?>=1" title="Delete file" class="btn btn-micro btn-danger hasTooltip">
|
|
<span class="icon-purge"></span>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
<td width="100%"><?= pathinfo($file)['filename'] ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<div class="mt10">
|
|
<a href="index.php?option=com_extensiondistributor&task=extension.importExtensions&return=<?= $redirect ?>&<?= JSession::getFormToken() ?>=1" class="btn btn-small btn-success">
|
|
<span class="icon-download"></span> Import all files
|
|
</a>
|
|
<a href="index.php?option=com_extensiondistributor&task=extension.deleteImportFiles&return=<?= $redirect ?>&<?= JSession::getFormToken() ?>=1" class="btn btn-small btn-danger">
|
|
<span class="icon-purge"></span> Delete all files in import folder
|
|
</a>
|
|
</div>
|
|
|
|
|
|
<?php else : ?>
|
|
<div class="alert alert-warning">
|
|
There aren't any files in the import folder
|
|
</div>
|
|
<?php endif; ?>
|
|
|