projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[freeside.git]
/
site_perl
/
CGI.pm
diff --git
a/site_perl/CGI.pm
b/site_perl/CGI.pm
index
611103b
..
65bf201
100644
(file)
--- a/
site_perl/CGI.pm
+++ b/
site_perl/CGI.pm
@@
-9,7
+9,7
@@
use CGI::Carp qw(fatalsToBrowser);
use FS::UID;
@ISA = qw(Exporter);
use FS::UID;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(header menubar idiot eidiot
url
);
+@EXPORT_OK = qw(header menubar idiot eidiot
popurl table
);
=head1 NAME
=head1 NAME
@@
-17,7
+17,7
@@
FS::CGI - Subroutines for the web interface
=head1 SYNOPSIS
=head1 SYNOPSIS
- use FS::CGI qw(header menubar idiot eidiot url);
+ use FS::CGI qw(header menubar idiot eidiot
pop
url);
print header( 'Title', '' );
print header( 'Title', menubar('item', 'URL', ... ) );
print header( 'Title', '' );
print header( 'Title', menubar('item', 'URL', ... ) );
@@
-25,8
+25,8
@@
FS::CGI - Subroutines for the web interface
idiot "error message";
eidiot "error message";
idiot "error message";
eidiot "error message";
- $url = url; #returns current url
- $url =
url
(3); #three levels up
+ $url =
pop
url; #returns current url
+ $url =
popurl
(3); #three levels up
=head1 DESCRIPTION
=head1 DESCRIPTION
@@
-121,22
+121,32
@@
sub eidiot {
exit;
}
exit;
}
-=item url LEVEL
+=item
pop
url LEVEL
Returns current URL with LEVEL levels of path removed from the end (default 0).
=cut
Returns current URL with LEVEL levels of path removed from the end (default 0).
=cut
-sub url {
+sub
pop
url {
my($up)=@_;
my($up)=@_;
- my($cgi)=FS::UID::cgi;
- my($url)=new URI::URL $cgi;
+ my($cgi)=
&
FS::UID::cgi;
+ my($url)=new URI::URL $cgi
->url
;
my(@path)=$url->path_components;
my(@path)=$url->path_components;
-
pop @path foreach ( 1.. $up )
;
+
splice @path, 0-$up
;
$url->path_components(@path);
$url->as_string;
}
$url->path_components(@path);
$url->as_string;
}
+=item table
+
+Returns HTML tag for beginning a table.
+
+=cut
+
+sub table {
+ "<TABLE BORDER=1>";
+}
+
=back
=head1 BUGS
=back
=head1 BUGS
@@
-161,8
+171,14
@@
lose the background, eidiot ivan@sisd.com 98-sep-2
pod ivan@sisd.com 98-sep-12
$Log: CGI.pm,v $
pod ivan@sisd.com 98-sep-12
$Log: CGI.pm,v $
-Revision 1.8 1998-11-09 08:36:05 ivan
-haha
+Revision 1.11 1998-11-12 07:43:54 ivan
+*** empty log message ***
+
+Revision 1.10 1998/11/12 01:53:47 ivan
+added table command
+
+Revision 1.9 1998/11/09 08:51:49 ivan
+bug squash
Revision 1.7 1998/11/09 06:10:59 ivan
added sub url
Revision 1.7 1998/11/09 06:10:59 ivan
added sub url