Implementing%20Web%20data%20access%20using%20sirweb.cgi - PowerPoint PPT Presentation

About This Presentation
Title:

Implementing%20Web%20data%20access%20using%20sirweb.cgi

Description:

add-onspws on Windows 98 CD. Southampton University. Computing Services ... Copy files from SIR2000 to PWS. Copy sirweb.cgi from SIR2000 directory to ... – PowerPoint PPT presentation

Number of Views:279
Avg rating:3.0/5.0
Slides: 21
Provided by: dcd
Category:

less

Transcript and Presenter's Notes

Title: Implementing%20Web%20data%20access%20using%20sirweb.cgi


1
Implementing Web data access using sirweb.cgi
  • By
  • Dave Doulton
  • University of Southampton

2
Agenda
  • Install SIR2000.
  • Install PWS.
  • Copy files from SIR2000 to PWS.
  • Demonstrate web access.
  • Demonstrate General Purpose Web Access
  • Summary

3
Install SIR2000
  • Run Setup.exe.
  • Install licence file.
  • Add SIR2000 to path in autoexec.bat.

4
Install Personal Web Server -1
  • Run setup.exe in either
  • c\windows\options\cabs\pws
  • or
  • \add-ons\pws on Windows 98 CD

5
Install Personal Web Server -2
  • Choose typical install
  • Leave default directory as suggested.
  • Install
  • Reboot system

6
Install Personal Web Server -3
  • If mstdcw causes a fault on reboot
  • run msconfig from run button
  • choose startup tab
  • unclick entry MSTDC mstdcw -start
  • restart machine

7
Copy files from SIR2000 to PWS.
  • Copy sirweb.cgi from SIR2000 directory to
    c\inetpub\wwwroot\cgi-bin
  • Copy red.gif from SIR2000\images
    toc\inetpub\wwwroot\images
  • Copy your html and your pql files to
    c\inetpub\wwwroot

8
Demonstrate web access - 1
  • Click on publish icon, check server running.
  • Start web browser
  • enter http//localhost/cgi-bin/sirweb.cgi?sirapp
    sysproc.cgi.gosirmemRunsirtxtdescrip
  • localhost can be machines name

9
Demonstrate web access - 2
  • More friendly to make a form and allow to choose
    what to run.
  • Using simple HTML

10
Demonstrate web access - 3
  • lthtmlgt
  • ltheadgtlttitlegtSIR demo lt/titlegt
  • lt/headgtltbodygt
  • ltform action"/cgi-bin/sirweb.cgi" method"post"gt
  • ltinput type"hidden" name"sirmem"
    value"Run"gt
  • ltinput type"hidden" name"sirapp"
    value"sysproc.cgi.go"gt
  • ltselect name"sirtxt" size"1"gt
  • ltoption value"fcache"gtflush
    cachelt/optiongt
  • ltoption value"default"gtdefaultlt/optiongt
  • ltoption value"stdout"gtstdoutlt/optiongt
  • ltoption value"hello"gthellolt/optiongt
  • ltoption value"call"gtcalllt/optiongt
  • ltoption value"menupic"gtwelcome
    picturelt/optiongt
  • ltoption value"splash"gtsplashlt/optiongt
  • ltoption value"runfile"gtrun filelt/optiongt
  • ltoption selected value"descrip"gtdescripti
    velt/optiongt
  • ltoption value"entry"gtdata entrylt/optiongt
  • ltoption value"report1"gtreportlt/optiongt
  • ltoption value"freport"gtfull
    reportlt/optiongt

11
Demonstrate web access - 4
  • Most useful option is sysproc.cgi.runfile
  • uses parameter RUNFILE to specify source PQL
  • call sysproc.tools.htmlcode
  • program
  • write(cgi)'lth3gt ltsirvergt ltdategt lttimegt lt/h3gt'
  • end program

12
Demonstrate web access - 5
  • Simple form to run file
  • lthtmlgt
  • ltheadgt
  • lttitlegtRun SIR PQL lt/titlegt
  • lt/headgt
  • ltbodygt
  • ltform action"/cgi-bin/sirweb.cgi" method"post"gt
  • ltinput type"hidden" name"sirapp"
    value"sysproc.cgi.runfile"gt
  • File to execute ltinput type"text" size"20"
    name"RUNFILE"gt
  • ltinput type"submit" value"submit"gt
  • lt/formgtlt/bodygtlt/htmlgt

13
Demonstrate web access - 6
  • You can have a form that does not look like a
    form and always does the same thing
  • ltHTMLgtltHEADgt
  • ltTITLEgtRun Descriptive lt/TITLEgt
  • lt/HEADgtltBODYgt
  • ltA HREF"javascriptdocument.forms0.submit()"gtru
    n desciptivelt/AgtltBRgt
  • ltform namedescrip methodpost action"/cgi-bin/si
    rweb.cgi"gt
  • ltinput typehidden namesirapp valuesysproc.cgi.g
    ogt
  • ltinput typehidden namesirmem value"Run"gt
  • ltinput typehidden namesirtxt value"descrip"gt
  • lt/formgtlt/BODYgtlt/HTMLgt

14
Demonstrate web access - 7
  • Source of descrip
  • RETRIEVAL
  • PROCESS CASES ALL
  • . PROCESS REC EMPLOYEE
  • . GET VARS CURRPOS
  • . PERFORM PROCS
  • . END PROCESS REC
  • END PROCESS CASES
  • DESCRIPTIVE VARIABLECURRPOS / FILENAMECGI/
  • END RETRIEVAL

15
Demonstrate General Purpose Web Access -1
  • Based around idea from data sysproc.cgi.entry
  • Has two versions show and update based on hidden
    value on form
  • DB_WRyes means update
  • anything else just show

16
Demonstrate General Purpose Web Access -2
  • ltHTMLgt
  • ltHEADgt
  • ltTITLEgtGeneral Purpose SIR2000 Database Access
    Forms lt/TITLEgt
  • lt/HEADgt
  • ltBODYgt
  • ltform methodpost action"/cgi-bin/sirweb.cgi"gt
  • lttablegt
  • lttrgtltthgtDatabase Namelt/thgtlttdgtltinput typetext
    nameDB_DBgtlt/tdgtlt/trgt
  • lttrgtltthgtPassword lt/thgtlttdgtltinput typepassword
    nameDB_PWgtlt/tdgtlt/trgt
  • lttrgtltthgtRead Securitylt/thgtlttdgtltinput
    typepassword nameDB_RSgtlt/tdgtlt/trgt
  • lttrgtltthgtWrite securitylt/thgtlttdgtltinput
    typepassword nameDB_WSgtlt/tdgtlt/trgt
  • lttrgtltthgtDatabase Prefixlt/thgtlttdgtltinput typetext
    nameDB_Pgtlt/tdgtlt/trgt
  • lttrgtltthgtDatabase Masterlt/thgtlttdgtltinput typetext
    nameDB_MSgtlt/tdgtlt/trgt
  • lt/tablegt
  • ltinput typesubmit valueGogt
  • ltinput typehidden namesirapp valuesysproc.cgi.r
    unfilegt
  • ltinput typehidden nameRUNFILE value"edit.pql"gt
  • ltinput typehidden nameDB_WR value"yes"gt
  • lt/formgtlt/BODYgtlt/HTMLgt

17
Demonstrate General Purpose Web Access -3
  • ltHTMLgt
  • ltHEADgt
  • ltTITLEgtGeneral Purpose SIR2000 Database Access
    Forms lt/TITLEgt
  • lt/HEADgtltBODYgt
  • ltform methodpost action"/cgi-bin/sirweb.cgi"gt
  • lttablegt
  • lttrgtltthgtDatabase Namelt/thgtlttdgtltinput typetext
    nameDB_DBgtlt/tdgtlt/trgt
  • lttrgtltthgtPassword lt/thgtlttdgtltinput typepassword
    nameDB_PWgtlt/tdgtlt/trgt
  • lttrgtltthgtRead Securitylt/thgtlttdgtltinput
    typepassword nameDB_RSgtlt/tdgtlt/trgt
  • lttrgtltthgtWrite securitylt/thgtlttdgtltinput
    typepassword nameDB_WSgtlt/tdgtlt/trgt
  • lttrgtltthgtDatabase Prefixlt/thgtlttdgtltinput typetext
    nameDB_Pgtlt/tdgtlt/trgt
  • lt/tablegt
  • ltinput typesubmit valueGogt
  • ltinput typehidden namesirapp valuesysproc.cgi.r
    unfilegt
  • ltinput typehidden nameRUNFILE value"edit.pql"gt
  • lt/formgtlt/BODYgtlt/HTMLgt

18
Summary - 1
  • Install SIR2000
  • Install PWS
  • Set up files
  • Test forms

19
Summary - 2
  • Check security
  • Be careful with sirweb.isa
  • Check sysproc.cgi.runfile for source of files
  • Make site available

20
The End
  • End of presentation
  • Any Questions?
Write a Comment
User Comments (0)
About PowerShow.com