Restructuring for Mongoose
This commit is contained in:
parent
37a0bcacc6
commit
ecd322f5c3
13 changed files with 56 additions and 52 deletions
|
@ -59,6 +59,7 @@ if(@file_exists($sTemp) && (@is_dir($sTemp . "Core") || @is_link($sTemp . "Core"
|
||||||
define("BAIKAL_PATH_CORE", BAIKAL_PATH_ROOT . "Core/");
|
define("BAIKAL_PATH_CORE", BAIKAL_PATH_ROOT . "Core/");
|
||||||
define("BAIKAL_PATH_SPECIFIC", BAIKAL_PATH_ROOT . "Specific/");
|
define("BAIKAL_PATH_SPECIFIC", BAIKAL_PATH_ROOT . "Specific/");
|
||||||
define("BAIKAL_PATH_FRAMEWORKS", BAIKAL_PATH_CORE . "Frameworks/");
|
define("BAIKAL_PATH_FRAMEWORKS", BAIKAL_PATH_CORE . "Frameworks/");
|
||||||
|
define("BAIKAL_PATH_WWWROOT", BAIKAL_PATH_CORE . "WWWRoot/");
|
||||||
|
|
||||||
require_once(BAIKAL_PATH_SPECIFIC . "config.php");
|
require_once(BAIKAL_PATH_SPECIFIC . "config.php");
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ elif [[ "$unamestr" == 'Darwin' ]]; then
|
||||||
platform='osx'
|
platform='osx'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PATH_docroot=`cd ../Web && pwd`
|
PATH_docroot=`cd ../WWWRoot && pwd`
|
||||||
echo "Serving $PATH_docroot"
|
echo "Serving $PATH_docroot"
|
||||||
|
|
||||||
PATH_this="`pwd`/"
|
PATH_this="`pwd`/"
|
||||||
|
|
|
@ -28,12 +28,12 @@ ini_set("display_errors", 1);
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
define("BAIKAL_CONTEXT", TRUE);
|
define("BAIKAL_CONTEXT", TRUE);
|
||||||
define("BAIKAL_CONTEXT_ADMIN", TRUE);
|
define("BAIKAL_CONTEXT_ADMIN", TRUE);
|
||||||
require_once("../Core/Bootstrap.php");
|
require_once("../../Bootstrap.php");
|
||||||
require_once(BAIKAL_PATH_CORE . "BaikalAdmin.php");
|
require_once(BAIKAL_PATH_WWWROOT . "classes/BaikalAdmin.php");
|
||||||
require_once(BAIKAL_PATH_CORE . "BaikalTools.php");
|
require_once(BAIKAL_PATH_WWWROOT . "classes/BaikalTools.php");
|
||||||
|
|
||||||
BaikalAdmin::assertEnabled();
|
BaikalAdmin::assertEnabled();
|
||||||
|
|
||||||
echo "<h1>Baïkal Admin</h1>";
|
echo "<h1>Baïkal Admin</h1>";
|
||||||
|
|
||||||
BaikalAdmin::displayUsers();
|
BaikalAdmin::displayUsers();
|
|
@ -30,7 +30,7 @@ class BaikalAdmin {
|
||||||
|
|
||||||
static function assertEnabled() {
|
static function assertEnabled() {
|
||||||
if(!defined("BAIKAL_ADMIN_ENABLED") || BAIKAL_ADMIN_ENABLED !== TRUE) {
|
if(!defined("BAIKAL_ADMIN_ENABLED") || BAIKAL_ADMIN_ENABLED !== TRUE) {
|
||||||
die("<h1>Baïkal Admin is disabled.</h1>To enable it, set BAIKAL_ADMIN_ENABLED to TRUE in <b>Specific/config.php</b>");
|
die("<h1>Baïkal Admin is disabled.</h1>To enable it, set BAIKAL_ADMIN_ENABLED to TRUE in <b>Specific/config.php</b>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$bLocked = TRUE;
|
$bLocked = TRUE;
|
||||||
|
@ -46,13 +46,13 @@ class BaikalAdmin {
|
||||||
$bLocked = FALSE;
|
$bLocked = FALSE;
|
||||||
} else {
|
} else {
|
||||||
if(!@unlink($sEnableFile)) {
|
if(!@unlink($sEnableFile)) {
|
||||||
die("<h1>Baïkal Admin is locked.</h1>To unlock it, delete and re-create an empty file named ENABLE_ADMIN in <b>Specific/config.php</b>");
|
die("<h1>Baïkal Admin is locked.</h1>To unlock it, delete and re-create an empty file named ENABLE_ADMIN in <b>Specific/config.php</b>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($bLocked) {
|
if($bLocked) {
|
||||||
die("<h1>Baïkal Admin is locked.</h1>To unlock it, create an empty file named ENABLE_ADMIN in <b>Specific/config.php</b>");
|
die("<h1>Baïkal Admin is locked.</h1>To unlock it, create an empty file named ENABLE_ADMIN in <b>Specific/</b>");
|
||||||
} else {
|
} else {
|
||||||
// update filemtime
|
// update filemtime
|
||||||
@touch($sEnableFile);
|
@touch($sEnableFile);
|
||||||
|
@ -68,7 +68,7 @@ class BaikalAdmin {
|
||||||
$oTabulator->render($aUsers);
|
$oTabulator->render($aUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
function &makeColumn($sName, $sHeader = "", $sType = "text") {
|
static function &makeColumn($sName, $sHeader = "", $sType = "text") {
|
||||||
$oColumn = new TabulatorColumnHtml($sName, $sHeader, $sType);
|
$oColumn = new TabulatorColumnHtml($sName, $sHeader, $sType);
|
||||||
return $oColumn;
|
return $oColumn;
|
||||||
}
|
}
|
41
CoreVersions/Baikal_0.1/WWWRoot/index-fe.php
Executable file
41
CoreVersions/Baikal_0.1/WWWRoot/index-fe.php
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2012 Jérôme Schneider <mail@jeromeschneider.fr>
|
||||||
|
* 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);
|
||||||
|
require_once("../Core/Bootstrap.php");
|
||||||
|
|
||||||
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<title><?= BAIKAL_BASEURI ?></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Baïkal on <?= BAIKAL_BASEURI ?></h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,41 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/***************************************************************
|
echo "<h1>Baïkal Admin</h1>";
|
||||||
* Copyright notice
|
|
||||||
*
|
|
||||||
* (c) 2012 Jérôme Schneider <mail@jeromeschneider.fr>
|
|
||||||
* 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);
|
|
||||||
require_once("../Core/Bootstrap.php");
|
|
||||||
|
|
||||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
||||||
<head>
|
|
||||||
<title><?= BAIKAL_BASEURI ?></title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h2>Baïkal on <?= BAIKAL_BASEURI ?></h2>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../Core/WWWRoot/admin.php
|
|
1
html/baikal
Symbolic link
1
html/baikal
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../Core/WWWRoot
|
|
@ -1 +1 @@
|
||||||
../Core/WWWRoot/cal.php
|
./baikal/cal.php
|
|
@ -1 +1 @@
|
||||||
../Core/WWWRoot/card.php
|
./baikal/card.php
|
|
@ -1 +1 @@
|
||||||
../Core/WWWRoot/index.php
|
./baikal/index-fe.php
|
Loading…
Reference in a new issue