#!/usr/bin/perl

#use utf8;
use strict;
use CGI;
use Opals::Context;
use Opals::Locale qw(
    loc_getMsgFile
    loc_write
);
use HTML::Template;

my $cgi = CGI->new;
    my $rootDir   = Opals::Context->config('rootDir');
    my $template = _getTemplate("/htdocs/theme/opals/ebook/","eob.tmpl");

 print $cgi->header(
        -type    => 'text/html',
        -expires => 'now',
        -charset => 'utf-8',
    ), $template->output;

#=======================================================
sub _getTemplate{
    my($path,$fname)=@_;
    my $rootDir   = Opals::Context->config('rootDir');
    my $template = HTML::Template->new(    
                filename            => $fname ,
                path                => "$rootDir/$path",
                global_vars         => 1,
                die_on_bad_params   => 0,
                cache               => 1,
                shared_cache        => 0,
                loop_context_vars   => 1);
    $template->param(http_host=>$ENV{'HTTP_HOST'});
    return $template;    
}

