Monday, November 08, 2010 at 12:06 AM.
system.verbs.builtins.webserver.data.cgis.samples.tellParams
<<Universal tellParams script by Mason Hale 9/17/95
<<server-independent - doesn't rely on specific parameters
<<simply returns contents of parameter table
<<encloses multiple line values in <pre> tags
<<shows sub-table values
on tellParams (adrParams) {
local (htmltext = webServer.httpHeader (), i);
on add (s) {
htmltext = htmltext + s + cr};
add ("<html>");
add ("<head>");
add ("<title>Parameters Received By Frontier</title>");
add ("<body>");
add ("<h2>Parameters Received By Frontier</h2>");
on addparam (name, val) {
add ("<b>" + name + "</b> = \"" + val + "\"<br>")};
for i = 1 to sizeOf (adrParams^) {
if typeOf (adrParams^ [i]) == tableType {
local (x, tableName = nameOf (adrParams^ [i]) + ".");
for x = 1 to sizeOf (adrParams^ [i]) {
addparam (tableName + nameOf (adrParams^ [i][x]), string (adrParams^ [i][x]))};
continue};
if adrParams^ [i] contains cr {
addparam (nameOf (adrParams^ [i]), "<pre>" + adrParams^ [i] + "</pre>")}
else {
addparam (nameOf (adrParams^ [i]), adrParams^ [i])}};
add ("</body>");
add ("</html>");
return (htmltext)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.