Texis Web Script source code for: https:///texisdocs.thunderstone.com
Note: Click on links to view the documentation for HTML tags which are special to the Vortex compiler.
<script language=vortex>

<!-- This script prints a directory tree of all the URLs in a Webinator 4 db.
  -- To run it, copy it to the webinator directory of your document tree.
  -- It produces a map for the profile $pr, eg. to map the profile mysite:
  --   http://www.mysite.com/cgi-bin/texis/webinator/dirtree?pr=mysite
  -->

<sqlcache=3>
<timeout=120></timeout>

<!--========================================================================-->
<a name=main>
<!-- Main entry point.  Prints header, directory tree, and footer. -->
  <top>
  <printtree>
  <bottom>
</a>

<!--========================================================================-->
<a name=printtree private>
<!-- Prints directory tree. -->
<local Url Depth Title subtitle suburl>
  <getDB pr=$pr>
  <db = $ret>
  <!-- Just use refs Url and Ref fields.  Can also use html Depth field. -->
  <sql "select Url, Depth, Title from html order by Depth, Title asc">
    <sql "select Title subtitle, refs.Ref suburl
          from refs, html
          where refs.Url = $Url and html.Url = refs.Ref and html.Depth > $Depth
          order by Depth, Title"/>
    <if $sqlresult.returnedmin gt 0 or $Depth eq 0>
      <B><A HREF="$Url">$Title</A></B>
      <BLOCKQUOTE>
      <loop $suburl $subtitle>
        <sandr "MSWord Document" $suburl $subtitle>
        <A HREF="$suburl">$ret</A><BR>
      </loop>
      </BLOCKQUOTE>
    </if>
  </sql>
</a>

<!--========================================================================-->
<a name=getDB private pr>
<!-- Get the current Webinator db for profile $pr. -->
  <if "" eq $pr><$pr = "default"></if>
  <vxinfo globaldb>
  <sql db=$ret max=1 "select String ret
                      from options
                      where Profile = $pr and Name = 'SS_db'">
    <return $ret>
  </sql>
  <p>Unknown Profile <i>$pr</i></p>
  <p>Bailing out</p>
  <exit>
  <return "unknown">
</a>

<!--========================================================================-->
<a name=top private>
<!-- Prints out HTML for top of page (like a header) -->
<local title="Site Map">
  <if "" neq $pr>
    <strfmt "Site Map for profile %s" $pr><$title = $ret>
  </if>
  <HTML>
  <HEAD>
    <TITLE>$title</TITLE>
    <STYLE>
      BODY {font-family: tahoma; font-size: 10pt;}
      H1 {font-family: tahoma; font-size: 18pt;font-color:dark red; font-weight:bold;}
    </STYLE>
  </HEAD>
  <BODY bgcolor=white>
  <H1>$title</H1>
</a>

<!--========================================================================-->
<a name=bottom private>
<!--  Prints out HTML for bottom of page (like a footer) -->
  </BODY>
  </HTML>
</a>

</script>

Back to the Code Example List

The Source Viewer is also a Code Example.
Click Here to see its source.
Copyright © 1992-1999 Thunderstone Software
Copyright © 2024 Thunderstone Software LLC. All rights reserved.