4 use vars qw(@EXPORT_OK @ISA);
8 use CGI::Carp qw(fatalsToBrowser);
12 @EXPORT_OK = qw(header menubar idiot eidiot popurl table);
16 FS::CGI - Subroutines for the web interface
20 use FS::CGI qw(header menubar idiot eidiot popurl);
22 print header( 'Title', '' );
23 print header( 'Title', menubar('item', 'URL', ... ) );
25 idiot "error message";
26 eidiot "error message";
28 $url = popurl; #returns current url
29 $url = popurl(3); #three levels up
33 Provides a few common subroutines for the web interface.
39 =item header TITLE, MENUBAR
41 Returns an HTML header.
46 my($title,$menubar)=@_;
55 <BODY BGCOLOR="#ffffff">
56 <FONT COLOR="#FF0000" SIZE=7>
65 =item menubar ITEM, URL, ...
67 Returns an HTML menubar.
71 sub menubar { #$menubar=menubar('Main Menu', '../', 'Item', 'url', ... );
74 ($item,$url)=splice(@_,0,2);
75 push @html, qq!<A HREF="$url">$item</A>!;
82 Sends headers and an HTML error message.
88 my($cgi)=FS::UID::cgi;
89 if ( $cgi->isa('CGI::Base') ) {
91 &CGI::Base::SendHeaders;
98 <TITLE>Error processing your request</TITLE>
102 <H4>Error processing your request</H4>
104 Your request could not be processed because of the following error:
106 <P>Hit the <I>Back</I> button in your web browser, correct this mistake, and try again.
115 Sends headers and an HTML error message, then exits.
126 Returns current URL with LEVEL levels of path removed from the end (default 0).
132 my($cgi)=&FS::UID::cgi;
133 my($url)=new URI::URL $cgi->url;
134 my(@path)=$url->path_components;
136 $url->path_components(@path);
142 Returns HTML tag for beginning a table.
164 subroutines for the HTML/CGI GUI, not properly OO. :(
166 ivan@sisd.com 98-apr-16
167 ivan@sisd.com 98-jun-22
169 lose the background, eidiot ivan@sisd.com 98-sep-2
171 pod ivan@sisd.com 98-sep-12
174 Revision 1.11 1998-11-12 07:43:54 ivan
175 *** empty log message ***
177 Revision 1.10 1998/11/12 01:53:47 ivan
180 Revision 1.9 1998/11/09 08:51:49 ivan
183 Revision 1.7 1998/11/09 06:10:59 ivan
186 Revision 1.6 1998/11/09 05:44:20 ivan
187 *** empty log message ***
189 Revision 1.4 1998/11/09 04:55:42 ivan
190 support depriciated CGI::Base as well as CGI.pm (for now)
192 Revision 1.3 1998/11/08 10:50:19 ivan
193 s/CGI::Base/CGI/; etc.