[fix] preview image in admin page
This commit is contained in:
parent
5d4edab2a4
commit
840de1ac0e
1 changed files with 5 additions and 5 deletions
|
@ -161,7 +161,7 @@ echo '<div class="hMenu">
|
||||||
</div>
|
</div>
|
||||||
<div id="log">';
|
<div id="log">';
|
||||||
if (isset($ui['ac']) && $ui['ac'] === 'delete') {
|
if (isset($ui['ac']) && $ui['ac'] === 'delete') {
|
||||||
if($ui['delThumb']){
|
if ($ui['delThumb']) {
|
||||||
delAndRegen($ui['delThumb'], $size);
|
delAndRegen($ui['delThumb'], $size);
|
||||||
}
|
}
|
||||||
if (isset($ui['deleteUrl']) && testValidUrl($ui['deleteUrl']) !== true) {
|
if (isset($ui['deleteUrl']) && testValidUrl($ui['deleteUrl']) !== true) {
|
||||||
|
@ -204,7 +204,7 @@ if (isset($ui['log']) && $ui['log'] === 'success') {
|
||||||
$nbThumb = 0;
|
$nbThumb = 0;
|
||||||
$nbThumb = count($logs['genTime']);
|
$nbThumb = count($logs['genTime']);
|
||||||
echo 'Total request : ', $nbThumb, '</br>';
|
echo 'Total request : ', $nbThumb, '</br>';
|
||||||
echo 'Moyenne per request : ', round(array_sum($logs['genTime']) / $nbThumb, 2), 's (min (', min($logs['genTime']), 's) max (', max($logs['genTime']), 's))</br>';
|
echo 'Moyenne per request : ', round(array_sum($logs['genTime']) / $nbThumb, 2), 's (min (', min($logs['genTime']), 's) max (', max($logs['genTime']), 's))</br>';
|
||||||
} else {
|
} else {
|
||||||
echo 'No result';
|
echo 'No result';
|
||||||
}
|
}
|
||||||
|
@ -226,15 +226,15 @@ if (isset($ui['log']) && ($ui['log'] === 'suspect' || $ui['log'] === 'retry' ||
|
||||||
if (isset($ui['keep']) && (int)$ui['keep'] === 1) {
|
if (isset($ui['keep']) && (int)$ui['keep'] === 1) {
|
||||||
keepThisThumb($ui['hash'], $ui['log']);
|
keepThisThumb($ui['hash'], $ui['log']);
|
||||||
}
|
}
|
||||||
if (isset($ui['mGen']) && (int)$ui['mGen'] === 1)
|
if (isset($ui['mGen']) && (int)$ui['mGen'] === 1) {
|
||||||
$success = manualGen($ui['hash'], $ui['log']);
|
$success = manualGen($ui['hash'], $ui['log']);
|
||||||
$success['base64'] = 'data:image/png;base64,'.base64_encode(file_get_contents($success['filePath']));
|
}
|
||||||
}
|
}
|
||||||
$logs = parseFailLog($ui['log']);
|
$logs = parseFailLog($ui['log']);
|
||||||
if (!empty($logs)) {
|
if (!empty($logs)) {
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
foreach ($logs as $value) {
|
foreach ($logs as $value) {
|
||||||
echo '<li>', htmlentities(strip_tags($value['3'])), htmlentities(strip_tags($value['0'])), '</br><a href="?p=admin&log=', $ui['log'], '&hash=', $value['1'], '&mGen=1#result">manuel launch</a> <a href="', htmlentities(strip_tags($value['0'])), '">view site</a> <a href="?p=admin&log=', $ui['log'], '&hash=', $value['1'], '&cache=1&s=', $value['2'], '#result">view image in cache</a></li>';
|
echo '<li>', htmlentities(strip_tags($value['3'])), htmlentities(strip_tags($value['0'])), '</br><a href="?p=admin&log=', $ui['log'], '&hash=', $value['1'], '&mGen=1#result">manuel launch</a> <a href="', htmlentities(strip_tags($value['0'])), '">view site</a> <a href="?p=admin&log=', $ui['log'], '&hash=', $value['1'], '&cache=1&s=', $value['2'], '#result">view image in cache</a></li>';
|
||||||
}
|
}
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue