diff --git a/public_html/admin/logviewer.php b/public_html/admin/logviewer.php index 64fff8848..b69d00272 100644 --- a/public_html/admin/logviewer.php +++ b/public_html/admin/logviewer.php @@ -67,34 +67,24 @@ $LANG_LOGVIEW['info'], $_CONF['layout_url'] . '/images/icons/log_viewer.' . $_IMAGE_TYPE ); + + +$T = new Template($_CONF['path_layout'] . 'admin'); +$T->set_file('page','logviewer.thtml'); -$display .= '
'; +$T->set_var('lang_log_view', $LANG_LOGVIEW['view']); +$T->set_var('lang_log_clear', $LANG_LOGVIEW['clear']); +$T->set_var('lang_confirm_del_message', $MESSAGE[76]); if (isset($_POST['clearlog'])) { if (@unlink($_CONF['path_log'] . $log)) { @@ -104,14 +94,15 @@ } } if (isset($_POST['viewlog'])) { - $display .= '' . $LANG_LOGVIEW['log_file'] . ': ' . $log . '
' - . '' - . '' - . htmlentities(file_get_contents($_CONF['path_log'] . $log), ENT_NOQUOTES, COM_getEncodingt()) - . ''; + $T->set_var('lang_log_file', $LANG_LOGVIEW['log_file']); + $T->set_var('log_filename', $log); + $T->set_var('log_contents', htmlentities(file_get_contents($_CONF['path_log'] . $log), ENT_NOQUOTES, COM_getEncodingt())); } +$T->parse('output', 'page'); +$display .= $T->finish($T->get_var('output')); $display .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); + $output = COM_createHTMLDocument($display, array('pagetitle' => $LANG_LOGVIEW['log_viewer'])); header('Content-Type: text/html; charset=' . COM_getEncodingt()); header('X-XSS-Protection: 1; mode=block'); diff --git a/public_html/layout/denim/admin/logviewer.thtml b/public_html/layout/denim/admin/logviewer.thtml new file mode 100644 index 000000000..fa33bf324 --- /dev/null +++ b/public_html/layout/denim/admin/logviewer.thtml @@ -0,0 +1,21 @@ +{# begin {templatelocation} #} + + + +{# end {templatelocation} #} \ No newline at end of file diff --git a/public_html/layout/denim_three/admin/logviewer.thtml b/public_html/layout/denim_three/admin/logviewer.thtml new file mode 100644 index 000000000..51ee1969e --- /dev/null +++ b/public_html/layout/denim_three/admin/logviewer.thtml @@ -0,0 +1,21 @@ +{# begin {templatelocation} #} + + + +{# end {templatelocation} #} \ No newline at end of file diff --git a/public_html/layout/modern_curve/admin/logviewer.thtml b/public_html/layout/modern_curve/admin/logviewer.thtml new file mode 100644 index 000000000..7fe89723b --- /dev/null +++ b/public_html/layout/modern_curve/admin/logviewer.thtml @@ -0,0 +1,21 @@ +{# begin {templatelocation} #} + + + +{# end {templatelocation} #} \ No newline at end of file