There are certain requirements a table must meet to work with these gateways. The most important is that it be ordered so that the unique record identifier must be the first field in the table (and of course the records must have a unique identifier). There must be a user that can search and add data to the table, but has no other privileges.
Each of the three types of HTML forms must include several hidden input fields. All three must have a field associating the name 'database' with the appropriate table name. Each should also contain a field associating the name 'authenticate' with the userid password string for a userid that can search and update data in the table. The administrator may instead choose to configure and use a default user/password authentication by editing the ORG perl scripts. Other items unique to one function are listed below in the HTML Form Templates. Each form should set its METHOD=POST and its ACTION to match the function desired (add, update or search).
Some names are reserved by the software and should not be used in HTML forms. They are: database, request, authenticate, field, choice, searchtype, sum_fields, sequence, and query. Using any of these names will cause unpredictable results.
To access your data through the web, use one of the following templates to build a form which will retrieve your data and provide the desired database access(search/browse, add, update). Do not use reserved names for input field names (see above). Pay attention to comment blocks, which are indicated by the HTML comment tags <!-- --> for information about user configurable options:
Hidden Options | ||
---|---|---|
Variable Name | Description | Example Contents |
database | name of Oracle table | ER_instructor |
authenticate | SQLplus username and password separated with forward slash | ereserve/Jtr23sa |
title | Title for results set | Instructor List |
sum_fields | Summary field columns list | last*first*dept |
User-Definable Options | ||
Variable Name | Description | Example Contents |
field | Table field to be searched | last |
query | Search string entered by user | Jones |
searchtype | Type of search (exact or substring) | substring |
report | Style of returned results (complete or summary) | complete |
sequence | Sequencer value being passed (yes/no) | no |
Search:
<HTML> <!-- Template web - oracle search form --> <HEAD><TITLE>Search Database</TITLE></HEAD> <BODY> <H1>Search Database</H1> <FORM METHOD=POST ACTION="http://server.edu/cgi-bin/OR_srch"> <INPUT NAME="database" VALUE="table_name" TYPE=HIDDEN> <INPUT NAME="authenticate" VALUE="userid/password" TYPE=HIDDEN> <!-- replace fielda, fieldb with fields from table to be searchable --> Search in <SELECT NAME="field"> <OPTION>fielda <OPTION>fieldb <OPTION>fieldc</SELECT> <BR> Search for <INPUT NAME="query" size=40> <I>Exactly <input name="searchtype" value="exact" type=radio> as a Substring <input name="searchtype" value="substring" type=radio checked><BR></I> <B>Complete Report: <input name="report" value="complete" type=radio> Summary Report: <input name="report" value="summary" type=radio checked></B> <!-- List of fields to be displayed in summary report --> <INPUT NAME="sum_fields" VALUE="fielda*fieldb*fieldc" TYPE=HIDDEN> <!-- Specify title to be displayed with result set --> <INPUT NAME="title" VALUE="your_title" TYPE=HIDDEN> <HR> <INPUT VALUE="Clear" TYPE=RESET> <INPUT VALUE="Submit" TYPE=SUBMIT> </FORM> </BODY> </HTML>Add:
<HTML> <!-- Template web - oracle add form --> <HEAD><TITLE>Add Item to Database</TITLE></HEAD> <BODY> <FORM METHOD=POST ACTION="http://server.edu/cgi-bin/OR_add"> <PRE> <!-- List of input fields for a record --> <input name="ID" type=hidden value="ID_seq.nextval"> <INPUT NAME="database" VALUE="table_name" TYPE=HIDDEN> <INPUT NAME="authenticate" VALUE="userid/password" TYPE=HIDDEN> </PRE> <HR> <INPUT VALUE="Clear" TYPE=RESET> <INPUT VALUE="Submit" TYPE=SUBMIT> </FORM> </BODY> </HTML>Update:
<HTML> <!-- Template web - oracle update form --> <HEAD><TITLE>Update Record in Database</TITLE></HEAD> <BODY> <FORM METHOD=POST ACTION="http://server.edu/cgi-bin/OR_updt"> <!-- Input field for search option --> <INPUT NAME="database" VALUE="table_name" TYPE=HIDDEN> <INPUT NAME="authenticate" VALUE="userid/password" TYPE=HIDDEN> <B>Complete Report: <input name="report" value="complete" type=radio> Summary Report: <input name="report" value="summary" type=radio checked></B> <HR> <INPUT VALUE="Clear" TYPE=RESET> <INPUT VALUE="Submit" TYPE=SUBMIT> </FORM> </BODY> </HTML>3.3 Examples
Table accessed (software):
Name Null? Type ------------------------------- -------- ---- SID NOT NULL NUMBER(10) WKSTATNUMB NOT NULL CHAR(10) TYPE CHAR(30) SOFTWARE NOT NULL CHAR(25) VERSION CHAR(10) LICENSE CHAR(20) FORMAT CHAR(10) PO CHAR(15) PRICE CHAR(10) STATUS CHAR(15)
These HTML forms provide access to the software inventory (above).
Add:
<HTML> <HEAD><TITLE>Add to Software Inventory</TITLE></HEAD> <BODY> <H1><IMG SRC="disk.gif">Add an item to Software Inventory</H1> <FORM METHOD=POST ACTION="/cgi-bin/OR_add"> <HR> <PRE> <input name="sid" type=hidden value="SID_seq.nextval"> <input name="database" type=hidden value="software"> Workstation Number: <INPUT NAME="wkstatnumb" size=15> <B>. . . <A HREF="/hardware/hw_search.html">Search hardware for wkstatnumb</A></B> Type: <select name="type"><option>Audio<option>Commercial Database Client<option>Database<option>DOS emulation<option>FTP client<option>Gopher client<option>Graphics<option>Mail<option>Menuing software<option>Networking<option>Operating System<option>Presentation<option>Serial Communications<option>Scheduling<option>Spreadsheet<option>Serer (httpd, ftpd, etc)<option>Telnet client<option>tn3270 client<option>Utility<option>Video<option>Virus Detection<option>Utility<option>WWW client<option>Word Processing<option>Other</select> Software: <input name="software" size=25> Version: <input name="version" size=10> License: <input name="license" size=20> Format: <input name="format" type="radio" value="35floppy" checked>3.5 floppy <input name="format" type="radio" value="54floppy">5.25 floppy<input name="format" type="radio" value="cd">CD-ROM Purchase Order: <input name="po" size=15> Price (if known): <input name="price" size=10> Status: <input name="status" type="radio" value="shareware">Shareware <input name="status" type="radio" value="freeware">Freeware <input name="status" type="radio" value="registered">Registered </PRE> <HR> <input value="Clear" TYPE=RESET> <input value="Submit" TYPE=SUBMIT> </FORM> </BODY> </HTML>Search:
<HTML> <HEAD><TITLE>Search Software Inventory</TITLE></HEAD> <BODY> <H1><IMG SRC="disk.gif">Search Software Inventory</H1> <FORM METHOD=POST ACTION="http://server.edu/cgi-bin/OR_srch"> <input name="database" value="software" type=hidden> Search on <SELECT NAME="field"><option>Software<OPTION>Type<OPTION>Wkstatnumblt;option>PO<OPTION>Status</SELECT> <BR> Search for: <INPUT NAME="query" size=50><BR> <B>Complete Report: <input name="report" value="complete" type=radio> Summary Report: <input name="report" value="summary" type=radio checked></B> <HR> <input value="Clear" TYPE=RESET> <input value="Submit" TYPE=SUBMIT> </FORM> </BODY> </HTML>Update:
<HTML> <HEAD><TITLE>Update a Software Inventory Record</TITLE></HEAD> <BODY> <H1><IMG SRC="disk.gif">Update a Software Inventory Record</H1><I>Move/de-install software or change installation information such as serial or version number</I><P> <B>Instructions:</B><BR> Enter the workstation number for the system on which the software is installed. This will return a list of installed software. Select the package you wish to change from this list. The full record will then be presented in a form for modification. Submit the changes when completed. <FORM METHOD=POST ACTION="http://server.edu/cgi-bin/OR_updt"> <input name="database" value="software" type=hidden> Enter Workstation number: <input name="query" size=15> <B>. . . <A HREF="sw_search.html">Search for an item</A></B><BR> <INPUT NAME="field" value="wkstatnumb" type=hidden> <input name="report" value="summary" type=hidden><BR> <B>Complete Report: <input name="report" value="complete" type=radio> Summary Report: <input name="report" value="summary" type=radio checked></B> <HR> <input value="Clear" TYPE=RESET> <input value="Submit" TYPE=SUBMIT> </FORM> </BODY> </HTML>