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,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/addgroup.apnl.php
*
* This library is free software; you can redistribute it and/or
@ -17,14 +17,15 @@
* 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.astat.org SVN: $URL: http://svn.astat.org/astat/trunk/admin/addgroup.apnl.php $
* @copyright 2009 becast.at
* @link http://www.becast.at
* @copyright 2009-2025 becast.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
* @version $Id: addgroup.apnl.php 41 2009-06-21 19:24:29Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
* @version $Id$
*/
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;

View file

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

View file

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

View file

@ -1,5 +1,30 @@
<?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!");
}
$addnav["right"]=FALSE;

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/module.apnl.php
*
* 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
* 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 $
* @copyright 2009 becast.at
* @link http://www.becast.at
* @copyright 2009-2025 becast.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
* @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!");
}

View file

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

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: BeFramed - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/versions.apnl.php
*
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.jaud.be
* @copyright 2025 becast.at
* @link http://www.becast.at
* @copyright 2009-2025 becast.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
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
*/
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;

View file

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

View file

@ -1,25 +1,31 @@
<?php
/**
* (c) 2009 BeCast
* -------------------------------------
* Filename: config.default.inc.php
* Purpose: Configuration
* CVS Header: $Header$
* Project: BeCast WebEngine - simple site engine
* File: config.inc.php
*
* 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
* the Free Software Foundation; version 2 of the License.
* This program 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 program 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.
* 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 General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
* 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 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)
$config["host"] = "localhost";

View file

@ -1,9 +1,9 @@
<?php
$module["functions"]["name"]="Functions Module";
$module["functions"]["ver"]="1.0.0";
$module["functions"]["ver"]="1.0.1";
/**
* Project: astat - simple site engine
* File: /inc/sessions.class.php
* Project: BeCast WebEngine - simple site engine
* File: /inc/functions.class.php
*
* This library is free software; you can redistribute it and/or
* 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
* 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 $
* @copyright 2010 becast.at
* @link http://www.becast.at
* @copyright 2010-2025 becast.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
* @version $Id: sessions.class.php 129 2010-02-21 22:04:51Z genuineparts $
* @version $Id$
*/
class functions {
@ -120,7 +120,9 @@ class functions {
function get_ip(){
global $config;
$ip = strtolower($_SERVER['REMOTE_ADDR']);
if(empty($config['ip_forwarded_check'])){
$config['ip_forwarded_check'] = false;
}
if($config['ip_forwarded_check'])
{
$addresses = array();

View file

@ -38,7 +38,7 @@ class session {
function page_begin($page = "UNDEFINED", $needlogin = TRUE){
global $config, $db, $log, $core, $lang, $plugin, $functions;
$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->packip = $functions->my_inet_pton($this->ip);
$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.
*/
if(!defined("in_astat")){
if(!defined("INBCWE")){
die();
}
// your Database Server (most likely localhost)

View file

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

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /modules/news/add.apnl.php
*
* 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
* 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 $
* @copyright 2009 becast.at
* @link http://www.becast.at
* @copyright 2009 - 2025 becast.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
* @version $Id: add.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
* @version $Id$
*/
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add News", True);

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /modules/text/text.output.php
*
* This program is free software; you can redistribute it and/or modify
@ -16,15 +16,15 @@
* 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.astat.org SVN: $URL$
* @copyright 2009 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
* @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
* @version $Id$
*/
If (!defined(INBCWE)) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}

View file

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