Exemplo 7 – escolhendo formato de exibição

Formulário HTML

[codesyntax lang="html4strict" container="pre"]
<html>
<head><title>Scipt7</title></head>
<body>
<h3>Modelo de Formulário para Pesquisas na base Multimidia</h3>
<form action="/cgi-bin/wxis.exe" method="post">
  <input type="hidden" name="IsisScript" value="curso/script7.xis">
   Digite sua expressão de pesquisa<br>
  <input type="text" name="expressao"> <p>
  <select name="formato">
 <option value="simples">Simples
 <option value="detalhado">Detalhado
</select>
<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="2001">expressao</field>
<field action="cgi" tag="2002">formato</field>
<parm name="cipar">
<pft>
'BASE2.*=C:\bases\virtu\Virtu.*'/
'GIZMO.*=C:\bases\gizmo\asc2ans.*'/
</pft>
</parm>
<do task="search">
<parm name="db">BASE2</parm>
<parm name="gizmo">GIZMO</parm>
<parm name="expression"><pft>v2001</pft></parm>
<loop>
<field action="import" tag="2002">2002</field>
<display>
<pft> if v2002='simples' then
newline('<br>')@\bases\virtu\simples.pft
'<hr>', fi
</pft>
</display>
<display>
<htmlpft>
<pft>if v2002='detalhado' then
cat('curso/detalhado.htm'), fi
</pft>
</htmlpft>
</display>
</loop>
</do>
</section>
</IsisScript>
[/codesyntax]

Was this helpful?

0 / 0

Deixe uma resposta 0

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