# # sdb.ws3 -- simple data storage using webshell's filecontext # nca-073-9 # # Copyright (C) 1996-2000 by Netcetera AG. # All rights reserved. # # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # @(#) $Id$ # ## create a command named "idgen". "idgen nextval" will return a ## unique sequence number, since it is file-based. web::filecounter idgen -filename [file join $sdb_datadir state.SEQNO] ## create a file-based context named "dscc" ## context files will be stored at the given path with name 1.dsc, 2.dsc ... ## idgen is the command that will be used to create a new context web::filecontext dscc \ -path [file join $sdb_datadir %d.dsc] \ -idgen idgen ## --- vvv --- usage ---------------------------------------------------------- # # ::sdb_showtitle - show this string as page title # # example: set sdb_showtitle "ProjeX" # # ::sdb_additionalcommands - additional links (dedault is: new and main) # # list of linkname-URL pairs to be displayed in the main commands # section of the page # example: set sdb_additionalcommands [list HowTo \ # https://infoplaza.netcetera.ch/internal/news/custom/howto-000711.html] # # attribute definition: # varDesc: descriptive text to be used in overview table and for # the edit fields # type: one of possible HTML input fields # - text sub-attributes: # size (eg 60) # - textarea # rows (eg 10) # colse (eg 80) # # showInTable: boolean # isLink: boolean # sub-attributes: # showAsLink references an other variable (eg sdsc) # ## --- ^^^ --- usage ---------------------------------------------------------- ## --- vvv --- now follow html output routines -------------------------------- ### page -- output a HTML page proc page {title code} { web::put "