SREhttp/2: Demo of INTERPRET SSI Keyphrase


This displays the values sent to INTERPRET CODE keyphrases.

SERVERNAMESREHTTP2.SREHTTP.ORG
HOST_NICKNAMESREHTTP2
SELECTOR/sre2k/srehttp2/demos/dointerp.sht
USEDFILED:\www\sre2k\srehttp2\demos\dointerp.sht
DATADIRD:\WWW\SREHTTP\SREHTTP2
VERBOSE1
ID_INFO3.147.89.85,SRE_2002_14_OWN_R14 \SEM32\SRE_2002_14_OWN_R14 ,SRE_2002_TRN_4803 \SEM32\SRE_2002_TRN_4803 TRN_4803,4864,4864A
PRIVSET
INTERPRET_ELEMENT
 Interpret Code 
    a1='<tr><th>SERVERNAME</th><td>'||servername||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>HOST_NICKNAME</th><td>'||HOST_NICKNAME||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>SELECTOR</th><td>'||SELECTOR||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>USEDFILE</th><td>'||USEDFILE||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>DATADIR</th><td>'||DATADIR||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>VERBOSE</th><td>'||VERBOSE||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>ID_INFO</th><td>'||ID_INFO||'</td>'||'0d0a'x ;
    a1=a1||'<tr><th>PRIVSET</th><td>'||PRIVSET||'</td>'||'0d0a'x ;

    a1=a1||'<tr><th>INTERPRET_ELEMENT</th><td><pre>'||sre_html_encode(INTERPRET_ELEMENT)||'</pre></td>'||'0d0a'x ;

    a1=a1||'<tr><th>#Arguments</th><td>'||arg(1)||'0d0a'x ; 

    if arg(1)>0 then do;
        a1=a1||'<ul>'||'0d0a'x ;
        do tm1=1 to arg(1) ;
           a1=a1||'<li>'||interp_args.tm1||'0d0a'x;
        end; 
        a1=a1||'</ul>'||'0d0a'x;
    end ;
    a1=a1||'</td> '||'0d0a'x ;
 
    return a1 ;
#Arguments

and this displays some directory information using the DIRINFO.REX INTERPETABLE file (located in the possibly host-specific ADDON directory).

Directory: D:\www\sre2k\srehttp2\demos\
  # subdirectories = 0
  # files = 38
  bytes in files = 357,794