Unifying things

This commit is contained in:
genuineparts 2025-06-23 19:41:29 +02:00
parent 1599a338e5
commit 8f0808b9ff
22 changed files with 110 additions and 76 deletions

View file

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Project: astat - simple site engine * Project: BeCast WebEngine - simple site engine
* File: /admin/addgroup.apnl.php * File: /admin/addgroup.apnl.php
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -17,14 +17,15 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @link http://www.astat.org SVN: $URL: http://svn.astat.org/astat/trunk/admin/addgroup.apnl.php $ * @link http://www.becast.at
* @copyright 2009 becast.at * @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at> * @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: addgroup.apnl.php 41 2009-06-21 19:24:29Z genuineparts $ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -1,5 +1,30 @@
<?php <?php
If (!defined("in_BL_ADMIN")) { /**
* Project: BeCast WebEngine - simple site engine
* File: /admin/config.apnl.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
* @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -29,7 +29,7 @@ $basepath="";
$nav_include="../"; $nav_include="../";
require_once dirname(__FILE__, 2) .'/core/init_core.inc.php'; require_once dirname(__FILE__, 2) .'/core/init_core.inc.php';
$session->page_begin("Admincenter", True); $session->page_begin("Admincenter", True);
define("in_BL_ADMIN",TRUE); define("IN_BCWE_ADMIN",TRUE);
function size_format($num, $prec = 2) function size_format($num, $prec = 2)
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Project: astat - simple site engine * Project: BeCast WebEngine - simple site engine
* File: /admin/module.apnl.php * File: /admin/module.apnl.php
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -17,15 +17,15 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @link http://www.astat.org SVN: $URL: http://svn.astat.org/astat/trunk/admin/module.apnl.php $ * @link http://www.becast.at
* @copyright 2009 becast.at * @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at> * @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: module.apnl.php 64 2009-07-24 22:07:55Z genuineparts $ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Project: BeFramed - simple site engine * Project: BeCast WebEngine - simple site engine
* File: /admin/versions.apnl.php * File: /admin/versions.apnl.php
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -17,14 +17,14 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @link http://www.jaud.be * @link http://www.becast.at
* @copyright 2025 becast.at * @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at> * @author Bernhard Jaud <bernhard at becast dot at>
* @package BeFramed core * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -25,7 +25,7 @@
* @version $Id$ * @version $Id$
*/ */
const INBCWE = true; define("INBCWE", true);
function getTime(): string function getTime(): string
{ {

View file

@ -1,25 +1,31 @@
<?php <?php
/** /**
* (c) 2009 BeCast * Project: BeCast WebEngine - simple site engine
* ------------------------------------- * File: config.inc.php
* Filename: config.default.inc.php
* Purpose: Configuration
* CVS Header: $Header$
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or
* it under the terms of the GNU General Public License as published by * modify it under the terms of the GNU Lesser General Public
* the Free Software Foundation; version 2 of the License. * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* GNU General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU Lesser General Public
* along with this program; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* MA 02111-1307 USA *
* @link http://www.becast.at
* @copyright 2010-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/ */
if(!defined("INBCWE")){
die();
}
// your Database Server (most likely localhost) // your Database Server (most likely localhost)
$config["host"] = "localhost"; $config["host"] = "localhost";

View file

@ -1,9 +1,9 @@
<?php <?php
$module["functions"]["name"]="Functions Module"; $module["functions"]["name"]="Functions Module";
$module["functions"]["ver"]="1.0.0"; $module["functions"]["ver"]="1.0.1";
/** /**
* Project: astat - simple site engine * Project: BeCast WebEngine - simple site engine
* File: /inc/sessions.class.php * File: /inc/functions.class.php
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -19,12 +19,12 @@ $module["functions"]["ver"]="1.0.0";
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @link http://www.astat.org SVN: $URL: http://svn.astat.org/astat/trunk/inc/sessions.class.php $ * @link http://www.becast.at
* @copyright 2010 becast.at * @copyright 2010-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at> * @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: sessions.class.php 129 2010-02-21 22:04:51Z genuineparts $ * @version $Id$
*/ */
class functions { class functions {
@ -120,7 +120,9 @@ class functions {
function get_ip(){ function get_ip(){
global $config; global $config;
$ip = strtolower($_SERVER['REMOTE_ADDR']); $ip = strtolower($_SERVER['REMOTE_ADDR']);
if(empty($config['ip_forwarded_check'])){
$config['ip_forwarded_check'] = false;
}
if($config['ip_forwarded_check']) if($config['ip_forwarded_check'])
{ {
$addresses = array(); $addresses = array();

View file

@ -38,7 +38,7 @@ class session {
function page_begin($page = "UNDEFINED", $needlogin = TRUE){ function page_begin($page = "UNDEFINED", $needlogin = TRUE){
global $config, $db, $log, $core, $lang, $plugin, $functions; global $config, $db, $log, $core, $lang, $plugin, $functions;
$plugin->run_hook('page_begin_start',array('page'=>$page,'needlogin'=>$needlogin)); $plugin->run_hook('page_begin_start',array('page'=>$page,'needlogin'=>$needlogin));
if($this->userdata['uid']==0 || !$this->userdata['uid']){ if(!isset($this->userdata['uid']) || $this->userdata['uid']==0){
$this->ip = $functions->get_ip(); $this->ip = $functions->get_ip();
$this->packip = $functions->my_inet_pton($this->ip); $this->packip = $functions->my_inet_pton($this->ip);
$this->useragent = $_SERVER["HTTP_USER_AGENT"]; $this->useragent = $_SERVER["HTTP_USER_AGENT"];

View file

@ -575,7 +575,7 @@ $config[\'db_class\']= \'' . $driver . '\';
/* /*
This file was created by the Installer. Don\'t touch it unless you have a very good reason to do so. This file was created by the Installer. Don\'t touch it unless you have a very good reason to do so.
*/ */
if(!defined("in_astat")){ if(!defined("INBCWE")){
die(); die();
} }
// your Database Server (most likely localhost) // your Database Server (most likely localhost)

View file

@ -261,7 +261,7 @@ CREATE TABLE IF NOT EXISTS `as_sessions` (
`ip` VARBINARY(16) NOT NULL, `ip` VARBINARY(16) NOT NULL,
`time` bigint(30) NOT NULL default '0', `time` bigint(30) NOT NULL default '0',
`location` varchar(150) NOT NULL default '', `location` varchar(150) NOT NULL default '',
`useragent` varchar(100) NOT NULL default '', `useragent` text NOT NULL,
`anonymous` int(1) NOT NULL default '0', `anonymous` int(1) NOT NULL default '0',
`nopermission` int(1) NOT NULL default '0', `nopermission` int(1) NOT NULL default '0',
PRIMARY KEY (`sid`), PRIMARY KEY (`sid`),

View file

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Project: astat - simple site engine * Project: BeCast WebEngine - simple site engine
* File: /modules/news/add.apnl.php * File: /modules/news/add.apnl.php
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -17,14 +17,14 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @link http://www.astat.org SVN: $URL: file:///var/local/svn/astat/trunk/modules/news/admin/add.apnl.php $ * @link http://www.becast.at
* @copyright 2009 becast.at * @copyright 2009 - 2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at> * @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: add.apnl.php 96 2010-02-17 21:56:41Z genuineparts $ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$session->page_begin("add News", True); $session->page_begin("add News", True);

View file

@ -1,5 +1,5 @@
<?php <?php
If (!defined(INBCWE)) { If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
class plugins_mybbnews{ class plugins_mybbnews{

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined("in_BL_ADMIN")) { If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$session->page_begin("add Text", True); $session->page_begin("add Text", True);

View file

@ -1,5 +1,5 @@
<?php <?php
If (!defined(INBCWE)) { If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }
$addnav["right"]=FALSE; $addnav["right"]=FALSE;

View file

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Project: astat - simple site engine * Project: BeCast WebEngine - simple site engine
* File: /modules/text/text.output.php * File: /modules/text/text.output.php
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,15 +16,15 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @link http://www.astat.org SVN: $URL$ * @link http://www.becast.at
* @copyright 2009 becast.at * @copyright 2010-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at> * @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$ * @version $Id$
*/ */
If (!defined(INBCWE)) { If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }

View file

@ -1,5 +1,5 @@
<?php <?php
If (!defined(INBCWE)) { If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!"); die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} }