From bb7c797a7b7bc1a14f3760e9bab62d33c862c608 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 19 May 2007 10:57:55 +0200 Subject: [PATCH] contrib/collection.cgi: Print proper HTML-header. --- contrib/collection.cgi | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/contrib/collection.cgi b/contrib/collection.cgi index 1666bdee..9fd504cd 100755 --- a/contrib/collection.cgi +++ b/contrib/collection.cgi @@ -481,12 +481,12 @@ sub action_show_plugin my $instance_html = encode_entities ($instance); my $instance_url = uri_escape ($instance); - print qq#
\n#; + print qq#
\n#; } if (!@{$types{$type}}) { - print qq#
\n#; + print qq#
\n#; } } } # action_show_plugin @@ -554,6 +554,39 @@ sub action_show_graph } } # action_show_graph +sub print_header +{ + print < + + + + + collection.cgi, Version 2 + + + + +HEAD +} # print_header + +sub print_footer +{ + print < + +FOOT +} # print_footer + sub main { read_config (); @@ -572,8 +605,7 @@ sub main return (0); } - print STDOUT header (-Content_Type => 'text/html'); - print STDOUT "
", Data::Dumper->Dump ([$Args], ['Args']), "
\n"; + print_header (); if (!$Args->{'host'}) { @@ -595,6 +627,8 @@ sub main $Args->{'type'}, $Args->{'type_instance'}); } + print_footer (); + return (0); } -- 2.30.2