Usage: HTML_START
Description: Whatever you put between HTML_START and HTML_END gets printed to stdout. You can incorporate C++ variables in between $
Usage: HTML_END
Description: Closes HTML_START
Usage: HTML_INCLUDE(file)
Description: Equivalent to pasting the contents of the file between HTML_START and HTML_END
Usage: MAIN_START
Description: embeds main() , and writes the code to send the HTTP header according to the settings determined by previous macros seen.
Usage: MAIN_END
Description: Closes the body of main()
Usage: SQL_DB_DRIVER(database)
Description: Specifies which database driver to use. Currently only MySQL
is supported. The only valid value is mysql
Usage: SQL_DECL_DBH(dbh)
Description: Declares a global variable to be used for a connection handle.
Usage: SQL_ON_ERROR(error_handler)
Description: Specifies the function to invoke when a database call fails.
Usage: SQL_CONNECT(host, database, user, pass)
Description: Opens database connection. C++ expressions can be $ $ embeded into parameters.
Usage: SQL_DISCONNECT Description: Closes database connection
Usage: SQL_DO(query)
Description: Executes query. Embedded C++ expressions OK.
Usage: SQL_CURSOR_DO(query)
Description: executes query, and processes the results in a loop terminated
by SQL_CURSOR_DONE. Embedded C++ expressions OK. Query results are in a variable sql_row of type char**.
Columns should be accessed with sql_row
Usage: SQL_CURSOR_DONE
Description: closes SQL_CURSOR_DO loop
Usage: SQL_CLIENT_APP(cmd)
Description: Specifies the command line to call the application capable of processing CREATE TABLE/DROP TABLE sql statements to create or re-create the schema inferred from the HTML forms
Usage: SQL_SCHEMA_FILE(filename)
Description: Specifies the file where the shell script creating/ dropping the tables will be written. You will need to execute it from the command line to create or re-create your schema inferred from the forms.
Usage: SQL_FORM_TO_TABLE(form_name)
Description: Infers the table schema from the form and generated DROP TABLE and CREATE TABLE writing it out to the schema file. The name of the table is the same as the name of the form. If you do not like the inferred type you can override it with a special parameter storage in the INPUT, TEXTAREA, or SELECT HTML tags. The storage parameter will only be used to infer the SQL type, it will not show in the HTML displayed by the generated program. Inference is done according to this rule:
Usage: HTML_DO_HASH_PARSE
Description: Enables the cgi-lib.pl style CGI input parsing. The results are stored in C++ STL equivalent of an associative array cgi_parse_hash . You can reference the elements the same way you do in Perl. This does not replace form classes, though, so you can use both.
Usage: SQL_FORM_DB_WRITE(form_name,
Description: Outputs the form data into the corresponding SQL table. The best (although not mandated) way to use this macro is along with SQL_FORM_TO_TABLE. If the table has a primary key, the data will be replaced in case of a match rather than inserted
Usage: SQL_FORM_DB_READ(form_name, table_name, where_constraint)
Description: Read the data from an SQL table into the form. The best (although not mandated) way to use this macro is along with SQL_FORM_TO_TABLE.
Usage: SQL_TABLE_EXPORT(table_name)
Description: Sends the exported comma-delimited table data to stdout enclosed in <pre> </ pre>
Usage: HTTP_COOKIE_START(cookie_name, lifetime, domain, path, member_list)
Description: Generates a cookie hanlding class. member_list is the list
of cgi++-0.8.tar.gzencoded name/value pairs stored in the cookie. Lifetime is in seconds.
An instance with the name of cookie_name will be created. Each member is public
and has the type
string
Usage: HTTP_COOKIE_MAKER(function_name)
Description: Specifies that the HTTP header needs to have Set-cookie and will invoke function_name to print the value of the cookie to stdout.
Usage: MAIL_INIT(from, to, reply_to, subject)
Description: Starts e-mail session by opening a mail pipe to the mail app.
Usage: MAIL_CLOSE
Description: closes the e-mail session by closing the pipe
Usage: MAIL_START
Description: Anything between this macro and MAIL_END will be sent to the currently open mail pipe. You must first open the pipe with MAIL_INIT
Usage: MAIL_END
Description: closes the MAIL_START macro
Usage: MAIL_ON_ERROR
Description: specifies the function to call in case there mail operations fail
Usage: MAIL_APP
Description: spefifies the application to be invoked on the other end of the mail pipe. Default is /usr/sbin/sendmail -t .