Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/CGI"

From Freeside
Jump to: navigation, search
(import from POD)
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 37: Line 37:
  
 
:If running under mod_perl, calles Apache::exit, otherwise, calls exit.
 
:If running under mod_perl, calles Apache::exit, otherwise, calls exit.
; popurl LEVEL
+
; popurl LEVEL [URL]
:Returns current URL with LEVEL levels of path removed from the end (default 0).
+
:Returns current (or, optionally, passed) URL with LEVEL levels of path removed from the end (default 0).
 
; rooturl; table
 
; rooturl; table
 
:Returns HTML tag for beginning a table.
 
:Returns HTML tag for beginning a table.
Line 45: Line 45:
 
; ntable
 
; ntable
 
:This is getting silly.
 
:This is getting silly.
; small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT, NOBALANCE_FLAG, URL
 
:Sheesh. I should just switch to Mason.
 
  
 
==BUGS==
 
==BUGS==
Line 52: Line 50:
  
 
Not complete.
 
Not complete.
 
small_custview sooooo doesn't belong here. i should just switch to Mason.
 
  
 
==SEE ALSO==
 
==SEE ALSO==
 
[[Freeside:1.9:Documentation:Developer/CGI|CGI]], [[Freeside:1.9:Documentation:Developer/CGI/Base|CGI::Base]]
 
[[Freeside:1.9:Documentation:Developer/CGI|CGI]], [[Freeside:1.9:Documentation:Developer/CGI/Base|CGI::Base]]

Latest revision as of 18:14, 6 February 2009

NAME

FS::CGI - Subroutines for the web interface

SYNOPSIS

 use FS::CGI qw(header menubar idiot eidiot popurl);

 print header( 'Title', '' );
 print header( 'Title', menubar('item', 'URL', ... ) );

 idiot "error message"; 
 eidiot "error message";

 $url = popurl; #returns current url
 $url = popurl(3); #three levels up

DESCRIPTION

Provides a few common subroutines for the web interface.

SUBROUTINES

header TITLE, MENUBAR
Returns an HTML header.
http_header
Sets an http header.
menubar ITEM, URL, ...
Returns an HTML menubar.
idiot ERROR
This is depriciated. Don't use it.
Sends an HTML error message.
eidiot ERROR
This is depriciated. Don't use it.
Sends an HTML error message, then exits.
myexit
You probably shouldn't use this; but if you must:
If running under mod_perl, calles Apache::exit, otherwise, calls exit.
popurl LEVEL [URL]
Returns current (or, optionally, passed) URL with LEVEL levels of path removed from the end (default 0).
rooturl; table
Returns HTML tag for beginning a table.
itable
Returns HTML tag for beginning an (invisible) table.
ntable
This is getting silly.

BUGS

Not OO.

Not complete.

SEE ALSO

CGI, CGI::Base