# # WARNING: This type of command file is *only* meant to demonstrate # the overall idea of proglets; you should not use this in production # context as the CI variable dereferencing used here in the example # is not safe against misuse by a malicious person at the browser, # unless you take care to remove "special" characters from the input # strings received from the browser request. # while setvar(http, input("HTTP> ")) <> "EXIT" do if http = "GET" then input pathinfo, "PATHINFO> " if pathinfo = "/showjob" then echo ! echo !MPE Proglet Demo! echo !ShowJob! echo ! showjob echo ! echo !Lars Appel, March 2000! echo ! elseif pathinfo = "/showme" then echo ! echo !MPE Proglet Demo! echo !ShowMe! echo ! showme echo ! echo !Lars Appel, March 2000! echo ! elseif pathinfo = "/pause" then setvar querystring "10" input querystring, "QUERYSTRING> " echo ! echo !MPE Proglet Demo! echo !Pause! echo ! echo pause !querystring pause !querystring echo ! echo !Lars Appel, March 2000! echo ! elseif pathinfo = "/listredo" then echo ! echo !MPE Proglet Demo! echo !ListRedo! echo ! listredo echo ! echo !Lars Appel, March 2000! echo ! else echo ! echo !MPE Proglet Demo! echo !Welcome to my 2nd CI Proglet! echo ! echo !!ShowJob! echo !!ShowMe! echo !!Pause 20! echo !!ListRedo! echo ! echo !Lars Appel, March 2000! echo ! endif else echo ! echo !MPE Proglet Demo! echo !Method !http is not supported by this Proglet! echo ! endif endwhile # # Usage: # http://your3k/servlet/cmdfile2/menu # # Dirty: # http://your3k/servlet/cmdfile2/pause?60 # http://your3k/servlet/cmdfile2/pause?ouch #