Listing of program p12_samplst2.cgi
#! /usr/local/bin/regina
/* A more elaborate list of the samples */
/*-----------------------------------------------------------------*/
call setdll /* loads the HHNS shared lib */
call CgiInit "TITLE='Another List of samples' BGCOLOR=FFFFFF"
if left(translate(webos), 3) = "WIN" then
call popen "Dir /b /o p*.cgi"
else call popen "ls -1 p*.cgi"
/* the above 3 statements may be replaced by :
call popen webdir "*.cgi"
*/
say tblHdr("Description", " URI")
do queued()
/*--- get the next program name ---*/
parse pull z
/*--- assume that 2nd line of the program is its brief description --*/
call linein z; desc = linein(z); /* call lineout z */
parse var desc '/*' desc '*/'
/*--- Now, write a table Row with the description and the Web link ---*/
say tblRow(strip(desc), cgiHref(z, z))
end
call cgiEnd
return 0
Back Home