WOK_SQL end def buttons2 <<-'WOK_SQL' |
#@tip #@search_note #@the_can |
WOK_SQL
end
def buttons3
<<-'WOK_SQL'
echo previous search search result stats url for search available search fields sql statement checks: selected all none |
SiSU © Ralph Amissah
1993, current 2007
All Rights Reserved.
|
Developed using
Ruby
on
Debian/Gnu/Linux
software infrastructure,
& with the usual GPL (or OSS) suspects.
| |
Generated by
SiSU
#{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
|
Using:
|
ocn #{c['ocn']}:
#{matched_para}} elsif c['suffix'] =~/1/ #doc %{#{title}ocn #{c['ocn']}:#{c['body']}}
end
@counter_txt_ocn+=1
output=if c['seg'] =~/\S+/; title+text
else text
end
elsif cgi['view']=~/index/ #% idx body
if c['suffix'] !~/1/ #seg
index=%{#{c['ocn']}, } if @text_search_flag
elsif c['suffix'] =~/1/ #doc
index=%{#{c['ocn']}, }
end
if c['seg'] =~/\S+/
if @text_search_flag
@counter_txt_ocn+=1
output=title+index
end
else
@counter_txt_ocn+=1
output=unless c['suffix'] =~/1/; title+index
else %{#{title}#{c['ocn'].sort}, }
end
end
end
else output=title
end
@counters_txt=if @counter_txt_doc > 0
%{Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.
}
else ''
end
@body_main << output #+ details
end
#text_objects_endnote
oldtid = 0
s_endnotes.each do |e| #% endnotes
location=e['filename'][/(.+?)\.(?:_?sst|ssm)$/,1]
file_suffix=e['filename'][/.+?\.(_?sst|ssm)$/,1]
lang=if location =~ /\S+?~(\S\S\S?)$/
l=location[/\S+?~(\S\S\S?)$/,1]
location.gsub!(/(\S+?)~\S\S\S?/,'\1')
l=".#{l}"
else ''
end
#metadata_found_endnotes
if @text_search_flag
if e['metadata_tid'].to_i != oldtid.to_i
title=%{
#{e['title']} by #{e['creator']} ?
} if file_suffix=~/s/
@counter_endn_doc+=1
oldtid=e['metadata_tid'].to_i
else title = ''
end
if cgi['view']=~/text/ #% txt endnotes
@counter_endn_ocn+=1
matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/)
matched=if e['body'] =~/\\1})
#e['body']
end
matched
else e['body']
end
output=%{#{title}
note #{e['nr']} referred to from ocn #{e['ocn']}: #{matched_endnote}}
elsif cgi['view']=~/index/ #% idx endnotes
@counter_endn_ocn+=1
output=%{#{title}#{e['nr']} [§ #{e['ocn']}], }
end
@counters_endn=if @counter_endn_doc > 0
%{Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.
}
end
@endnotes << output #+ details
else @endnotes=[] #does not take out yet
end
end
offset=dbi_statement.sql_offset.to_s
limit=dbi_statement.sql_limit.to_s
canned=dbi_statement.sql_canned_search_url.to_s
limit=dbi_statement.sql_limit.to_s
cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + canned + @tail} #% print cgi_output_header+counters+body+endnotes
end
rescue Exception => e
s='' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
s << CGI::escapeHTML(e.message) + '
'
cgi.out{s}
next
ensure # eg. disconnect from server
@conn.disconnect if @conn
end
end
WOK_SQL
end
end
end
__END__
#@counter_txt_ocn
#@counter_endn_ocn
if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1
checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='checked'
checked_none=''
#elsif cgi['checks'] =~/check_fixed/ or cgi['check_fixed'] =~/\S/
# #checked_ignore='checked'
# checked_fixed='checked'
# checked_url='checked'
# checked_searched='checked'
# checked_echo='checked'
# #checked_tip='checked'
# #checked_sql='checked'
# checked_tip=checked_sql=checked_none=''
#elsif cgi['checks'] =~/check_ignore/ or cgi['check_ignore'] =~/\S/
# checked_ignore='checked'
# checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1
# checked_searched='checked' if cgi['searched'] =~/\S/
# checked_tip='checked' if cgi['tip'] =~/\S/
# checked_echo='checked' if cgi['echo'] =~/\S/
# checked_sql='checked' if cgi['sql'] =~/\S/
# checked_none=''
elsif cgi['checks'] =~/check_none/ or cgi['a'].to_i==0
checked_none='checked'
checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql=''
else checked_ignore='checked'
end