]>
git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_arcview.pl
3 ################################################################################
5 # File: user/fo_arcview.pl #
7 # Authors: Frank Schönmann <fs@tower.de> #
9 # Description: archive browser #
11 ################################################################################
22 my $null = $0; $null =~ s/\\/\//g
; # for win :-(
23 $Bin = ($null =~ /^(.*)\/.*$/)?
$1 : '.';
24 $Shared = "$Bin/../../cgi-shared";
25 $Config = "$Bin/../../cgi-config/forum";
26 $Script = ($null =~ /^.*\/(.*)$/)?
$1 : $null;
29 # $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
30 # $Config = "$Bin/../../daten/forum/config";
31 # $Shared = "$Bin/../../cgi-shared";
32 # $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
35 # setting umask, remove or comment it, if you don't need
40 use CGI
::Carp
qw(fatalsToBrowser);
44 use Template
::Archive
qw(
45 print_overview_as_HTML
51 use CGI
qw(param header path_info);
53 ################################################################################
61 sub VERSION
{(q
$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'}
63 print header
(-type
=> 'text/html');
65 my $conf = read_script_conf
($Config, $Shared, $Script);
66 my $show = $conf->{'show'};
67 my $cgi = $show->{'assign'}->{'cgi'};
68 my $show_archive = $show->{'Archive'};
69 my $adminDefault = read_admin_conf
($conf->{'files'}->{'adminDefault'});
71 my ($year, $month, $tid, $mid);
73 # tid is thread id, mid is not used yet
74 if (my $path_info = path_info
()) {
75 (undef, $year, $month, $tid, $mid) = split "/", $path_info;
77 ($year, $month, $tid, $mid) =
78 (param
($cgi->{'year'}), param
($cgi->{'month'}), param
($cgi->{'thread'}), param
($cgi->{'posting'}));
85 # print_msg_as_HTML();
88 $conf->{'files'}->{'archivePath'} . $year .'/'. $month .'/t'. $tid . '.xml',
89 $show_archive->{'templateFile'},
91 'assign' => $show_archive->{'assign'},
92 'adminDefault' => $adminDefault,
98 'tree' => $show->{'assign'}->{'thread'}
105 $conf->{'files'}->{'archivePath'} . $year . '/' . $month . '/' . $conf->{'files'}->{'archiveIndex'},
106 $show_archive->{'templateFile'},
108 'assign' => $show_archive->{'assign'},
116 $conf->{'files'}->{'archivePath'} . $year . '/',
117 $show_archive->{'templateFile'},
119 'assign' => $show_archive->{'assign'},
125 print_overview_as_HTML
(
126 $conf->{'files'}->{'archivePath'},
127 $show_archive->{'templateFile'},
129 'assign' => $show_archive->{'assign'}
136 ### end of fo_view.pl ##########################################################
patrick-canterino.de