Пример #1
0
 * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 * @author blueyed: Daniel HAHLER
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
load_funcs('plugins/_plugin.funcs.php');
load_funcs('tools/model/_dbmaintenance.funcs.php');
load_funcs('tools/model/_tool.funcs.php');
load_funcs('tools/model/_system.funcs.php');
// load item class
load_class('items/model/_item.class.php', 'Item');
if ($current_User->check_perm('options', 'edit') && ($action != 'utf8check' && $action != 'utf8upgrade') && system_check_charset_update()) {
    // DB charset is required to update
    $Messages->add(sprintf(T_('WARNING: Some of your tables have different charsets/collations than the expected. It is strongly recommended to upgrade your database charset by running the tool <a %s>Check/Convert/Normalize the charsets/collations used by the DB (UTF-8 / ASCII)</a>.'), 'href="' . $admin_url . '?ctrl=tools&amp;action=utf8check&amp;' . url_crumb('tools') . '"'));
}
param('tab', 'string', '', true);
param('tab3', 'string', 'tools', true);
$tab_Plugin = NULL;
$tab_plugin_ID = false;
if (!empty($tab)) {
    // We have requested a tab which is handled by a plugin:
    if (preg_match('~^plug_ID_(\\d+)$~', $tab, $match)) {
        // Instanciate the invoked plugin:
        $tab_plugin_ID = $match[1];
        $tab_Plugin =& $Plugins->get_by_ID($match[1]);
        if (!$tab_Plugin) {
            // Plugin does not exist
Пример #2
0
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 * Parts of this file are copyright (c)2006 by Daniel HAHLER - {@link http://daniel.hahler.de/}.
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
load_funcs('tools/model/_system.funcs.php');
// Check minimum permission:
$current_User->check_perm('options', 'view', true);
if ($current_User->check_perm('options', 'edit') && system_check_charset_update()) {
    // DB charset is required to update
    $Messages->add(sprintf(T_('WARNING: Some of your tables have different charsets/collations than the expected. It is strongly recommended to upgrade your database charset by running the tool <a %s>Check/Convert/Normalize the charsets/collations used by the DB (UTF-8 / ASCII)</a>.'), 'href="' . $admin_url . '?ctrl=tools&amp;action=utf8check&amp;' . url_crumb('tools') . '"'));
}
$AdminUI->set_path('options', 'system');
$AdminUI->breadcrumbpath_init(false);
// fp> I'm playing with the idea of keeping the current blog in the path here...
$AdminUI->breadcrumbpath_add(T_('System'), $admin_url . '?ctrl=system');
$AdminUI->breadcrumbpath_add(T_('Status'), $admin_url . '?ctrl=system');
// Set an url for manual page:
$AdminUI->set_page_manual_link('system-status-tab');
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
// Begin payload block:
Пример #3
0
        ?>
</h1>

		<?php 
        $old_db_version = get_db_version();
        $require_charset_update = false;
        if (!is_null($old_db_version)) {
            $expected_connection_charset = $DB->php_to_mysql_charmap($evo_charset);
            if ($DB->connection_charset != $expected_connection_charset) {
                display_install_messages(sprintf(T_('In order to install b2evolution with the %s locale, your MySQL needs to support the %s connection charset.') . ' (mysqli::set_charset(%s))', $current_locale, $evo_charset, $expected_connection_charset));
                // sam2kb> TODO: If something is not supported we can display a message saying "do this and that, enable extension X etc. etc... or switch to a better hosting".
                break;
            } else {
                // Check if some of the tables have different charset than what we expect
                load_funcs('tools/model/_system.funcs.php');
                if (system_check_charset_update()) {
                    if (!is_null($old_db_version) && $old_db_version < $new_db_version) {
                        // DB is not updagraded to new version yet, We should not suggest to normalize DB to avoid errors
                        display_install_messages(sprintf(T_('WARNING: Some of your tables have a different charset than the expected %s. You should normalize your database after upgrade.'), utf8_strtoupper($evo_charset)), 'warning');
                    } else {
                        // DB is already upgraded to last version, Siggest to normalize DB
                        $require_charset_update = true;
                        display_install_messages(sprintf(T_('WARNING: Some of your tables have a different charset than the expected %s. It is strongly recommended to normalize your database charset by running the preselected task below:'), utf8_strtoupper($evo_charset)));
                    }
                }
            }
        }
        ?>

		<form action="index.php" method="get" class="evo_form__install">
			<input type="hidden" name="locale" value="<?php