', $context['error_title'], '
', $context['error_message'], '
'; else { echo '

', $context['error_title'], '

', $context['error_message'], '
'; // Show a back button echo '
', $txt['back'], '
'; } } /** * This template handles the error log in the admin center. */ function template_error_log() { global $scripturl, $context, $txt; echo '

', $txt['errorlog'], '

'; // No errors, so just show a message and be done with it. if (empty($context['errors'])) { echo ' ', $txt['errorlog_no_entries'], '
'; return; } echo '
', $txt['apply_filter_of_type'], ':'; $error_types = array(); foreach ($context['error_types'] as $type => $details) $error_types[] = ($details['is_selected'] ? ' ' : '') . '' . ($details['error_type'] === 'critical' ? '' . $details['label'] . '' : $details['label']) . ''; echo ' ', implode(' | ', $error_types), '
'; if ($context['has_filter']) echo '
', $txt['applying_filter'], ': ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' [', $txt['clear_filter'], ']
'; // We have some errors, must be some mods installed :P foreach ($context['errors'] as $error) { echo '
', $error['id'], '
', $error['time'], '

', $error['member']['link'], ''; if (!empty($error['member']['ip'])) echo '
', $error['member']['ip'], ''; if (!empty($error['member']['session'])) echo '
', $error['member']['session'], ''; echo '
', $error['url']['html'], ''; if (!empty($error['file'])) echo '
', $error['file']['file'], ' (', $txt['line'], ' ', $error['file']['line'], ')'; echo '

', $txt['error_type'], ': ', $error['error_type']['type'] === 'critical' ? '' . $error['error_type']['name'] . '' : $error['error_type']['name'], '
', $error['message']['html'], '
'; } echo '
'; if ($context['sort_direction'] == 'down') echo ' '; echo ' '; } /** * This template shows a snippet of code from a file and highlights which line caused the error. */ function template_show_file() { global $context, $settings, $modSettings; echo ' ', $context['file_data']['file'], ' '; foreach ($context['file_data']['contents'] as $index => $line) { $line_num = $index + $context['file_data']['min']; $is_target = $line_num == $context['file_data']['target']; echo ' '; } echo '
==>' : '">', $line_num, ': ', $line, '
'; } /** * This template handles showing attachment-related errors */ function template_attachment_errors() { global $context, $scripturl, $txt; echo '

', $context['error_title'], '

', $context['error_message'], '
'; if (!empty($context['back_link'])) echo ' ', $txt['back'], ''; echo ' ', $txt['continue'], '
'; } /** * This template shows a backtrace of the given error */ function template_show_backtrace() { global $context, $settings, $modSettings, $txt, $scripturl; echo ' ', $txt['backtrace_title'], ''; template_css(); echo ' '; if (!empty($context['error_info'])) { echo '

', $txt['error'], '

'; if (!empty($context['error_info']['error_type'])) echo ' '; if (!empty($context['error_info']['message'])) echo ' '; if (!empty($context['error_info']['file'])) echo ' '; if (!empty($context['error_info']['line'])) echo ' '; if (!empty($context['error_info']['url'])) echo ' '; echo '
', $txt['error_type'], '
', ucfirst($context['error_info']['error_type']), '
', $txt['error_message'], '
', $context['error_info']['message'], '
', $txt['error_file'], '
', $context['error_info']['file'], '
', $txt['error_line'], '
', $context['error_info']['line'], '
', $txt['error_url'], '
', $context['error_info']['url'], '
'; } if (!empty($context['error_info']['backtrace'])) { echo '

', $txt['backtrace_title'], '

    '; foreach ($context['error_info']['backtrace'] as $key => $value) { //Check for existing if (!property_exists($value, 'file') || empty($value->file)) $value->file = $txt['unknown']; if (!property_exists($value, 'line') || empty($value->line)) $value->line = -1; echo '
  • ', sprintf($txt['backtrace_info'], $key, $value->function, $value->file, $value->line, base64_encode($value->file), $scripturl), '
  • '; } echo '
'; } echo ' '; } ?>