by the cgi interface program.
Work on more simple user interface and Europagate buttons.
# Europagate, 1995
#
# $Log: Makefile,v $
-# Revision 1.17 1995/11/14 16:31:35 adam
+# Revision 1.18 1995/12/20 16:31:30 adam
+# Bug fix: shell might terminate even though new request was initiated
+# by the cgi interface program.
+# Work on more simple user interface and Europagate buttons.
+#
+# Revision 1.17 1995/11/14 16:31:35 adam
# Temporary remove of ccl entry.
#
# Revision 1.16 1995/11/14 16:01:50 adam
mtargets.egw mquery.egw msearch.egw
HSCRIPTS=egwindex.html
CONFFILES=ztargets.conf
-GIFFILES=webgate.gif darrw.gif uarrw.gif noway.gif
TPROG1=egwcgi
TPROG2=egwsh
TPROG3=wtest
echo Installing $$x; \
cp $$x $(CONFDIR); \
done
- @for x in $(GIFFILES); do \
+ @for x in gif/*.gif; do \
echo Installing $$x; \
cp $$x $(GIFDIR); \
done
</head>
<body>
{
-# $Id: query.egw,v 1.18 1995/11/14 16:31:36 adam Exp $
+# $Id: query.egw,v 1.19 1995/12/20 16:31:31 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
ir z39
}
- html "<h2> Search in " [lindex $targets($host) 0] "</h2>\n"
+ html {<h2><img src="/gif/button-egw.gif" border=0 align=middle>}
+ html " Search in " [lindex $targets($host) 0] "</h2>\n"
z39 callback ok-response
z39 failback fail-response
html {<input type="checkbox" name="baseall" value="}
html [concat $databases] {"> All <br>} \n
}
+ html "Input your search criteria:<br>\n"
}
}
-<hr>
-<h3>Input your search criteria: </h3> <br>
{
set fields [lindex $targets($host) 2]
for {set no 1} {$no < 4} {incr no} {
}
}
-{
- if {0} {
- html {<hr><p>Alternatively you can enter your query in }
- html {<a href="http://www.dtv.dk/ccl.html"> CCL </a> here: <br>}
- html {<input type=text name="cclentry" size=52> <br>}
- html "<hr>\n"
- }
-}
<input type=submit value="Search"><input type=reset value="Reset">
-<h3> Various technical parameters: </h3> <br>
+<br>
{
- html {Max hits: <input type="text" name="hits" value="}
+ html {Number of records to display in the result set list: }
+ html {<input type="text" name="hits" value="}
if {$oSetNo > 0} {
html $hist($oSetNo,maxPresent)
} else {
}
html {" size=3>}
}
-Records are shown in:
-<select name="format">
-<option> Long format
-<option> Medium format
-<option> Short format
-<option> Raw MARC
-</select>
<br>
<p>
</form>
+
+{
+ html {<img src="/gif/button-egw.gif" border=0></a>}
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/targets.egw}
+ html {"><img src="/gif/button-new-target.gif" border=0></a>}
+}
+
<hr>
This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
Last modified 29. september 1995. <br>
<em> This and the following pages are under construction
and will continue to be so until the end of December 1995.</em>
-<hr>
{
- html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw"> New target </a>}
-}
-{
html "<hr>\n"
html "<h3>Debug information</h3>\n"
html "sessionId: $sessionId <br>\n"
<html>
{
-# $Id: search.egw,v 1.17 1995/11/14 16:01:51 adam Exp $
+# $Id: search.egw,v 1.18 1995/12/20 16:31:31 adam Exp $
proc buttons {setNo setMax startPos after} {
global sessionId
+ global useIcons
global env
global hist
- if {$after && $setMax < [z39.$setNo resultCount]} {
+ if {!$useIcons && $after && $setMax < [z39.$setNo resultCount]} {
html "<p>\n"
html "<center>\n"
html {<a href="http:} $env(SCRIPT_NAME)
}
html "<p>\n"
+ if {$useIcons} {
+ html {<img src="/gif/button-egw.gif">}
+ }
if {$setMax < [z39.$setNo resultCount]} {
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
html + [expr $setMax + $hist($setNo,maxPresent)]
- html {">Next records</a>} " | \n"
+ if {$useIcons} {
+ html {"><img src="/gif/button-next-records.gif" border=0></a>}
+ } else {
+ html {">Next records</a>} " | \n"
+ }
}
if {$startPos != "" && $startPos != "1"} {
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo
html + [expr $startPos - $hist($setNo,maxPresent)]
html + [expr $startPos - 1]
- html {">Previous records</a>} " | \n"
+ if {$useIcons} {
+ html {"><img src="/gif/button-previous-records.gif" border=0></a>}
+ } else {
+ html {">Previous records</a>} " | \n"
+ }
}
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
- html {">New query</a>} " | \n"
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-query.gif" border=0></a>}
+ } else {
+ html {">New query</a>} " | \n"
+ }
html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw">New target</a>} "<p>\n"
-
- if {!$after && $startPos != "" && $startPos != "1"} {
+ html / $sessionId {/targets.egw}
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-target.gif" border=0></a>}
+ } else {
+ html {">New target</a>}
+ }
+ html "<p>\n"
+ if {!$useIcons && !$after && $startPos != "" && $startPos != "1"} {
html "<center>\n"
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo
set hist($nextSetNo,idAuthentication) $hist($setNo,idAuthentication)
set hist($nextSetNo,host) $hist($setNo,host)
set setNo $nextSetNo
- html "using host " $hist($setNo,host) " <br\n"
set query [build-query $hist($setNo,host)]
if {"x$query" == "x"} {
<html>
{
-# $Id: showfull.egw,v 1.11 1995/11/14 09:30:20 adam Exp $
+# $Id: showfull.egw,v 1.12 1995/12/20 16:31:32 adam Exp $
proc buttons {setNo tno no format count host after} {
global sessionId
+ global useIcons
global env
global hist
html "<p>\n"
- if {$after && $no < $count} {
+ if {!$useIcons && $after && $no < $count} {
html "<center>\n"
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + $tno +
html {"><img src="/gif/darrw.gif"></a>}
html "</center><p>\n"
}
+ if {$useIcons} {
+ html {<img src="/gif/button-egw.gif">}
+ }
if {$no < $count} {
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + $tno +
html [expr $no + 1] + $format
- html {">Next record</a>} " | \n"
+ if {$useIcons} {
+ html {"><img src="/gif/button-next-record.gif" border=0></a>}
+ } else {
+ html {">Next record</a>} " | \n"
+ }
}
if {$no > 1} {
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + $tno +
html [expr $no - 1] + $format
- html {">Previous record</a>} " | \n"
+ if {$useIcons} {
+ html {"><img src="/gif/button-previous-record.gif" border=0></a>}
+ } else {
+ html {">Previous record</a>} " | \n"
+ }
}
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + $tno + $no +
if {$format == "full"} {
- html raw {">Raw format</a>} " | \n"
+ html raw
+ if {$useIcons} {
+ html {"><img src="/gif/button-raw-marc.gif" border=0></a>}
+ } else {
+ html {">Raw format</a>} " | \n"
+ }
} else {
- html full {">Full format</a>} " | \n"
+ html full
+ if {$useIcons} {
+ html {"><img src="/gif/button-full-format.gif" border=0></a>}
+ } else {
+ html {">Full format</a>} " | \n"
+ }
}
html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
}
html $setNo + 1
html + $hist($setNo,maxPresent)
- html {">Result set</a>} " | \n"
-
+ if {$useIcons} {
+ html {"><img src="/gif/button-result-set.gif" border=0></a>}
+ } else {
+ html {">Result set</a>} " | \n"
+ }
html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
if {$tno > 0} {
html {/mquery.egw/}
html {/query.egw/}
}
html $host + $setNo
- html {">New query</a>} " | \n"
-
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-query.gif" border=0></a>}
+ } else {
+ html {">New query</a>} " | \n"
+ }
html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
if {$tno > 0} {
html {/mtargets.egw}
} else {
html {/targets.egw}
}
- html {">New target</a>} "<p>\n"
-
- if {!$after && $no > 1} {
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-target.gif" border=0></a>}
+ } else {
+ html {">New target</a>}
+ }
+ html "<p>\n"
+ if {!$useIcons && !$after && $no > 1} {
html "<p><center>\n"
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + $tno +
<html>
{
-# $Id: targets.egw,v 1.7 1995/11/08 16:14:34 adam Exp $
+# $Id: targets.egw,v 1.8 1995/12/20 16:31:32 adam Exp $
source /usr/local/etc/httpd/conf/ztargets.conf
if {[info commands saveState] == ""} {
source z39util.tcl
<title> Europagate, WWW/Z39.50 Gateway </title>
</head>
<body>
-<center>
-<img src="/gif/webgate.gif" Alt="Welcome to EUROPAGATE">
-</center>
-Part of Europagate is a World Wide Web to Z39.50 gateway. The gateway provides search and
-retrieve facilities in the databases of various libraries. <p>
-<a href="http://www.dtu.dk/dtv/egate/egate.html"> Europagate </a> is a
-project in the <a href="http://www.echo.lu/programmes/en/LIBRARIES.html">
-EU libraries Programme </a> carried out by: <br>
-<a href="http://www.ucd.ie/"> University College Dublin </a> <br>
-<a href="http://www.dtv.dk/dtv/">Technical University & Library of Denmark </a> <br>
-Library Council <br>
-Consejo Superior de Investigaciones Científicas <br>
-<hr>
-<h3> Choose a Z39.50 target: </h3>
+<h3>
+<img src="/gif/button-egw.gif" Alt="Welcome to EUROPAGATE" align=middle>
+ Choose a Z39.50 target: </h3>
<dl>
{
foreach t [array names targets] {
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Log: wcgi.c,v $
- * Revision 1.8 1995/11/08 16:14:35 adam
+ * Revision 1.9 1995/12/20 16:31:33 adam
+ * Bug fix: shell might terminate even though new request was initiated
+ * by the cgi interface program.
+ * Work on more simple user interface and Europagate buttons.
+ *
+ * Revision 1.8 1995/11/08 16:14:35 adam
* Many improvements and bug fixes.
* First version that ran on dtbsun.
*
path_info++;
if (*path_info)
*(path_info++) = '\0';
- if (!(gw_db = gw_db_open ("user.db", 1)))
+ if (!(gw_db = gw_db_open ("www.db", 1, 1)))
{
gw_log (GW_LOG_FATAL, prog, "gw_db_open");
exit (1);
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Log: wsh.c,v $
- * Revision 1.7 1995/11/06 17:44:23 adam
+ * Revision 1.8 1995/12/20 16:31:33 adam
+ * Bug fix: shell might terminate even though new request was initiated
+ * by the cgi interface program.
+ * Work on more simple user interface and Europagate buttons.
+ *
+ * Revision 1.7 1995/11/06 17:44:23 adam
* State reestablised when shell restarts. History of previous
* result sets.
*
#include <unistd.h>
#include <ctype.h>
+#include <gw-db.h>
#include "whtml.h"
#include "wtcl.h"
#include "wirtcl.h"
-#define TIMEOUT_SHORT 60
-#define TIMEOUT_MEDIUM 1800
-#define TIMEOUT_LONG 7200
+#define TIMEOUT 60
static WCLIENT wcl;
static char *mod = "wsh";
int main (int argc, char **argv)
{
char *script, *parms, parms_buf[512];
- int timeout = TIMEOUT_SHORT;
+ int timeout;
W_Interp w_interp;
+ GW_DB gw_db;
chdir("/usr/local/etc/httpd/cgi-bin");
gw_log_init (*argv);
exit (1);
}
w_interp_load_state (w_interp, NULL);
- while (wproto_process(wcl, timeout) > 0)
+ timeout = TIMEOUT;
+ while (1)
{
char *p;
+ int r;
+ r = wproto_process (wcl, timeout);
+ if (r <= 0)
+ {
+ gw_db = gw_db_open ("www.db", 0, 0);
+ if (gw_db)
+ break;
+ gw_log (GW_LOG_DEBUG, mod, "Cannot terminate - new request");
+ timeout = 10;
+ continue;
+ }
+ timeout = TIMEOUT;
wo_clear (wcl, "text/html");
strcpy (parms_buf, wcl->wf_parms);
script = parms = parms_buf;
#
-# $Id: z39util.tcl,v 1.11 1995/11/14 16:01:52 adam Exp $
+# $Id: z39util.tcl,v 1.12 1995/12/20 16:31:34 adam Exp $
#
proc saveState {} {
uplevel #0 {
set indicator [lindex $line 1]
set fields [lindex $line 2]
set l [string length $indicator]
- html "$tag "
+ html "<tt>$tag "
if {$l > 0} {
for {set i 0} {$i < $l} {incr i} {
if {[string index $indicator $i] == " "} {
}
}
}
+ html "</tt>"
foreach field $fields {
set id [lindex $field 0]
set data [lindex $field 1]
}
html $cc
if {$ref != ""} {
- html {">} $urltype { reference</a>}
+ html {">} $cc {</a>}
}
}
}
html "</center><p>\n"
}
+
+set useIcons 1
\ No newline at end of file