<html>
{
-# $Id: search.egw,v 1.35 1996/03/08 16:47:05 adam Exp $
+# $Id: search.egw,v 1.38 1996/03/13 14:07:31 adam Exp $
proc start-scan {scanNo targetNo cache dir initSet} {
global sessionId
html "</head><body>\n"
set useIcons 1
- button-europagate
+ button-main
if {$dir == "b"} {
set lines 20
}
if {$hist($setNo,$scanNo,scanTerm) != ""} {
if {[z39scan $setNo $scanNo 0 $lines $pos $cache] != "1"} {
- button-new-query 0 $setNo
+ button-new-query $setNo
egw_log debug "z39_scan failed"
return
}
}
html {</a>}
}
- button-new-query 0 $setNo
+ button-new-query $setNo
set databases [splitDatabaseSpec $host]
set useIcons 0
if {$hist($setNo,$scanNo,scanTerm) == ""} {
- button-europagate
- button-new-query 0 $setNo
+ button-main
+ button-new-query $setNo
return
}
display-scan $setNo $scanNo 0
html "<p>\n"
- button-europagate
+ button-main
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + $targetNo +
html {Next Terms</a> | }
}
html {</a>}
- button-new-query 0 $setNo
+ button-new-query $setNo
if {!$debug} return
html "<hr>\n"
html $e {: } $env($e) {<br>} \n
}
html "form: " [egw_form] " <br>\n"
- html "target: " $host " <br>\n"
html "databases: " $hist($setNo,$targetNo,database) " <br>\n"
html "selected: " [egw_form base] " <br>\n"
html "setNo: " $setNo " <br>\n"
set setNo $nextSetNo
incr nextSetNo
} else {
- catch {unset hist($setNo,hits)}
+ catch {unset hist($setNo,$targetNo,hits)}
}
set hist($setNo,scan) 0
set b [egw_form base]
if {[egw_form baseall] != ""} {
- set hist($setNo,0,database) $databases
+ set hist($setNo,$targetNo,database) $databases
} elseif {$b == ""} {
- set hist($setNo,0,database) $databases
+ set hist($setNo,$targetNo,database) $databases
} else {
- set hist($setNo,0,database) $b
+ set hist($setNo,$targetNo,database) $b
}
set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,maxPresent) 30
}
+ set hist($setNo,format) brief
+ set hist($setNo,sort) server
+
set i [lindex $sessionParms 2]
- if {$i == ""} {
+ if {[string length $i] == 0} {
for {set j 1} {$j <= 3} {incr j} {
if {[egw_form scan$j] != ""} {
set i $j
}
}
}
- if {$i != ""} {
+ if {[string length $i] != 0} {
set scanNo 1000
set hist($setNo,scan) $i
set termPlusAttr [build-scan $hist($setNo,0,host) $i]
return
}
set query [build-query $hist($setNo,0,host) 3]
- if {"x$query" == "x"} {
+ if {[string length $query] == 0} {
html "<head><title> WWW/Z39.50 Gateway Search</title>\n<body>\n"
displayError "Empty query" \
"You must specify at least one search word"
set setNo $nextSetNo
incr nextSetNo
} else {
- catch {unset hist($setNo,hits)}
+ catch {unset hist($setNo,$targetNo,hits)}
}
set hist($setNo,scan) 0
set hist($setNo,$targetNo,query) \
html "env($n) = " $env($n) " <br>\n"
}
html "form: " [egw_form] " <br>\n"
- html "target: " $host " <br>\n"
html "databases: " $hist($setNo,$targetNo,database) " <br>\n"
html "selected: " [egw_form base] " <br>\n"
html "query: --" $hist($setNo,$targetNo,query) "-- <br>"