mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-15 16:58:42 +00:00
fix html
This commit is contained in:
commit
78f0f3753d
|
|
@ -15,17 +15,17 @@ declare(strict_types=1);
|
||||||
namespace Modules\Media\Admin;
|
namespace Modules\Media\Admin;
|
||||||
|
|
||||||
use Modules\Admin\Models\NullAccount;
|
use Modules\Admin\Models\NullAccount;
|
||||||
|
use Modules\Media\Controller\ApiController;
|
||||||
use Modules\Media\Models\Collection;
|
use Modules\Media\Models\Collection;
|
||||||
use Modules\Media\Models\CollectionMapper;
|
use Modules\Media\Models\CollectionMapper;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
use phpOMS\Module\InstallerAbstract;
|
|
||||||
use phpOMS\System\File\PathException;
|
|
||||||
use phpOMS\System\File\Local\Directory;
|
|
||||||
use phpOMS\System\File\Local\File;
|
|
||||||
use Modules\Media\Models\UploadFile;
|
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use Modules\Media\Models\MediaMapper;
|
use Modules\Media\Models\MediaMapper;
|
||||||
use Modules\Media\Controller\ApiController;
|
use Modules\Media\Models\UploadFile;
|
||||||
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\Module\InstallerAbstract;
|
||||||
|
use phpOMS\System\File\Local\Directory;
|
||||||
|
use phpOMS\System\File\Local\File;
|
||||||
|
use phpOMS\System\File\PathException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer class.
|
* Installer class.
|
||||||
|
|
@ -78,7 +78,7 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
$result = [
|
$result = [
|
||||||
'collection' => [],
|
'collection' => [],
|
||||||
'upload' => [],
|
'upload' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
\mkdir(__DIR__ . '/tmp');
|
\mkdir(__DIR__ . '/tmp');
|
||||||
|
|
@ -112,10 +112,10 @@ final class Installer extends InstallerAbstract
|
||||||
{
|
{
|
||||||
if (!isset($data['path'])) {
|
if (!isset($data['path'])) {
|
||||||
$dirPath = __DIR__ . '/../../../Modules/Media/Files' . ($data['virtualPath'] ?? '/') . '/' . ($data['name'] ?? '');
|
$dirPath = __DIR__ . '/../../../Modules/Media/Files' . ($data['virtualPath'] ?? '/') . '/' . ($data['name'] ?? '');
|
||||||
$path = '/Modules/Media/Files' . ($data['virtualPath'] ?? '') . '/' . ($data['name'] ?? '');
|
$path = '/Modules/Media/Files' . ($data['virtualPath'] ?? '') . '/' . ($data['name'] ?? '');
|
||||||
} else {
|
} else {
|
||||||
$dirPath = $data['path'] . '/' . ($data['name'] ?? '');
|
$dirPath = $data['path'] . '/' . ($data['name'] ?? '');
|
||||||
$path = $data['path'] ?? '/Modules/Media/Files' . '/' . ($data['name'] ?? '');
|
$path = $data['path'] ?? '/Modules/Media/Files' . '/' . ($data['name'] ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$collection = new Collection();
|
$collection = new Collection();
|
||||||
|
|
@ -152,10 +152,10 @@ final class Installer extends InstallerAbstract
|
||||||
File::copy(__DIR__ . '/../../..' . $file, __DIR__ . '/tmp' . $file);
|
File::copy(__DIR__ . '/../../..' . $file, __DIR__ . '/tmp' . $file);
|
||||||
|
|
||||||
$files[] = [
|
$files[] = [
|
||||||
'size' => \filesize(__DIR__ . '/tmp' . $file),
|
'size' => \filesize(__DIR__ . '/tmp' . $file),
|
||||||
'name' => \basename($file),
|
'name' => \basename($file),
|
||||||
'tmp_name' => __DIR__ . '/tmp' . $file,
|
'tmp_name' => __DIR__ . '/tmp' . $file,
|
||||||
'error' => \UPLOAD_ERR_OK,
|
'error' => \UPLOAD_ERR_OK,
|
||||||
];
|
];
|
||||||
} if (\is_dir(__DIR__ . '/../../..' . $file)) {
|
} if (\is_dir(__DIR__ . '/../../..' . $file)) {
|
||||||
Directory::copy(__DIR__ . '/../../..' . $file, __DIR__ . '/tmp' . $file);
|
Directory::copy(__DIR__ . '/../../..' . $file, __DIR__ . '/tmp' . $file);
|
||||||
|
|
@ -171,10 +171,10 @@ final class Installer extends InstallerAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$files[] = [
|
$files[] = [
|
||||||
'size' => \filesize($item->getPathname()),
|
'size' => \filesize($item->getPathname()),
|
||||||
'name' => \basename($item->getPathname()),
|
'name' => \basename($item->getPathname()),
|
||||||
'tmp_name' => $item->getPathname(),
|
'tmp_name' => $item->getPathname(),
|
||||||
'error' => \UPLOAD_ERR_OK,
|
'error' => \UPLOAD_ERR_OK,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Autoloader;
|
|
||||||
|
|
||||||
use PhpOffice\PhpWord\IOFactory;
|
use PhpOffice\PhpWord\IOFactory;
|
||||||
use PhpOffice\PhpWord\Writer\HTML;
|
use PhpOffice\PhpWord\Writer\HTML;
|
||||||
|
use phpOMS\Autoloader;
|
||||||
|
|
||||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ use phpOMS\Utils\IO\Csv\CsvSettings;
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<input type="radio" id="media-c-tab-1" name="tabular-1" checked>
|
<input type="radio" id="media-c-tab-1" name="tabular-1" checked>
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
|
<table class="default">
|
||||||
<?php
|
<?php
|
||||||
$f = \fopen(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath(), 'r');
|
$f = \fopen(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath(), 'r');
|
||||||
|
|
||||||
echo '<table class="default">';
|
|
||||||
$delim = CsvSettings::getFileDelimiter($f, 3);
|
$delim = CsvSettings::getFileDelimiter($f, 3);
|
||||||
while (($line = \fgetcsv($f, 0, $delim)) !== false) {
|
while (($line = \fgetcsv($f, 0, $delim)) !== false) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
|
|
@ -26,8 +26,8 @@ use phpOMS\Utils\IO\Csv\CsvSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
\fclose($f);
|
\fclose($f);
|
||||||
echo '</table>';
|
|
||||||
?>
|
?>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<input type="radio" id="media-c-tab-2" name="tabular-1">
|
<input type="radio" id="media-c-tab-2" name="tabular-1">
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Autoloader;
|
|
||||||
|
|
||||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||||
use PhpOffice\PhpSpreadsheet\Writer\Csv;
|
use PhpOffice\PhpSpreadsheet\Writer\Csv;
|
||||||
|
use phpOMS\Autoloader;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
Autoloader::addPath(__DIR__ . '/../../../../../../Resources/');
|
Autoloader::addPath(__DIR__ . '/../../../../../../Resources/');
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,7 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use \phpOMS\System\File\FileUtils;
|
|
||||||
use \phpOMS\System\File\Local\File;
|
|
||||||
use \phpOMS\Uri\UriFactory;
|
use \phpOMS\Uri\UriFactory;
|
||||||
use phpOMS\Utils\IO\Csv\CsvSettings;
|
|
||||||
use phpOMS\Utils\Parser\Markdown\Markdown;
|
|
||||||
use phpOMS\Utils\Converter\FileSizeType;
|
use phpOMS\Utils\Converter\FileSizeType;
|
||||||
|
|
||||||
include __DIR__ . '/template-functions.php';
|
include __DIR__ . '/template-functions.php';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user