BeCastWebEngine/index.php

74 lines
2.1 KiB
PHP
Raw Normal View History

2025-06-20 19:10:23 +02:00
<?php
/**
2025-06-20 19:13:52 +02:00
* Project: BeCast WebEngine - simple site engine
2025-06-20 19:10:23 +02:00
* File: index.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.becast.at
2025-06-20 19:13:52 +02:00
* @copyright 2009-2025 becast.at
2025-06-20 19:10:23 +02:00
* @author Bernhard Jaud <bernhard at becast dot at>
2025-06-20 19:13:52 +02:00
* @package BcWe core
2025-06-20 19:10:23 +02:00
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
2025-06-20 19:13:52 +02:00
* @version $Id$
2025-06-20 19:10:23 +02:00
*/
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ERROR);
$basepath="";
//require 'xhprof/external/header.php';
require_once 'core/init_core.inc.php';
$content = "";
$body = "";
$meta = "";
/**
* PLUGIN HOOK index_start
*
*/
$plugin->run_hook("index_start");
/**
* If the Page is in Maintenance Mode we have to fetch the Userdata ourself.
*
*/
if($config["maintenance"]==1){
$session->page_begin("Maintenance", FALSE);
}
/**
* If the User is a Admin continue even if the Page is in Maintenance Mode
* Else show a Maintenance Page
*
*/
if($config["maintenance"]==1 && $session->userdata["is_admin"]!=1){
$core->message($lang->_('MAINTENANCE'),$lang->_('SITEINMAINTENANCE').':<br />'.$config["maintenance_message"],FALSE,"","",TRUE);
}else{
if(isset($_GET["task"])){
$core->get_module($_GET["task"],$_GET["sub"]);
}else{
$core->get_module($config["startmodule"],$config["startmodulesub"]);
}
}
/**
* PLUGIN HOOK index_end
*
*/
$plugin->run_hook("index_end");
?>