Still needs links to the help and write the help texts.
use PciIds::Html::Changes;
use PciIds::Html::Admin;
use PciIds::Html::Notifications;
use PciIds::Html::Changes;
use PciIds::Html::Admin;
use PciIds::Html::Notifications;
-use PciIds::Notifications;
use Apache2::Const qw(:common :http);
$ENV{'PATH'} = '';
use Apache2::Const qw(:common :http);
$ENV{'PATH'} = '';
my( $req, $hasSSL ) = @_;
return HTTPRedirect( $req, $req->uri()."index.html" ) if( $req->uri() eq '/' );
return DECLINED if( $req->uri() =~ /^\/((static)\/|robots.txt|index.html)/ );
my( $req, $hasSSL ) = @_;
return HTTPRedirect( $req, $req->uri()."index.html" ) if( $req->uri() eq '/' );
return DECLINED if( $req->uri() =~ /^\/((static)\/|robots.txt|index.html)/ );
+ return getHelp( $req ) if( $req->uri() =~ /^\/help/ );
my $args = parseArgs( $req->args() );
my $action = $args->{'action'};
$action = '' unless( defined $action );
my $args = parseArgs( $req->args() );
my $action = $args->{'action'};
$action = '' unless( defined $action );
--- /dev/null
+package PciIds::Html::Help;
+use strict;
+use warnings;
+use PciIds::Startup;
+use PciIds::Html::Util;
+use Apache2::Const qw(:common :http);
+use base 'Exporter';
+
+our @EXPORT=qw(getHelp);
+
+sub getHelp($) {
+ my( $req ) = @_;
+ my( $helpname ) = ( $req->uri() =~ /^\/help\/(.*)/ );
+ return NOT_FOUND if( $helpname =~ /[\/.]/ || $helpname eq '' );
+ open HELP, "$directory/help/$helpname" or return NOT_FOUND;
+ my $head = <HELP>;
+ chomp $head;
+ genHtmlHead( $req, $head, undef );
+ print "<h1>$head</h1>\n";
+ while( defined( my $line = <HELP> ) ) {
+ print $line;
+ }
+ close HELP;
+ genHtmlTail();
+ return OK;
+}
+
+1;