Skip to content

Commit 106e145

Browse files
committed
Updated index
1 parent f7c583f commit 106e145

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

index.php

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,45 @@ private function firstUse(){
191191

192192
//once configuration is finished, call the function SystemFunctions::configured()
193193
//$this->SF->configured();
194+
195+
196+
//do not remove next lines of code.
197+
//Used to show error message in case the
198+
//system is not configured.
194199
if(!$this->SF->isSetupFinished()){
195-
die('System is not ready for use.');
200+
$this->needConfigration();
196201
}
197-
202+
}
203+
private function needConfigration(){
204+
header('HTTP/1.1 503 Service Unavailable');
205+
die(''
206+
. '<!DOCTYPE html>'
207+
. '<html>'
208+
. '<head>'
209+
. '<title>Service Unavailable</title>'
210+
. '</head>'
211+
. '<body>'
212+
. '<h1>503 - Service Unavailable</h1>'
213+
. '<hr>'
214+
. '<p>'
215+
. 'This error means that the system is not configured yet or this is the first run.'
216+
. 'If you think that your system is configured, then refresh this page and the '
217+
. 'error should be gone. If you did not configure the system yet, then do the following:'
218+
. '</p>'
219+
. '<ul>'
220+
. '<li>Open the file \'index.php\' in any editor.</li>'
221+
. '<li>Inside the class \'LisksCode\', go to the body of the function \'firstUse()\'.</li>'
222+
. '<li>Modify the body of the function as instructed.</li>'
223+
. '</ul>'
224+
. '<p>'
225+
. 'Once you do that, you are ready to go and use the system.'
226+
. '</p>'
227+
. '<p>System Powerd By: <a href="https://github.com/usernane/liskscode" target="_blank"><b>'
228+
. 'LisksCode Framework v'.Config::get()->getLisksVersion().' ('.Config::get()->getLisksVersionType().')'
229+
. '</b></a></p>'
230+
. '</body>'
231+
. '</html>');
198232
}
199233
}
200-
234+
//start the system
201235
LisksCode::getAndStart();

0 commit comments

Comments
 (0)