#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use v5.10;
use CGI;
use XML::Simple;
use Data::Dumper;
use Net::Http::Useragent;
# global config section - probably should go into a config file
my $tnw = 100;
my $tnh = 100;
my $prew = 800;
my $preh = 800;
# end of global config section
my $q = CGI->new();
if ($q->param('i')) {
show_image($q);
} elsif ($q->param('p')) {
show_page($q);
} else {
show_index($q);
}
sub show_index {
my ($q) = @_;
my $navigation = get_navigation();
print "Content-Type: text/html; charset=UTF-8\n";
print "\n";
binmode STDOUT, "encoding(UTF-8)";
pi(qq{
|
|$navigation->{h1}
|