Unifying things
This commit is contained in:
parent
1599a338e5
commit
8f0808b9ff
22 changed files with 110 additions and 76 deletions
|
@ -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";
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue