summaryrefslogtreecommitdiffstats
path: root/wizard/index.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-12-07 15:29:15 +0100
committerRemi Collet <remi@php.net>2023-12-07 15:29:15 +0100
commitc9405943be332a186ffdac30730d524cf6a8361c (patch)
treee434d608195c23217b39af1bf9d0e20d5e30ad4c /wizard/index.php
parentba7ec8873177be71070319601fd0f618787832ff (diff)
Wizard: add info/alarm/question icons
Diffstat (limited to 'wizard/index.php')
-rw-r--r--wizard/index.php30
1 files changed, 16 insertions, 14 deletions
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("<li><b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os);
+ printf("<li><img src='alarm.png'> <b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os);
} else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) {
- printf("<li><b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $os);
+ printf("<li><img src='notice.png'> <b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $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("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$months months</b>, upgrade is heartily recommended.</li><br />", $os);
+ printf("<li><img src='notice.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$months months</b>, upgrade is heartily recommended.</li><br />", $os);
} else if ($weeks >= 8) {
- printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$weeks weeks</b>, upgrade is strongly recommended.</li><br />", $os);
+ printf("<li><img src='alarm.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$weeks weeks</b>, upgrade is strongly recommended.</li><br />", $os);
} else {
- printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$days days</b>, upgrade is urgently recommended.</li><br />", $os);
+ printf("<li><img src='alarm.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$days days</b>, upgrade is urgently recommended.</li><br />", $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("<li><b>WARNING</b>, PHP version <b>%s</b> have reached its eod of life, despite packages have security fix, you should consider a maintained version.</li><br />", $php);
+ if (version_compare($php, PHP_SEC, '<')) {
+ printf("<li><img src='notice.png'> <b>WARNING</b>, PHP version <b>%s</b> have reached its end of life, despite packages have security fix, you should consider a maintained version.</li><br />", $php);
}
+ // else printf("<li>PHP %s is a maintained version (> %s).</li><br />", $php, PHP_SEC);
}
if ($arch == 'ppc64le' || $arch == 's390x') {
@@ -410,7 +412,7 @@ if ($php && $os && $type && !$err) {
printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b> (%s).</li><br />", $osmin[$os], $os, $arch);
} else {
if (!$phpvers[$php]) {
- printf("<li><b>WARNING</b>: PHP version <b>%s</b> is a <b>development</b> version, not ready for production.</li><br />", $php);
+ printf("<li><img src='alarm.png'> <b>WARNING</b>: PHP version <b>%s</b> is a <b>development</b> version, not ready for production.</li><br />", $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 "<li><p>Please select the operating system you are running.</p></li>";
- echo "<li><p><b>Tips</b>: check the content of /etc/redhat-release.</p></li>";
+ echo "<li><p><img src='question.png'> Please select the operating system you are running.</p></li>";
+ echo "<li><p><img src='info.png'> <b>Tips</b>: check the content of /etc/redhat-release.</p></li>";
} else if (!$php) {
- echo "<li><p>Please select PHP version you want to use.</p></li>";
- echo "<li><p><b>Tips</b>: read: <a href='https://www.php.net/supported-versions.php'>PHP Supported Versions</a></li>";
+ echo "<li><p><img src='question.png'> Please select PHP version you want to use.</p></li>";
+ echo "<li><p><img src='info.png'> <b>Tips</b>: read: <a href='https://www.php.net/supported-versions.php'>PHP Supported Versions</a></li>";
} else if (!$err) {
- echo "<li><p>Please select installation type</p></li>";
- echo "<li><p><b>Tips</b>: read the <a href='https://blog.remirepo.net/pages/English-FAQ#scl'>FAQ</a></p></li>";
+ echo "<li><p><img src='question.png'> Please select installation type</p></li>";
+ echo "<li><p><img src='info.png'> <b>Tips</b>: read the <a href='https://blog.remirepo.net/pages/English-FAQ#scl'>FAQ</a></p></li>";
}
?>
</ul>