'; if (isset($ui['ac']) && $ui['ac'] === 'delete') { if ($ui['delThumb']) { delAndRegen($ui['delThumb'], $size); } if (isset($ui['deleteUrl']) && testValidUrl($ui['deleteUrl']) !== true) { unset($ui['deleteUrl']); echo '
Not a valid url.
'; } echo '

'; if (empty($ui['deleteUrl'])) { echo ''; } else { echo ''; } echo '

'; if (!empty($ui['deleteUrl'])) { $ui['deleteUrl'] = trim(rawurldecode($ui['deleteUrl'])); $ui['deleteUrl'] = rtrim($ui['deleteUrl'], '/'); $hashUrl = sha1($GLOBALS['config']['salt'].$ui['deleteUrl']); $imgUrl = pathForFile('', $hashUrl); echo '

Delete this thumb
'; } } if (isset($ui['log']) && $ui['log'] === 'success') { $logs = parseSuccessLog(); if (!empty($logs)) { $nbThumb = 0; $nbThumb = count($logs['genTime']); echo 'Total request : ', $nbThumb, '
'; echo 'Moyenne per request : ', round(array_sum($logs['genTime']) / $nbThumb, 2), 's (min (', min($logs['genTime']), 's) max (', max($logs['genTime']), 's))
'; } else { echo 'No result'; } echo '

Clear success log

'; } if (isset($ui['log']) && ($ui['log'] === 'suspect' || $ui['log'] === 'retry' || $ui['log'] === 'other')) { if (isset($ui['hash']) && !empty($ui['hash'])) { //$ui['hash'] = validHash($ui['hash']); if (isset($ui['root']) && (int)$ui['root'] === 1) { $response = tryRootDomain($ui['hash'], $ui['log']); } if (isset($ui['cache']) && (int)$ui['cache'] === 1) { $response['success'] = 1; $response['filePath'] = pathForFile($ui['s'], $ui['hash']).'.png'; $response['base64'] = 'data:image/png;base64,'.base64_encode(file_get_contents($response['filePath'])); if (!file_exists($response['filePath'])) { $response['base64'] = 'data:image/png;base64,'.base64_encode(file_get_contents('bin/error.png')); } } if (isset($ui['keep']) && (int)$ui['keep'] === 1) { keepThisThumb($ui['hash'], $ui['log']); } if (isset($ui['mGen']) && (int)$ui['mGen'] === 1) { $response = manualGen($ui['hash'], $ui['log']); } if (isset($ui['tryCurl']) && (int)$ui['tryCurl'] === 1) { $response = tryWithCurl($ui['hash'], $ui['log']); } } $logs = parseFailLog($ui['log']); if (!empty($logs)) { echo ''; } else { echo 'No result'; } } echo ''; if (!empty($response) && $response['success'] === 1) { echo '
'; echo ''; echo '

'; echo 'Manuel launch / '; if (extension_loaded("curl")) { echo 'Try with curl / '; } echo 'Try with root domain / '; echo 'Keep this thumbshot'; echo '
'; } if (!empty($response) && $response['error'] === 1) { echo '
'; echo '

', $response['msg'], '

'; echo 'Manuel launch / '; if (extension_loaded("curl")) { echo 'Try with curl / '; } echo 'Try with root domain / '; echo 'Keep this thumbshot'; echo '
'; } ?>