From 35764bdd59976d2529221a307a498b971abd50b9 Mon Sep 17 00:00:00 2001 From: FelipeNMoura Date: Wed, 1 Feb 2012 00:05:39 -0200 Subject: [PATCH] Changes to the installation page --- setup.php | 119 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 95 insertions(+), 24 deletions(-) diff --git a/setup.php b/setup.php index 88a36c2..f5014ba 100755 --- a/setup.php +++ b/setup.php @@ -1,33 +1,99 @@ * @license licenses/mind3rd.license - * + * * This file will perform the instalation of the system through the browser. * The source code will still get more beautiful, the focus now was to set * it to work in bouth Windows and Unix based Operational Systems. - * + * * For now, Windows does not have support for readline lib with PHP, what * forces us to use it *only* via HTTP on Windows. */ +?> + +
+

theWebMind

+ + This is the setup page for theWebMind. + +
+
"; if(isset($_GET['setupGo']) && $_GET['setupGo'] && $installationOk) { echo "
";
         Setup::install();
-        echo "
"; + echo "
"; + echo "
"; + echo "Well, where to go now?
"; + $apiSrc= str_replace('setup.php', '', $_SERVER['HTTP_REFERER']); + echo "You can check the documentation at http://thewebmind.org/docs
"; + echo "Make post requisitions to the API in your webserver at ".$apiSrc."
"; + echo "And if you downloaded the IDE, you can probably access it at ".$apiSrc."ide"; + echo "
"; exit; } - - echo "
"; echo "

PHP 5.3+
"; echo "

SQLite3 support
"; - + /* if(!Setup::$readLlineOk) { @@ -45,33 +111,38 @@ echo "

Write permissions in '".getcwd()."/mind3rd/projects/' to the user '".trim(shell_exec('whoami'))."'
"; echo "

Write permissions in '".getcwd()."/mind3rd/SQLite/' to the user '".trim(shell_exec('whoami'))."'
"; echo "

Write permissions in '".getcwd()."/mind3rd/API/' to the user '".trim(shell_exec('whoami'))."'
"; - + if(Setup::databaseAlreadyExists()) { echo "

Database already exists! It will *NOT* be replaced or even touched.
If you are trying to reinstall the system, consider removing the file
mind3rd/SQLite/mind(the database itself...all the old projects will be lost, them) and then try to re-installing the application.

"; } + echo ""; + + if(Setup::getSO() == 'WIN') + { + echo "

NOTE: In windows, the system works only via HTTP, not accepting commands from + command line/console.
"; + }else{ + echo "
NOTE: Installing using this interface, you will be able to access the system + only via HTTP or, using command line straight from the directory where + the system is and then, running mind. + If you want to use the program simply typing mind from any directory in your console, + you can perform this installation from your console typing, in the mind3rd's directory:
+      sudo php mind install
"; + } + /*echo "Admin's password:
"; echo "Admin's e-mail:
";*/ echo ""; + onclick='self.location.href=self.location.href' + class='button' />"; if(Setup::$installationOk) { echo ""; + value='Install' + class='button' />"; } - echo "
"; - if(Setup::getSO() == 'WIN') - { - echo "NOTE: In windows, the system works only via HTTP, not accepting commands from - command line/console."; - }else{ - echo "NOTE: Installing using this interface, you will be able to access the system - only via HTTP or, using command line straight from the directory where - the system is and then, running mind. - If you want to use the program simply typing mind from any directory in your console, - you can perform this installation from your console typing, in the mind3rd's directory:
-      sudo php mind install"; - } \ No newline at end of file + echo "
"; \ No newline at end of file