summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ba0a80)
raw | patch | inline | side by side (parent: 9ba0a80)
author | Florian Forster <octo@huhu.verplant.org> | |
Sat, 19 May 2007 08:57:55 +0000 (10:57 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 19 May 2007 08:57:55 +0000 (10:57 +0200) |
contrib/collection.cgi | patch | blob | history |
diff --git a/contrib/collection.cgi b/contrib/collection.cgi
index 1666bdee4ca1997282345be0f18240e966775460..9fd504cdeac9434bf500cb923daccd00a9727c5b 100755 (executable)
--- a/contrib/collection.cgi
+++ b/contrib/collection.cgi
my $instance_html = encode_entities ($instance);
my $instance_url = uri_escape ($instance);
- print qq# <div><a href="$url_prefix;type=$type_url;type_instance=$instance_url;type=$type_url;type_instance=$instance_url;action=show_type"><img src="$url_prefix;type=$type_url;type_instance=$instance_url;action=show_graph" /></a></div>\n#;
+ print qq# <div><a href="$url_prefix;type=$type_url;type_instance=$instance_url;action=show_type"><img src="$url_prefix;type=$type_url;type_instance=$instance_url;action=show_graph" /></a></div>\n#;
}
if (!@{$types{$type}})
{
- print qq# <div><img src="$url_prefix;type=$type_url;action=show_graph" /></div>\n#;
+ print qq# <div><a href="$url_prefix;type=$type_url;action=show_type"><img src="$url_prefix;type=$type_url;action=show_graph" /></a></div>\n#;
}
}
} # action_show_plugin
}
} # action_show_graph
+sub print_header
+{
+ print <<HEAD;
+Content-Type: application/xhtml+xml; charset=utf-8
+Cache-Control: no-cache
+
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>collection.cgi, Version 2</title>
+ <style type="text/css">
+ img
+ {
+ border: none;
+ }
+ </style>
+ </head>
+
+ <body>
+HEAD
+} # print_header
+
+sub print_footer
+{
+ print <<FOOT;
+ </body>
+</html>
+FOOT
+} # print_footer
+
sub main
{
read_config ();
return (0);
}
- print STDOUT header (-Content_Type => 'text/html');
- print STDOUT "<pre>", Data::Dumper->Dump ([$Args], ['Args']), "</pre>\n";
+ print_header ();
if (!$Args->{'host'})
{
$Args->{'type'}, $Args->{'type_instance'});
}
+ print_footer ();
+
return (0);
}