mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Formatting 2 x files
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
if (!isset($reqsPassed)) {
|
||||
if (false === isset($reqsPassed)) {
|
||||
// Start off assuming all is fine with requirements
|
||||
$reqsPassed = true;
|
||||
$reqsFailures = [];
|
||||
@@ -12,28 +12,28 @@ if (version_compare(phpversion(), '7.0.0', '<')) {
|
||||
}
|
||||
|
||||
// Check we have a working session
|
||||
if (!isset($_SESSION) || session_id() === "") {
|
||||
if (false === isset($_SESSION) || "" === session_id()) {
|
||||
$reqsPassed = false;
|
||||
array_push($reqsFailures, "phpSession");
|
||||
}
|
||||
|
||||
// Check we can read config settings
|
||||
if (file_exists(dirname(__FILE__)."/../data/config-settings.php")) {
|
||||
include(dirname(__FILE__)."/../data/config-settings.php");
|
||||
if (!isset($ICEcoderSettings['versionNo'])) {
|
||||
if (file_exists(dirname(__FILE__) . "/../data/config-settings.php")) {
|
||||
include(dirname(__FILE__) . "/../data/config-settings.php");
|
||||
if (false === isset($ICEcoderSettings['versionNo'])) {
|
||||
$reqsPassed = false;
|
||||
array_push($reqsFailures, "phpReadFile");
|
||||
}
|
||||
}
|
||||
|
||||
// Check we have allow_url_fopen enabled
|
||||
if (!ini_get('allow_url_fopen')) {
|
||||
if (false === ini_get('allow_url_fopen')) {
|
||||
$reqsPassed = false;
|
||||
array_push($reqsFailures, "phpAllowURLFOpen");
|
||||
}
|
||||
|
||||
// If any of these failed, show requirements problem info screen
|
||||
if (!$reqsPassed) {
|
||||
if (false === $reqsPassed) {
|
||||
// $t = $text['reqsIssue'];
|
||||
?>
|
||||
<html>
|
||||
@@ -42,11 +42,12 @@ if (!$reqsPassed) {
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/resets.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/icecoder.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="icon" type="image/png" href="assets/images/favicon.png">
|
||||
</head>
|
||||
|
||||
<body style="background-color: #181817" onLoad="setTimeout(function(){document.getElementById('screenContainer').style.opacity=1},50)">
|
||||
<body style="background-color: #181817" onLoad="setTimeout(function(){document.getElementById('screenContainer').style.opacity = '1'}, 50)">
|
||||
|
||||
<div class="screenContainer" id="screenContainer" style="background-color: #181817; opacity: 0; transition: opacity 0.1s ease-out">
|
||||
<div class="screenVCenter">
|
||||
@@ -58,31 +59,31 @@ if (!$reqsPassed) {
|
||||
<b style="padding: 5px; background: #b00; color: #fff">Requirements problem!</b><br><br><br><br>
|
||||
Sorry, but ICEcoder has a problem<br>running on your server:<br><br><hr style="height: 1px; border: 0; background: #888"><br>
|
||||
<?php
|
||||
if (in_array("phpVersion", $reqsFailures)) {
|
||||
echo "Your PHP version is ".phpversion()."<br>and needs 7.0 or above<br><br>";
|
||||
if (true === in_array("phpVersion", $reqsFailures)) {
|
||||
echo "Your PHP version is " . phpversion() . "<br>and needs 7.0 or above<br><br>";
|
||||
}
|
||||
if (in_array("phpSession", $reqsFailures)) {
|
||||
if (true === in_array("phpSession", $reqsFailures)) {
|
||||
echo "You don't appear to have a<br>working PHP session<br><br>";
|
||||
}
|
||||
if (in_array("phpReadFile", $reqsFailures)) {
|
||||
if (true === in_array("phpReadFile", $reqsFailures)) {
|
||||
echo "You don't seem to be able<br>to read the config file<br><br>";
|
||||
}
|
||||
if (in_array("phpAllowURLFOpen", $reqsFailures)) {
|
||||
if (true === in_array("phpAllowURLFOpen", $reqsFailures)) {
|
||||
echo "You don't seem to have<br>allow_url_fopen enabled<br><br>";
|
||||
}
|
||||
if (in_array("phpCreateConfig", $reqsFailures)) {
|
||||
if (true === in_array("phpCreateConfig", $reqsFailures)) {
|
||||
echo "Cannot update config file:<br>data/".$configSettings."<br>Please check write permissions<br>on data dir and reload page<br><br>";
|
||||
}
|
||||
if (in_array("phpCreateSettings", $reqsFailures)) {
|
||||
if (true === in_array("phpCreateSettings", $reqsFailures)) {
|
||||
echo "Couldn't create:<br>data/$settingsFile<br>Maybe you need write<br>permissions on the data dir?<br><br>";
|
||||
}
|
||||
if (in_array("phpUpdateSettings", $reqsFailures)) {
|
||||
if (true === in_array("phpUpdateSettings", $reqsFailures)) {
|
||||
echo "Can't update config file:<br>data/".$settingsFile."<br>Please check write permissions<br>on data dir and reload page<br><br>";
|
||||
}
|
||||
if (in_array("phpCreateSettingsFileAddr", $reqsFailures)) {
|
||||
if (true === in_array("phpCreateSettingsFileAddr", $reqsFailures)) {
|
||||
echo "Couldn't create:<br>data/$settingsFileAddr<br>Maybe you need write<br>permissions on the data dir?<br><br>";
|
||||
}
|
||||
if (in_array("systemIPRestriction", $reqsFailures)) {
|
||||
if (true === in_array("systemIPRestriction", $reqsFailures)) {
|
||||
echo "Not in permitted IPs list<br><br>";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Load headings and settings
|
||||
// Do this every 5 mins to keep session alive
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
include "headers.php";
|
||||
include "settings.php";
|
||||
|
||||
Reference in New Issue
Block a user