Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: class_core.php 2187 2006-09-02 13:48:31Z chris $
| * $Id: class_core.php 3173 2007-06-29 06:01:38Z Tikitiki $
|
*/
class MyBB {
| */
class MyBB {
|
Zeile 15 | Zeile 15 |
---|
* * @var string */
|
* * @var string */
|
var $version = "1.2";
| var $version = "1.2.9";
|
/** * The version code of MyBB we're running. * * @var integer */
|
/** * The version code of MyBB we're running. * * @var integer */
|
var $version_code = 120;
| var $version_code = 129;
|
/** * The current working directory.
| /** * The current working directory.
|
Zeile 88 | Zeile 88 |
---|
var $request_method = "";
/**
|
var $request_method = "";
/**
|
* Variables that need to be clean.
| * Variables that need to be cleaned.
|
* * @var array */
| * * @var array */
|
Zeile 96 | Zeile 96 |
---|
"int" => array("tid", "pid", "uid", "eid", "pmid", "fid", "aid") );
|
"int" => array("tid", "pid", "uid", "eid", "pmid", "fid", "aid") );
|
| /** * Variables that are to be ignored from cleansing proccess * * @var array */ var $ignore_clean_variables = array();
|
/** * Using built in shutdown functionality provided by register_shutdown_function for < PHP 5?
| /** * Using built in shutdown functionality provided by register_shutdown_function for < PHP 5?
|
Zeile 110 | Zeile 116 |
---|
function MyBB() { // Set up MyBB
|
function MyBB() { // Set up MyBB
|
| $protected = array("_GET", "_POST", "_SERVER", "_COOKIE", "_FILES", "_SERVER", "_ENV", "GLOBALS"); foreach($protected as $var) { if($_REQUEST[$var] || $_FILES[$var] || $_COOKIE[$var]) { die("Hacking attempt"); } } if(defined("IGNORE_CLEAN_VARS")) { if(!is_array(IGNORE_CLEAN_VARS)) { $this->ignore_clean_variables = array(IGNORE_CLEAN_VARS); } else { $this->ignore_clean_variables = IGNORE_CLEAN_VARS; } }
|
// Determine Magic Quotes Status if(get_magic_quotes_gpc())
| // Determine Magic Quotes Status if(get_magic_quotes_gpc())
|
Zeile 154 | Zeile 180 |
---|
{ $this->use_shutdown = true; register_shutdown_function(array(&$this, "__destruct"));
|
{ $this->use_shutdown = true; register_shutdown_function(array(&$this, "__destruct"));
|
}
| }
|
if(isset($this->input['intcheck']) && $this->input['intcheck'] == 1) {
| if(isset($this->input['intcheck']) && $this->input['intcheck'] == 1) {
|
Zeile 168 | Zeile 194 |
---|
* @param array The array of incoming variables. */ function parse_incoming($array)
|
* @param array The array of incoming variables. */ function parse_incoming($array)
|
{
| {
|
if(!is_array($array)) { return;
| if(!is_array($array)) { return;
|
Zeile 197 | Zeile 223 |
---|
{ $array[$key] = stripslashes($array[$key]); }
|
{ $array[$key] = stripslashes($array[$key]); }
|
} }
| } }
|
/** * Unsets globals from a specific array.
| /** * Unsets globals from a specific array.
|
Zeile 215 | Zeile 241 |
---|
foreach(array_keys($array) as $key) { unset($GLOBALS[$key]);
|
foreach(array_keys($array) as $key) { unset($GLOBALS[$key]);
|
| global $$key; unset($$key);
|
} }
| } }
|
Zeile 228 | Zeile 256 |
---|
{ foreach($variables as $var) {
|
{ foreach($variables as $var) {
|
| // If this variable is in the ignored array, skip and move to next if(in_array($var, $this->ignore_clean_variables)) { continue; }
|
if($type == "int" && isset($this->input[$var]) && $this->input[$var] != "lastposter") { $this->input[$var] = intval($this->input[$var]);
| if($type == "int" && isset($this->input[$var]) && $this->input[$var] != "lastposter") { $this->input[$var] = intval($this->input[$var]);
|
Zeile 269 | Zeile 302 |
---|
$message = "Your board has not yet been installed and configured. Please do so before attempting to browse it."; break; default:
|
$message = "Your board has not yet been installed and configured. Please do so before attempting to browse it."; break; default:
|
$message = "MyBB has experienced an internal error. Please contact the MyBB Group for support. <a href=\"http://www.mybboard.com\">MyBB Website</a>";
| $message = "MyBB has experienced an internal error. Please contact the MyBB Group for support. <a href=\"http://www.mybboard.net\">MyBB Website</a>";
|
} include MYBB_ROOT."inc/generic_error.php"; if($halt)
| } include MYBB_ROOT."inc/generic_error.php"; if($halt)
|