Beispiel #1
0
            break;
    }
}
/********************************************************************************
 *
 *   Set all HTML variables
 *
 *********************************************************************************/
$html->use_javascript(array('validatenumber', 'popup'));
// http charset / theme
$html->set_loop('http_charset_loop', array_to_template_loop($config['http_charsets'], $config['html']['http_charset']));
$html->set_loop('theme_loop', build_theme_loop(), $config['html']['theme']);
$html->set_loop('custom_css_loop', build_custom_css_loop(), $config['html']['custom_css']);
// locale settings
$html->set_loop('timezone_loop', array_to_template_loop($config['timezones'], $config['timezone']));
$html->set_loop('language_loop', array_to_template_loop($config['languages'], $config['language']));
// checkboxes
$html->set_variable('disable_updatelist', $config['startup']['disable_update_list'], 'boolean');
$html->set_variable('disable_help', $config['menu']['disable_help'], 'boolean');
$html->set_variable('disable_config', $config['menu']['disable_config'], 'boolean');
$html->set_variable('enable_debug_link', $config['menu']['enable_debug'], 'boolean');
$html->set_variable('disable_devices', $config['devices']['disable'], 'boolean');
$html->set_variable('disable_footprints', $config['footprints']['disable'], 'boolean');
$html->set_variable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
$html->set_variable('disable_labels', $config['menu']['disable_labels'], 'boolean');
$html->set_variable('disable_calculator', $config['menu']['disable_calculator'], 'boolean');
$html->set_variable('disable_iclogos', $config['menu']['disable_iclogos'], 'boolean');
$html->set_variable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
$html->set_variable('disable_tools_footprints', $config['menu']['disable_footprints'], 'boolean');
$html->set_variable('tools_footprints_autoload', $config['tools']['footprints']['autoload'], 'boolean');
$html->set_variable('developer_mode_available', file_exists(BASE . '/development'), 'boolean');
Beispiel #2
0
            }
        } catch (Exception $e) {
            $messages[] = array('text' => 'Es trat ein Fehler auf!', 'strong' => true, 'color' => 'red');
            $messages[] = array('text' => 'Fehlermeldung: ' . nl2br($e->getMessage()), 'color' => 'red');
        }
        $messages[count($messages) - 1]['text'] .= nl2br("\n");
        break;
}
/********************************************************************************
 *
 *   Set all HTML variables
 *
 *********************************************************************************/
$html->set_variable('is_online_demo', $config['is_online_demo'], 'boolean');
$html->set_loop('db_type_loop', array_to_template_loop($config['db_types'], $config['db']['type']));
$html->set_loop('db_charset_loop', array_to_template_loop($config['db_charsets'], $config['db']['charset']));
$html->set_variable('db_host', $config['db']['host'], 'string');
$html->set_variable('db_name', $config['db']['name'], 'string');
$html->set_variable('db_user', $config['db']['user'], 'string');
$html->set_variable('automatic_updates_enabled', $config['db']['auto_update'], 'boolean');
$html->set_variable('refresh_navigation_frame', isset($database_update_executed) && $database_update_executed, 'boolean');
if (!$fatal_error) {
    try {
        $current = $database->get_current_version();
        $latest = $database->get_latest_version();
        $html->set_variable('current_version', $current, 'integer');
        $html->set_variable('latest_version', $latest, 'integer');
        $html->set_variable('update_required', $latest > $current, 'boolean');
        $html->set_variable('last_update_failed', $config['db']['update_error']['version'] == $current, 'boolean');
        if ($current > 0 && $current < 13 && $latest >= 13) {
            $messages[] = array('text' => 'Achtung!<br><br>' . 'Das Datenbankupdate auf Version 13 ist sehr umfangreich, es finden sehr viele Veränderungen statt.<br>' . 'Es wird dringend empfohlen, vor dem Update eine Sicherung der Datenbank anzulegen, ' . 'damit diese im Fehlerfall wiederhergestellt, und so ein Datenverlust verhindert werden kann.<br>' . 'Die Entwickler von Part-DB übernehmen keinerlei Haftung für Schäden, die durch fehlgeschlagene Updates, ' . 'Fehler in der Software oder durch andere Ursachen hervorgerufen werden.', 'strong' => true, 'color' => 'red');