NAME

esmith::cgi - Useful CGI routines for e-smith server and gateway


VERSION

This file documents esmith::cgi version 1.4.0


SYNOPSIS

    use esmith::cgi;


DESCRIPTION

This module contains a collection of useful routines for working with the e-smith manager's CGI interface.


WEB PAGE HEADER GENERATION ROUTINES

genHeaderNonCacheable($q, $confref, $title)

genHeaderCacheableNoPasswordCheck($q, $confref, $title)

genHeaderCacheableNoPasswordCheck($q, $confref, $title)

genHeader($q, $confref, $title, $expiry, $checkpassword)

genNavigationHeader($q)

genNoframesHeader($q)

genHeaderStartHTML($q)


WEB PAGE FOOTER GENERATION ROUTINES

genFooter($q)

genFooterNoCopyright($q)

genNavigationFooter($q)

genNoframesFooter($q)


FONT ROUTINES

curFont()

Returns the preferred font faces eg. ``Helvetica,Arial''.


TABLE GENERATION ROUTINES

genCell($q, $text)

genDoubleCell($q, $text);

Generates a cell which spans two columns, containing the text specified.

genSmallCell($q, $text)

Generates a cell with ``small'' text (font size -1).

genSmallRedCell($q, $text)

Generates a cell with ``small'' (font size -1) red text.

genTextRow($q, $text)

Returns a table row containing a two-column cell containing $text.

genButtonRow($q, $button)

Returns a table row containing an empty first cell and a second cell containing a button with the value $button.

genNameValueRow($q, $fieldlabel, $fieldname, $fieldvalue)

Returns a table row with two cells. The first has the text ``$fieldlabel:'' in it, and the second has a text field with the default value $fieldvalue and the name $fieldname.

genNamePasswordRow($q, $fieldlabel, $fieldname, $fieldvalue)

As for genNameValueRow() above, but instead of a text field it generates a password field so that user input is obscured.

Possible buglet: if $fieldvalue is given, the password field defaults to this value, so the number of stars may indicate to the end-user what the previous value was.

sub genWidgetRow($q, $fieldlabel, $popup)


STATUS AND ERROR REPORT GENERATION ROUTINES

genResult($q, $msg)

Generates a ``status report'' page, including the footer

genStateError($q, $confref)

Subroutine to generate ``unknown state'' error message.


AUTHOR

e-smith, inc.

For more information, see http://e-smith.org/