Restructuring for Mongoose

Former-commit-id: ecd322f5c3
This commit is contained in:
Jérôme Schneider 2012-03-20 13:33:57 +01:00
parent 47d1db07df
commit a74f200a71
13 changed files with 56 additions and 52 deletions

View file

@ -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_SPECIFIC", BAIKAL_PATH_ROOT . "Specific/");
define("BAIKAL_PATH_FRAMEWORKS", BAIKAL_PATH_CORE . "Frameworks/");
define("BAIKAL_PATH_WWWROOT", BAIKAL_PATH_CORE . "WWWRoot/");
require_once(BAIKAL_PATH_SPECIFIC . "config.php");

View file

@ -9,7 +9,7 @@ elif [[ "$unamestr" == 'Darwin' ]]; then
platform='osx'
fi
PATH_docroot=`cd ../Web && pwd`
PATH_docroot=`cd ../WWWRoot && pwd`
echo "Serving $PATH_docroot"
PATH_this="`pwd`/"

View file

@ -28,12 +28,12 @@ ini_set("display_errors", 1);
error_reporting(E_ALL);
define("BAIKAL_CONTEXT", TRUE);
define("BAIKAL_CONTEXT_ADMIN", TRUE);
require_once("../Core/Bootstrap.php");
require_once(BAIKAL_PATH_CORE . "BaikalAdmin.php");
require_once(BAIKAL_PATH_CORE . "BaikalTools.php");
require_once("../../Bootstrap.php");
require_once(BAIKAL_PATH_WWWROOT . "classes/BaikalAdmin.php");
require_once(BAIKAL_PATH_WWWROOT . "classes/BaikalTools.php");
BaikalAdmin::assertEnabled();
echo "<h1>Baïkal Admin</h1>";
echo "<h1>Ba&iuml;kal Admin</h1>";
BaikalAdmin::displayUsers();

View file

@ -30,7 +30,7 @@ class BaikalAdmin {
static function assertEnabled() {
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&iuml;kal Admin is disabled.</h1>To enable it, set BAIKAL_ADMIN_ENABLED to TRUE in <b>Specific/config.php</b>");
}
$bLocked = TRUE;
@ -46,13 +46,13 @@ class BaikalAdmin {
$bLocked = FALSE;
} else {
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&iuml;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) {
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&iuml;kal Admin is locked.</h1>To unlock it, create an empty file named ENABLE_ADMIN in <b>Specific/</b>");
} else {
// update filemtime
@touch($sEnableFile);
@ -68,7 +68,7 @@ class BaikalAdmin {
$oTabulator->render($aUsers);
}
function &makeColumn($sName, $sHeader = "", $sType = "text") {
static function &makeColumn($sName, $sHeader = "", $sType = "text") {
$oColumn = new TabulatorColumnHtml($sName, $sHeader, $sType);
return $oColumn;
}

View 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>

View file

@ -1,41 +1,3 @@
<?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>
echo "<h1>Baïkal Admin</h1>";

View file

@ -1 +0,0 @@
../Core/WWWRoot/admin.php

1
html/baikal Symbolic link
View file

@ -0,0 +1 @@
../Core/WWWRoot

View file

@ -1 +1 @@
../Core/WWWRoot/cal.php
./baikal/cal.php

View file

@ -1 +1 @@
../Core/WWWRoot/card.php
./baikal/card.php

View file

@ -1 +1 @@
../Core/WWWRoot/index.php
./baikal/index-fe.php