#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" ÷ Addresses!PÁ-- on librarystack put $QUERY_STRING into theTerms put "" into buffer if theTerms = "" then put "No query submitted." after buffer else put 0 into theCt put theTerms into theTermsArray split theTermsArray by "&" and "=" put urlDecode(theTermsArray["terms"]) into theSearchWords put urlDecode(theTermsArray["searchScope"]) into theScope unmark all cds if theScope = "byfield" then delete char 1 to offset("&Fields",theTerms) of theTerms replace "Fields=" with empty in theTerms replace "&" with comma in theTerms put theTerms into theFldList repeat for each item i in theFldList mark cds by finding theSearchWords in fld i end repeat else -- find in all flds mark cds by finding theSearchWords end if repeat with x = 1 to the number of marked cds put fld "name" of marked cd x & "
" & cr after buffer put fld "address" of marked cd x & "
" & cr after buffer put fld "city" of marked cd x && \ fld "state" of marked cd x && \ fld "zip" of marked cd x & "
" & cr after buffer put fld "phone" of marked cd x & "

" & cr after buffer add 1 to theCt end repeat end if put "

Results for " "e& theSearchWords "e& colon \ & "

"& theCt && "found" && "

" before buffer put " " after buffer put "Content-Type: text/html" & cr & cr put buffer end librarystack €etYÖ ÿÿÿÿ ULucida Grande cREVGeneralscriptChecksumCÎNïsØÐßÐo&SåÔ|à bookmarks handlerList tempScript prevHandler librarystackscriptSelectionchar 534 to 533script

-- on librarystack

put $QUERY_STRING into theTerms

put "" into buffer

if theTerms = "" then

put "No query submitted." after buffer

else

put 0 into theCt

put theTerms into theTermsArray

split theTermsArray by "&" and "="

put urlDecode(theTermsArray["terms"]) into theSearchWords

put urlDecode(theTermsArray["searchScope"]) into theScope

unmark all cds

if theScope = "byfield" then

delete char 1 to offset("&Fields",theTerms) of theTerms

replace "Fields=" with empty in theTerms

replace "&" with comma in theTerms

put theTerms into theFldList

repeat for each item i in theFldList

mark cds by finding theSearchWords in fld i

end repeat

else -- find in all flds

mark cds by finding theSearchWords

end if

repeat with x = 1 to the number of marked cds

put fld "name" of marked cd x & "<br>" & cr after buffer

put fld "address" of marked cd x & "<br>" & cr after buffer

put fld "city" of marked cd x && \

fld "state" of marked cd x && \

fld "zip" of marked cd x & "<br>" & cr after buffer

put fld "phone" of marked cd x & "<p>" & cr after buffer

add 1 to theCt

end repeat

end if

put "<h3>Results for " &quote& theSearchWords &quote& colon \

& "</h3>"& theCt && "found" && "<p>" before buffer

put "</body> </html>" after buffer

put "Content-Type: text/html" & cr & cr

put buffer

end librarystack

cRevStandaloneSettings7scriptLibrariesInternet Geometry PrintingMacOSXtrue OSX,nametestMacOS,documentTypeUNIX,fileSelectortrueWindowstrueMacOS,longVersion test 1.0.0.0Windows,LegalCopyright62004 HyperActive Sotware All rights reserved worldwideUNIX,pageSetuptrueOSX,documentTypeLinuxfalse inclusionsselectOdtfalseWindows,documenticonFileL/Applications/MetaCard/Revolution/Revolution 2.2/Sample Icons/genericdoc.ico answerDialogtrueSPARCfalseOSX,documentExtension SolIntelfalseWindows,FileDescriptiontest 1.0.0.0 for WindowsOSX,longVersion test 1.0.0.0UNIX,printerChoosertrueOSX,copyright62004 HyperActive Sotware All rights reserved worldwideMacOS,MinimumSize15000MacOS,versionnumber11MacOS,ReleaseFinalMacOS,versionnumber20MacOS,versionnumber30nametest MacOS,Region1rs6000falseHp9k700falseOSX,shortVersion1.0.0.0Windows,fileversion11Windows,productversion11Windows,fileversion20Windows,fileversion30Windows,productversion20Windows,fileversion40Windows,productversion30cursorsfalseBsdfalse OSX,infotest Version 1.0.0.0Windows,productversion40MacOS,dynamicMemorytrue askDialogtrueIrisfalseOSX,signature????Windows,iconFileL/Applications/MetaCard/Revolution/Revolution 2.2/Sample Icons/genericapp.icoWindows,ProductNametestMacOS,PreferredSize15000UNIX,colorChoosertrue MacOSPPCtrueMacOS,creator???? SolSparcfalseWindows,companynameHyperActive Sotwareê @YÖóô @YÖóõ @YÖóö @YÖó÷ @YÖóóaddrGrpi€?˜ cREVGeneral revUniqueID 1082859153069 ìName)`€7 cREVGeneral revUniqueID 1082655359189 ê John Jones ö Melissa Doolittle õ Tom Jones ô Melissa Smith ÷ Elwood John Smith  íAddress)`€<7 cREVGeneral revUniqueID 1082858836223 ê 1234 North 5th Street ö 9098 County Rd 6 õ 1498 Broadway ô 4 West Little Avenue ÷ 13 East Broadway  îCity)`€bš cREVGeneral revUniqueID 1082858838983 ê Minneapolis ö Cootie õ Eagan ô Anytown ÷ Minneapolis  ïState)`€°bD cREVGeneral revUniqueID 1082858848150 ê MN ö MN õ MN ô MN ÷ MN  ðZip)`€÷bR cREVGeneral revUniqueID 1082858855231 ê 55441 ö 55491 õ 20392 ô 34234 ÷ 55411  ñPhone)`€Œ7 cREVGeneral revUniqueID 1082858861458 ê 123-4567 ö 723-4742 õ 340-0999 ô 345-2304 ÷ 999-1122