Technical data

8. Documentation for Developers
The Function show_html_header
The show_html_header function expects a string as a parameter. This string represents the
title of the generated page. It automatically generates the menu and includes associated
CSS and language files as long as they can be found in the directories /srv/www/css resp.
/srv/www/lang and have the same name (but of course a different extension) as the script.
An example:
/srv/www/admin/OpenVPN.cgi
/srv/www/css/OpenVPN.css
/srv/www/lang/OpenVPN.de
Both the use of language files and CSS files is optional. The files css/main.css and
lang/main.<lang> (where <lang> refers to the chosen language) are always included.
Additional parameters can be passed to the function show_html_header. A call with all
possible parameters might look like this:
show_html_header "Title" "refresh=$time;url=$url;cssfile=$cssfile;showmenu=no"
Any additional parameters must, as shown in the example, be enclosed with quotation marks
and separated by a semicolon. The syntax will not be checked! So it is necessary to pay close
attention to the exact parameter syntax.
Here is a brief overview of the function of the parameters:
refresh=time: Time in seconds in which the page should be reloaded by the browser.
url=url: The URL which is reloaded on a refresh.
cssfile=cssfile: Name of a CSS file if it differs from the name of the CGI.
showmenu=no: By using this the display of the menu and the header can be suppressed.
Other Content Guidelines:
Don’t write novels, use short desriptions :-)
Use clean HTML (SelfHTML
8
is a good starting point)
Omit the bells and whistles (JavaScript is OK, if it does not interfere and support the
user, everything also has to work without JavaScript)
The Function show_html_footer
The function show_html_footer closes the block from the CGI script which was openend by
the function show_html_header.
8
see http://de.selfhtml.org/
326