set nwsblue #e0f0ff set noteDb NWSNotes set homesite "http://www.unreality.com/neowebscript" append abs_location "http://" $webenv(HTTP_HOST) "/neowebscript" proc emit_abs_location {file} { global abs_location append location $abs_location "/" $file return $location } proc dotclear {height width} { set x "" return $x } proc dotclearlink {homedir height width filename} { append homelink $homedir "/" $filename set src [dotclear $height $width] append src "" return $src } proc emit_full_header {title} { global abs_location nwsblue homesite html " $title
\"Tcl\"NeoWebScript\" NeoSoft™
NeoWebScript™
[dotclear 1 150]
[dotclearlink $abs_location 35 1 index.nhtml]Home
[dotclearlink $homesite 35 1 download.nhtml]Download
[dotclearlink $abs_location 35 1 userinfo/]User Info
[dotclearlink $abs_location 25 15 userinfo/newuserfaq.nhtml]New User FAQ
[dotclearlink $abs_location 1 15 userinfo/tutorials.nhtml]Tutorials
[dotclearlink $abs_location 1 15 userinfo/library.nhtml]Demos
[dotclearlink $abs_location 1 15 commands/]Commands
[dotclearlink $abs_location 1 15 userinfo/variables.nhtml]Variables
[dotclearlink $abs_location 1 15 userinfo/usertrouble.nhtml]Troubleshooting
[dotclearlink $abs_location 1 15 examples.nhtml]Code Examples
[dotclearlink $abs_location 35 1 sysopinfo/]Sysop Info
[dotclearlink $abs_location 25 15 sysopinfo/sysopfaq.nhtml]Sysop FAQ
[dotclearlink $abs_location 1 15 sysopinfo/theory.nhtml]Theory
[dotclearlink $abs_location 1 15 sysopinfo/installation.nhtml]Installation
[dotclearlink $abs_location 1 15 sysopinfo/management.nhtml]Management
[dotclearlink $abs_location 1 15 tests/index.nhtml]Tests
[dotclearlink $abs_location 1 15 sysopinfo/sysoptrouble.nhtml]Troubleshooting
[dotclearlink $abs_location 35 1 faq.nhtml]FAQ
[dotclearlink $abs_location 35 1 feedback.nhtml]Feedback
[dotclearlink $abs_location 35 1 resources.nhtml]Resources
[dotclearlink $abs_location 35 1 release.nhtml]Release Notes
[dotclearlink $abs_location 35 1 credits.nhtml]Credits
[dotclearlink $abs_location 35 1 disclaimer.nhtml]Disclaimer
" } proc emit_full_footer {} { html "
Copyright © 1995-1999 The NeoWebScript Group. All Rights Reserved
" } proc emit_header { } { global abs_location homesite html "
\"Tck/Tk\"\"NeoWebScript\" NeoSoft™
NeoWebScript™
Search
Site Map
" } proc emit_menu { } { global abs_location nwsblue html " [dotclear abs_location 0 150]
[dotclearlink $abs_location 35 1 register.nhtml]Download

[dotclearlink $abs_location 35 1 userinfo.nhtml]User Info
[dotclearlink $abs_location 25 15 userinfo/newuserfaq.nhtml]New User FAQ
[dotclearlink $abs_location 1 15 userinfo/tutorials.nhtml]Tutorials
[dotclearlink $abs_location 1 15 userinfo/library.nhtml]Demos
[dotclearlink $abs_location 1 15 commands.nhtml]Commands
[dotclearlink $abs_location 1 15 userinfo/variables.nhtml]Variables
[dotclearlink $abs_location 1 15 userinfo/usertrouble.nhtml]Troubleshooting
[dotclearlink $abs_location 35 1 sysopinfo.nhtml]Sysop Info
[dotclearlink $abs_location 25 15 sysopinfo/sysopfaq.nhtml]Sysop FAQ
[dotclearlink $abs_location 1 15 sysopinfo/theory.nhtml]Theory of Operations
[dotclearlink $abs_location 1 15 sysopinfo/installation.nhtml]Installation
[dotclearlink $abs_location 1 15 sysopinfo/management.nhtml]Management
[dotclearlink $abs_location 1 15 tests]Tests
[dotclearlink $abs_location 1 15 sysopinfo/sysoptrouble.nhtml]Troubleshooting
[dotclearlink $abs_location 35 1 resources.nhtml]Resources
[dotclearlink $abs_location 35 1 release.nhtml]Release Notes
[dotclearlink $abs_location 35 1 credits.nhtml]Credits
[dotclearlink $abs_location 35 1 disclaimer.nhtml]Disclaimer
" }
proc emit_command_page {} { global command_name title_name package_name short_description global seealso keywords synopsis description append header_title $title_name " - " $package_name " - NeoWebScript" emit_full_header $header_title # begins true body of webpage, where text info goes html "
$title_name - $package_name" html "
" if {[info exists synopsis]} {html "Synopsis"} if {[info exists description]} { html " * Description" } if {[info exists seealso]} {html " * See Also"} if {[info exists keywords]} {html " * Keywords"} html "
" html "
" html "

" html "$short_description" html "

" if {[info exists synopsis]} { html "" html "Synopsis" html "

" html "

" html "

" } if {[info exists description]} { html "" html "Description" html "

$description

" } if {[info exists seealso]} { html "" html "See Also" html "

$seealso

" } if {[info exists keywords]} { html "" html "Keywords" html "

" html "$keywords" html "

" } } proc handle_command_notes {} { global response webenv load_response if {![info exists response(mode)]} { command_notes } else { $response(mode) } } proc command_notes {} { global response webenv noteDb html "" html html " html set keys [dbkeys $noteDb $webenv(DOCUMENT_URI)_*] if {[lempty $keys]} { html html " html } else { foreach key [lsort $keys] { dbfetch $noteDb $key array html html " html " html } } html
" html "
User Contributed Notes" html
" html "No Notes" html
" html "$array(email)" html
html $array(date) html
" html $array(note) html
html "" html html " html html
" neo_form response "method=post action=../notes.nhtml" neo_form_field hidden mode "value=add_note" neo_form_field hidden doc "value=\"$webenv(DOCUMENT_URI)\"" neo_form_submit "Add Note" neo_form_end html
} proc add_note {} { global response webenv emit_full_header " User Notes " html "Add a note to this command page that will assist future " html "users in using it. Please report any bugs or suggestions using " html "the Contact page." neo_form neo_form_field hidden mode "value=save_note" neo_form_field hidden doc html html html "Your e-mail address:" td html html html html html "Your notes:" td html html html html
neo_form_field text email "size=30" html
neo_form_textarea note "rows=5 cols=40 wrap=physical" html
neo_form_submit "Save Note" neo_form_end } proc save_note {} { global response webenv noteDb emit_full_header " Saved User Note " if {[info exists response(mode)]} {unset response(mode)} set doc $response(doc) unset response(doc) set secs [clock seconds] set response(date) [clock format $secs -format "%D %T"] dbstore $noteDb ${doc}_$secs[pid] response html "Your note has been saved.[dotclear 1 150]" b html

html "Back to Command Page" }