Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/includes Added Files: functions_admincp.php functions_core.php functions_required.php functions_styles.php functions_tools.php mx_constants.php Log Message: upgrade --- NEW FILE: functions_admincp.php --- <?php /** * * @package mx_mod * @version $Id: functions_admincp.php,v 1.1 2008/09/18 07:43:28 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } function mx_do_install_upgrade( $sql = '', $main_install = false ) { global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; $inst_error = false; $n = 0; $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; while ( $sql[$n] ) { if ( !$result = @$db->sql_query( $sql[$n] ) ) { $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; $inst_error = true; } else { $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; } $n++; } $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating mods'; return $message; } // THE END ?> --- NEW FILE: functions_styles.php --- <?php /** * * @package mx_mod * @version $Id: functions_styles.php,v 1.1 2008/09/18 07:43:29 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } /** * Class: mx_Template from mx_functions_style.php * [...1580 lines suppressed...] function set_module_cfg_name($module_cfg_name = '') { //global $mx_block; global $module_root_path; //$this->loaded_default_styles[$mx_block->module_root_path] = $default_module_style; $this->module_cfg_name[$module_root_path] = $module_cfg_name; } function set_module_lang_path($module_lang_path = '') { //global $mx_block; global $module_root_path; //$this->loaded_default_styles[$mx_block->module_root_path] = $default_module_style; $this->module_lang_path[$module_root_path] = $module_lang_path; } } // class mx_user // THE END ?> --- NEW FILE: functions_required.php --- <?php /** * * @package mx_mod * @version $Id: functions_required.php,v 1.1 2008/09/18 07:43:29 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } if(!function_exists('mx_message_die')) { [...1552 lines suppressed...] { $mxurl = ( $file == '' ? "./" : $file . '/' ) . ( $args == '' ? '' : '?' . $args ); } else { $mxurl = $mx_root_path . 'index.' . $phpEx; if( is_numeric($page_id) ) { $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : '&' . $args ); } else { $mxurl = "./" . ( $args == '' ? '' : '?' . $args ); } } return $mxurl; } } // THE END ?> --- NEW FILE: mx_constants.php --- <?php /** * * @package Constants * @version $Id: mx_constants.php,v 1.1 2008/09/18 07:43:30 orynider Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ if ( !defined('IN_PORTAL') ) { die("Hacking attempt"); } // User Levels <- this values are for compatiblility with mxBB 2.8.x and phpBB2 // Revove them when mxBB is fixed !defined('DELETED') ? define('DELETED', -1) : false; !defined('USER') ? define('USER', 0) : false; !defined('ADMIN') ? define('ADMIN', 1) : false; !defined('MOD') ? define('MOD', 2) : false; // User Levels <- this values are for compatiblility with mxBB 2.8.x and phpBB2 // URL PARAMETERS !defined('POST_TOPIC_URL') ? define('POST_TOPIC_URL', 't') : false; !defined('POST_CAT_URL') ? define('POST_CAT_URL', 'c') : false; !defined('POST_FORUM_URL') ? define('POST_FORUM_URL', 'f') : false; !defined('POST_USERS_URL') ? define('POST_USERS_URL', 'u') : false; !defined('POST_POST_URL') ? define('POST_POST_URL', 'p') : false; !defined('POST_GROUPS_URL') ? define('POST_GROUPS_URL', 'g') : false; // Page numbers for session handling !defined('PAGE_INDEX') ? define('PAGE_INDEX', 0) : false; !defined('PAGE_LOGIN') ? define('PAGE_LOGIN', -1) : false; !defined('PAGE_SEARCH') ? define('PAGE_SEARCH', -2) : false; !defined('PAGE_REGISTER') ? define('PAGE_REGISTER', -3) : false; !defined('PAGE_PROFILE') ? define('PAGE_PROFILE', -4) : false; !defined('PAGE_VIEWONLINE') ? define('PAGE_VIEWONLINE', -6) : false; !defined('PAGE_VIEWMEMBERS') ? define('PAGE_VIEWMEMBERS', -7) : false; !defined('PAGE_FAQ') ? define('PAGE_FAQ', -8) : false; !defined('PAGE_POSTING') ? define('PAGE_POSTING', -9) : false; !defined('PAGE_PRIVMSGS') ? define('PAGE_PRIVMSGS', -10) : false; !defined('PAGE_GROUPCP') ? define('PAGE_GROUPCP', -11) : false; !defined('PAGE_TOPIC_OFFSET') ? define('PAGE_TOPIC_OFFSET', 5000) : false; // Auth settings (blockCP) !defined('AUTH_LIST_ALL') ? define('AUTH_LIST_ALL', 0) : false; !defined('AUTH_ALL') ? define('AUTH_ALL', 0) : false; !defined('AUTH_REG') ? define('AUTH_REG', 1) : false; !defined('AUTH_ACL') ? define('AUTH_ACL', 2) : false; !defined('AUTH_MOD') ? define('AUTH_MOD', 3) : false; !defined('AUTH_ADMIN') ? define('AUTH_ADMIN', 5) : false; !defined('AUTH_ANONYMOUS') ? define('AUTH_ANONYMOUS', 9) : false; !defined('AUTH_VIEW') ? define('AUTH_VIEW', 1) : false; !defined('AUTH_READ') ? define('AUTH_READ', 2) : false; !defined('AUTH_POST') ? define('AUTH_POST', 3) : false; !defined('AUTH_REPLY') ? define('AUTH_REPLY', 4) : false; !defined('AUTH_EDIT') ? define('AUTH_EDIT', 5) : false; !defined('AUTH_DELETE') ? define('AUTH_DELETE', 6) : false; !defined('AUTH_ANNOUNCE') ? define('AUTH_ANNOUNCE', 7) : false; !defined('AUTH_STICKY') ? define('AUTH_STICKY', 8) : false; !defined('AUTH_POLLCREATE') ? define('AUTH_POLLCREATE', 9) : false; !defined('AUTH_VOTE') ? define('AUTH_VOTE', 10) : false; !defined('AUTH_ATTACH') ? define('AUTH_ATTACH', 11) : false; /** * ViewOnline extension for MX-Publisher Pages * @access private */ define('MX_PORTAL_PAGES_OFFSET', 1000); $mx_table_prefix = $table_prefix; @define('MX_CONFIG_TABLE', $table_prefix . 'mx_config'); /**#@+ * MX-Publisher Core table names * @access public */ @define('PORTAL_TABLE', $table_prefix . 'mx_config'); //Modifyed for mx_mod /* define('MENU_NAV_TABLE', $mx_table_prefix . 'menu_nav'); define('MENU_CAT_TABLE', $mx_table_prefix . 'menu_categories'); define('MODULE_TABLE', $mx_table_prefix . 'module'); define('FUNCTION_TABLE', $mx_table_prefix . 'function'); define('PARAMETER_TABLE', $mx_table_prefix . 'parameter'); define('PARAMETER_OPTION_TABLE', $mx_table_prefix . 'parameter_option'); define('PAGE_TABLE' , $mx_table_prefix . 'page'); define('COLUMN_TABLE' , $mx_table_prefix . 'column'); define('COLUMN_BLOCK_TABLE', $mx_table_prefix . 'column_block'); define('BLOCK_TABLE', $mx_table_prefix . 'block'); define('BLOCK_SYSTEM_PARAMETER_TABLE', $mx_table_prefix . 'block_system_parameter'); define('BLOCK_USER_PARAMETER_TABLE', $mx_table_prefix . 'block_user_parameter'); define('COLUMN_TEMPLATES' , $mx_table_prefix . 'column_templates'); define('PAGE_TEMPLATES' , $mx_table_prefix . 'page_templates'); define('MX_THEMES_TABLE', $mx_table_prefix.'themes'); define('MX_MATCH_TABLE' , $mx_table_prefix . 'wordmatch'); define('MX_WORD_TABLE' , $mx_table_prefix . 'wordlist'); define('MX_SEARCH_TABLE' , $mx_table_prefix . 'search_results'); */ /**#@-*/ /** * Sick and tired of these variables getting lost... */ $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); $html_entities_replace = array('&', '<', '>', '"'); $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); $unhtml_specialchars_replace = array('>', '<', '"', '&'); ?> --- NEW FILE: functions_tools.php --- <?php /** * * @package mx_mod * @version $Id: functions_tools.php,v 1.15.2.6 2008/02/18 20:20:08 jonohlsson Exp * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // // This 'include' is needed for the mx_text class // [...4373 lines suppressed...] echo '<b>Value</b>: '; if (is_string($var)) { echo htmlspecialchars($var); } else { $print_r = print_r($var, true); // str_contains < or > if ((strstr($print_r, '<') !== false) || (strstr($print_r, '>') !== false)) { $print_r = htmlspecialchars($print_r); } echo $print_r; } echo '</pre>'; exit; } } ?> --- NEW FILE: functions_core.php --- <?php /** * * @package mx_mod * @version $Id: functions_core.php,v 1.1 2008/09/18 07:43:28 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PORTAL') ) { die("Hacking attempt"); } //@define('MX_CONFIG_TABLE', $table_prefix . 'mx_config'); /**#@+ [...3308 lines suppressed...] global $HTTP_GET_VARS; return empty($HTTP_GET_VARS[$var]) ? 1 : 0 ; } /** * Is REQUEST empty (GET and POST) var? * * Boolean method to check if REQUEST (both) variable is empty. * * @access public * @param string $var * @return boolean */ function is_empty_request($var) { return ($this->is_empty_get($var) && $this->is_empty_post($var)) ? 1 : 0; } } // class mx_request_vars ?> |