return $aux_parms;
}
+sub print_navbar {
+ my ($cgi, $dbh, $locale) = @_;
+ my $url = $cgi->url(-relative => 1);
+
+ print "<p style=\"font-size: smaller;\">";
+
+ my $q = $dbh->prepare('SELECT spraak, kultur FROM fotballspraak WHERE nyestesesong <> -1 ORDER BY id');
+ $q->execute;
+
+ my $first = 1;
+ while (my $ref = $q->fetchrow_hashref) {
+ if (!$first) {
+ print " :: ";
+ }
+ $first = 0;
+
+ if ($ref->{'kultur'} eq $locale) {
+ printf "%s ", $ref->{'spraak'};
+ } else {
+ printf "<a href=\"/%s/%s\">%s</a> ", $ref->{'kultur'}, $url, $ref->{'spraak'};
+ }
+ }
+ print "</p>\n";
+}
+
1;
my $cov = get_covariance_matrix($dbh, keys %players);
print_header($cgi, 'WLoH-plasseringsannsynlighetsberegning');
+wloh_common::print_navbar($cgi, $dbh, $locale);
if (defined($match_player) && defined($match_position)) {
my $tmpnam = write_parms_to_file($aux_parms, $match_stddev, \%ratings, $cov);
print CGI->header(-type=>'text/html; charset=utf-8', -expires=>'+5m');
POSIX::setlocale(&POSIX::LC_ALL, 'nb_NO.UTF-8');
-printf <<"EOF", $aux_parms->{'rating_prior_stddev'}, $match_stddev;
+print <<"EOF";
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
<link rel="stylesheet" href="style" type="text/css" />
</head>
<body>
+EOF
+
+wloh_common::print_navbar($cgi, $dbh, $locale);
+
+printf <<"EOF", $aux_parms->{'rating_prior_stddev'}, $match_stddev;
<h1>WLoH-rating</h1>
<p><em>Dette er et hobbyprosjekt fra tredjepart, og ikke en offisiell del av