From 8bafbc608e1ffba9ee87f4856e586dffa57901b8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 14 Mar 1996 11:50:44 +0000 Subject: [PATCH] Attempt to inform user if session has really terminated. --- www/history.egw | 15 ++++++++------- www/mquery.egw | 12 +++++++----- www/msearch.egw | 6 +++++- www/mtargets.egw | 8 ++++---- www/nwi.egw | 8 ++++---- www/nwiutil.tcl | 4 ++-- www/query.egw | 12 +++++++----- www/search.egw | 6 +++++- www/showfull.egw | 6 +++++- www/targets.egw | 34 +++++++++++++++++++++++++++++----- www/tdefine.egw | 30 ++++++++++++++++++++++-------- www/tform.egw | 27 ++++++++++++++++++++++----- www/z39util.tcl | 20 ++++++++++++++++++-- www/ztargets.conf | 9 ++++++--- 14 files changed, 144 insertions(+), 53 deletions(-) diff --git a/www/history.egw b/www/history.egw index 4c18e79..f9360d3 100644 --- a/www/history.egw +++ b/www/history.egw @@ -1,15 +1,17 @@ - - WWW/Z39.50 Gateway History - - { -# $Id: history.egw,v 1.7 1996/03/13 14:07:29 adam Exp $ +# $Id: history.egw,v 1.8 1996/03/14 11:50:44 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } + html { WWW/Z39.50 Gateway History} + set useIcons 1 button-main button-new-target @@ -19,8 +21,7 @@ set useIcons 0 button-main button-new-target -} -{ + catch maintenance if {!$debug} return html "
\n" diff --git a/www/mquery.egw b/www/mquery.egw index 364a8cd..b694786 100644 --- a/www/mquery.egw +++ b/www/mquery.egw @@ -1,13 +1,13 @@ - - WWW/Z39.50 Gateway Query Form - - { -# $Id: mquery.egw,v 1.15 1996/03/13 14:07:29 adam Exp $ +# $Id: mquery.egw,v 1.16 1996/03/14 11:50:45 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } global setNo @@ -20,6 +20,8 @@ set setNo 1 } + html { WWW/Z39.50 Gateway Query Form} + set useIcons 1 button-main button-new-target diff --git a/www/msearch.egw b/www/msearch.egw index ef43804..5544a3c 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,9 +1,13 @@ { -# $Id: msearch.egw,v 1.20 1996/03/13 14:07:29 adam Exp $ +# $Id: msearch.egw,v 1.21 1996/03/14 11:50:45 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } global sessionWait global nextSetNo diff --git a/www/mtargets.egw b/www/mtargets.egw index e3bb9dd..0d23dc9 100644 --- a/www/mtargets.egw +++ b/www/mtargets.egw @@ -1,11 +1,8 @@ { -# $Id: mtargets.egw,v 1.19 1996/03/13 14:07:30 adam Exp $ +# $Id: mtargets.egw,v 1.20 1996/03/14 11:50:46 adam Exp $ set setNo 1 source ztargets.conf - if {[info commands saveState] == ""} { - source z39util.tcl - } if {![info exists debug]} { if {[lindex $sessionParms 1] == "1"} { set debug 1 @@ -13,6 +10,9 @@ set debug 0 } } + if {[info commands saveState] == ""} { + source z39util.tcl + } set html3 [lindex $sessionParms 0] if {[string length $html3] == 0} { if {![info exists env(HTTP_USER_AGENT)]} { diff --git a/www/nwi.egw b/www/nwi.egw index a42ac74..75209c3 100644 --- a/www/nwi.egw +++ b/www/nwi.egw @@ -1,15 +1,12 @@ { -# $Id: nwi.egw,v 1.3 1996/03/13 14:07:30 adam Exp $ +# $Id: nwi.egw,v 1.4 1996/03/14 11:50:46 adam Exp $ source ztargets.conf set scriptQuery nwi.egw set scriptTarget {} set utilExtension nwiutil.tcl - if {[info commands saveState] == ""} { - source z39util.tcl - } if {![info exists debug]} { if {[lindex $sessionParms 1] == "1"} { set debug 1 @@ -17,6 +14,9 @@ set debug 0 } } + if {[info commands saveState] == ""} { + source z39util.tcl + } set html3 [lindex $sessionParms 0] if {[string length $html3] == 0} { if {![info exists env(HTTP_USER_AGENT)]} { diff --git a/www/nwiutil.tcl b/www/nwiutil.tcl index a3aa8ba..85b824d 100644 --- a/www/nwiutil.tcl +++ b/www/nwiutil.tcl @@ -1,5 +1,5 @@ # -# $Id: nwiutil.tcl,v 1.1 1996/03/12 16:30:27 adam Exp $ +# $Id: nwiutil.tcl,v 1.2 1996/03/14 11:50:46 adam Exp $ # proc button-main {} { @@ -15,6 +15,6 @@ proc button-main {} { proc maintenance {} { html {
This page is maintained by } html { Adam Dickmeiss .} - html {Last modified March 12, 1996.
} + html {Last modified March 14, 1996.
} } diff --git a/www/query.egw b/www/query.egw index f17cc58..74ad296 100644 --- a/www/query.egw +++ b/www/query.egw @@ -1,13 +1,13 @@ - - WWW/Z39.50 Gateway Query Form - - { -# $Id: query.egw,v 1.38 1996/03/13 14:07:30 adam Exp $ +# $Id: query.egw,v 1.39 1996/03/14 11:50:47 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } proc fail-response {} { @@ -24,6 +24,8 @@ proc ok-response {} { global nextSetNo global hist + html { WWW/Z39.50 Gateway Query Form} + set initSet [lindex $sessionParms 0] set host [lindex $sessionParms 1] set scanLine [lindex $sessionParms 2] diff --git a/www/search.egw b/www/search.egw index fd25d08..88969cd 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $Id: search.egw,v 1.38 1996/03/13 14:07:31 adam Exp $ +# $Id: search.egw,v 1.39 1996/03/14 11:50:48 adam Exp $ proc start-scan {scanNo targetNo cache dir initSet} { global sessionId @@ -170,6 +170,10 @@ proc start-scan {scanNo targetNo cache dir initSet} { if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } global sessionWait global nextSetNo diff --git a/www/showfull.egw b/www/showfull.egw index 8b33a18..abd1277 100644 --- a/www/showfull.egw +++ b/www/showfull.egw @@ -1,6 +1,6 @@ { -# $Id: showfull.egw,v 1.23 1996/03/13 14:07:31 adam Exp $ +# $Id: showfull.egw,v 1.24 1996/03/14 11:50:49 adam Exp $ proc buttons {setNo tno no format count host after} { global sessionId @@ -70,6 +70,10 @@ proc buttons {setNo tno no format count host after} { if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } global setNo diff --git a/www/targets.egw b/www/targets.egw index 04b5ec0..bd4838b 100644 --- a/www/targets.egw +++ b/www/targets.egw @@ -1,10 +1,7 @@ { -# $Id: targets.egw,v 1.23 1996/03/13 14:07:31 adam Exp $ +# $Id: targets.egw,v 1.24 1996/03/14 11:50:49 adam Exp $ source ztargets.conf - if {[info commands saveState] == ""} { - source z39util.tcl - } if {![info exists debug]} { if {[lindex $sessionParms 1] == "1"} { set debug 1 @@ -12,6 +9,9 @@ set debug 0 } } + if {[info commands saveState] == ""} { + source z39util.tcl + } set html3 [lindex $sessionParms 0] if {[string length $html3] == 0} { if {![info exists env(HTTP_USER_AGENT)]} { @@ -40,9 +40,32 @@ button-view-history } button-define-target - html "

Choose a target


\n" + html "

Select a target


\n" html "
\n" + if {1} { + proc headlineC {h} { + html {

} $h \n {

} + } + proc targetC {t} { + global targets + global env + global sessionId + + html {
} [lindex $targets($t) 0] + html {} + + html {
} + set desc [lindex $targets($t) 4] + if {[string length $desc] > 0} { + html "$desc
\n" + } + html "
\n" + } + serverList headlineC targetC + + } else { proc targetsCmp {l r} { global targets return [string compare [string tolower [lindex $targets($l) 0]] \ @@ -59,6 +82,7 @@ html "
$desc\n" } } + } html "

\n" set useIcons 0 button-main diff --git a/www/tdefine.egw b/www/tdefine.egw index ca5f862..28f27c8 100644 --- a/www/tdefine.egw +++ b/www/tdefine.egw @@ -1,14 +1,18 @@ - - WWW/Z39.50 Gateway Target Definition Response - - { -# $Id: tdefine.egw,v 1.5 1996/03/13 14:07:31 adam Exp $ +# $Id: tdefine.egw,v 1.6 1996/03/14 11:50:49 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } + + html { WWW/Z39.50 Gateway Target Definition Response} + html {} + set useIcons 1 button-main button-define-target @@ -22,6 +26,7 @@ set databases [lindex [egw_form databases] 0] set authentication [egw_form authentication] set fields [lindex [egw_form fields] 0] + set recordType [lindex [egw_form recordtype] 0] set ok 1 if {[string length $name] == 0} { @@ -39,6 +44,11 @@ html "must be specified.
\n" set ok 0 } + if {[string length $recordType] == 0} { + html "You didn't specify any record type. One record type " + html "must be specified.
\n" + set ok 0 + } catch {unset item} catch {unset attrList} set fname {} @@ -67,16 +77,20 @@ html " search fields must be present
\n" set ok 0 } + if {![string compare recordType WAIS]} { + set attrList { {Free-text} {} } + } set hostSpec [mergeHostSpec $host $databases] if {$ok} { global targets set targets($hostSpec) [list \ [join $name] \ - USMARC \ + $recordType \ $attrList \ $authentication \ $description \ - 1 ] + 1 \ + user ] html "Target successfully defined
\n" } html "

\n" @@ -90,7 +104,7 @@ if {!$debug} return - html "name=" $name "
\n" + html "\n
name=" $name "
\n" html "description=" $description "
\n" html "host=" $host "
\n" html "databases=" $databases "
\n" diff --git a/www/tform.egw b/www/tform.egw index ce34990..5c6f060 100644 --- a/www/tform.egw +++ b/www/tform.egw @@ -1,14 +1,17 @@ - - WWW/Z39.50 Gateway Target Definition - - { -# $Id: tform.egw,v 1.5 1996/03/13 14:07:32 adam Exp $ +# $Id: tform.egw,v 1.6 1996/03/14 11:50:50 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl + if {![info exists debug]} { + session-lost + egw_abort + } } + html {WWW/Z39.50 Gateway Target Definition} + html {} + set useIcons 1 button-main button-new-target @@ -38,6 +41,20 @@ html "i.e. passwords. Leave this field empty if no authentication " html "string is required." + html "\n

Record type:\n" + html {
} + html "\n
Select WAIS for a WAIS server. The " + html "other formats apply to Z39.50 servers" + html "\n
Databases\n" html {
} html "\n
Separate each database by blanks" diff --git a/www/z39util.tcl b/www/z39util.tcl index ba0b55e..36a28a1 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.40 1996/03/13 14:07:32 adam Exp $ +# $Id: z39util.tcl,v 1.41 1996/03/14 11:50:51 adam Exp $ # proc saveState {} { uplevel #0 { @@ -1872,6 +1872,22 @@ proc serverList {headlineProc targetProc} { rename targetsCmp {} } +proc session-lost {} { + global useIcons + + html {WWW/Z39.50 Gateway: Session Expired} + html \n {} + set useIcons 1 + button-main + html {

Session Expired

} + html {Your session has expired. Please reload the gateways' } + html {front page.

} \n + set useIcons 0 + button-main + html {} +} + if {[info exists utilExtension]} { source $utilExtension -} \ No newline at end of file +} + diff --git a/www/ztargets.conf b/www/ztargets.conf index b7d2dfd..504e64f 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.31 1996/03/13 14:07:33 adam Exp $ +# $Id: ztargets.conf,v 1.32 1996/03/14 11:50:53 adam Exp $ # # This file contains the predefined targets in the WWW-Z39.50 gateway # Each target is an entry in the associative array "targets". The @@ -200,7 +200,7 @@ set targets(Tikal.dev.oclc.org/AGRICOLA) [list \ ] set targets(nwi.ub2.lu.se/sverige) { - NWI-Sweden + Sweden WAIS \ { { Free-text {@attr 1=4} } } {} @@ -211,7 +211,7 @@ set targets(nwi.ub2.lu.se/sverige) { set targets(nwi.ub2.lu.se/new_nor_lib) { - NWI-Norway + Norway WAIS { { Free-text {@attr 1=4} } } {} @@ -301,3 +301,6 @@ set groupsOrder(z39sample) 99 set groupsDescription(test) {Test servers} set groupsOrder(test) 100 +set groupsDescription(user) {User defined servers} +set groupsOrder(user) 101 + -- 1.7.10.4