write string into the webpage being sent to the user. If tag is specified, it is emitted in its on-state in front, and its off state behind of, the string.
html "Hi, my name is Ah Clem." h3
...will produce...
<h3>Hi, my name is Ah Clem.</h3>
Emit a hyperlink pointing to the referer URL, with linktext emitted as HTML text within the hyperlink. Emits nolinktext if there was no referer.
Randomly picks one of the elements in a list and emits that into the webpage being generated.
<!--#neoscript return='random_pick_html { "This is one of the choices." "This is another one of the choices." "<b>This is a bold choice.</b>" "<img src=mygif.gif> ...an image and some text." '-->
If using code= instead of return=, use the html command to emit the result into the webpage.
Aborts NeoWebScript execution immediately. Does not emit any of the rest of the webpage to the requester. Remaining code in the script being executed will still be executed, so abort_page is typically immediately followed by return.
Load the CGI response into the global array response or the array named by responseArrayName
If the same name is repeated in the post or query,
response(__name) is set, and response(name) is converted
to a list. Use
[info exists response(__name)]
to check if the
array member is a straight value or a list.
If multiple response is expected (as in <select multiple>), use multiList to force the array members of the response array to always be a list.
Return HTML to create a "cookie" which, if emitted to a browser that is cookie-capable, will cause the cookie to be included subject to defined restrictions.
Example: neo_make_cookie email karl@neosoft.com -days 30 -path /myApp
Create a cookie named email containing karl@neosoft.com that will be included in all HTTP requests from the browser we're responding to, for a period of 30 days, when the requests are "underneath" /myApp on this server, and the browser is cookie-enabled.
For more information, see Persistent Client State HTTP Cookies at Netscape, and also Which Browsers Support Cookies at Digital.
This only works with Netscape if it's emitted before any other HTML. It uses <meta http-equiv> to set the cookie, and won't work with browsers that don't support this.
Load the HTTP persistent data "cookies" into the global array cookies or the array named by cookieArrayName.
Return a numeric estimate of the number of hits that will be served in the next hour. Works by seeking back approximately 1000 hits into the log file and sees how long ago it was, to extrapolate hits-per-hour. If there are fewer than 1000 hits in the access log file, it will return 0.
Quote a string by hex-encoding special characters. (Useful for passing HTML fragments as values for hidden fields in forms and stuff like that.)
Unquote string by decoding hex-encoded characters.
Store the contents of the array specified by arrayName into the database database, indexed by key, as key-value pairs. (This was formerly called array_to_props.)
Fetch from database database into the array specified by arrayName the key-value pairs for the specified key, previously stored by dbstore (This was formerly called props_to_array.)
Return a list of all of the keys in the database database matching pattern. Pattern is in the style of a Unix wildcard. In other words, if you were looking for a key starting with horace, the pattern would be horace*. To match horace anywhere in the string, *horace*.
Delete in database database the entry corresponding to key. If the entry isn't there or the datbase doesn't exist, returns 0, otherwise 1 (or an error).
Returns 1 if database exists, 0 otherwise.
Returns a list of the databases in the webpage owner's database directory.
access_data_file opens the specified datafile for reading and writing, creating it if its not there. Datafile name can consist of upper and lowercase letters and numbers only. No slashes, no periods, etc. The file can then be operated on in the normal manner by gets, puts, seek, tell, flush, close, etc.
delete_data_file deletes a datafile. It is not an error to delete a datafile that is not there.
returns a list of all of the user's datafiles.
displays disk usage for the current directory. Also shows K-bytes used from the current directory on down.
Write all of the server's environment vars and values into webpage.
Dump the specified global arrays keys and values into webpage.
Returns the passed integer-since-1970 time formatted according to RFC-850, with the additional proviso that it be specified in GMT timezone only. (Because that's the way Netscape wanted it.)
For example, neo_clock_to_rfc850_gmt 84236782
should produce "Fri, 01-Sep-72 18:06:22 GMT".
Copy the contents of the specified file into the webpage being generated. File must be in the same directory or somewhere beneath the current directory. If the filename matches the MIME type for a server side include, the server side include is still performed. If it also contains embedded NeoWebScript, the NeoWebScript is executed. If the owner of the current page and the page being included are the same, the code is executed within the same safe interpreter that's handling the current page. If the file is owned by someone else, it gets its own interpreter for its neoscript.
Copy the contents of the file named by the specified virtual path (rooted from the htdocs directory) into the webpage currently being generated.
Matching MIME types and processing embedded requests proceeds as for include_file above.
Load and evaluate the NeoWebScript code contained in fileName. This is to support libraries of procs and shared code.
Load and evaluate the NeoWebScript code specified by the virtual path virtualPath. This also supports libraries of procs and shared code.
The Neoscript programmer can log messages to a number of self-defined
logging databases. When log_message is executed, the message is
logged along with the server time (in integer-seconds format) and the
remote hostname (or IP number, if hostname either was unavailable due
to DNS problems or if Apache was compiled with MINIMAL_DNS
selected) fetching the page.
If you need something fancier you can always roll your own with access_data_file.
This opens an email message and returns the filehandle for use with puts, etc, for the contents of the message body. The message always comes "from" the user name of the owner of the webpage file that's being interpreted, and the name of the server that did the serving. If to is not specified, the recipient is also set to be the user name of the owner of the webpage file.
This starts a news posting and returns the filehandle for use with puts, etc, for the contents of the message body. The message always comes "from" the user name of the owner of the webpage file that's being interpreted, and the name of the server that did the serving.
When done writing the body of the news article, write a single line to the filehandle consisting only of a single period, then close the file.
Note that for this to work you must have a news server within your domain named or aliased as news. For example, within neosoft.com, open_post_news will try to contact the news server at news.neosoft.com.
This is an experimental capability that obviously needs work.
This returns the hostname of the remote host if it can be determined. If the webserver is running with normal DNS, we return the hostname already looked up and stored in the environment. If it's running with minimal DNS, we perform a DNS lookup on the IP number to try to get the hostname. If we succeed, we return the hostname, otherwise we return the IP number.
Executed one time only, to create the page owner's Named Counter Registry file (NCRegistry). Defaults to 20 counters in the registry. Maximum of 200 counters allowed.
Executed one time only for each Named Counter. This creates the counter and places it in the page owner's NCRegistry file. Name should be unique. Initial counts are distributed over the 5 browser classes as Mozilla 85%, Mosaic 5%, Lynx 2%, MIE 1% and Other 7%. Default initial counts is 0.
Increment the indicated named counter. This increments the overall lifetime total, the browser's lifetime total and the daily browser total. Any value other than "show" in the show argument causes no value to be returned. If "show" is specified, the indicated value is returned by the incr_nc call. The default return value is the overall lifetime total. The caller may request only a specific browser (all, mozilla, mosaic, lynx, mie, other) in the browser argument. The caller may request only today's count value by specifying the val_type argument (lifetime, today).
On the first incr_nc call of a new day, a new daily-count record is created automatically.
Returns the current counter value. By default the overall lifetime count is returned. Caller may request a specific browser (all, mozilla, mosaic, lynx, mie, other). Caller may request lifetime of today's count only using val_type.
Returns the initial counts assigned to the counter when it was registered. By default the total value for all browsers is returned. Caller may request a specific browser (all, mozilla, mosaic, lynx, mie, other).
Returns the actual counts assigned to the counter (i.e. count-init_count). By default the total value for all browsers is returned. Caller may request a specific browser (all, mozilla, mosaic, lynx, mie, other).
Returns the average daily counts assigned to the counter. The average is calculated by dividing the real counts by the number of days since the counter was registered. (NOTE: initial counts are not used to calculate the average.) By default the total value for all browsers is returned. Caller may request a specific browser (all, mozilla, mosaic, lynx, mie, other).
Emit a link back to Yahoo in the manner that they ask.
Emit a Magellan link with at-link searching.
load the key-value pairs from string into array arrayName, as -element string.
Example: import_keyvalue_pairs foo "-action paint -customer fred"
Will set element action of array foo to paint and element customer to fred.
The normal usage would be to get optional key-value pairs as arguments to a proc, as in:
proc sell_item {customer item args} { import_keyvalue_pairs options $args . . }This will pull an arbitrary number of optional key-value pairs, read into the args list when the proc began execution (because of the special meaning Tcl attaches to this keyword in argument lists), and store the key-value pairs into the options array.
neotrack records information that may be used to determine a visitor's path through a site. NeoTrack uses IP number to distinguish between users. timeout is an optional specification of the number of minutes that the visitor can remain on the current page before we will assume that he has left the site. Default is 30 minutes. A dash, "-", may be used in this position if you wish to supply a filename argument but still wish to use the default timeout. filename - is an optional specification of the name of the file in which the visitor's path information is to be recorded. Default is NeoTrack (.db is implied and should not be specified). The neotrack command returns 1 if the page is served to a new visitor. Otherwise, 0 is returned.
neotrack_report produces a report table that details a visitors path. For each page in the path, this command reports 1) the Refering address (if available), the current pages URI, 3) the time the current page was entered, 4) the time that the visitor spent on the page (not available for the last page in a path) and 5) the timeout assigned to the current page. You may write your orw proc to produce this or a similar report. This built in proc is provided only for convenience. You must suply the key required to access the visitor that you want reported. The key is formed as time_IP where time is the time (in seconds) that the visitor entered your site and IP is the visitor's IP number. The filename argument is an optional identification of the tracking data file from which the report is to be produced.