Yanıtınız için teşekkürler hocamSürüm vBulletin 3.8.7 Patch Level 2vBulletin 4'e geçmek istemiiyorum. class_core. php dosyasında define ; kodunu göremedim. Tarattım ama yok böyle bir kod

Sürümünüz Kaç? Bir Üst Sürüme Geçme Şansınız Varsa Yapın Yoksa;class_core. php DosyanızdaBul: define ; Bununla Değiştir: define ;

O Dosyanın İçeriğini Buraya Yazarsanız Yardımcı Olurum. Buyrun hocam;/ ====================================================================== \|| #################################################################### |||| # vBulletin 3.8.7 Patch Level 2 - Licence Number VBF2085D84|| # ---------------------------------------------------------------- # |||| # Copyright ©2000-2011 vBulletin Solutions, Inc. All Rights Reserved. |||| # This file may not be redistributed in whole or significant part. # |||| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # |||| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # |||| #################################################################### ||\ ====================================================================== /define('FILE_VERSION', '3.8.7'); // this should match install. phpdefine('SIMPLE_VERSION', '387'); // see vB_Datastore::check_options define('YUI_VERSION', '2.9.0'); // define the YUI version we bundle, used for external YUI/ #@+ The maximum sizes for the "small" profile avatars /define('FIXED_SIZE_AVATAR_WIDTH', 60);define('FIXED_SIZE_AVATAR_HEIGHT', 80);/ #@- // #@+ These make up the bit field to disable specific types of BB codes. /define('ALLOW_BBCODE_BASIC', 1);define('ALLOW_BBCODE_COLOR', 2);define('ALLOW_BBCODE_SIZE', 4);define('ALLOW_BBCODE_FONT', 8);define('ALLOW_BBCODE_ALIGN', 16);define('ALLOW_BBCODE_LIST', 32);define('ALLOW_BBCODE_URL', 64);define('ALLOW_BBCODE_CODE', 128);define('ALLOW_BBCODE_PHP', 256);define('ALLOW_BBCODE_HTML', 512);define('ALLOW_BBCODE_IMG', 1024);define('ALLOW_BBCODE_QUOTE', 2048);define('ALLOW_BBCODE_CUSTOM', 4096);/ #@- // #@+ These make up the bit field to control what "special" BB codes are found in the text. /define('BBCODE_HAS_IMG', 1);define('BBCODE_HAS_ATTACH', 2);define('BBCODE_HAS_SIGPIC', 4);/ #@- // #@+ Bitfield values for the inline moderation javascript selector which should be self-explanitory /define('POST_FLAG_INVISIBLE', 1);define('POST_FLAG_DELETED', 2);define('POST_FLAG_ATTACH', 4);define('POST_FLAG_GUEST', 8);// #############################################################################// MySQL Database Class/ #@+ The type of result set to return from the database for a specific row. /define('DBARRAY_BOTH', 0);define('DBARRAY_ASSOC', 1);define('DBARRAY_NUM', 2);/ #@- // Class to interface with a database This class also handles data replication between a master and slave servers @package vBulletin @version $Revision: 43870 $ @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Database{ / Array of function names, mapping a simple name to the RDBMS specific function name @var array / var $functions = array ; / The vBulletin registry object @var vB_Registry / var $registry = null; / Array of constants for use in fetch_array @var array / var $fetchtypes = array ; / Full name of the system @var string / var $appname = 'vBulletin'; / Short name of the system @var string / var $appshortname = 'vBulletin'; / Database name @var string / var $database = null; / Link variable. The connection to the master/write server. @var string / var $connection_master = null; / Link variable. The connection to the slave/read server . @var string / var $connection_slave = null; / Link variable. The connection last used. @var string / var $connection_recent = null; / Whether or not we will be using different connections for read and write queries @var boolean / var $multiserver = false; / Array of queries to be executed when the script shuts down @var array / var $shutdownqueries = array ; / The contents of the most recent SQL query string. @var string / var $sql = ''; / Whether or not to show and halt on database errors @var boolean / var $reporterror = true; / The text of the most recent database error message @var string / var $error = ''; / The error number of the most recent database error message @var integer / var $errno = ''; / SQL Query String @var integer The maximum size of query string permitted by the master server / var $maxpacket = 0; / Track lock status of tables. True if a table lock has been issued @var bool / var $locked = false; / Number of queries executed @var integer The number of SQL queries run by the system / var $querycount = 0; / Constructor. If x_real_escape_string is available, switches to use that function over x_escape_string . @param vB_Registry Registry object / function vB_Database { if (is_object else } / Connects to the specified database server @param string Name of the database that we will be using for select_db @param string Name of the master server - should be either 'localhost' or an IP address @param integer Port for the master server @param string Username to connect to the master server @param string Password associated with the username for the master server @param boolean Whether or not to use persistent connections to the master server @param string Name of the slave server - should be either left blank or set to 'localhost' or an IP address, but NOT the same as the servername for the master server @param integer Port of the slave server @param string Username to connect to the slave server @param string Password associated with the username for the slave server @param boolean Whether or not to use persistent connections to the slave server @param string Parse given MySQL config file to set options @param string Connection Charset MySQLi / PHP 5.1.0+ or 5.0.5+ / MySQL 4.1.13+ or MySQL 5.1.10+ Only @return none / function connect($database, $w_servername, $w_port, $w_username, $w_password, $w_usepconnect = false, $r_servername = '', $r_port = 3306, $r_username = '', $r_password = '', $r_usepconnect = false, $configfile = '', $charset = '') { $this->database = $database; $w_port = $w_port? $w_port : 3306; $r_port = $r_port? $r_port : 3306; $this->connection_master = $this->db_connect ; $this->multiserver = false; $this->connection_slave =& $this->connection_master; if } / Initialize database connection Connects to the specified master database server, and also to the slave server if it is specified @param string Name of the database server - should be either 'localhost' or an IP address @param integer Port of the database server (usually 3306) @param string Username to connect to the database server @param string Password associated with the username for the database server @param boolean Whether or not to use persistent connections to the database server @param string Not applicable; config file for MySQLi only @param string Force connection character set @return boolean / function db_connect { if (function_exists // catch_db_error will handle exiting, no infinite loop here do while ; restore_error_handler ; if (! empty { if (function_exists else } return $link; } / Selects a database to use @param string The name of the database located on the database server @return boolean / function select_db { if if ($check_write = @$this->select_db_wrapper else } / Simple wrapper for select_db , to allow argument order changes @param string Database name @param integer Link identifier @return boolean / function select_db_wrapper / Forces the sql_mode varaible to a specific mode. Certain modes may be incompatible with vBulletin. Applies to MySQL 4.1+. @param string The mode to set the sql_mode variable to / function force_sql_mode { $reset_errors = $this->reporterror; if $this->query_write("SET @@sql_mode = '" . $this->escape_string . "'"); if } / Executes an SQL query through the specified connection @param boolean Whether or not to run this query buffered or unbuffered . Default is unbuffered. @param string The connection ID to the database server @return string / function &execute_query { $this->connection_recent =& $link; $this->querycount++; if ($queryresult = $this->functions else } / Executes a data-writing SQL query through the 'master' database connection @param string The text of the SQL query to be executed @param boolean Whether or not to run this query buffered or unbuffered . Default is buffered. @return string / function query_write / Executes a data-reading SQL query through the 'master' database connection we don't know if the 'read' database is up to date so be on the safe side @param string The text of the SQL query to be executed @param boolean Whether or not to run this query buffered or unbuffered . Default is buffered. @return string / function query_read / Executes a data-reading SQL query through the 'slave' database connection @param string The text of the SQL query to be executed @param boolean Whether or not to run this query buffered or unbuffered . Default is buffered. @return string / function query_read_slave / Executes an SQL query, using either the write connection @deprecated Deprecated as of 3.6. Use query_ @param string The text of the SQL query to be executed @param boolean Whether or not to run this query buffered or unbuffered . Default is unbuffered. @return string / function query / Executes a data-reading SQL query, then returns an array of the data from the first row from the result set @param string The text of the SQL query to be executed @param string One of @return array / function &query_first / Executes a FOUND_ROWS query to get the results of SQL_CALC_FOUND_ROWS @return integer / function found_rows / Executes a data-reading SQL query against the slave server, then returns an array of the data from the first row from the result set @param string The text of the SQL query to be executed @param string One of @return array / function &query_first_slave / Executes an INSERT INTO query, using extended inserts if possible @param string Name of the table into which data should be inserted @param string Comma-separated list of the fields to affect @param array Array of SQL values @param boolean Whether or not to run this query buffered or unbuffered . Default is unbuffered. @return mixed / function &query_insert / Executes a REPLACE INTO query, using extended inserts if possible @param string Name of the table into which data should be inserted @param string Comma-separated list of the fields to affect @param array Array of SQL values @param boolean Whether or not to run this query buffered or unbuffered . Default is unbuffered. @return mixed / function &query_replace / Executes an INSERT or REPLACE query with multiple values, splitting large queries into manageable chunks based on $this->maxpacket @param string The text of the first part of the SQL query to be executed - example "INSERT INTO table (field1, field2) VALUES" @param mixed The values to be inserted. Example: (0 => "('value1', 'value2')", 1 => "('value3', 'value4')") @param boolean Whether or not to run this query buffered or unbuffered . Default is unbuffered. @return mixed / function insert_multiple { if ($this->maxpacket == 0) $i = 0; $num_values = sizeof ; $this->sql = $sql; while { $sql_length = strlen ; $value_length = strlen ; if < $this->maxpacket) else } if if (sizeof == 1) else } / Registers an SQL query to be executed at shutdown time. If shutdown functions are disabled, the query is run immediately. @param string The text of the SQL query to be executed @param mixed Allows particular shutdown queries to be labelled @return boolean / function shutdown_query($sql, $arraykey = -1) { if ($arraykey === -1) else } / Returns the number of rows contained within a query result set @param string The query result ID we are dealing with @return integer / function num_rows / Returns the number of fields contained within a query result set @param string The query result ID we are dealing with @return integer / function num_fields / Returns the name of a field from within a query result set @param string The query result ID we are dealing with @param integer The index position of the field @return string / function field_name / Returns the ID of the item just inserted into an auto-increment field @return integer / function insert_id / Returns the name of the character set @return string / function client_encoding / Closes the connection to the database server @return integer / function close / Escapes a string to make it safe to be inserted into an SQL query @param string The string to be escaped @return string / function escape_string { if else } / Escapes a string using the appropriate escape character for the RDBMS for use in LIKE conditions @param string The string to be escaped @return string / function escape_string_like / Takes a piece of data and prepares it to be put into an SQL query by adding quotes etc. @param mixed The data to be used @return mixed The prepared data / function sql_prepare { if (is_string else if (is_numeric AND $value + 0 == $value) else if (is_bool else } / Fetches a row from a query result and returns the values from that row as an array The value of $type defines whether the array will have numeric or associative keys, or both @param string The query result ID we are dealing with @param integer One of DBARRAY_ASSOC / DBARRAY_NUM / DBARRAY_BOTH @return array / function fetch_array / Fetches a row from a query result and returns the values from that row as an array with numeric keys @param string The query result ID we are dealing with @return array / function fetch_row / Fetches a row information from a query result and returns the values from that row as an array @param string The query result ID we are dealing with @return array / function fetch_field / Moves the internal result pointer within a query result set @param string The query result ID we are dealing with @param integer The position to which to move the pointer (first position is 0) @return boolean / function data_seek / Frees all memory associated with the specified query result @param string The query result ID we are dealing with @return boolean / function free_result / Retuns the number of rows affected by the most recent insert/replace/update query @return integer / function affected_rows / Lock tables @param mixed List of tables to lock @param string Type of lock to perform / function lock_tables { if (! empty AND is_array { // Don't lock tables if we know we might get stuck with them locked // mysqli doesn't support pconnect! YAY! if (strtolower != 'mysqli' AND $this->registry->config ) $sql = ''; foreach $this->query_write ; $this->locked = true; } } / Unlock tables / function unlock_tables { # must be called from exec_shutdown as tables can get stuck locked if pconnects are enabled # note: the above case never actually happens as we skip the lock if pconnects are enabled =) if } / Returns the text of the error message from previous database operation @return string / function error { if else return $this->error; } / Returns the numerical value of the error message from previous database operation @return integer / function errno { if else return $this->errno; } / Switches database error display ON / function show_errors / Switches database error display OFF / function hide_errors / Halts execution of the entire system and displays an error message @param string Text of the error message. Leave blank to use $this->sql as error text. @return integer / function halt { global $vbulletin; if if { if if (! headers_sent { if else } $vboptions =& $vbulletin->options; $technicalemail =& $vbulletin->config ; $bbuserinfo =& $vbulletin->userinfo; $requestdate = date ; $date = date ; $scriptpath = str_replace ; $referer = REFERRER; $ipaddress = IPADDRESS; $classname = get_class ; if $display_db_error = (VB_AREA == 'Upgrade' OR VB_AREA == 'Install' OR $vbulletin->userinfo == 6 OR ; // Hide the MySQL Version if its going in the source if eval('$message = "' . str_replace('"', '\"', file_get_contents . '";'); require_once ; if (function_exists if ($technicalemail!= '' AND!$vbulletin->options AND verify_email_vbulletin_error { // If vBulletinHook is defined then we know that options are loaded, so we can then use vbmail if (class_exists else } if else if else eval('$message = "' . str_replace('"', '\"', file_get_contents . '";'); // This is needed so IE doesn't show the pretty error messages $message.= str_repeat(' ', 512); die ; } else if (! empty }}// #############################################################################// MySQLi Database Class/ Class to interface with a MySQL 4.1 database This class also handles data replication between a master and slave servers @package vBulletin @version $Revision: 43870 $ @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Database_MySQLi extends vB_Database{ / Array of function names, mapping a simple name to the RDBMS specific function name @var array / var $functions = array ; / Array of constants for use in fetch_array @var array / var $fetchtypes = array ; / Initialize database connection Connects to the specified master database server, and also to the slave server if it is specified @param string Name of the database server - should be either 'localhost' or an IP address @param integer Port of the database server - usually 3306 @param string Username to connect to the database server @param string Password associated with the username for the database server @param string Persistent Connections - Not supported with MySQLi @param string Configuration file from config. php. ini @param string Mysqli Connection Charset PHP 5.1.0+ or 5.0.5+ / MySQL 4.1.13+ or MySQL 5.1.10+ Only @return object Mysqli Resource / function db_connect { if (function_exists $link = mysqli_init ; # Set Options Connection Options if (! empty // this will execute at most 5 times, see catch_db_error do while ; restore_error_handler ; if (! empty { if (function_exists else } return ? false : $link; } / Executes an SQL query through the specified connection @param boolean Whether or not to run this query buffered or unbuffered . Default is unbuffered. @param string The connection ID to the database server @return string / function &execute_query { $this->connection_recent =& $link; $this->querycount++; if ($queryresult = mysqli_query($link, $this->sql, else } / Simple wrapper for select_db , to allow argument order changes @param string Database name @param integer Link identifier @return boolean / function select_db_wrapper / Escapes a string to make it safe to be inserted into an SQL query @param string The string to be escaped @return string / function escape_string / Returns the name of a field from within a query result set @param string The query result ID we are dealing with @param integer The index position of the field @return string / function field_name }// #############################################################################// datastore class/ Class for fetching and initializing the vBulletin datastore from the database @package vBulletin @version $Revision: 43870 $ @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Datastore{ / Default items that are always loaded by fetch ; @var array / var $defaultitems = array ; / This variable contains a list of all items to be returned from the datastore @var array / var $itemarray = array ; / This variable should be set to be a reference to the registry object @var vB_Registry / var $registry = null; / This variable should be set to be a reference to the database object @var vB_Database / var $dbobject = null; / Unique prefix for item's title, required for multiple forums on the same server using the same classes that read/write to memory @var string / var $prefix = ''; / Constructor - establishes the database object to use for datastore queries @param vB_Registry The registry object @param vB_Database The database object / function vB_Datastore { $this->registry =& $registry; $this->dbobject =& $dbobject; $this->prefix =& $this->registry->config ; if (defined if (! is_object if (! is_object } / Sorts the data returned from the cache and places it into appropriate places @param string The name of the data item to be processed @param mixed The data associated with the title @param integer If the data needs to be unserialized, 0 = no, 1 = yes, 2 = auto detect @return boolean / function register($title, $data, $unserialize_detect = 2) { // specifies whether or not $data should be an array $try_unserialize = (($unserialize_detect == 2) AND ($data == 'a' AND $data == ':')); if ($try_unserialize OR $unserialize_detect == 1) { // unserialize returned an error so return false if (($data = unserialize === false) } if { $registry =& $this->registry; foreach (array_keys AS $group) { $registry-> =& $data ; $group_prefix = 'bf_' . $group. '_'; $group_info =& $data ; foreach (array_keys AS $subgroup) { $registry-> =& $group_info ; } } } else if (! empty return true; } / Fetches the contents of the datastore from the database @param array Array of items to fetch from the datastore @return void / function fetch { $db =& $this->dbobject; $itemlist = "''"; foreach if (is_array { foreach } $this->do_db_fetch ; $this->check_options ; // set the version number variable $this->registry->versionnumber =& $this->registry->options ; } / Performs the actual fetching of the datastore items for the database, child classes may use this @param string title of the datastore item @return void / function do_db_fetch { $db =& $this->dbobject; $dataitems = $db->query_read(" SELECT FROM " . TABLE_PREFIX. "datastore WHERE title IN "); while ($dataitem = $db->fetch_array $db->free_result ; } / Checks that the options item has come out of the datastore correctly and sets the 'versionnumber' variable / function check_options { if (! isset // set the short version number $this->registry->options = SIMPLE_VERSION. $this->registry->config ; }}// #############################################################################// input handler class/ #@+ Ways of cleaning input. Should be mostly self-explanatory. /define('TYPE_NOCLEAN', 0); // no changedefine('TYPE_BOOL', 1); // force booleandefine('TYPE_INT', 2); // force integerdefine('TYPE_UINT', 3); // force unsigned integerdefine('TYPE_NUM', 4); // force numberdefine('TYPE_UNUM', 5); // force unsigned numberdefine('TYPE_UNIXTIME', 6); // force unix datestamp define('TYPE_STR', 7); // force trimmed stringdefine('TYPE_NOTRIM', 8); // force string - no trimdefine('TYPE_NOHTML', 9); // force trimmed string with HTML made safedefine('TYPE_ARRAY', 10); // force arraydefine('TYPE_FILE', 11); // force filedefine('TYPE_BINARY', 12); // force binary stringdefine('TYPE_NOHTMLCOND', 13); // force trimmed string with HTML made safe if determined to be unsafedefine('TYPE_ARRAY_BOOL', 101);define('TYPE_ARRAY_INT', 102);define('TYPE_ARRAY_UINT', 103);define('TYPE_ARRAY_NUM', 104);define('TYPE_ARRAY_UNUM', 105);define('TYPE_ARRAY_UNIXTIME', 106);define('TYPE_ARRAY_STR', 107);define('TYPE_ARRAY_NOTRIM', 108);define('TYPE_ARRAY_NOHTML', 109);define('TYPE_ARRAY_ARRAY', 110);define('TYPE_ARRAY_FILE', 11); // An array of "Files" behaves differently than other arrays. TYPE_FILE handles both types. define('TYPE_ARRAY_BINARY', 112);define('TYPE_ARRAY_NOHTMLCOND',113);define('TYPE_ARRAY_KEYS_INT', 202);define('TYPE_ARRAY_KEYS_STR', 207);define('TYPE_CONVERT_SINGLE', 100); // value to subtract from array types to convert to single typesdefine('TYPE_CONVERT_KEYS', 200); // value to subtract from array => keys types to convert to single types/ #@- /// temporarydefine ;define ;define ;define ;/ Class to handle and sanitize variables from GET, POST and COOKIE etc @package vBulletin @version $Revision: 43870 $ @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Input_Cleaner{ / Translation table for short name to long name @var array / var $shortvars = array ; / Translation table for short superglobal name to long superglobal name @var array / var $superglobal_lookup = array ; / System state. The complete URL of the current page, without sessionhash @var string / var $scriptpath = ''; / Reload URL. Complete URL of the current page including sessionhash @var string / var $reloadurl = ''; / System state. The complete URL of the page for Who's Online purposes @var string / var $wolpath = ''; / System state. The complete URL of the referring page @var string / var $url = ''; / System state. The IP address of the current visitor @var string / var $ipaddress = ''; / System state. An attempt to find a second IP for the current visitor @var string / var $alt_ip = ''; / A reference to the main registry object @var vB_Registry / var $registry = null; / Keep track of variables that have already been cleaned @var array / var $cleaned_vars = array ; / Constructor First, reverses the effects of magic quotes on GPC Second, translates short variable names to long Third, deals with $_COOKIE conflicts @param vB_Registry The instance of the vB_Registry object / function vB_Input_Cleaner { $this->registry =& $registry; if (! is_array // overwrite GET and REQUEST with POST if it exists if { foreach (array_keys AS $key) { if (isset } } // deal with session bypass situation if (! defined // reverse the effects of magic quotes if necessary if (function_exists AND get_magic_quotes_gpc { $this->stripslashes_deep ; // needed for some reason (at least on php5 - not tested on php4) $this->stripslashes_deep ; $this->stripslashes_deep ; $this->stripslashes_deep ; if (is_array { foreach $this->stripslashes_deep ; } } set_magic_quotes_runtime(0); @ini_set('magic_quotes_sybase', 0); foreach (array AS $arrayname) { if (isset $this->convert_shortvars ; } // set the AJAX flag if we have got an AJAX submission if // reverse the effects of register_globals if necessary if (@ini_get OR!@ini_get { foreach { $registry->superglobal_size = sizeof ; foreach (array_keys AS $varname) { // make sure we dont unset any global arrays like _SERVER if (! in_array } } } else { foreach } // deal with cookies that may conflict with _GET and _POST data, and create our own _REQUEST with no _COOKIE input foreach (array_keys AS $varname) { unset ; if (isset else if (isset } // fetch client IP address $registry->ipaddress = $this->fetch_ip ; define ; // attempt to fetch IP address from behind proxies - useful, but don't rely on it... $registry->alt_ip = $this->fetch_alt_ip ; define ; // defines if the current page was visited via SSL or not define('REQ_PROTOCOL', (($_SERVER == 'on' OR $_SERVER == '1') ? 'https' : 'http')); // fetch complete url of current page $registry->scriptpath = $this->fetch_scriptpath ; define ; // fetch url of current page without the variable string $quest_pos = strpos ; if else define ; // fetch url of current page for Who's Online $registry->wolpath = $this->fetch_wolpath ; define ; // define session constants define('SESSION_HOST', substr($registry->ipaddress, 0, 15)); // define some useful contants related to environment define ; define ; } / Makes data in an array safe to use @param array The source array containing the data to be cleaned @param array Array of variable names and types we want to extract from the source array @return array / function &clean_array { $return = array ; foreach return $return; } / Makes GPC variables safe to use @param string Either, g, p, c, r or f @param array Array of variable names and types we want to extract from the source array @return array / function clean_array_gpc { $sg =& $GLOBALS[$this->superglobal_lookup ]; foreach { // clean a variable only once unless its a different type if (! isset OR $this->cleaned_vars != $vartype) } } / Makes a single GPC variable safe to use and returns it @param array The source array containing the data to be cleaned @param string The name of the variable in which we are interested @param integer The type of the variable in which we are interested @return mixed / function &clean_gpc { // clean a variable only once unless its a different type if (! isset OR $this->cleaned_vars != $vartype) return $this->registry->GPC ; } / Makes a single variable safe to use and returns it @param mixed The variable to be cleaned @param integer The type of the variable in which we are interested @param boolean Whether or not the variable to be cleaned actually is set @return mixed The cleaned value / function &clean { if { if else if (is_array { if else foreach (array_keys AS $key) } else return $var; } else { if { switch { case TYPE_INT: case TYPE_UINT: case TYPE_NUM: case TYPE_UNUM: case TYPE_UNIXTIME: case TYPE_STR: case TYPE_NOHTML: case TYPE_NOTRIM: case TYPE_NOHTMLCOND: case TYPE_BOOL: case TYPE_ARRAY: case TYPE_FILE: case TYPE_NOCLEAN: default: } } else return $var; } } / Does the actual work to make a variable safe @param mixed The data we want to make safe @param integer The type of the data @return mixed / function &do_clean { static $booltypes = array('1', 'yes', 'y', 'true'); switch { case TYPE_INT: $data = intval ; break; case TYPE_UINT: $data = ($data = intval < 0? 0 : $data; break; case TYPE_NUM: $data = strval + 0; break; case TYPE_UNUM: $data = strval + 0; $data = ($data < 0) ? 0 : $data; break; case TYPE_BINARY: $data = strval ; break; case TYPE_STR: $data = trim(strval ; break; case TYPE_NOTRIM: $data = strval ; break; case TYPE_NOHTML: $data = htmlspecialchars_uni(trim(strval ; break; case TYPE_BOOL: $data = in_array(strtolower , $booltypes) ? 1 : 0; break; case TYPE_ARRAY: $data = (is_array ? $data : array ; break; case TYPE_NOHTMLCOND: { $data = trim(strval ; if (strcspn < strlen OR (strpos !== false AND! preg_match('/&(# +|amp|lt|gt|quot);/si', $data))) break; } case TYPE_FILE: { // perhaps redundant :p if (is_array { if (is_array { $files = count ; for ($index = 0; $index < $files; $index++) } else } else break; } case TYPE_UNIXTIME: { if (is_array { $data = $this->clean ; if else } else break; } // null actions should be deifned here so we can still catch typos below case TYPE_NOCLEAN: default: { if } } // strip out characters that really have no business being in non-binary data switch return $data; } / Removes HTML characters and potentially unsafe scripting words from a string @param string The variable we want to make safe @return string / function xss_clean / Reverses the effects of magic_quotes on an entire array of variables @param array The array on which we want to work / function stripslashes_deep(&$value, $depth = 0) { if (is_array { foreach { if (is_string else if (is_array AND $depth < 10) } } } / Turns $_POST into $_POST etc. @param array The name of the array / function convert_shortvars { // extract long variable names from short variable names foreach { if (isset AND! isset } } / Strips out the s=gobbledygook& rubbish from URLs @param string The URL string from which to remove the session stuff @return string / function strip_sessionhash { $string = preg_replace('/ = ?&?/', '', $string); return $string; } / Fetches the 'scriptpath' variable - ie: the URI of the current page @return string / function fetch_scriptpath { if else { if else { if else if else if } // in the future we should set $registry->script here too $quest_pos = strpos ; if else // store a version that includes the sessionhash $this->registry->reloadurl = $this->xss_clean ; $scriptpath = $this->strip_sessionhash ; $scriptpath = $this->xss_clean ; $this->registry->scriptpath = $scriptpath; return $scriptpath; } } / Fetches the 'wolpath' variable - ie: the same as 'scriptpath' but with a handler for the POST request method @return string / function fetch_wolpath { $wolpath = $this->fetch_scriptpath ; if { // Tag the variables back on to the filename if we are coming from POST so that WOL can access them. $tackon = ''; if (is_array { foreach { switch { case 'forumid': case 'threadid': case 'postid': case 'userid': case 'eventid': case 'calendarid': case 'do': case 'method': // postings. php case 'dowhat': // private. php } } } if } return $wolpath; } / Fetches the 'url' variable - usually the URL of the previous page in the history @return string / function fetch_url { $temp_url = $_REQUEST ; $scriptpath = $this->fetch_scriptpath ; if (empty else { if else } if ($url == $scriptpath OR empty // if $url is set to forum home page, check it against options if $url = $this->xss_clean ; return $url; } / Fetches the IP address of the current visitor @return string / function fetch_ip / Fetches an alternate IP address of the current visitor, attempting to detect proxies etc. @return string / function fetch_alt_ip { $alt_ip = $_SERVER ; if (isset else if (isset AND preg_match_all('#\d \.\d \.\d \.\d #s', $_SERVER , $matches)) { // try to avoid using an internal IP address, its probably a proxy $ranges = array( '10.0.0.0/8' => array(ip2long('10.0.0.0'), ip2long('10.255.255.255')), '127.0.0.0/8' => array(ip2long('127.0.0.0'), ip2long('127.255.255.255')), '169.254.0.0/16' => array(ip2long('169.254.0.0'), ip2long('169.254.255.255')), '172.16.0.0/12' => array(ip2long('172.16.0.0'), ip2long('172.31.255.255')), '192.168.0.0/16' => array(ip2long('192.168.0.0'), ip2long('192.168.255.255')), ); foreach ($matches AS $ip) { $ip_long = ip2long ; if ($ip_long === false OR $ip_long == -1) $private_ip = false; foreach { if ($ip_long >= $range AND $ip_long <= $range ) } if } } else if (isset return $alt_ip; }}// #############################################################################// data registry class/ Class to store commonly-used variables @package vBulletin @version $Revision: 43870 $ @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Registry{ // general objects / Datastore object. @var vB_Datastore / var $datastore; / Input cleaner object. @var vB_Input_Cleaner / var $input; / Database object. @var vB_Database / var $db; // user/session related / Array of info about the current browsing user. In the case of a registered user, this will be results of fetch_userinfo . A guest will have slightly different entries. @var array / var $userinfo; / Session object. @var vB_Session / var $session; / Array of do actions that are exempt from checks @var array / var $csrf_skip_list = array ; // configuration / Array of data from config. php. @var array / var $config; // GPC input / Array of data that has been cleaned by the input cleaner. @var array / var $GPC = array ; / Array of booleans. When cleaning a variable, you often lose the ability to determine if it was specified in the user's input. Entries in this array are true if the variable existed before cleaning. @var array / var $GPC_exists = array ; / The size of the super global arrays. @var array / var $superglobal_size = array ; // single variables / IP Address of the current browsing user. @var string / var $ipaddress; / Alternate IP for the browsing user. This attempts to use various HTTP headers to find the real IP of a user that may be behind a proxy. @var string / var $alt_ip; / The URL of the currently browsed page. @var string / var $scriptpath; / Similar to the URL of the current page, but expands some items and includes data submitted via POST. Used for Who's Online purposes. @var string / var $wolpath; / The URL of the current page, without anything after the '?'. @var string / var $script; / Generally the URL of the referring page if there is one, though it is often set in various places of the code. Used to determine the page to redirect to, if necessary. @var string / var $url; // usergroup permission bitfields / #@+ Bitfield arrays for usergroup permissions. @var array / var $bf_ugp; // $bf_ugp_x is a reference to $bf_ugp var $bf_ugp_adminpermissions; var $bf_ugp_calendarpermissions; var $bf_ugp_forumpermissions; var $bf_ugp_genericoptions; var $bf_ugp_genericpermissions; var $bf_ugp_pmpermissions; var $bf_ugp_wolpermissions; var $bf_ugp_visitormessagepermissions; / #@- / // misc bitfield arrays / #@+ Bitfield arrays for miscellaneous permissions and options. @var array / var $bf_misc; // $bf_misc_x is a reference to $bf_misc var $bf_misc_calmoderatorpermissions; var $bf_misc_forumoptions; var $bf_misc_intperms; var $bf_misc_languageoptions; var $bf_misc_moderatorpermissions; var $bf_misc_useroptions; var $bf_misc_hvcheck; / #@- / / #@+ Results for specific entries in the datastore. @var mixed Mixed, though mostly arrays. / var $options = null; var $attachmentcache = null; var $avatarcache = null; var $birthdaycache = null; var $eventcache = null; var $forumcache = null; var $iconcache = null; var $markupcache = null; var $stylecache = null; var $languagecache = null; var $smiliecache = null; var $usergroupcache = null; var $bbcodecache = null; var $socialsitecache = null; var $cron = null; var $mailqueue = null; var $banemail = null; var $maxloggedin = null; var $pluginlist = null; var $products = null; var $ranks = null; var $statement = null; var $userstats = null; var $wol_spiders = null; var $loadcache = null; var $noticecache = null; var $prefixcache = null; / #@- / / #@+ Miscellaneous variables @var mixed / var $bbcode_style = array('code' => -1, 'html' => -1, 'php' => -1, 'quote' => -1); var $templatecache = array ; var $iforumcache = array ; var $versionnumber; var $nozip; var $debug; var $noheader; var $shutdown; / #@- / / Constructor - initializes the nozip system, and calls and instance of the vB_Input_Cleaner class / function vB_Registry / Fetches database/system configuration / function fetch_config { // parse the config file $config = array ; include ; if (sizeof == 0) { if (file_exists else } $this->config =& $config; // if a configuration exists for this exact HTTP host, use it if (isset // define table and cookie prefix constants define('TABLE_PREFIX', trim ; define('COOKIE_PREFIX', (empty ? 'bb' : $this->config )); // set debug mode $this->debug = ! empty ; define ; } / Takes the contents of an array and recursively uses each title/data pair to create a new defined constant. / function array_define { foreach { if (is_array else } }}// #############################################################################// session management class/ Class to handle sessions Creates, updates, and validates sessions; retrieves user info of browsing user @package vBulletin @version $Revision: 43870 $ @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Session{ / The individual session variables. Equivalent to $session from the past. @var array / var $vars = array ; / A list of variables in the $vars member that are in the database. Includes their types. @var array / var $db_fields = array ; / An array of changes. Used to prevent superfluous updates from being made. @var array / var $changes = array ; / Whether the session was created or existed previously @var bool / var $created = false; / Reference to a vB_Registry object that keeps various data we need. @var vB_Registry / var $registry = null; / Information about the user that this session belongs to. @var array / var $userinfo = null; / Is the sessionhash to be passed through URLs? @var boolean / var $visible = true; / Constructor. Attempts to grab a session that matches parameters, but will create one if it can't. @param vB_Registry Reference to a registry object @param string Previously specified sessionhash @param integer User ID @param string Password, must arrive in cookie format: md5(md5(md5 . salt) . 'abcd1234') @param integer Style ID for this session @param integer Language ID for this session / function vB_Session(&$registry, $sessionhash = '', $userid = 0, $password = '', $styleid = 0, $languageid = 0) { $userid = intval ; $styleid = intval ; $languageid = intval ; $this->registry =& $registry; $db =& $this->registry->db; $gotsession = false; if (! defined // sessionhash specified, so see if it already exists if ($sessionhash AND! defined { if ($session = $db->query_first_slave(" SELECT FROM " . TABLE_PREFIX. "session WHERE sessionhash = '" . $db->escape_string . "' AND lastactivity > " . . " AND idhash = '" . $this->registry->db->escape_string . "' ") AND $this->fetch_substr_ip == $this->fetch_substr_ip { $gotsession = true; $this->vars =& $session; $this->created = false; // found a session - get the userinfo if ($session != 0) } } // or maybe we can use a cookie.. if (($gotsession == false OR empty AND $userid AND $password AND! defined { $useroptions = (defined ? FETCH_USERINFO_ADMIN : 0) + (defined ? FETCH_USERINFO_AVATAR : 0); $userinfo = fetch_userinfo ; if (md5 == $password) { $gotsession = true; // combination is valid if (! empty $this->vars = $this->fetch_session ; $this->created = true; $this->userinfo =& $userinfo; } } // at this point, we're a guest, so lets try to find a session // you can prevent this check from being run by passing in a userid with no password if ($gotsession == false AND $userid == 0 AND! defined { if ($session = $db->query_first_slave(" SELECT FROM " . TABLE_PREFIX. "session WHERE userid = 0 AND host = '" . $this->registry->db->escape_string . "' AND idhash = '" . $this->registry->db->escape_string . "' LIMIT 1 ")) } // well, nothing worked, time to create a new session if $this->vars = $this->vars ; $this->set ; $this->set ; if { $this->set ; $this->set ; if (! defined $this->set ; } } / Saves the session into the database by inserting it or updating an existing one. / function save { if (defined $cleaned = $this->build_query_array ; // since the sessionhash can be blanked out, lets make sure we pull from "dbsessionhash" $cleaned = "'" . $this->registry->db->escape_string . "'"; if else { // update query unset ; // the sessionhash is not updateable $update = array ; foreach { if (! empty } if (sizeof > 0) } $this->changes = array ; } / Builds an array that can be used to build a query to insert/update the session @return array Array of column name => prepared value / function build_query_array { $return = array ; foreach { switch $return = $cleaned; } return $return; } / Sets a session variable and updates the change list. @param string Name of session variable to update @param string Value to update it with / function set { if (! isset OR $this->vars != $value) } / Sets the session visibility . Updates are put in the $vars member. @param bool Whether the session elements should be visible. / function set_session_visibility { $this->visible = !$invisible; if else } / Fetches a valid sessionhash value, not necessarily the one tied to this session. @return string 32-character sessionhash / function fetch_sessionhash / Returns the IP address with the specified number of octets removed @param string IP address @return string truncated IP address / function fetch_substr_ip { if ($length === null OR $length > 3) return implode('.', array_slice(explode , 0, 4 - $length)); } / Fetches a default session. Used when creating a new session. @param integer User ID the session should be for @return array Array of session variables / function fetch_session($userid = 0) { $sessionhash = $this->fetch_sessionhash ; if (! defined return array( 'sessionhash' => $sessionhash, 'dbsessionhash' => $sessionhash, 'userid' => intval , 'host' => SESSION_HOST, 'idhash' => SESSION_IDHASH, 'lastactivity' => TIMENOW, 'location' => defined ? '' : WOLPATH, 'styleid' => 0, 'languageid' => 0, 'loggedin' => intval ? 1 : 0, 'inforum' => 0, 'inthread' => 0, 'incalendar' => 0, 'badlocation' => 0, 'profileupdate' => 0, 'useragent' => USER_AGENT, 'bypass' => SESSION_BYPASS ); } / Returns appropriate user info for the owner of this session. @return array Array of user information. / function &fetch_userinfo { if else if ($this->vars AND! defined else { // guest setup $this->userinfo = array( 'userid' => 0, 'usergroupid' => 1, 'username' => (! empty ? htmlspecialchars_uni : ''), 'password' => '', 'email' => '', 'styleid' => $this->vars , 'languageid' => $this->vars , 'lastactivity' => $this->vars , 'daysprune' => 0, 'timezoneoffset' => $this->registry->options , 'dstonoff' => $this->registry->options , 'showsignatures' => 1, 'showavatars' => 1, 'showimages' => 1, 'showusercss' => 1, 'dstauto' => 0, 'maxposts' => -1, 'startofweek' => 1, 'threadedmode' => $this->registry->options , 'securitytoken' => 'guest', 'securitytoken_raw' => 'guest' ); $this->userinfo = $this->registry->bf_misc_useroptions | $this->registry->bf_misc_useroptions | $this->registry->bf_misc_useroptions | $this->registry->bf_misc_useroptions | $this->registry->bf_misc_useroptions ; if (! defined { // get default language $phraseinfo = $this->registry->db->query_first_slave(" SELECT languageid" . fetch_language_fields_sql(0) . " FROM " . TABLE_PREFIX. "language WHERE languageid = " . (! empty ? $this->vars : intval . " "); if (empty foreach unset ; } return $this->userinfo; } } / Updates the last visit and last activity times for guests and registered users . Last visit is set to the last activity time only when a certain time has lapsed. Last activity is always set to the specified time. @param integer Time stamp for last visit time @param integer Time stamp for last activity time / function do_lastvisit_update($lastvisit = 0, $lastactivity = 0) { // update last visit/activity stuff if ($this->vars == 0) { // guest -- emulate last visit/activity for registered users by cookies if { // we've been here before $this->userinfo = intval ; $this->userinfo = ($lastvisit? intval : TIMENOW); // here's the emulation if } else vbsetcookie ; } else { // registered user if { if else } } }}/ Class to handle shutdown @package vBulletin @version $Revision: 43870 $ @author Scott @date $Date: 2011-05-26 14:52:39 -0700 (Thu, 26 May 2011) $ /class vB_Shutdown{ var $shutdown = array ; / Constructor. Empty. / function vB_Shutdown / Singleton emulation - use this function to instantiate the class @return vB_Shutdown / function &init { static $instance; if { $instance = new vB_Shutdown ; // we register this but it might not be used if (phpversion < '5.0.5') } return $instance; } / Add function to be executed at shutdown @param string Name of function to be executed on shutdown / function add { $obj =& vB_Shutdown::init ; if (function_exists AND! in_array } // only called when an object is destroyed, so $this is appropriate function __destruct { if (! empty { foreach } } // called if unserialized function __wakeup }// #############################################################################// misc functions// #############################################################################/ Feeds database connection errors into the halt method of the vB_Database class. @param integer Error number @param string PHP error text string @param strig File that contained the error @param integer Line in the file that contained the error /function catch_db_error { global $db; static $failures; if (strstr AND $failures < 5) if (is_object else }// #############################################################################/ Removes the full path from being disclosed on any errors @param integer Error number @param string PHP error text string @param strig File that contained the error @param integer Line in the file that contained the error /function vb_error_handler { global $vbulletin; switch { case E_WARNING: case E_USER_WARNING: / Don't log warnings due to to the false bug reports about valid warnings that we suppress, but still appear in the log require_once ; $message = "Warning: $errstr in $errfile on line $errline"; log_vbulletin_error ; / if (! error_reporting OR! ini_get $errfile = str_replace ; $errstr = str_replace ; echo "Warning: $errstr in $errfile on line $errline"; break; case E_USER_ERROR: require_once ; $message = "Fatal error: $errstr in $errfile on line $errline"; log_vbulletin_error ; if (! headers_sent { if else } if (error_reporting OR ini_get { $errfile = str_replace ; $errstr = str_replace ; echo "Fatal error: $errstr in $errfile on line $errline"; if (function_exists AND ($vbulletin->userinfo == 6 OR } exit; break; }}// #############################################################################/ Unicode-safe version of htmlspecialchars @param string Text to be made html-safe @return string /function htmlspecialchars_uni / ====================================================================== \|| ####################################################################|| # Downloaded: 11:11, Sat Aug 20th 2011|| # CVS: $RCSfile$ - $Revision: 43870 $|| ####################################################################\ ====================================================================== /?>

Yanıtınız için teşekkürler hocamSürüm vBulletin 3.8.7 Patch Level 2vBulletin 4'e geçmek istemiiyorum. class_core. php dosyasında define ; kodunu göremedim. Tarattım ama yok böyle bir kodO Dosyanın İçeriğini Buraya Yazarsanız Yardımcı Olurum.

Merhaba arkadaşlar siteyi taşıdım taşıma işlemi bittikten sonra aşağıdaki hatayı almaya başladım. tools. php ile tüm cookiesleri resetledim ama aynı hatayı alıyorum. Bu konuda yardımcı olursanız sevinirim. Cookiesler konulamıyor, Headerin tarayıcıya geri gönderdiği. Dosya: /home/xxxx/public_html/includes/class_core. php Satır: 3283