Fix Upload URL

This commit is contained in:
Ibnu Maksum 2024-03-01 09:37:13 +07:00
parent bae079f71c
commit 699289662b
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 11 additions and 6 deletions

View File

@ -62,10 +62,11 @@ switch ($action) {
$title = ' Reports [' . $mdate . ']';
$title = str_replace('-', ' ', $title);
$UPLOAD_URL_PATH = str_replace($root_path, '', $UPLOAD_PATH);
if (file_exists($UPLOAD_PATH . '/logo.png')) {
$logo = $UPLOAD_PATH . '/logo.png';
$logo = $UPLOAD_URL_PATH . '/logo.png';
} else {
$logo = $UPLOAD_PATH . '/logo.default.png';
$logo = $UPLOAD_URL_PATH . '/logo.default.png';
}
if ($x) {
@ -234,10 +235,12 @@ EOF;
$title = ' Reports [' . $mdate . ']';
$title = str_replace('-', ' ', $title);
$UPLOAD_URL_PATH = str_replace($root_path, '', $UPLOAD_PATH);
if (file_exists($UPLOAD_PATH . '/logo.png')) {
$logo = $UPLOAD_PATH . '/logo.png';
$logo = $UPLOAD_URL_PATH . '/logo.png';
} else {
$logo = $UPLOAD_PATH . '/logo.default.png';
$logo = $UPLOAD_URL_PATH . '/logo.default.png';
}
if ($x) {

View File

@ -30,10 +30,12 @@ switch ($action) {
r2(U . "settings/app", 's', 'Test Telegram has been send<br>Result: ' . $result);
}
$UPLOAD_URL_PATH = str_replace($root_path,'', $UPLOAD_PATH);
if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.png')) {
$logo = $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.png?' . time();
$logo = $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'logo.png?' . time();
} else {
$logo = $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.default.png';
$logo = $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'logo.default.png';
}
$ui->assign('logo', $logo);
if ($config['radius_enable'] && empty($config['radius_client'])) {