Exemplo 11 – Consulta utilizando o dicionário de termos usando campo específico

Formulário HTML

[codesyntax lang="html4strict" container="pre"]
<html>
<head><title>Consulta utilizando o dicionário de termos</title></head>
<body>
<h3>Modelo de Pesquisa utilizando o dicionário de termos</h3>
<form action="/cgi-bin/wxis.exe" method="post">
 <input type="hidden" name="IsisScript" value="curso/script11.xis">
 Digite uma palavra ou raiz para percorrer o dicionário de termos
<input type="Text" name="raiz">
 <input type="Checkbox" name="tombo" value="REG=">
 Pesquisar somente nos números de tombo
 <input type="submit" value="pesquisar">
</form>
</body>
</html>
[/codesyntax]

Script

[codesyntax lang="html4strict" container="pre"]
<IsisScript>
<section>
<display><pft>'Content-type: text/html'/#</pft></display>
 <field action="cgi" tag="2000">raiz</field>
 <field action="cgi" tag="2001">expressao1</field>
 <field action="cgi" tag="5000">quantidade</field>
 <field action="cgi" tag="6000">comeco</field>
 <field action="cgi" tag="7000">operador</field>
 <field action="cgi" tag="8000">tombo</field>
<parm name="cipar">
<pft>
 'LIVRO.*=C:\bases\livro\livro.*'/
 'GIZMO.*=C:\bases\gizmo\asc2ans.*'/
</pft>
</parm>
<flow action="jump"><pft>if p(v2001) then 'PESQUISA' fi</pft></flow>
<do task="keyrange">
 <parm name="db">LIVRO</parm>
 <parm name="gizmo">GIZMO</parm>
 <parm name="from"><pft>v8000,v2000</pft></parm>
 <parm name="to"><pft>v8000,v2000'zzz'</pft></parm>
 <parm name="count">15</parm>
<display><pft>v8000,v2000</pft></display>
<field action="define" tag="1">Isis_Key</field>
<field action="define" tag="2">Isis_Postings</field>
<display>
<h3>Visualizando Dicionário de Termos da Base Livros</h3>
<form action="/cgi-bin/wxis.exe" method="post">
 <input type="hidden" name="IsisScript" value="curso/script11.xis">
 <select name="expressao1" size="15" multiple>
</display>
<loop>
<display>
<pft>
 '<option value="' v1 '">'
 '['v2'] ' v1'<br>'
</pft>
</display>
</loop>
<display>
</select>
Quantidade
<select name="quantidade">
 <option value="5">5
 <option value="10">10
 <option value="15">15
</select>
Usando entre os termos
<select name="operador">
 <option value="*">AND
 <option value="+">OR
</select>
 <input type="submit" value="pesquisar">
</form>
</display>
</do>
<flow action="exit">fim</flow>
 <label>PESQUISA</label>
 <display><h3>Exibindo o resultado da pesquisa</h3></display>
<do task="search">
 <parm name="db">C:\bases\livro\livro</parm>
 <parm name="gizmo">C:\bases\gizmo\asc2ans</parm>
 <parm name="count"><pft>v5000</pft></parm>
 <parm name="from"><pft>if val(v6000)<1 then '1' else v6000, fi</pft></parm>
 <parm name="expression"><pft>
if v7000='*' then (v2001+|*|), else (v2001+|+|) fi
</pft></parm>
<field action="define" tag="1001">Isis_Current</field>
<field action="define" tag="1002">Isis_Total</field>
<display>
<pft>
'<h1>' if v7000='*' then (v2001+|*|), else (v2001+|+|) fi '</h1>'
</pft>
</display>
<loop>
<display>
<pft>v1001'/'v1002'<br>'
 newline('<br>')@\bases\livro\form1.pft
'<hr>'
</pft>
</display>
</loop>
<!--Aqui está o botao de proxima pagina-->
<display>
 <pft> if val(v1002)>val(v1001) then
 '<form action="/cgi-bin/wxis.exe" method="post">
 <input type="hidden" name="IsisScript" value="curso/script11.xis">
 <input type="hidden" name="expressao1" value="'if v7000='*' then (v2001+|*|), else (v2001+|+|) fi'">
 <input type="hidden" name="campo1" value="'v3001'">
 <input type="hidden" name="operador1" value="'v4001'">
 <input type="hidden" name="expressao2" value="'v2002'">
 <input type="hidden" name="campo2" value="'v3002'">
 <input type="hidden" name="operador2" value="'v4002'">
 <input type="hidden" name="expressao3" value="'v2003'">
 <input type="hidden" name="campo3" value="'v3003'">
 <input type="hidden" name="quantidade" value="'v5000'">
 ' /*Comentario*/ '
 <input type="hidden" name="comeco" value=" 'f(val(v1001)+1,0,0)'">
 <input type="submit" value="Próxima Página">
 </form>' fi
 </pft>
 </display>
 </do>
 </section>
 </IsisScript>
[/codesyntax]


Was this helpful?

0 / 0

Deixe uma resposta 0

Your email address will not be published. Required fields are marked *