|
From: Jon O. <jon...@us...> - 2006-07-01 21:32:23
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10721/modules/mx_linkdb/linkdb Added Files: linkdb_common.php Log Message: Ok. Moving files. Renaming files. Adding code... --- NEW FILE: linkdb_common.php --- <?php /** * * @package mxBB Portal Module - mx_linkdb * @version $Id: linkdb_common.php,v 1.1 2006/07/01 21:32:19 jonohlsson Exp $ * @copyright (c) 2002-2006 [CRLin, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } /* // // addslashes to vars if magic_quotes_gpc is off // if ( !@function_exists( 'slash_input_data' ) ) { function slash_input_data( &$data ) { if ( is_array( $data ) ) { foreach ( $data as $k => $v ) { $data[$k] = ( is_array( $v ) ) ? slash_input_data( $v ) : addslashes( $v ); } } return $data; } } // // to make it work with php version under 4.1 and other stuff // if ( @phpversion() < '4.1' ) { $_GET = &$HTTP_GET_VARS; $_POST = &$HTTP_POST_VARS; $_COOKIE = &$HTTP_COOKIE_VARS; $_SERVER = &$HTTP_SERVER_VARS; $_ENV = &$HTTP_ENV_VARS; $_FILES = &$HTTP_POST_FILES; $_SESSION = &$HTTP_SESSION_VARS; } if ( !isset( $_REQUEST ) ) { $_REQUEST = array_merge( $_GET, $_POST, $_COOKIE ); } if ( !get_magic_quotes_gpc() ) { $_GET = slash_input_data( $_GET ); $_POST = slash_input_data( $_POST ); $_COOKIE = slash_input_data( $_COOKIE ); $_REQUEST = slash_input_data( $_REQUEST ); } */ // // Include linkdb data file // include_once( $module_root_path . 'linkdb/includes/linkdb_constants.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_cache.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_auth.' . $phpEx ); //include_once( $module_root_path . 'linkdb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_linkdb.' . $phpEx ); $linkdb_cache = new linkdb_cache(); $linkdb_functions = new linkdb_functions(); if ( $linkdb_cache->exists( 'config' ) ) { $linkdb_config = $linkdb_cache->get( 'config' ); } else { $linkdb_config = $linkdb_functions->linkdb_config(); $linkdb_cache->put( 'config', $linkdb_config ); } $linkdb_user = new linkdb_user_info(); $linkdb = new linkdb_public(); ?> |