=cut
sub header {
- my($title,$menubar)=@_;
+ my($title,$menubar,$etc)=@_; #$etc is for things like onLoad= etc.
+ use Carp;
+ $etc = '' unless defined $etc;
my $x = <<END;
<HTML>
$title
</TITLE>
</HEAD>
- <BODY BGCOLOR="#e8e8e8">
+ <BODY BGCOLOR="#e8e8e8"$etc>
<FONT SIZE=7>
$title
</FONT>
=cut
sub eidiot {
- #warn "eidiot depriciated";
+ warn "eidiot depriciated";
idiot(@_);
- #exit;
- use Apache;
- Apache::exit;
+ if (exists $ENV{MOD_PERL}) {
+ $main::Response->End()
+ if defined $main::Response
+ && $main::Response->isa('Apache::ASP::Response');
+ require Apache;
+ Apache::exit();
+ } else {
+ exit;
+ }
}
=item popurl LEVEL
sub popurl {
my($up)=@_;
- my($cgi)=&FS::UID::cgi;
- my($url)=new URI::URL $cgi->url;
+ my $cgi = &FS::UID::cgi;
+ my $url = new URI::URL ( $cgi->isa('Apache') ? $cgi->uri : $cgi->url );
my(@path)=$url->path_components;
splice @path, 0-$up;
$url->path_components(@path);