diff --git a/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/cal.php b/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/cal.php index ce92bc7..4768982 100755 --- a/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/cal.php +++ b/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/cal.php @@ -1,32 +1,39 @@ -# All rights reserved -# -# http://baikal.codr.fr -# -# This script is part of the Baïkal Server project. The Baïkal -# Server project is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# The GNU General Public License can be found at -# http://www.gnu.org/copyleft/gpl.html. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# This copyright notice MUST APPEAR in all copies of the script! -################################################################# +/*************************************************************** +* Copyright notice +* +* (c) 2012 Jérôme Schneider +* All rights reserved +* +* http://baikal.codr.fr +* +* This script is part of the Baïkal Server project. The Baïkal +* Server project is free software; you can redistribute it +* and/or modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ define("BAIKAL_CONTEXT", TRUE); define("PROJECT_CONTEXT_BASEURI", "/"); -define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ + +if(file_exists(getcwd() . "/Core")) { + # Flat FTP mode + define("PROJECT_PATH_ROOT", getcwd() . "/"); #./ +} else { + # Dedicated server mode + define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ +} # Bootstraping Flake require_once(PROJECT_PATH_ROOT . "Core/Frameworks/Flake/Framework.php"); diff --git a/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/card.php b/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/card.php index 7febf61..c1959e6 100755 --- a/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/card.php +++ b/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/card.php @@ -1,32 +1,39 @@ -# All rights reserved -# -# http://baikal.codr.fr -# -# This script is part of the Baïkal Server project. The Baïkal -# Server project is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# The GNU General Public License can be found at -# http://www.gnu.org/copyleft/gpl.html. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# This copyright notice MUST APPEAR in all copies of the script! -################################################################# +/*************************************************************** +* Copyright notice +* +* (c) 2012 Jérôme Schneider +* All rights reserved +* +* http://baikal.codr.fr +* +* This script is part of the Baïkal Server project. The Baïkal +* Server project is free software; you can redistribute it +* and/or modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ define("BAIKAL_CONTEXT", TRUE); define("PROJECT_CONTEXT_BASEURI", "/"); -define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ + +if(file_exists(getcwd() . "/Core")) { + # Flat FTP mode + define("PROJECT_PATH_ROOT", getcwd() . "/"); #./ +} else { + # Dedicated server mode + define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ +} # Bootstraping Flake require_once(PROJECT_PATH_ROOT . "Core/Frameworks/Flake/Framework.php"); diff --git a/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/index.php b/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/index.php index ed36386..c99de30 100755 --- a/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/index.php +++ b/CoreVersions/0.2.0/Frameworks/Baikal/WWWRoot/index.php @@ -1,32 +1,38 @@ -# All rights reserved -# -# http://baikal.codr.fr -# -# This script is part of the Baïkal Server project. The Baïkal -# Server project is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# The GNU General Public License can be found at -# http://www.gnu.org/copyleft/gpl.html. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# This copyright notice MUST APPEAR in all copies of the script! -################################################################# - +/*************************************************************** +* Copyright notice +* +* (c) 2012 Jérôme Schneider +* All rights reserved +* +* http://baikal.codr.fr +* +* This script is part of the Baïkal Server project. The Baïkal +* Server project is free software; you can redistribute it +* and/or modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ define("BAIKAL_CONTEXT", TRUE); define("PROJECT_CONTEXT_BASEURI", "/"); -define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ + +if(file_exists(getcwd() . "/Core")) { + # Flat FTP mode + define("PROJECT_PATH_ROOT", getcwd() . "/"); #./ +} else { + # Dedicated server mode + define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ +} # Bootstraping Flake require_once(PROJECT_PATH_ROOT . "Core/Frameworks/Flake/Framework.php"); diff --git a/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/index.php b/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/index.php index a043448..b949a80 100755 --- a/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/index.php +++ b/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/index.php @@ -1,28 +1,28 @@ -# All rights reserved -# -# http://baikal.codr.fr -# -# This script is part of the Baïkal Server project. The Baïkal -# Server project is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# The GNU General Public License can be found at -# http://www.gnu.org/copyleft/gpl.html. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# This copyright notice MUST APPEAR in all copies of the script! -################################################################# +/*************************************************************** +* Copyright notice +* +* (c) 2012 Jérôme Schneider +* All rights reserved +* +* http://baikal.codr.fr +* +* This script is part of the Baïkal Server project. The Baïkal +* Server project is free software; you can redistribute it +* and/or modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ ini_set("display_errors", 1); error_reporting(E_ALL); @@ -30,7 +30,14 @@ error_reporting(E_ALL); define("BAIKAL_CONTEXT", TRUE); define("BAIKAL_CONTEXT_ADMIN", TRUE); define("PROJECT_CONTEXT_BASEURI", "/admin/"); -define("PROJECT_PATH_ROOT", dirname(dirname(getcwd())) . "/"); #../../ + +if(file_exists(dirname(getcwd()) . "/Core")) { + # Flat FTP mode + define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../ +} else { + # Dedicated server mode + define("PROJECT_PATH_ROOT", dirname(dirname(getcwd())) . "/"); #../../ +} # Bootstraping Flake require_once(PROJECT_PATH_ROOT . "Core/Frameworks/Flake/Framework.php"); # ../../ diff --git a/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/install/index.php b/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/install/index.php index 9f49895..ab6837f 100755 --- a/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/install/index.php +++ b/CoreVersions/0.2.0/Frameworks/BaikalAdmin/WWWRoot/install/index.php @@ -1,37 +1,43 @@ -# All rights reserved -# -# http://baikal.codr.fr -# -# This script is part of the Baïkal Server project. The Baïkal -# Server project is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# The GNU General Public License can be found at -# http://www.gnu.org/copyleft/gpl.html. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# This copyright notice MUST APPEAR in all copies of the script! -################################################################# +/*************************************************************** +* Copyright notice +* +* (c) 2012 Jérôme Schneider +* All rights reserved +* +* http://baikal.codr.fr +* +* This script is part of the Baïkal Server project. The Baïkal +* Server project is free software; you can redistribute it +* and/or modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ ini_set("display_errors", 1); error_reporting(E_ALL); define("BAIKAL_CONTEXT", TRUE); define("BAIKAL_CONTEXT_INSTALL", TRUE); - define("PROJECT_CONTEXT_BASEURI", "/admin/install/"); -define("PROJECT_PATH_ROOT", dirname(dirname(dirname(getcwd()))) . "/"); # ../../../ + +if(file_exists(dirname(dirname(getcwd())) . "/Core")) { + # Flat FTP mode + define("PROJECT_PATH_ROOT", dirname(dirname(getcwd())) . "/"); #../../ +} else { + # Dedicated server mode + define("PROJECT_PATH_ROOT", dirname(dirname(dirname(getcwd()))) . "/"); # ../../../ +} # Bootstraping Flake require_once(PROJECT_PATH_ROOT . "Core/Frameworks/Flake/Framework.php");