From: Adam Dickmeiss Date: Fri, 26 Jan 1996 17:41:25 +0000 (+0000) Subject: Work on HTML3 detection. Tables are used to display history. X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=3bbb844581f17ede97f6eb7ea8022b69a0859420;p=egate.git Work on HTML3 detection. Tables are used to display history. --- diff --git a/www/egwindex.html b/www/egwindex.html index 5a8b9db..39ce406 100644 --- a/www/egwindex.html +++ b/www/egwindex.html @@ -3,18 +3,28 @@ Europagate WWW index -

Europagate WWW index, $Id: egwindex.html,v 1.7 1996/01/08 08:42:12 adam Exp $

+

Europagate WWW index, $Id: egwindex.html,v 1.8 1996/01/26 17:41:25 adam Exp $

-z39 targets: - targets.egw -(with - debug) -
-Multiple z39 targets: - mtargets.egw -(with -debug) -
+

diff --git a/www/mtargets.egw b/www/mtargets.egw index 1d5dc32..5b641f5 100644 --- a/www/mtargets.egw +++ b/www/mtargets.egw @@ -1,34 +1,36 @@ { -# $Id: mtargets.egw,v 1.12 1996/01/26 15:50:07 adam Exp $ +# $Id: mtargets.egw,v 1.13 1996/01/26 17:41:25 adam Exp $ set setNo 1 source ztargets.conf if {[info commands saveState] == ""} { source z39util.tcl } set mMode 1 -} - -Europagate, WWW/Z39.50 Gateway - - -{ + if {![info exists debug]} { - if {[lindex $sessionParms 0] == "1"} { + if {[lindex $sessionParms 1] == "1"} { set debug 1 } else { set debug 0 } } - - if {![info exists useIcons]} { - if {[lindex $sessionParms 1] == "1"} { - set useIcons 0 + set html3 [lindex $sessionParms 0] + if {$html3 == ""} { + if {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} { + set html3 1 + egw_log debug "New user using Netscape" } else { - set useIcons 1 + set html3 0 + egw_log debug "New user Not using Netscape" } } - +} + +Europagate, WWW/Z39.50 Gateway + + +{ set useIcons 1 button-europagate button-define-target 0 diff --git a/www/targets.egw b/www/targets.egw index 46d61e1..55d8189 100644 --- a/www/targets.egw +++ b/www/targets.egw @@ -1,18 +1,29 @@ { -# $Id: targets.egw,v 1.18 1996/01/26 15:50:10 adam Exp $ +# $Id: targets.egw,v 1.19 1996/01/26 17:41:26 adam Exp $ source ztargets.conf if {[info commands saveState] == ""} { source z39util.tcl } + set mMode 0 + if {![info exists debug]} { - if {[lindex $sessionParms 0] == "1"} { + if {[lindex $sessionParms 1] == "1"} { set debug 1 } else { set debug 0 } } - set mMode 0 + set html3 [lindex $sessionParms 0] + if {$html3 == ""} { + if {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} { + set html3 1 + egw_log debug "New user using Netscape" + } else { + set html3 0 + egw_log debug "New user Not using Netscape" + } + } } Europagate, WWW/Z39.50 Gateway diff --git a/www/z39util.tcl b/www/z39util.tcl index 6860b16..e703062 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.26 1996/01/26 15:50:11 adam Exp $ +# $Id: z39util.tcl,v 1.27 1996/01/26 17:41:26 adam Exp $ # proc saveState {} { uplevel #0 { @@ -949,35 +949,73 @@ proc z39history {} { global env global sessionId global targets + global html3 if {![info exists nextSetNo]} { return } - html "

History


\n" + html "

History


\n" + if {$html3} { + html {} + html {} "\n" + } else { + html {
} "\n" + } for {set setNo 1} {$setNo < $nextSetNo} {incr setNo} { if {$hist($setNo,scan) > 0} continue set host $hist($setNo,host) - html {
} [lindex $targets($host) 0] - if {[llength [lindex $targets($host) 1]] > 1} { - html ": " - foreach b $hist($setNo,database) { - html " $b" + if {$html3} { + html {
} "\n" + } } - html "\n" + if {$html3} { + html {
Target} + html {Database} + html {Hits} + html {Query} + html {
} + } else { + html {
} + } + html [lindex $targets($host) 0] + if {$html3} { + html {
} [join $hist($setNo,database)] + } else { + if {[llength [lindex $targets($host) 1]] > 1} { + html ": " + foreach b $hist($setNo,database) { + html " $b" + } } + html {. } + } + if {$html3} { + html {} } - html {. } - if {[info exists hist($setNo,hits)]} { html { Result: } $hist($setNo,hits) { hits.} + if {1} { + html {">} $hist($setNo,hits) {} + } else { + html {">Result: } $hist($setNo,hits) { hits.} + } } else { - html {Search failed.} + if {$html3} { + html {Failed} + } else { + html {Search failed.} + } + } + if {$html3} { + html {} + } else { + html "
\n" } - html "
\n" html { Query: } + html / $sessionId {/query.egw/} $host + $setNo + if {$html3} { + html {">} + } else { + html {">Query: } + } set op {} for {set i 1} {$i <= 3} {incr i} { if {[string length $hist($setNo,form,entry$i)] > 0} { @@ -987,8 +1025,16 @@ proc z39history {} { set op $hist($setNo,form,logic$i) } } + if {$html3} { + html {

} + } else { + html {

} + } + html "\n" } proc displayError {msga msgb} { @@ -1003,10 +1049,11 @@ proc displayError {msga msgb} { proc button-europagate {} { global useIcons + html {} if {$useIcons} { html {Europagate} } else { - html {Europagate | } + html {Europagate | } } }