1 / 20

Implementing Web data access using sirweb.cgi

Implementing Web data access using sirweb.cgi. By Dave Doulton University of Southampton. Agenda . Install SIR2000. Install PWS. Copy files from SIR2000 to PWS. Demonstrate web access. Demonstrate General Purpose Web Access Summary. Install SIR2000. Run Setup.exe.

auryon
Download Presentation

Implementing Web data access using sirweb.cgi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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.go&sirmem=Run&sirtxt=descrip • localhost can be machine’s 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 <html> <head><title>SIR demo </title> </head><body> <form action="/cgi-bin/sirweb.cgi" method="post"> <input type="hidden" name="sirmem" value="Run"> <input type="hidden" name="sirapp" value="sysproc.cgi.go"> <select name="sirtxt" size="1"> <option value="fcache">flush cache</option> <option value="default">default</option> <option value="stdout">stdout</option> <option value="hello">hello</option> <option value="call">call</option> <option value="menupic">welcome picture</option> <option value="splash">splash</option> <option value="runfile">run file</option> <option selected value="descrip">descriptive</option> <option value="entry">data entry</option> <option value="report1">report</option> <option value="freport">full report</option> <option value="table1">table</option> <option value="tables">tables</option> <option>excel</option> <option value="spss">spss</option> </select> <p>File to execute <input type="text" size="20" name="RUNFILE"> </p> <p><input type="submit" value="submit"> </p> </form></body></html>

  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)'<h3> <sirver> <date> <time> </h3>' end program

  12. Demonstrate web access - 5 • Simple form to run file <html> <head> <title>Run SIR PQL </title> </head> <body> <form action="/cgi-bin/sirweb.cgi" method="post"> <input type="hidden" name="sirapp" value="sysproc.cgi.runfile"> File to execute <input type="text" size="20" name="RUNFILE"> <input type="submit" value="submit"> </form></body></html>

  13. Demonstrate web access - 6 • You can have a form that does not look like a form and always does the same thing <HTML><HEAD> <TITLE>Run Descriptive </TITLE> </HEAD><BODY> <A HREF="javascript:document.forms[0].submit()">run desciptive</A><BR> <form name=descrip method=post action="/cgi-bin/sirweb.cgi"> <input type=hidden name=sirapp value=sysproc.cgi.go> <input type=hidden name=sirmem value="Run"> <input type=hidden name=sirtxt value="descrip"> </form></BODY></HTML>

  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 VARIABLE=CURRPOS / FILENAME=CGI/ 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_WR=yes means update • anything else just show

  16. Demonstrate General Purpose Web Access -2 <HTML> <HEAD> <TITLE>General Purpose SIR2000 Database Access Forms </TITLE> </HEAD> <BODY> <form method=post action="/cgi-bin/sirweb.cgi"> <table> <tr><th>Database Name</th><td><input type=text name=DB_DB></td></tr> <tr><th>Password </th><td><input type=password name=DB_PW></td></tr> <tr><th>Read Security</th><td><input type=password name=DB_RS></td></tr> <tr><th>Write security</th><td><input type=password name=DB_WS></td></tr> <tr><th>Database Prefix</th><td><input type=text name=DB_P></td></tr> <tr><th>Database Master</th><td><input type=text name=DB_MS></td></tr> </table> <input type=submit value=Go> <input type=hidden name=sirapp value=sysproc.cgi.runfile> <input type=hidden name=RUNFILE value="edit.pql"> <input type=hidden name=DB_WR value="yes"> </form></BODY></HTML>

  17. Demonstrate General Purpose Web Access -3 <HTML> <HEAD> <TITLE>General Purpose SIR2000 Database Access Forms </TITLE> </HEAD><BODY> <form method=post action="/cgi-bin/sirweb.cgi"> <table> <tr><th>Database Name</th><td><input type=text name=DB_DB></td></tr> <tr><th>Password </th><td><input type=password name=DB_PW></td></tr> <tr><th>Read Security</th><td><input type=password name=DB_RS></td></tr> <tr><th>Write security</th><td><input type=password name=DB_WS></td></tr> <tr><th>Database Prefix</th><td><input type=text name=DB_P></td></tr> </table> <input type=submit value=Go> <input type=hidden name=sirapp value=sysproc.cgi.runfile> <input type=hidden name=RUNFILE value="edit.pql"> </form></BODY></HTML>

  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?

More Related