From c9405943be332a186ffdac30730d524cf6a8361c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 7 Dec 2023 15:29:15 +0100 Subject: Wizard: add info/alarm/question icons --- wizard/alarm.png | Bin 0 -> 1907 bytes wizard/index.php | 30 ++++++++++++++++-------------- wizard/info.png | Bin 0 -> 1817 bytes wizard/notice.png | Bin 0 -> 1770 bytes wizard/question.png | Bin 0 -> 1854 bytes 5 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 wizard/alarm.png create mode 100644 wizard/info.png create mode 100644 wizard/notice.png create mode 100644 wizard/question.png (limited to 'wizard') diff --git a/wizard/alarm.png b/wizard/alarm.png new file mode 100644 index 00000000..e57cccb0 Binary files /dev/null and b/wizard/alarm.png differ diff --git a/wizard/index.php b/wizard/index.php index a3f790ce..d173806b 100644 --- a/wizard/index.php +++ b/wizard/index.php @@ -12,6 +12,7 @@ define('FC_EOL', 37); define('FC_DEV', 40); define('EL_EOL', 6); define('EL_DEV', 10); +define('PHP_SEC', '8.1'); define('EPEL_DEV', 2); // 0 missing, 1 partially populated, 2 mostly full define('COUNTER', __DIR__ . "/counter.txt"); @@ -204,10 +205,10 @@ $err = false; if ($os) { list($dist, $ver) = explode(' ', $os, 2); if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) { - printf("
  • %s has reached its end of life, upgrade is strongly recommended.

  • ", $os); + printf("
  • %s has reached its end of life, upgrade is strongly recommended.

  • ", $os); } else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { - printf("
  • WARNING: %s is a development version, not ready for production.

  • ", $os); + printf("
  • WARNING: %s is a development version, not ready for production.

  • ", $os); } else if ($ver == 7 || $ver == 37) { $days = ($ver == 7 ? mktime(0,0,0,6,30,2024) : mktime(0,0,0,12,7,2023)); @@ -216,11 +217,11 @@ if ($os) { $weeks = round($days/7); $months = round($days/30); if ($months >= 6) { - printf("
  • WARNING: %s will reach its end of life in $eol, in $months months, upgrade is heartily recommended.

  • ", $os); + printf("
  • WARNING: %s will reach its end of life in $eol, in $months months, upgrade is heartily recommended.

  • ", $os); } else if ($weeks >= 8) { - printf("
  • WARNING: %s will reach its end of life in $eol, in $weeks weeks, upgrade is strongly recommended.

  • ", $os); + printf("
  • WARNING: %s will reach its end of life in $eol, in $weeks weeks, upgrade is strongly recommended.

  • ", $os); } else { - printf("
  • WARNING: %s will reach its end of life in $eol, in $days days, upgrade is urgently recommended.

  • ", $os); + printf("
  • WARNING: %s will reach its end of life in $eol, in $days days, upgrade is urgently recommended.

  • ", $os); } } } @@ -229,9 +230,10 @@ if ($php && $os) { $os, is_array($osvers[$os]) ? implode(', ', $osvers[$os]) : $osvers[$os] ); - if (version_compare($php, '7.4', '<')) { - printf("
  • WARNING, PHP version %s have reached its eod of life, despite packages have security fix, you should consider a maintained version.

  • ", $php); + if (version_compare($php, PHP_SEC, '<')) { + printf("
  • WARNING, PHP version %s have reached its end of life, despite packages have security fix, you should consider a maintained version.

  • ", $php); } + // else printf("
  • PHP %s is a maintained version (> %s).

  • ", $php, PHP_SEC); } if ($arch == 'ppc64le' || $arch == 's390x') { @@ -410,7 +412,7 @@ if ($php && $os && $type && !$err) { printf("
  • Sorry, but PHP version older than %s are not available for %s (%s).

  • ", $osmin[$os], $os, $arch); } else { if (!$phpvers[$php]) { - printf("
  • WARNING: PHP version %s is a development version, not ready for production.

  • ", $php); + printf("
  • WARNING: PHP version %s is a development version, not ready for production.

  • ", $php); } if ($dist=='Fedora') { $repo = 'remi'; //($phpvers[$php] ? 'remi' : 'remi-test'); // Dev version @@ -453,16 +455,16 @@ if ($php && $os && $type && !$err) { @file_put_contents(COUNTER, "$counter\n"); } } else if (!$os) { - echo "
  • Please select the operating system you are running.

  • "; - echo "
  • Tips: check the content of /etc/redhat-release.

  • "; + echo "
  • Please select the operating system you are running.

  • "; + echo "
  • Tips: check the content of /etc/redhat-release.

  • "; } else if (!$php) { - echo "
  • Please select PHP version you want to use.

  • "; - echo "
  • Tips: read: PHP Supported Versions

  • "; + echo "
  • Please select PHP version you want to use.

  • "; + echo "
  • Tips: read: PHP Supported Versions

  • "; } else if (!$err) { - echo "
  • Please select installation type

  • "; - echo "
  • Tips: read the FAQ

  • "; + echo "
  • Please select installation type

  • "; + echo "
  • Tips: read the FAQ

  • "; } ?> diff --git a/wizard/info.png b/wizard/info.png new file mode 100644 index 00000000..6f2911d1 Binary files /dev/null and b/wizard/info.png differ diff --git a/wizard/notice.png b/wizard/notice.png new file mode 100644 index 00000000..44262883 Binary files /dev/null and b/wizard/notice.png differ diff --git a/wizard/question.png b/wizard/question.png new file mode 100644 index 00000000..69929d0b Binary files /dev/null and b/wizard/question.png differ -- cgit