The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CGI::Bus - Web and DBI Application object

SYNOPSIS

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->print->htpfstart;       # start http, page, form

 $s->cgi->...                # -> CGI object
 $s->dbi->...                # -> DBI object
 $s->tmsql->...              # -> SQL database interface object
 ........
 $s->print->htpfend          # end form and page

DESCRIPTION

A web database with record versioning, access control at the record level, and file attachments was needed for me, see examples and CGI::Bus::tmsql... Modular structure and some codes implemented due to infrastructural needs.

This module is to provide based on CGI module core application object to load, contain and manage any other used by application objects, methods and data. Several slots and methods may be useful predefined and added also. Several automatic subobject classes may be useful provided. Perhaps, this looks something like Jellybean or PAS, but is not so complex or so right.

Currently implemented and tested on Win32 Apache and IIS.

SUBOBJECTS

CGI::Bus::Base is base class for automatic subobjects.

CGI::Bus::file is a file object encapsulating IO::File object.

CGI::Bus::fut is a file and directory utils library.

CGI::Bus::psp is a very simple and little HTML/Perl script processor, like something as Apache::ASP, HTML::Embperl, HTML::HTPL, HTML::Mason.

CGI::Bus::smtp is a simple SMTP sender, based on Net::SMTP.

CGI::Bus::tm is a database Transaction page Manager to view and edit data, the base and simplest case of CGI::Bus::tmsql below.

CGI::Bus::tmsql is an SQL database user interface to view and edit data, page transaction manager, another than DBIx::HTMLView, eXtropia or MOT.

CGI::Bus::uauth is default or base user authentication class, provides user, ugroups, uglist methods. It translates web server authentication and uses platform specific methods.

CGI::Bus::udata is a user data store.

CGI::Bus::upws is a user personal work space.

CGI::Bus::wg is a collection of HTML widgets.

SOLUTIONS

See AUTOLOAD, reset, print, CGI::Bus::Base

CLASSIFICATION

Creation and Setup

new, set, -import, -reimport

Internals

AUTOLOAD, launch, -classes, -cache, $CGI::Bus::SELF, reset, -reset, -endh, DESTROY, -debug, microtest

Subobjects and Features Embedded

cgi, -cgi, fcgicount, request, dbi, -dbi, oscmd

Error and Message processing

die, warn, problem, -problem, pushmsg, pushlog, -pushlog

Language

lngname, -lngname, lngload, lng

Locations

qpath, -qpath, qurl, -qurl, spath, -spath, surl, -surl, bpath, -bpath, burl, -burl, dpath, -dpath, tpath, -tpath, ppath, -ppath, purl, -purl, fpath, -fpath, furf, -furf, furl, -furl, hpath, -hpath, hurf, -hurf, hurl, -hurl, urfcnd, -urfcnd, -iurl

Utils

strtime, timestr, timeadd, cptran, ishtml, dumpout, dumpin, orarg

HTML Generation

httpheader, -httpheader, htmlstart, -htmlstart, htpgstart, -htpnstart, -htpgstart, -htpfstart, -htpgtop, htpgend, -htpgbot, htpfstart, htpfend, htmlescape, urlescape, dbquote, dblikesc, htmlddlb, htmltextarea, htmltextfield, htmlfsdir

Parameters Handling

qparam, param, qparamh, qrun

User Name

userauth, userauthopt, -login, user, useron, -user, -usercnv, -unmsadd, usercn, usersn, unames, uguest, uadmin, -uadmins, usdomain, -usdomain, userver, -userver, ugroups, -ugroups, -ugrpcnv, -ugrpadd, ugnames, uglist, -uglist, -udflt, -unflt, -ugflt, unamesun

SLOTS

Are available via set and several explicitly refered here methods.

$CGI::Bus::SELF

Package variable, pointer to current CGI::Bus object. local $SELF is set within some methods for use by external objects or methods. See also evalsub

-bpath
-burl

Binary path, URL Default is path of script running. Cached and used by bpath, burl. See also Locations.

-cache

Data cache hash ref for stable methods results to speed up by skipping some code evaluations.

-cgi

CGI predefined object, created in initialize

-classes

Classes to autocreate Objects: {-key=>class,...}. See also -import, -reimport, -reset.

-dbi

DBI predefined object

-debug

Debug Mode: add 1 - verbose operation messages at the bottom of HTML pages with "display: none" style, 2 - verbose operation messages at the bottom of HTML pages, 3 - some debug values as HTML comment, 4 - debug values at the bottom of HTML pages, 5 - results of some methods calls.

-dpath

Data path. Default is tpath. Cached and used by dpath. See also Locations.

-endh

Delayed commands hash ref, executed in reset, cleaned after execution.

-fcgicount

Counter of CGI::Fast loops. Used inside fcgicount.

-fcgimax

Margin of CGI::Fast loops. And FastCGI enable flag also. Used inside fcgicount.

-fpath
-furf
-furl

File store path, filesystem URL, URL. Default is ppath, fpath, purl. Cached and used by fpath, furf, furl See also Locations.

-hpath
-hurf
-hurl

Homes store path, filesystem URL, URL. Default is ppath, hpath, purl. Cached and used by hpath, hurf, hurl See also Locations.

-htmlstart

HTML start hash ref, for htmlstart

-htpfstart

Form pages HTML start hash ref, for htmlstart in CGI::Bus::tmsql and etc, see also -htpgstart, -htpnstart

-htpgbot

HTML page end HTML string, for htpgend

-htpgstart

Pages (views, lists) HTML start hash ref, for htmlstart in CGI::Bus::tmsql and etc, see also -htpfstart, -htpnstart

-htpgtop

HTML page begin HTML string, for htpgstart

-htpnstart

Navigator panes HTML start hash ref, for htmlstart in CGI::Bus::upws, see also -htpgstart, -htpfstart

-httpheader

HTTP header hash ref, for httpheader

-iurl

Apache images URL to use instead of text only behaviour. Default is undef, standard is '/icons'.

-import
 -import => {'use...'=>{-method=>call,...},...}

 -import => {'use...'=>[method,...],...}

 -import => {-key=>class}

Add Classes or Methods and Packages. This slot does not exists, it is used only as set parameter to fill other slots or -classes slot.

-lngname

Name and charset of the language to use. See lngname

-login

Login screen URL. Used by userauth and CGI::Bus::uauth. If login URL ends with '/' sign, it is treated as authenticated location, current script name will be appended.

-ppath
-purl

Publish path, URL. Default is $ENV{DOCUMENT_ROOT} ||$ENV{PATH_TRANSLATED} ||'.'; surl. Cached and used by ppath, purl. See also Locations.

-pushlog

Log file name to push messages to

-qpath
-qurl

Query (script) Path, URL. Cached and used by qpath, qurl. See also Locations.

-reimport
 -reimport => {-key=>class,...}

 -reimport => [-key,...]

 -reimport => -key

Add Classes or slots to reset when reusing application object. This slot does not exists, it is used only as set parameter to fill -reset or -classes slots. See also -import, -reset, new.

-reset
 -reset => {-slot => 1,...}

slots to destroy when reusing application object. See also -import, -reimport, new.

-spath
-surl

Site path, URL Cached and used by spath, surl. See also Locations.

-tpath

Temporary files path. Default is based on CGI $TempFile::TMPDIRECTORY ||$ENV{TMP} ||$ENV{TEMP}. Cached and used by tpath. See also Locations.

-uadmins

List (array ref) of administrators or sub{} to check current user as administrator. Used by uadmin

-udflt

User domains filter optional sub{} to be evaluated against each domain name in $_. Considered in CGI::Bus::uauth windows specific codes. See also -unflt, -ugflt.

-ugflt

User groups filter optional sub{} to be evaluated against each group name in $_. Considered in ugroups and uglist default code. See also -unflt.

-uglist

Users and groups list optional sub{}. uglist method evaluates this sub or uses it's own code.

-ugroups

User groups list optional sub{}. ugroups method evaluates this sub or uses it's own code.

-ugrpadd

Additional user groups names array or hash ref or research sub{}, used by ugroups. Example:

 $g->set(-ugrpadd=>sub{['Everyone','Guests']})
-ugrpcnv

User groups names conversion optional sub{} to convert or filter user and group names to be returned by ugroups, uglist. Example:

 $g->set(-ugrpcnv=>sub{$_[0]->usersn})
-unflt

User names filter optional sub{} to be evaluated against each name in $_. Considered in uglist default code. See also -ugflt.

-unmsadd

Additional user names research sub{}, used by unames. Example:

 $g->set(-unmsadd=>sub{$_[0]->usercn})
-urfcnd

Filesystem URLs (file://) condition sub{}. Condition to use '-urf's instead of '-url's. See also urfcnd

-usdomain

User names Server's Domain name optional evaluation sub{}. usdomain method evaluates this sub or returns value from CGI::Bus::uauth. See also -userver, userver

-user

User name get optional sub{}. user method evaluates this sub or returns user name got from web server.

-userver

User names Server name optional evaluation sub{}. userver method evaluates this sub or returns value from CGI::Bus::uauth. See also -usdomain, usdomain

-userauth

User authentication optional sub{} or reference to list of authentication options. userauth evaluates this sub or calls CGI::Bus::uauth->'auth' if there is no current user. Authentication options will be passed to CGI::Bus::uauth->'auth'.

-usercnv

User name conversion optional sub{} to convert or filter user names to be returned by user. Example:

 $g->set(-usercnv=>sub{lc($_[0]->usercn)});
-w32IISdpsn

Deimpersonation place for Microsoft IIS authenticated user session, see also userauth().

        0 - never
        1 - when required, i.e. for file store operation
        2 - always and early

METHDOS

AUTOLOAD

Loads subobject or method requested in order: subobject or method defined via set(-import), CGI module method, automatic CGI::Bus subobject. Sets new object slot 'CGI::Bus' to application object. See also Creation and Setup, Internals

bpath -> binary path
bpath (subpath) -> binary subdirectory path

Binary path cached in -bpath with given subpath added. See also Locations.

burl -> binary URL
burl (subpath) -> binary subdirectory URL
burl (subpath, param => value,...) -> binary subdirectory URL

Binary URL cached in -burl with given subpath and parameters added. See also Locations.

cgi () -> CGI object

CGI predefined object stored in -cgi

cptran (fromCP, toCP, strings) -> translated

Translates strings from codepage fromCP to codepage toCP, returns translated string or list of strings. Codepages may be 'oem', '866','ansi', '1251','koi' prone of koi8, '8859-5' prone of ISO 8859-5.

dbi (constructor args) -> new DBI object
dbi -> current DBI object

Create new or return current DBI object stored in -dbi

dblikesc (text) -> escaped

Escapes text to use inside SQL LIKE 'text' ESCAPE '\' expression. See also htmlescape, urlescape, dbquote.

dbquote (text) -> quoted

Quotes text to use inside SQL. See also htmlescape, urlescape, dblikesc.

DESTROY

Destructor, uses reset for almost all application object. See also Creation and Setup, Internals

die (?message) -> died

Error Stop, like CORE::die. Message with "\n" signs is considered to be for user, without "\n" is treated as software error and implemented via 'confess' or 'croak'. See also Error and Message processing, CGI::Carp

dpath -> data path
dpath (subpath) -> data subdirectory path

Data path cached in -dpath with given subpath added. See also Locations.

dumpin ( data string ) -> data ref
dumpout ( data ref ) -> data string

Stringify and destringify data structure with Data::Dumper and Safe

evalsub (sub, arguments) -> result

Evals sub given with local $CGI::Bus::SELF set to application object.

CGI::Bus::fcgicount (-fcgimax=>number, constructor args) -> success self
fcgicount (self, -fcgimax=>number, constructor args) -> success self
fcgicount -> success self

Interface for CGI::Fast. Uses -fcgicount, -fcgimax. May be used in constructs like:

 while ($s =CGI::Bus::fcgicount($s,-fcgimax=>...)) {};
 while (1) {$s =CGI::Bus::new($s,-fcgimax=>...); ...; last until $s->fcgicount};
fpath ( ?subpath ) -> File store path
furf ( ?subpath, ?args ) -> File store file URL
furl ( ?subpath, ?args ) -> File store URL

Location of file store cached in -fpath, -furf, -furl with given subpath added. Default is ppath, fpath, purl. See also Locations.

hpath ( ?subpath ) -> Home store path
hurf ( ?subpath, ?args ) -> Home store file URL
hurl ( ?subpath, ?args ) -> Home store URL

Location of home store cached in -hpath, -hurf, -hurl with given subpath added. Default is ppath, hpath, purl. See also Locations.

htmlddlb (false, name, data, field name,...) -> HTML drop-down list box
htmlddlb (widget | false, name, data, [field name => label],...)

Generate input helper drop-down list box HTML. Optional 'widget' parameter (html, '$_' placeholder, any other string or empty value), is used only to be placed after some javascript may be generated. Name is used as the common part of names of the HTML widgets - submits, scrolling_list, buttons, which names are generated by appending '_' sign and suffix. Data may be array ref with list of values, hash ref with internal and external values, sub{} to produce above. Other arguments are field names to fill with values. Field names with leading "\t" corresponds to multivalue fields, leading "\tmsab\t" hints to try Microsoft Address Book before if possible. Implemented in CGI::Bus::wg.

htmlescape (text) -> escaped

CGI::escapeHTML call. See also urlescape, dbquote, dblikesc.

htmlescapetext (text) -> escaped

Alike htmlescape, but with text area formatting improved with '&nbsp;' signs and '<code>' tags as needed; '<br />' and '<a href=' tags; URLs; relative URLs marked with 'host://' and 'url://' protocols.

htmlfsdir ( name, edit?, allow edit?, files path, URL, ?filesystemURL, ?rows, ?cols )

Generate filesystem directory editor HTML. This may be IE HTML IFRAME tag pointed to filesystem, URLs, or filefield for upload files and checkboxes to delete. Name is used as the common part of names of the HTML widgets. Implemented in CGI::Bus::wg.

htmlstart (?parameters) -> start html string

Start HTML string using CGI::start_html(?parameters) call. Default parameters are given from -htmlstart slot.

htmltextarea (-name=>...,-arows=>min, -hrefs=>1,...) -> textarea HTML

Like CGI::textarea call, but with additional attributes: -arows=>min autosizes widget to it's content. -hrefs=>1 searches HTML hyperlinks in content and displays them. Implemented in CGI::Bus::wg.

htmltextfield (-name=>..., -asize=>min) -> text field HTML

Like CGI::textfield call, but with additional attributes: -asize=>min autosizes widget to it's content. Implemented in CGI::Bus::wg.

htpfend -> end form and page HTML

End HTML form and page string using htpgend.

htpfstart (?httpheader, ?htmlstart) -> start page and form HTML

Start HTML page and form string using htmlstart, -htpfstart.

htpgend () -> end page HTML

End HTML page string using -htpgbot and CGI->end_html call.

htpgstart (?httpheader, ?htmlstart) -> start page HTML

Start HTML page string using httpheader, htmlstart, -htpgstart, -htpgtop

httpheader (?parameters) -> HTTP header string

HTTP header string using CGI::header(?parameters). Default parameters are given from -httpheader slot.

ishtml ( text ) -> is text HTML formatted?

Detect HTML format of text: beginning with '<' and one of well-known HTML tags.

launch (class => constructor args) -> object
launch -> class(constructor args) -> object

Creates object unbinded to CGI::Bus object. Uses AUTOLOAD like principles, but does not attaches object created to CGI::Bus object.

lng (msg) -> language message variants array ref
lng (number, msg) -> language message

Message text in current language. 0 - short message, label. 1 - long message, comment or description.

lngload (class, ?language) -> language base hash ref

Loads and returns language base hash ref for class given.

lngname () -> language name with charset
lngname (language to set)

Returns current language name with charset. Default is $ENV{HTTP_ACCEPT_LANGUAGE} and $ENV{HTTP_ACCEPT_CHARSET}.

microtest

Prints some diagnostics, used in debug mode.

new ( -slot=>value...) -> new application object
new (?reuse,...)...

Create new or reuse existed application object. See also Creation and Setup, Internals

orarg (sub, arg,...) -> succeeded arg
orarg (function string, arg,...) -> succeeded arg

Evaluates sub or function given with local $_ set to each arg until success. Returns successful arg. Example: orarg('-d','c:/home','c:/users') returns first existed directory.

oscmd (?'-hi', command, args) -> success

Execute given OS command with output interception. Command and output will be stored with pushmsg if 'h'ide option is not set. Non zero return code will produce die if 'i'gnore option is not set. The last argument may be sub{} to print to STDIN of the command.

param (args) -> CGI subobject param call

CGI subobject param call, optimising AUTOLOADing. See also qparam

ppath -> publish path
ppath (subpath) -> publish subdirectory path

Publish path cached in -ppath with given subpath added. See also Locations.

Prints arguments, returns object, that autoloads self or CGI method, prints result of it, returns itself. This is useful to shorten notation and some output control. Example: $u->print->h1('some header')->h2('some header') will print 'h1' and 'h2' tags given. See also: AUTOLOAD, cgi

problem (?message) -> problem set

Set problem flag or message -problem. See also Error and Message processing

purl -> publish URL
purl (subpath) -> publish subdirectory URL
purl (subpath, param => value,...) -> publish subdirectory URL

Publish URL cached in -purl with given subpath and parameters added. See also Locations.

pushlog ( messages )

Push messages strings to -pushlog file

pushmsg -> messages []
pushmsg (messages) -> messages []

Retrieve and store messages strings. Accumulate messages to display.

qparam ([parameters names]) -> [parameters values]
qparam ([names]=>[values]) -> [values]
qparam ({name=>value,...}) -> {name=>value,...}
qparam (?CGI param args) -> CGI param call
qparamh ([names]) -> {name=>value,...}

CGI::param call extended

qpath -> query (script) path
qpath (subpath) -> query (script) subdirectory path

Query (script running) path including script name cached in -qpath with given subpath added. See also Locations.

qrun () -> run parameter value

Query to run: CGI::param('_run') ||CGI::param('') ||CGI::param('run')

qurl -> query (script) URL
qurl (subpath) -> query (script) subdirectory URL
qurl (subpath, param => value,...) -> query (script) subdirectory URL

Query (script running) URL including script name cached in -qurl with given subpath and parameters added. See also Locations.

request () -> web server request object

Predefined web server request object - something like cgi or Apache->request.

reset
reset ({-slot=>1,...})

Reset application object, i.e. when reusing - release subobjects to be reinitiated. Calls destructors of objects to be released, deletes 'CGI::Bus' slots of this objects. See also Creation and Setup, Internals

set (-slot) -> value
set (-slot=>value,...) -> application object

Retrieve or set application object slots. See also Creation and Setup

spath -> site path
spath (subpath) -> site subdirectory path

Site path cached in -spath with given subpath added. See also Locations.

strtime ( ?mask, ?@time ) -> string
strtime ( ?mask, ?time seconds ) -> string

Convert given date-time array into string using mask or format given. Mask constructions are 'yyyy', 'yy', 'mm', 'dd', 'hh', 'mm' or 'MM', 'ss', or POSIX strftime format. Default mask is 'yyyy-mm-dd hh:mm:ss'. Default time is localtime(time).

surl -> site URL
surl (subpath) -> site subdirectory URL
surl (subpath, param => value,...) -> site subdirectory URL

Site URL cached in -purl with given subpath and parameters added. See also Locations.

timeadd (time seconds, years, ?months, ?days, ?hours, ?minutes ,?seconds) -> time seconds

Add values given to time given.

timestr ( ?mask, time string ) -> time seconds

Convert time string by mask to compatible with time number of seconds. See strtime for mask constructions and default mask.

tpath -> temporary files path
tpath (subpath) -> temporary subdirectory path

Temporary files path cached in -tpath with given subpath added. See also Locations.

uadmin () -> administrator?
uadmin ( user or group name ) -> administrator?
uadmin ( [] ) -> [ managed users ]

Is current user an administrator (checked against -uadmins) or an administrator of user or group given (checked against CGI::Bus::udata)? What names are managed by current user?

uglist ( ?'-ug' ) -> [users and groups list]
uglist ( ?'-ug<>', {}, ?label width ) -> {name => label,...}

List all users and groups. Options are 'u'sers, 'g'roups, '<>' force comment notation, default are '-ug'. See also -uglist

ugnames () -> [user and group names]

Names and groups of current user, including unames and ugroups

ugroups (?user name) -> [user groups]

Groups current user belongs to. Default is current user. See also -ugroups.

uguest (?user name) -> guest?

Is current user or user name given a guest or authenticated?

unames () -> [user names]

Names of current user, including user, usercn, lowercase of this names. See also ugnames.

unamesun (user names list) -> [unique names]

Convert user names list to contain only unique names. Remove redundant lowercases and common names as possible.

urfcnd () -> use URFs?

Condition to use filesystem URLs (file://) instead of HTTP URLs (http://). This depends on browser type (see source code) and -urfcnd.

urlescape (text) -> escaped

CGI::escape call. See also htmlescape, dbquote, dblikesc.

usdomain () -> User names Server's Domain name
usdomain (set name)

User names Server's Domain name - Windows NT or DNS domain name that may be included in user result as a part. See also -usdomain, CGI::Bus::uauth.

user () -> user name
user (?user name) -> user name set

User name of the current user. See also -user.

userauth (?redirect) -> user name

Authenticate current user if guest. There are three authentication methods: by web server, via -login script back redirecting; by application, using -login screen back redirecting; by web server, redirecting to -login directory. First two methods uses signature cookies. Last method on Microsoft IIS requests 'RevertToSelf' deimpersonation using Win32::API and requires low process insulation.

See also -userauth, -w32IISdpsn, CGI::Bus::uauth.

userauthopt () -> user name

Authenticate current user if guest and required by '_auth' or '_login' CGI param. Otherwise avoid '_*(login|auth|a|ntlm)' IIS impersonated script subURL with redirection if not 'RevertToSelf. Uses userauth.

usercn (?username) -> user name common part

Common name of user, without domain part

userds (?username) -> user name as directory structure

User name as directory structure

userfn (?username) -> user name as filename

User name as filename

useron () -> user original name

Original name of the current user, user value before -usercnv

usersn (?username) -> user shorten name

User shorten name, with usdomain value removed if present.

userver () -> User names Server name
userver (set name)

User names Server name - Windows NT or DNS host name. See also -userver, CGI::Bus::uauth.

warn (?message) -> warning

Warning message, like CORE::warn. Message with "\n" signs is considered to be for user, without "\n" is treated as software warn and implemented via 'cluck' or 'carp'. See also Error and Message processing, CGI::Carp

VERSION

07/09/2007

Version 0.62, improvement release.

23/08/2007

New CGI::Bus::tm -banner.

Corrected 'xcopy' command call under PerlEx.

29/06/2007

Version 0.61, improvement release.

26/06/2007

Corrections for Active Perl/PerlIS 5.8 and CGI 3.20: 'use CGI qw(-nph -no_xhtml)'; '$CGI::Q =$s->{-cgi}'; new url fixing CGI::url.

12/06/2007

Fixed for newer CGI peculiarities: 'use CGI qw(-no_xhtml)', CGI->br, print->br.

23/01/2007

Fixed CGI::Bus::tmsql::fsacl considering 'cacls' for invalid user names.

21/03/2006

Changed htmlddlb, the first parameter, input widget, became positional, but may be empty.

20/03/2006

Changed htmlddlb, leading "\tmsab\t" hints to try Microsoft Address Book before if possible.

14/01/2006

New -w32IISdpsn slot.

26/12/2005

New -ugrpadd slot.

25/11/2005

Version 0.60, improvement release.

22/11/2005

New dbquote and dblikesc methods.

29/08/2005

Improved styles/classes in CGI::Bus and CGI::Bus::tm.

CGI::Bus::tmsql QBF expressions extended with 'rlike', 'regexp', 'similar to' operators.

12/08/2005

CGI::Bus supplied with default -style for -htmlstart; CGI::Bus::upws screens corrected using style names.

03/08/2005

CGI::Bus::tm, CGI::Bus::tmsql, CGI::Bus::upws, CGI::Bus::wg: 'font size=-1' replaced with 'style="font-size: smaller;"', class names somewere added to improve CSS behaviour.

15/03/2005

Version 0.59, improvement release.

19/01/2005

tpath usage replaced with dpath in CGI::Bus::udata and CGI::Bus::upws; -tpath is not used directly inside CGI::Bus now, but only as -dpath default value and for CGI $TempFile::TMPDIRECTORY.

10/01/2005

Some corrections in CGI::Bus::wg 'ddlb' and CGI::Bus::tm behaviours.

26/11/2004

CGI::Bus::wg 'ddlb' and CGI::Bus::tmsql 'htmlddlb' changed - optional 'field' parameter added.

22/11/2004

CGI::Bus::wg changed - 'ddlb' gives default value from the first field, 'ddlb' double clicking invokes the first field filling.

19/11/2004

ugroups extended with new 'user name' parameter.

16-17/11/2004

Additional CGI::Bus::tm '-opflg' options. New CGI::Bus::tm 'cmdfe' method. New CGI::Bus::tmsql '-rowsel1a', '-rowsel2a', '-rowsel3a' slots. HTML style names changed, style usage extended in CGI::Bus::tm, CGI::Bus::tmsql, CGI::Bus::upws.

05/11/2004

New CGI::Bus::tmsql 'f'etch flag in '-flg' for 'cmdlst'.

03/11/2004

CGI::Bus::tm changed implementing experimental '_tsw_LSO' interface for options embedded into views.

CGI::Bus::uauth fixed to return ['guest'] instead of empty list from 'ugroups'.

CGI::Bus::lngbase strings corrected.

25/10/2004

CGI::Bus::tmsql 'cmdlst' changed to bind database columns to hash ref available from '-rowlst' and '-clst'.

18-19/10/2004

CGI::Bus::tm 'evaluate' changed to execute some CGI::Bus::upws '_run' commands as full-text 'SEARCH' or user 'SETUP'.

CGI::Bus::tm 'qlst' changed to determine default view via '_' sign not only at the end of the view name, but at the end of the view label too.

12/10/2004

New CGI::Bus::tmsql -listurm slots

11/10/2004

locale used for sorting in some places.

10/10/2004

Version 0.58, improvement release.

09/10/2004

-udflt slot added.

27/09/2004

'<>' uglist option added.

21/09/2004

-unflt and -ugflt slots added.

14/09/2004

Win32::OLE->Option("Warn"=>0) used anywere (in CGI::Bus::wg, CGI::Bus::upws, CGI::Bus::uauth).

-endh slote developed for CGI::Bus::uauth ADSI data buffering.

CGI::Bus::uauth evoluted to buffer ADSI data inside dpath for faster access and Apache usage.

30/08/2004

CGI::Bus::tmsql - -swrite does not grant read right, -sread should be used instead. Changes in 'acltest' (-swrite excluded for '-lst','-sel') and 'fsacl' (filesystem - excluded when read, '.htaccess' - excluded).

26-28/08/2004

CGI::Bus::uauth - migration to base on Windows ADSI, other Windows intarfaces (and 'findgrp.exe') used at last, -adsi slot ignored.

-debug levels shifted, new level '1' produces debug output with "display: none" style, operation rezult should be clicked to access. This is useful to view SQL.

23-25/08/2004

CGI::Bus::tm - record ID added to some command button URLs if available.

CGI::Bus::tm - some record view/edit form corrections.

CGI::Bus::tm - -pxqc fields commented out as unused in transaction sequences.

CGI::Bus::tmsql - switch to view mode after insert/update/delete when versioning.

CGI::Bus::tmsql and CGI::Bus::tm - '-cmdCCC' view description slots implemented.

CGI::Bus::smtp - addrtr method added.

19/08/2004

'DHTML Edit Control for IE5' replaced with 'MSHTML Edit Control for IE5.5' in CGI::Bus::wg.

CGI::Bus::tm and CGI::Bus::tmsql little corrections.

24/06/2004

unames code rewritten, lowercases removed (-usercnv may be used), -unmsadd slot added.

'DHTML Edit Control for IE5' experimentally used in CGI::Bus::wg.

09/06/2004

Version 0.57, improvement release.

27/05/2004 - 05/06/2004

HTML classes added to support CSS.

Inline HTML styles changed to be compatible with Mozilla.

'Back' button behaviour changed - 'window.history.back()' follows 'window.history.go(-x)', this is useful for opened in new windows links.

Perl warnings will be shown at the bottom of the screen in debug modes.

usercn removed from ugnames.

CGI::Bus::uauth changed: Microsoft IIS deimpersination code added using 'RevertToSelf' via Win32::API. Tried when finished with '/' sign -login URL. See cource code comments.

CGI::Bus::wg changed: added user interface to close opened file attachments on Windows server.

07/07/2003

Version 0.56 released

25/06/2003

CGI::Bus::tm changed: 'htmlbar' button set behaviour.

CGI::Bus::tmsql changed: new '-listrnm' view description slot used in 'cmdlst' alike common '-listrnm' slot

21/05/2003

CGI::Bus::tmsql fixed: Excluded 'order by', 'group by', 'limit' clauses from gant (timeline) chart minimum and maximum margins SQL 'select' command to escape fields to be defined in 'select' list.

'gwo' application example changed: added 'List Obj Hier' view and 'subject_q' virtual field.

29-28/04/2003

CGI::Bus::tmsql new '-wherepar' view description slot

CGI::Bus::tm cmdfrm fixed: 'l'ist, 's'elect, '"'quoted only fields (-flg =~/^["'ls]*$/) are not considered in form layout now

26-25/04/2003

CGI::Bus, CGI::Bus::wg, CGI::Bus::tmsql changed: special URL protocol 'url://' added, translated as relative to script URL. Special URL protocols new aliaces: host:// or urlh://, url:// or urlr://, fsurl:// or urlf://

24/04/2003

Version 0.55 released

17/04/2003

htmlescapetext() method introduced, 'gwo' and 'notes' examples changed.

CGI::Bus::tm 'cmdfrm' text area formatting improved with '&nbsp;' signs and '<code>' tags as needed.

CGI::Bus::tmsql 'acltest' - fixed record read delegation via '-readsub': it processes further only array refs from 'acl' now, false values will be ignored in loop, true - returned. 'gwo' and 'notes' examples changed.

07/04-31/03/2003

microtest, microenv increased using getlogin() or Win32::LoginName().

CGI::Bus, CGI::Bus::upws::search changed: '_*(login|auth|a|ntlm|search|guest)' special IIS subURLs introduced:

/cgi-bin/cgi-bus - may be common unimpersonated URL under IUSR_xxx user, and moreover

/cgi-bin/login/cgi-bus - common impersonated virtual URL of /cgi-bin/cgi-bus,

/cgi-bin/search/cgi-bus - common guest access unimpersonated virtual URL of /cgi-bin/cgi-bus under IUSR_xxx_1 user

userauthopt changed: avoiding '_*(login|auth|a|ntlm|search|guest)' IIS impersonated script subURL with authentication or redirection as needed.

CGI::Bus::psp modified: [filename, base] filename syntax may now be used to generate '<base href...>' tag

CGI::Bus::tmsql modified: new '-htaccess' subslot of '-acd'

25/11/2002

CGI::Bus::tm fixed: cmdfrm lost line breacks when displaying text areas with embedded URLs

18-19/11/2002

CGI::Bus::wg changed: 'fsdir' displays now filesystem URLs only in edit mode. Files URLs supplied with '_blank' option.

17/11/2002

CGI::Bus::tmsql changed: new 'thead' and 'tbody' HTML tags in cmdlst.

08/11/2002

gwo.cgi changed: 'otime' field SQL formula changed from '..., gwo.utime)' to '..., COALESCE(gwo.etime, gwo.utime)'.

gwo.cgi new: 'All News', 'Our News', 'Pers News' views.

31/10/2002

CGI::Bus::wg changed: textarea: special URL protocols may be used and translated in the text: 'host://' -> '/'.

CGI::Bus::tmsql changed: -inp Field Description: 'htmltextarea' URLs display behaviour is extended with special URL protocol 'fsurl://' to be translated to fsurl value.

20/10/2002

CGI::Bus::upws new: -search, -searchms slots. Problem: Microsoft Index Server calls should be impersonalisated to obtain rightly ACL checked results.

14/10/2002

Version 0.54 released

21/08/2002 - 31/08/2002 - 12-13/09/2002 - 16/09/2002

CGI::Bus::psp changed: parse omits text given before m/<(!DOCTYPE|html|head)/i, so mixed CGI/HTML page files may be parsed. Synopsis changed to reflect this feature.

CGI::Bus::tm new: -logo slot

CGI::Bus::tm changed: htmlbar and cmdhlp behaviour for '<' -opflg.

CGI::Bus::upws changed: scrleft discards duplicate rows to display. 'label|URL|_target|URL' syntax added to deal with a complex pages. Logotype (-logo) enclosed within URL filling the current browser window with scrleft.

CGI::Bus::upws new: 'USITES' CGI param for scrusites identifier or number - to use multiple sets of users home pages, empty parameter means default page set

CGI::Bus::tmsql changed:

cmdlst - fixed parsing of query condition parameters with leading '<>=' operators

acltest - field may contain several user names delimited with commas with spaces allowed. Regular expression is used instead of 'eq' comparison.

aclsel - sub{}, m/^\$_(regexp|rlike)$/i, m/.*\$_.*/ special parameters introduced for the field name followed

19/05/2002 - 01-06/06/2002 - 13/06/2002 - 19/06/2002

Changed
 - gwo.cgi - fields 'subject_v' and 'alist_v' used in all views,
   perconal views filters changed
 - uauth.pm - 'ugroups' on Win32 returns global group names prefixed 
   with domain name for users from foreign domains. '-ugrpcnv' 
   should be commented out. 'gwo.cgi' and 'notes.cgi' default group 
   detection condition changed
 - gwo.cgi - fields 'subject_v', 'plist_v', 'alist_v' added to use 
   in views, timeline view changed using this fields
 - timeline view supplied with predefined date margin columns from 
   '-gant1' and '-gant2', so 'gwo.cgi' changed
New
 - IE6 with IIS problem detected - on 'post' requests browser brings 
   IIS to authentication/impersonalisation of the script to be not 
   impersonalisated, but placed in the same directory as requiring web 
   server authentication 'uauth.cgi'
 - tm.pm, tmsql.pm: '-refresh' view and common slots
 - tm.pm, tmsql.pm: '-htmlts', '-htmlte', '-width' common slots; 
   '-width' field slot
 - cache-control http header mentioned in 'config.pl'
 - form tag generation with '-acceptcharset' attribute given from 
   '-httpheader'
 - notes.cgi - 'mailto' field added
 - install-db.pl script to install or upgrade applications database
 - tmsql.pm: '-width' view attribute
 - tmsql.pm: 'explain select...' 'pushmsg' when listing data

07/05/2002 - 18/05/2002

New
 - tmsql.pm: '-htmlts', '-htmlte', '-gant1', '-gant2', '-htmlg1' 
   view slots.
 - tmsql.pm: '-rowsav1' and '-rowsav2' events.
Changed
 - gwo.cgi - timeline chart view using '-gant1' and '-gant2' 
   view slots.
 - gwo.cgi - mailsend code improved using '-rowsav1' event.
 - uauth.pm - filtered rows with space chars only 'findgrp.exe' 
   may return.
 - tm.pm - textarea fields displays linebreaks when viewed
 - tm.pm - 'Select' command turns to view mode from edit mode, 
           'Edit' command removed from edit mode; 
           '!s'elect command button '-opflg' flag
 - Bus.pm - '-debug=>3' recurse loop corrected
Issue on tm.pm record 'Select' and 'Edit' command buttons

'Select' command may to be removed, 'Edit' command may to be restricted to appear when record viewing only. 'Select' may be replaced with 'refresh' browser action when record viewing. 'Select' may be useful to reject changes, but it is not very required. 'Select' may be useful to select record when it's key is available, so some flag in '-opflg' should be used to turn it on or off. 'Edit' command when editing loses changes and may be useful only to preview HTML entered by user. 'Edit' may be also associated with 'Select' when record editing.

05/04/2002 - 06/05/2002

New & Changed
 - tmsql.pm - MySQL 'LIMIT rows' clause generation
 - uauth.pm - attempting to use a Windows2000 ADSI, 
   see issues in the source code
 - uauth.pm, wg.pm - case insensitive sorting
 - notes.cgi - update for indexes
 - gwo.cgi   - update for indexes, may be not useful
 - Bus.pm -debug slot levels
 - Bus.pm -iurl  slot added
 - upws.pm  - using icons based on -iurl slot value
 - all printed HTML tags and attributes are lowercase as from 
   CGI module
 - tm.pm - image toolbar using -iurl slot, uncomment at the 
   beginning of the source to disable

15/10/2001 - 23/03/2002

Implemented and Documented.

ToDo
  -  -dpath, -ppath, -purl default values review
  -  username SSL value review
  -  naming review
  -  review & test & debug

AUTHOR

Andrew V Makarow <makarow at mail.com>

8 POD Errors

The following errors were encountered while parsing the POD:

Around line 1180:

You forgot a '=back' before '=head2'

Around line 1669:

'=item' outside of any '=over'

Around line 1700:

You forgot a '=back' before '=head2'

Around line 1703:

'=item' outside of any '=over'

Around line 1736:

You forgot a '=back' before '=head2'

Around line 1738:

'=item' outside of any '=over'

Around line 1756:

You forgot a '=back' before '=head2'

Around line 1760:

'=item' outside of any '=over'