home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13g.zip / CONFIG2.CMD < prev    next >
OS/2 REXX Batch file  |  1999-06-13  |  78KB  |  1,811 lines

  1. /*4/98. this is the SRE-http configuration routine */
  2. /* to add variables:
  3.    1) Create a new Param.nn line (say, Param.30='NEW_CONTROL')
  4.   2) Create a new set of output lines in the DISPLAY THEM  section
  5.   3) Create a new set of output lines in the CHANGE THEM section
  6. */
  7.  
  8. config2:
  9.  
  10. CHECKIT=0   /* Change this to 0 if you want to enable REMOTE configuration by SUPERUSERS */
  11.  
  12. USECOLOR='2dd52f'
  13.  
  14.  
  15. /* ---------------- DO NOT MODIFY BELOW THIS LINE  ------------------ */
  16.  
  17.  
  18. parse arg ddir,tempfile,sel,list,verb,uri,user,basedir,workdir,privset, ,
  19.            enmadd,transaction,verbose,servername,host_nickname,homedir
  20.  
  21. if verb="" then do
  22.    say " This SRE-http procedure is not meant to be run in stand-alone mode. "
  23.    say " You should invoke it using CONFIGUR.HTM ! "
  24.    exit
  25. end  /* Do */
  26.  
  27. list=translate(list, ' ', '+'||'090a0d'x)  /* Whitespace, etc. */
  28.  
  29. signal on error name badguys
  30. signal on syntax name badguys
  31.  
  32. crlf = '0d0a'x
  33.  
  34. who2=extract('CLIENTADDR')
  35. saddr2=extract('SERVERADDR')
  36.  
  37. NO_REM=VALUE('SREF_NO_REMOTE_CONFIG',,'OS2ENVIRONMENT')
  38.  
  39. select
  40.    when checkit=1 | no_rem>0 then do
  41.  
  42. /* only if user = serveraddress !!! */
  43.      if who2<>saddr2 | no_rem=2 then do
  44.  
  45.         call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  46.         call lineout tempfile, "<html><head><title>SRE-http remote configurator disabled </title>"
  47.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  48.  
  49.         call lineout tempfile,' <strong> Action not allowed remotely.</strong> <pre>'
  50.         call lineout tempfile,' </body> </html> '
  51.         call lineout tempfile
  52.         foo=sref_gos('FILE ERASE TYPE text/html NAME' tempfile)
  53.       signal off error ; signal off syntax
  54.         return 'CONFIG2: action not allowed remotely. '
  55.      end
  56.    end
  57.    otherwise do
  58.       if wordpos('SUPERUSER',privset)=0 then do
  59.  
  60.       'header add WWW-Authenticate: Basic Realm=<Configure>'  /* challenge */
  61.         call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  62.         call lineout tempfile, "<html><head><title>Not authorized </title>"
  63.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  64.  
  65.         call lineout tempfile,' <strong> You do not have configuration rights.</strong> <pre>'
  66.         if who2=saddr2 then
  67.                 call lineout tempfile,'<br> <Em> You may want to edit CONFIG2.CMD </em> '
  68.         call lineout tempfile,' </body> </html> '
  69.         call lineout tempfile
  70.          signal off error ; signal off syntax
  71.         return sref_response('unauth', "You do not have configuration rights ",tempfile,servername)
  72.       end
  73.    end
  74. end
  75.  
  76. /* go get initfilt */
  77. aport=extract(serverport)
  78. afile=value(enmadd||'INITFILT_FILE',,'os2environment')
  79.  
  80. /* the following directories and files are subject to change */
  81. fd.1="messbox_dir"   /* location of message boxes  */
  82. fd.2="tempfile_dir"     /* workspace for server side programs */
  83. fd.3="counter_file" /* used by REPLACE HITS and REPLACE COUNTS keyphrase */
  84. fd.4="record_all_file" /* used if record_option =YES or YES_ALL */
  85. fd.5="sendfile_file"  /* used by the SENDFILE facility*/
  86. fd.6="access_file"   /* used if ALLOW_ACCESS=YES or INHOUSE*/
  87. fd.7="alias_file"   /* list of aliases */
  88. fd.8="repstrgs_file"  /* custom written variables for REPLACE keyphrase */
  89. fd.9="user_file"    /* username/password/privileges file */
  90. fd.10="upload_dir"  /* upload directory (used by GET_URL) */
  91. fd.11="upload_log"  /* log file for upload tracking */
  92. fd.12="cgi_bin_dir" /* cgi-bin directory */
  93. fd.13="virtual_file" /* file containing virtual directory information */
  94. fd.14="mailbox_dir"   /* location of incoming e-mail box */
  95. fd.15="tempdata_dir" /* workspace for SRE-http */
  96. fd.16="workdata_dir" /* permanent SRE-http "data file" directory */
  97. fd.17='logon_fail_file' /* file sent if logon failure */
  98. fd.18='access_fail_file' /* file sent if sel-specific access failure */
  99. fd.19='addon_dir'  /* storage of SRE-http addons */
  100. fd.20='userinfo_dir' /* workspace for SRE-http */
  101. fd.21='error_log'  /*error log file */
  102. fd.22='puburl_file' /* public urls file */
  103. fd.0=22
  104. do mm=1 to fd.0
  105.    fd.mm=translate(strip(fd.mm))
  106. end
  107.  
  108.  
  109.  
  110. /* IF THE VERB IS POST-- THEN THIS IS A "WRITE INFO CALL
  111.    IF IT'S GET, THEN ITS A "SHOW INFO" OR "LET ME CHANGE INFO" CALL
  112. */
  113.  
  114. if translate(verb)="POST" then signal write_it
  115.  
  116.  
  117.  
  118. /* IF HERE, VERB=GET --- so show vars or request changes  */
  119.  
  120.  
  121.  
  122. parse upper var list foo '=' todo
  123. ll=list
  124. nickname=' '
  125. do until ll=' '
  126.    parse var ll a1 '&' ll
  127.    parse var a1 a1a '=' a2a ; a2a=packur(a2a) ; a1a=packur(a1a)
  128.    if upper(a1a)='TODO' then todo=upper(a2a)
  129.    if upper(a1a)='HOST_NICKNAME' then nickname=strip(upper(a2a))
  130. end /* do */
  131.  
  132. /* read initfilt.80 file into internal storage */
  133.  
  134. FOO=sref_fileREAD(AFILE,'FILELINES',,'E')
  135. IF FOO=0 THEN DO
  136.   SAY " CONFIG2 ERROR: COULD NOT READ INITFILT FILE "
  137.   'String  Error reading initfilt file '
  138.    signal off error ; signal off syntax
  139.   return "CONFIG2 ERROR: Could Not read INITFILT FILE "
  140. end
  141.  
  142. /* convert < to < and > to > */
  143. i=0
  144. do mm=1 to filelines.0
  145.   big=fix_me(filelines.mm)
  146.   filelines.mm.igot=0           /* fill this is later */
  147.   filelines.mm.name=0           /* assume it's comment/blank */
  148.   filelines.mm.stem=' '          /* assume is non stem var */
  149.   filelines.mm.value=' '
  150.   if big  <>" " then do
  151.      big=sref_replacestrg(big,'<','<','all')
  152.      big=sref_replacestrg(big,'>','>','all')
  153.      filelines.mm=big
  154.      if abbrev(strip(big),';')=0  then do
  155.          parse var big atype '=' avalue
  156.          if words(atype)=1  then do
  157.              parse upper var atype aname '.' astem
  158.              filelines.mm.name=upper(strip(aname))
  159.              filelines.mm.value=strip(strip(avalue),,"'")
  160.              if astem<>' ' then filelines.mm.stem=astem
  161.              opop=filelines.mm.name
  162.              if nickname=' ' & verify(astem,'0123456789 .')>0 then do
  163.                   nop                   /* no nickname, but nickname in entry */
  164.              end
  165.              else do
  166.                 if symbol('quiklist.opop')='VAR' then do
  167.                    quiklist.opop=quiklist.opop' 'mm
  168.                 end
  169.                 else do
  170.                    quiklist.opop=mm
  171.                 end   /* quiklist */
  172.              end   /* verify/nickname */
  173.           end      /* one work name */
  174.       end       /* comment */
  175.    end          /* not ' ' line */
  176. end      /* loop over lines */
  177.  
  178. /* the following is a list of parameters that we will adjust
  179. (if end in ., it's a stem variable)*/
  180.  
  181. /* logon control variables */
  182. param.1="checklog"  /* whether require logon: NO ALWAYS INHOUSE*/
  183. param.2="owners"     /* list of owners */
  184. param.3="inhouseips."  /* stem variable of inhouse ips */
  185. param.4="unallowedips." /* stem variable of unallowed ip */
  186.  
  187. /* request string modification variables */
  188. param.5="default"   /* the default page : A file name relative to ddir*/
  189. param.6="xxxyyyzzz"      /* fill in later */
  190. param.7="home_dir"    /* the ~ substitution */
  191. param.8="auto_name"  /* list of potential "default documents" for directories */
  192.  
  193. /* access and auditing variables */
  194. param.9="allow_access"   /*File specific: YES=no control, INHOUSE=inhouse only, NO=Superusrs */
  195. param.10="record_option" /*NO YES YES_ALL FILE arguments*/
  196. param.11="verbose" /*  */
  197.  
  198. /* stem variables for  REPLACE keyphrase */
  199. param.12="headers."     /* stem variable of headers */
  200. param.13="footers."    /* stem variable of footers */
  201. param.14="inhouse."    /* stem variables for replace inhouse. static variables */
  202. param.15="superuser."  /* stem variables for replace superuser. static variables*/
  203.  
  204. /* static variables for REPLACE keyphrase */
  205. param.16="webmaster"   /* string containing the webmasters url */
  206. param.17="home_name"  /* colloquial name of this server */
  207.  
  208. /* misc. static variables (used for a variety of internally generated messages  */
  209. param.18="the_realm"    /* Colloquial name of "inhouse" folks*/
  210. param.19="option_hit_line" /* variable used with option_hit.n and option_count.n */
  211. param.20="not_found_url" /* string returned with 404 error */
  212.  
  213. /* late additions */
  214. param.21="INHOUSE_PRIVS"
  215. param.22="PUBLIC_PRIVS"
  216. param.23="PUBLIC_URLS."  /* stem var of public urls -- no longer used */
  217. param.24="AUTO_HEADER"
  218. param.25="UPLOAD_MAXSIZE"
  219. param.26="UPLOAD_MINFREE"
  220. param.27="NOEXT_TYPE"
  221. param.28="POST_FILTER"
  222. param.29="PRE_FILTER"
  223. param.30="DNS_CHECK"
  224. param.31="SMTP_GATEWAY"
  225. param.32='SSI_SHTML_ONLY'
  226. param.33='HOSTS.'
  227. param.34='DO_HTACCESS'
  228. param.35='FIX_EXPIRE'
  229. param.36='HIT_CACHE_LEN'
  230. param.37='HIT_CACHE_DURATION'
  231. param.38='HIT_OWNER_SUPPRESS'
  232. param.39='CHECK_ADD_PRIVS'
  233. param.40='DIR_OPTIONS'
  234. param.41='DIR_EXCLUSION'
  235. param.42='SSI_CACHE_ON'
  236. param.43='WRITE_LOGS'
  237. param.44='DIR_ACCESS'
  238. param.45='DIR_ACCESS_PRIVS'
  239. param.46="USER_PRIVS"
  240.  
  241. param.0=46
  242. do mm=1 to param.0
  243.    param.mm=strip(translate(param.mm))
  244.    param.mm.stem=0
  245.    if pos('.',param.mm)>0 then param.mm.stem=1
  246.    param.mm=strip(param.mm,,'.')
  247. end
  248.  
  249.  
  250. /* Note that a number of variables will  NOT be settable by this program.
  251. Ambitious users can go into INITFILT.80 and edit these parameters.
  252. */
  253.  
  254.  
  255. /* ************************  DISPLAY THEM --------------------------------*/
  256. if todo="SHOW" then do
  257.    call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  258.    call lineout tempfile, "<html><head><title>SRE-http: modify initializaton parameters</title>"
  259.    call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  260.  
  261.    call lineout tempfile," <hr> <h2> Current Settings of SRE-http's Parameters </h2> "
  262.    if nickname<>'' then do
  263.         call lineout tempfile,' <h3> For parameters specific to the ' nickname ' host.</h3>'
  264.         call lineout tempfile,' <blockquote> You selected <strong>' nickname ' </strong> as the  target "host nickname" '
  265.         call lineout tempfile,' The top half of this document contains only parameters specific to <strong>' nickname '. </strong>'
  266.         call lineout tempfile,'<eM> Non host-specific parameters</em>, which are used when a host-specific parameter is '
  267.         call lineout tempfile,' not specified, are listed  at  '
  268.         call lineout tempfile,' the  <A HREF="#otherparams">bottom half of the document</A>. '
  269.  
  270.    end  /* Do */
  271.  
  272.    call lineout tempfile, ' <h3> Logon Control Variables </h3> <menu> '
  273.    do mm=1 to 4
  274.        foo=write_1(mm)
  275.    end
  276.    foo=write_1(30)
  277.  
  278. /*  call lineout tempfile,' </menu> <h3> PUBLIC_URLS </h3>  <menu>'
  279.    foo=write_1(23)*/
  280.  
  281.   call lineout tempfile,'  </menu> <H3> HOST Identifiers </h3>  <menu>'
  282.      foo=write_1(33,2)
  283.  
  284.   call lineout tempfile,' </menu>  <h3> Request  modification variables  </h3>  <menu>'
  285.     do mm=5 to 8
  286.         if mm=6 then iterate
  287.        foo=write_1(mm)
  288.     end
  289.     foo=write_1(27)
  290.     foo=write_1(40)
  291.     foo=write_1(41)
  292.     foo=write_1(44)
  293.     foo=write_1(45)
  294.  
  295.    call lineout tempfile,' </menu> <h3> Reponse header creation, Pre and Post filters </h3>  <menu>'
  296.    foo=write_1(24)
  297.    foo=write_1(28)
  298.    foo=write_1(29)
  299.  
  300.   call lineout tempfile,' </menu>  <h3> File access and auditing variables  </h3>  <menu>'
  301.    do mm=9 to 10
  302.        foo=write_1(mm)
  303.     end
  304.     foo=write_1(21)
  305.     foo=write_1(22)
  306.     foo=write_1(34)
  307.     foo=write_1(43)
  308.  
  309.     foo=write_1(36)
  310.     foo=write_1(37)
  311.     foo=write_1(38)
  312.     foo=write_1(39)
  313.  
  314.   call lineout tempfile,' </menu> <h3> SSI control and stem variables for REPLACE keyphrase </h3>  <menu>'
  315.    foo=write_1(32)
  316.    foo=write_1(42)
  317.    do mm=12 to 15
  318.  
  319.        foo=write_1(mm)
  320.     end
  321.  
  322.   call lineout tempfile,' </menu>  <h3> Other variables for REPLACE keyphrase  </h3>  <menu>'
  323.    do mm=16 to 17
  324.        foo=write_1(mm)
  325.     end
  326.  
  327.   call lineout tempfile, '</menu> <h3>Upload control, and E-Mail support, variables </h3>  <menu>'
  328.   do mm=25 to 26
  329.      foo=write_1(mm)
  330.   end
  331.   foo=write_1(31)
  332.  
  333.   call lineout tempfile,'</menu>  <h3> Miscellanous variables (used for error messages, etc.) </h3>  <menu>'
  334.    do mm=18 to 20
  335.        foo=write_1(mm)
  336.     end
  337.     foo=write_1(35)
  338.  
  339.   call lineout tempfile,'</menu>  <hr width=50%>   <h3> Files and Directories .. </h3> <menu> '
  340.   do mm2=1 to fd.0
  341.       foo=write_1(mm2,1)
  342.   end
  343.  CALL LINEOUT TEMPFILE,'</menu>'
  344.  
  345.  
  346.    call lineout tempfile,' <hr>  <h2><a name="otherparams"> Other  SRE-http Parameters </a> </h2>  '
  347.    call lineout tempfile,' Note that the following parameters and filenames: <ol>'
  348.    call lineout tempfile,' <li> Either apply to a  different HOST.  To change them, '
  349.    call lineout tempfile,' re-run this configurator with a different HOST NICKNAME'
  350.    if nickname<>' ' then do
  351.      call lineout tempfile,' <li>Are non-host specific parameters (which may'
  352.      call lineout tempfile,' be used if there is no host-specific entry for the parameter)'
  353.    end
  354.    call lineout tempfile,' <li>Are parameters that this configurator will not modify.'
  355.  
  356.    call lineout tempfile," <em> To change them, you'll have to edit INITFILT."aport
  357.    call lineout tempfile,' </em> </ol> <br>'
  358.    call lineout tempfile, ' <blockquote> <code> <menu>'
  359.  
  360.   spuds=0
  361.    do mm=1 to filelines.0               /* write other host/ misc lines */
  362.        findit=filelines.mm.name
  363.        if findit=0 then iterate
  364.        IF FILELINES.MM.IGOT=1 then ITERATE
  365.        avalue=filelines.mm.value
  366.        dostem=filelines.mm.stem
  367.        spuds=spuds+1
  368.        tofus.spuds.afindit=findit
  369.        tofus.spuds.aavalue=avalue
  370.        tofus.spuds.adostem=dostem
  371.        tofus.spuds.jdone=0
  372.    end
  373. /* sort into "non-host specific" and "host-specific" terms */
  374.    do mu=1 to spuds             /* the non-host specific terms */
  375.        dostem=tofus.mu.adostem
  376.        findit=tofus.mu.afindit
  377.        avalue=tofus.mu.aavalue
  378.        if dostem=' ' then do
  379.           call lineout tempfile, " <li> <b>" findit "</b> =<tt> " avalue '</tt> <br>'
  380.           tofus.mu.jdone=1
  381.        end
  382.        else do
  383.           foox=lastpos('.',dostem)
  384.           yeek=substr(dostem,foox+1)
  385.           if datatype(yeek)='NUM' then do
  386.               call lineout tempfile, " <li> <b>" findit ||'.'|| dostem "</b> =<tt> " avalue '</tt> <br>'
  387.               tofus.mu.jdone=1
  388.           end
  389.        end
  390.    end /* do */
  391.    call lineout tempfile,'</menu><br><menu> '
  392.  
  393. ndid=1
  394. do until ndid=0
  395.    ndid=0
  396.  
  397.    do mu=1 to spuds
  398.        if tofus.mu.jdone=1 then iterate
  399.        ndid=ndid+1
  400.        dostem=tofus.mu.adostem
  401.        foox=lastpos('.',dostem)
  402.        yhost=substr(dostem,foox+1)
  403.        if ndid=1 then do
  404.           nowhost=yhost
  405.        end
  406.        else do
  407.            if yhost<>nowhost then iterate
  408.        end  /* Do */
  409.        findit=tofus.mu.afindit
  410.        avalue=tofus.mu.aavalue
  411.        if dostem=' ' then do
  412.           call lineout tempfile, " <li> <b>" findit "</b> =<tt> " avalue '</tt> <br>'
  413.           tofus.mu.jdone=1
  414.        end
  415.        else do
  416.            call lineout tempfile, " <li> <b>" findit ||'.'|| dostem "</b> =<tt> " avalue '</tt> <br>'
  417.            tofus.mu.jdone=1
  418.        end
  419.    end /* do */
  420.    call lineout tempfile,'</menu><br><menu> '
  421.  
  422. end
  423. call lineout tempfile,'</menu>'
  424.  
  425.  
  426. call lineout tempfile,' </menu> '
  427. call lineout tempfile,'<p> <em> Note: REXX Comments may point to parameter-entry errors! </em>  '
  428. call lineout tempfile,' </blockquote> <hr> </body> </html> '
  429. call lineout tempfile
  430.  
  431. foo=sref_gos('FILE ERASE TYPE text/html NAME' tempfile)
  432.  
  433. signal off error ; signal off syntax
  434. return ' '
  435.  
  436. end
  437.  
  438.  
  439. /* ****************      CHANGE THEM --------------------------------. */
  440. else do
  441.  
  442.  
  443.  call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  444.   call lineout tempfile, "<html><head><title>SRE-http: modify initializaton parameters </title>"
  445.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  446.         call lineout tempfile,'<!--  a button bar. --> 'crlf ,
  447.            '<a href="/configur.htm">Configurator</a>||' crlf ,
  448.            '<a href="/config2?todo=SET">Parameters</a>||' crlf ,
  449.            '<a href="/usercfg?todo=SET">Usernames</a>||'  crlf ,
  450.            '<a href="/realmcfg?todo=SET">Define-Realms</a>||'||crlf ,
  451.            '<a href="/accescfg?todo=SET">Access-Controls||'  crlf ,
  452.            '<a href="/aliascfg?todo=SET">Aliases</a>||'  crlf ,
  453.            '<a href="/virtcfg?todo=SET">VirtualDir</a><p>'  
  454.         call lineout tempfile,' <h1> SRE-http: modify initialization parameters </h1>'
  455.   call lineout tempfile,'<h2>  Change parameter values </h2>'
  456.   call lineout tempfile,'This form allows you to change most (but not all) of the SRE-http parameters. '
  457.   call lineout tempfile,'The current values are shown, and are retained if not explicitily modified.'
  458.  
  459.   if  nickname<>' 'then do
  460.      call lineout tempfile,' <p> You selected the <strong> ' nickname '</strong> host nickname.'
  461.      call lineout tempfile,' Parameters specific to <strong> ' nickname '</strong> '
  462.      call lineout tempfile,'will be displayed (and modified). '
  463.      call lineout tempfile,'<br> <em>Note:</em> When  a <strong> ' nickname '</strong>  specific parameter is not available,'
  464.      call lineout tempfile,' the default (non host-specific) version is used.'
  465.  
  466.   end  /* Do */
  467.  
  468.   call lineout tempfile,'<p><em> If the explanations here are insufficient, '
  469.   call lineout tempfile,' <a href="/samples/initfilt.doc">INITFILT.DOC</a>'
  470.   call lineout tempfile,'might help!</em>'
  471.   call lineout tempfile,'<HR WIDTH=40%>'
  472.   call lineout tempfile,' Notes: <ul>'
  473.   if nickname<>' ' then do
  474.      call lineout tempfile,' <li> If you want to leave a field blank, <strong>we advise inserting a 0 </strong> -- since SRE-http will attempt '
  475.      call lineout tempfile,' to use the default (non host-specific) parameter whenever it finds an empty variable (this'
  476.      call lineout tempfile,' is a design "feature" ' " of REXX's use of the OS/2 environment)!<br>"
  477.   end
  478.   call lineout tempfile,' <li> To change the "more obscure" parameters not mentioned here you will have to'
  479.   call lineout tempfile,' edit INITFILT.'||aport ' by hand (see INITFILT.DOC for details) '
  480.   call lineout tempfile,'<li> A caution: '
  481.   call lineout tempfile," do not use <code>single quote</code> (<strong>'</strong>) characters (they will cause errors)!"
  482.   call lineout tempfile,'</ul><hr>'
  483.   call lineout tempfile,'<FORM ACTION="config2" METHOD="POST">'
  484.  
  485.   call lineout tempfile,' <em> <A NAME="section0">Quick jumps...</A> </em> <br>'
  486.  
  487.   call lineout tempfile,'  <dl> <dt> <A HREF="#section1">Logon, privileges and HOSTS</A> '
  488.   call lineout tempfile,' <dd> CHECKLOG, OWNERS, INHOUSEIPS. INHOUSE_PRIV, PUBLIC_PRIVS, USER_PRIVS, UNALLOWED_IPS., DNS_CHECK, HOSTS.'
  489.   call lineout tempfile,' <dt><A HREF="#section2">Request modification </A>'
  490.   call lineout tempfile,' <dd> DEFAULT, HOME_DIR, NOEXT_TYPE, AUTO_NAME DIR_OPTIONS DIR_EXCLUSION DIR_ACCESS DIR_ACCESS_PRIVS'
  491.   call lineout tempfile,'<dt><A HREF="#section3"> Access and Auditing</A> '
  492.   call lineout tempfile,' <dd> ALLOW_ACCESS, DO_HTACCESS, WRITE_LOGS, RECORD_OPTION, HIT_CACHE_LEN, HIT_CACHE_DURATION, HIT_OWNER_SUPPRESS, CHECK_ADD_PRIVS '
  493.   call lineout tempfile,' <dt><A HREF="#section4">SSI control, Response Header, Pre-filter and Post-Filter, and Uploading</A> '
  494.   call lineout tempfile,' <dd> AUTO_HEADER, PRE_FILTER, POST_FILTER, SSI_SHTML_ONLY, SSI_CACHE_ON, SMTP_GATEWAY, UPLOAD_MINFREE, UPLOAD_MAXSIZE '
  495.   call lineout tempfile,' <dt><A HREF="#section5">String Replacements</A> '
  496.   call lineout tempfile,' <dd> HEADERS., FOOTERS., INHOUSE. message, SUPERUSER. message, WEBMASTER address, HOME_NAME '
  497.   call lineout tempfile,'<dt><A HREF="#section5a"> Miscellaneous</A> '
  498.   call lineout tempfile,' <dd> THE_REALM, OPTION_HIT_LINE, NOT_FOUND_URL, FIX_EXPIRE '
  499.   call lineout tempfile,'<dt><A HREF="#section6"> File & Directory Names</A> '
  500.   call lineout tempfile,'</dl> <p> <em> and when you are done.. </em> '
  501.   call lineout tempfile,'<INPUT TYPE="submit" VALUE="make the changes">, '
  502.   call lineout tempfile,' <em> or you can </em> '
  503.   call lineout tempfile,'<INPUT TYPE="reset" VALUE="reset to current values">'
  504.  
  505.  
  506.  
  507.   call lineout tempfile,' <hr width=80%> '
  508.  
  509.   call lineout tempfile,' <H3><a name="section1"> Logon, Privileges </a></H3>'
  510.  
  511.   call lineout tempfile,'<dl>'
  512.  
  513.  
  514. /* CHECKLOG */
  515.  
  516.   call lineout tempfile,'<dt> <strong>CHECKLOG</strong>:'
  517.   v.1="NO" ; v.2="ALWAYS" ; v.3="INHOUSE" ;
  518.   foo=do_radio(1,3)
  519.   call lineout tempfile,'<dd>'
  520.   call lineout tempfile,'CHECKLOG controls the logon-level:'
  521.   call lineout tempfile,'<ul>'
  522.   call lineout tempfile,'<LI>NO : Logon never required'
  523.   call lineout tempfile,'<LI>ALWAYS : Logon required for any request'
  524. call lineout tempfile,'<LI>INHOUSE : Only requesters with predefined, or explicitily granted (in the'
  525. call lineout tempfile,'USERS.IN file) privileges of INHOUSE or SUPERUSER are allowed in.'
  526. call lineout tempfile,'</ul>'
  527.  
  528.  
  529. /* owners */
  530. call lineout tempfile,'<hr><dt> <strong>OWNERS</strong>:'
  531. call lineout tempfile,' <INPUT TYPE="text" NAME="OWNERS" '
  532. thisval=find_val(2,2)
  533.  
  534. call lineout tempfile,'value="' thisval '"'
  535. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  536. call lineout tempfile,'<dd>'
  537. call lineout tempfile,'OWNERS is a space delimited list of  <strong>numeric </strong> IP addresses of the OWNERS.  Owners'
  538. call lineout tempfile,'are automatically granted SUPERUSER privileges.'
  539. call lineout tempfile,'<em>Wildcards are NOT allowed in the OWNERS list </em>'
  540.  
  541. /* INHOUSEIPS.ips */
  542. foo=find_val(3,2)
  543. call lineout tempfile,'<hr><dt> <strong>INHOUSEIPS.</strong>:'
  544. call lineout tempfile,' <TEXTAREA NAME="'||param.3||'." ROWS=4 COLS=25>'
  545. call lineout tempfile,foo
  546. call lineout tempfile,'</TEXTAREA>'
  547. call lineout tempfile,'<dd>'
  548. call lineout tempfile,' INHOUSEIPS. is a "stem" variable that contains the IP '
  549. call lineout tempfile,' addresses (numeric or name) of requesters who will be automatically granted INHOUSE privileges.'
  550. call lineout tempfile,' <br> You should enter each of these addresses on a <strong> seperate line </strong> .'
  551. call lineout tempfile,' <em> Wildcards (the * character) are allowed</em>'
  552. call lineout tempfile,' <p> In addition, you can put (optional)privileges after the '
  553. call lineout tempfile, ' the IP address. '
  554. call lineout tempfile,' <BR> Examples: <ul> <li> 152.22.12.* <li>515.21.512.51 VIEWMESS PROJ1'
  555. call lineout tempfile,' <li> pf.ourisp.org  <li>551.21.512.* </ul> '
  556. call lineout tempfile, ' <br> Note that 515.21.512.51 is granted VIEWMESS and PROJ1 privileges '
  557. call lineout tempfile, " (in addition to the INHOUSE_PRIV's privleges) "
  558.  
  559.  
  560. /*INHOUSE_PRIVS*/
  561. call lineout tempfile,'<hR><dt> <strong>INHOUSE_PRIVS</strong>:'
  562. call lineout tempfile,' <INPUT TYPE="text" NAME="INHOUSE_PRIVS" '
  563. foo=find_val(21)
  564. call lineout tempfile,'value="' foo '"'
  565. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  566. call lineout tempfile,'<dd> INHOUSE_PRIVS is a space delimited list of  "extra"'
  567. call lineout tempfile,' privileges to give to OWNERS and to IN-HOUSE requesters.'
  568. call lineout tempfile,' <br>It is <em> highly</em> recommended that <strong>INHOUSE</strong>'
  569. call lineout tempfile,' be included in this list! <p>'
  570. call lineout tempfile,' Example: if you want to give all IN-HOUSE requesters '
  571. call lineout tempfile,' message-box reading privileges, add VIEWMESS to this list.'
  572.  
  573. /*PUBLIC_PRIVS*/
  574. call lineout tempfile,'<hR><dt> <strong>PUBLIC_PRIVS</strong>:'
  575. call lineout tempfile,' <INPUT TYPE="text" NAME="PUBLIC_PRIVS" '
  576. foo=find_val(22)
  577. call lineout tempfile,'value="' foo '"'
  578. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  579. call lineout tempfile,'<dd> PUBLIC_PRIVS is a space delimited list of "extra" '
  580. call lineout tempfile,' privileges to give to  everyone. '
  581.  
  582. /*USER_PRIVS*/
  583. call lineout tempfile,'<hR><dt> <strong>USER_PRIVS</strong>:'
  584. call lineout tempfile,' <INPUT TYPE="text" NAME="USER_PRIVS" '
  585. foo=find_val(46)
  586. call lineout tempfile,'value="' foo '"'
  587. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  588. call lineout tempfile,'<dd> USER_PRIVS is a space delimited list of "extra" '
  589. call lineout tempfile,' privileges to give to  all <em>registered </em> users (clients with a valid with username and password). '
  590.  
  591.  
  592.  
  593. /* Unallowed ips */
  594. foo=find_val(4,2)
  595. call lineout tempfile,'<hr><dt> <strong>UNALLOWEDIPS.</strong>:'
  596. call lineout tempfile,' <TEXTAREA NAME="'||param.4||'." ROWS=4 COLS=25>'
  597. call lineout tempfile,foo
  598. call lineout tempfile,'</TEXTAREA>'
  599. call lineout tempfile,'<dd>'
  600. call lineout tempfile,' UNALLOWEDIPS. is the "opposite" of INHOUSEIPS. It is a list of '
  601. call lineout tempfile,' the IP addresses of requesters who will NOT be allowed access.'
  602. call lineout tempfile,' Note  INHOUSEIPS. and OWNERS takes precedence over UNALLOWEDIPS.'
  603. call lineout tempfile,' Thus, entering *.*.*.* as an UNALLOWEDIPS. will keep everyone, except '
  604. call lineout tempfile,' OWNERS and INHOUSE requesters, out! '
  605.  
  606. /* DNS_CHECK */
  607.   call lineout tempfile,'<hr><dt> <strong>DNS_CHECK</strong>:'
  608.   v.1="NO" ; v.2="YES"
  609.   foo=do_radio(30,2)
  610.   call lineout tempfile,'<dd>'
  611.   call lineout tempfile,'DNS_CHECK controls whether a domain name check should occur:'
  612.   call lineout tempfile,'<ul>'
  613.   call lineout tempfile,"<LI>NO : Do not check the user's <tt> IP Name </tt> "
  614.   call lineout tempfile,"<LI>YES : Get the user's <tt> IP Name </tt> (by calling the DNS), and deny access if not found"
  615.   call lineout tempfile,'</ul>'
  616.   call lineout tempfile,' DNS_CHECK=YES  provides extra security, but will slow response time '
  617.   call lineout tempfile, ' (and may keep out legitimate clients with faulty DNS servers).'
  618.  
  619. /* hosts */
  620. foo=""
  621. call lineout tempfile,'<hr><dt> <strong>HOSTS.</strong>:'
  622. call lineout tempfile,' <TEXTAREA NAME="'||param.33||'." ROWS=4 COLS=45>'
  623. foo=find_val(33,1)
  624. call lineout tempfile,foo
  625. call lineout tempfile,'</TEXTAREA>'
  626. call lineout tempfile,'<dd>'
  627. call lineout tempfile,'HOSTS. is a stem variable used to identify what HOSTS '
  628. call lineout tempfile,'GoServe is servicing.'
  629. call lineout tempfile,'Each HOSTS. entry should contain the following comma-delimited information:<br>'
  630. call lineout tempfile,'<code> IP_address , host_nickname , default_dir</code> <p>'
  631. call lineout tempfile,'Where <blockquote>'
  632. call lineout tempfile,'<STRONG>IP_address</STRONG> is the IP address (numeric or character) of the host. <br>'
  633. call lineout tempfile,' <STRONG>host_nickname</STRONG> is the "nickname" that you will use to refer to this host <br>'
  634. call lineout tempfile,' <STRONG>default_directory</STRONG> is the default data directory for this host </blockquote>'
  635. call lineout tempfile,' Examples:<MENU>'
  636. call lineout tempfile,'<LI>www.ag.gov , main , e:\WWW1  <br>'
  637. call lineout tempfile,'<LI>w3.ag.gov , second , e:\WWW2  <LI> 0</MENU>'
  638. if nickname<>' ' then
  639.   call lineout tempfile,'<p><strong> Reminder: the HOSTS. parameters are NOT host-specific! </strong>'
  640.  
  641. /*********
  642.  public urls  no longer set in initfilt.80 -- see puburls.in 
  643. foo=find_val(23)
  644. call lineout tempfile,'<hr><dt> <strong>PUBLIC_URLS.</strong>:'
  645. call lineout tempfile,' <TEXTAREA NAME="'||param.23||'." ROWS=4 COLS=25>'
  646. call lineout tempfile,foo
  647. call lineout tempfile,'</TEXTAREA>'
  648. call lineout tempfile,'<dd>'
  649. call lineout tempfile,' PUBLIC_URLS. is a "stem" variable that contains a '
  650. call lineout tempfile,' list of "publically accessible URLs".  These URLs '
  651. call lineout tempfile,'will be available to all requesters -- no logon or '
  652. call lineout tempfile,'access control is attempted when PUBLIC_URLS are requested.<br>'
  653. call lineout tempfile,'PUBLIC_URLS. entry may include * (for wildcard matching). <br>'
  654. call lineout tempfile,'You can also specify <strong>LITERAL </strong> PUBLIC_URLS. <br>'
  655. call lineout tempfile,' <em> Note that PUBLIC_URLS. entries  will be checked against your ALIASES</em>'
  656. ***********/
  657.  
  658. call lineout tempfile,'</dl>  '
  659. call lineout tempfile,' <hr width=40%>  '
  660. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  661. call lineout tempfile,' <hr width=40%>  '
  662. call lineout tempfile,'  <H3><A name="section2">Request Modification </a3> </H3>'
  663. call lineout tempfile,' <dl> '
  664.  
  665. /* DEFAULT */
  666. call lineout tempfile,'<p> <dt> <strong>DEFAULT</strong>:'
  667. call lineout tempfile,' <INPUT TYPE="text" NAME="DEFAULT" '
  668. foo=find_val(5)
  669. call lineout tempfile,'value="' foo '"'
  670. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  671. call lineout tempfile,'<dd>'
  672. call lineout tempfile,' Enter the name of the HTML document to be used as your '
  673. call lineout tempfile,' "default document" (your home page).  This will be used '
  674. call lineout tempfile,' when an empty request selector is recieved. <br>Note that  '
  675. call lineout tempfile,' INDEX.HTM (located in the root of your "data directory") '
  676. call lineout tempfile, ' is often used as the default document.'
  677.  
  678.  
  679.  
  680. /* HOME_DIR */
  681. call lineout tempfile,'<hR><dt> <strong>HOME_DIR</strong>:'
  682. call lineout tempfile,' <INPUT TYPE="text" NAME="HOME_DIR" '
  683. foo=find_val(7)
  684. call lineout tempfile,'value="' foo '"'
  685. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  686. call lineout tempfile,'<dd>'
  687. call lineout tempfile,' HOME_DIR is used when a ~ appears in the request selector. '
  688. call lineout tempfile,' Typically, it is a shorthand for a "home directory" --'
  689. call lineout tempfile,' under which personal directories are placed.'
  690. call lineout tempfile,' <br>Advanced option:  include a $ to specify a <em> web subdirectory </em>'
  691. call lineout tempfile,' of the  <em> personal </em> directory.'
  692.  
  693.  
  694. /***** NOEXT_TYPE 
  695. call lineout tempfile,'<hR><dt> <strong>NOEXT_TYPE</strong>:'
  696. v.1="NO" ; V.2="REDIR" ; v.3="HTM" ; v.4="HTML"
  697.   foo=do_radio(27,4)
  698. call lineout tempfile,'<dd> NOEXT_TYPE controls how SRE-http handles request that '
  699. call lineout tempfile,' have no extension, that do not have a ? in them, and that do not '
  700. call lineout tempfile,' end with a /.  <ul> <li> NO : Use as is '
  701. call lineout tempfile,' <li>REDIR: Append a /, and then redirect '
  702. call lineout tempfile,' <li> HTM or HTML : Treat as HTML documents (append a '
  703. call lineout tempfile,' .HTM or a .HTML respectively) </ul>'
  704. ****/
  705.  
  706. /****** NOEXT_TYPE */
  707. call lineout tempfile,'<hR><dt> <strong>NOEXT_TYPE</strong>:'
  708. call lineout tempfile,' <INPUT TYPE="text" NAME="NOEXT_TYPE" '
  709. foo=find_val(27)
  710. call lineout tempfile,'value="' foo '"'
  711. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  712. call lineout tempfile,'<dd>'
  713. call lineout tempfile,'<dd> NOEXT_TYPE controls how SRE-http handles request that '
  714. call lineout tempfile,' have no extension, that do not have a ? in them, and that do not '
  715. call lineout tempfile,' end with a /. '
  716. call lineout tempfile,' <br> You should enter a spaced delimited list containing: '
  717. call lineout tempfile,' <menu><li> <b>NO</b> -- Use as is  (do not add an extension) '
  718. call lineout tempfile,' <li> <b>REDIR</b> -- Add a / to the end, and redirect <em>(if used, should be the last entry)</em>'
  719. call lineout tempfile,' <li><b>HTM</b>, <b>HTML</b>: add a .HTM or .HTML  extension (respectively)'
  720. call lineout tempfile,' <li> <b>.xxx</b>: add a <code>.xxx</code> extension (for example, .SHT or .SHTML)'
  721. call lineout tempfile,'</menu>'
  722.  
  723.  
  724. /* AUTO_NAME */
  725. call lineout tempfile,'<hR><dt> <strong>AUTO_NAME</strong>:'
  726. call lineout tempfile,' <INPUT TYPE="text" NAME="AUTO_NAME" '
  727. foo=find_val(8)
  728. call lineout tempfile,'value="' foo '"'
  729. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  730. call lineout tempfile,'<dd>'
  731. call lineout tempfile,' AUTO_NAME is a space delimited list of "default document for directories".'
  732. call lineout tempfile,' It is used when <code>NOEXT_TYPE=DIR</code>, and a  request for a '
  733. call lineout tempfile, 'directory name (an <code>action</code> that ends with a /) is recieved.'
  734. call lineout tempfile,' <br> Notes: <menu> <li> a *.HTM (or *.HTML)  means "use a file '
  735. call lineout tempfile,     ' called directory_name.htm (or .html) " '
  736. call lineout tempfile, ' (if it exists in the requested directory) '
  737. call lineout tempfile,' <li> !CREATE means "create a list of links to each file in the directory </menu>'
  738.  
  739.  
  740. /* DIR_OPTIONS */
  741. call lineout tempfile,'<hR><dt> <strong>DIR_OPTIONS</strong>:'
  742. call lineout tempfile,' <INPUT TYPE="text" NAME="DIR_OPTIONS" '
  743. foo=find_val(40)
  744. call lineout tempfile,'value="' foo '"'
  745. call lineout tempfile,' SIZE=50 MAXLENGTH=180>'
  746. call lineout tempfile,'<dd>'
  747. call lineout tempfile," DIR_OPTIONS is used by the DIR: SRE-http's built in directory lister."
  748. call lineout tempfile,' <br> It is used to customize the format and content of the directory listing.'
  749. call lineout tempfile,'<br>Notes:<menu><li>DIR_OPTIONS should contain a space-delimited list of options'
  750. call lineout tempfile, '<li> DIR is used when a !CREATE option is included in '
  751. call lineout tempfile,' the AUTO_NAME variable </ul>'
  752.  
  753.  
  754.  
  755. /* DIR_Exclusion */
  756. call lineout tempfile,'<hR><dt> <strong>DIR_EXCLUSION</strong>:'
  757. call lineout tempfile,' <INPUT TYPE="text" NAME="DIR_EXCLUSION" '
  758. foo=find_val(41)
  759. call lineout tempfile,'value="' foo '"'
  760. call lineout tempfile,' SIZE=50 MAXLENGTH=180>'
  761. call lineout tempfile,'<dd>'
  762. call lineout tempfile," DIR_EXCLUSION is used by !DIR: SRE-http's built in directory lister."
  763. call lineout tempfile,' <br> It is used to indicate files and directories that should <b>not</b> be displayed.'
  764. call lineout tempfile,'<br>Notes:<menu><li>DIR_EXCLUSION should contain a space-delimited list of filenames and directory names'
  765. call lineout tempfile,' <li> To indicate subdirectories, start the directory name with a / '
  766. call lineout tempfile,' <LI> You can use * as a wildcard character '
  767. call lineout tempfile,' the AUTO_NAME variable </ul>'
  768.  
  769.  
  770. /* DIR_EXCLUSION */
  771. call lineout tempfile,'<hR><dt> <strong>DIR_ACCESS</strong>:'
  772. call lineout tempfile,' <INPUT TYPE="text" NAME="DIR_ACCESS" '
  773. foo=find_val(44)
  774. call lineout tempfile,'value="' foo '"'
  775. call lineout tempfile,' SIZE=50 MAXLENGTH=180>'
  776. call lineout tempfile,'<br> and <strong>DIR_ACCESS_PRIVS:</strong>'
  777. call lineout tempfile,' <br><INPUT TYPE="text" NAME="DIR_ACCESS_PRIVS" '
  778. foo=find_val(45)
  779. call lineout tempfile,'value="' foo '"'
  780. call lineout tempfile,' SIZE=50 MAXLENGTH=180>'
  781.  
  782. call lineout tempfile,'<dd>'
  783. call lineout tempfile," DIR_ACCESS is used by !DIR: SRE-http's built in directory lister."
  784. call lineout tempfile,' <br> It is used to indicate directories that should be displayed <b>only</b> to clients with one of the DIR_ACCESS_PRIVS <em>client</em> privileges.'
  785. call lineout tempfile,'<br>Notes:<menu><li>DIR_ACCESS should contain a space-delimited list of (relative) directory names'
  786. call lineout tempfile,' <br> You can use * as a wildcard character '
  787.  
  788. call lineout tempfile,'<li>DIR_ACCESS_PRIVS should contain a space-delimited list of <em>client privileges</em> '
  789. call lineout tempfile,'</ul>'
  790.  
  791. call lineout tempfile,'</dl>  '
  792. call lineout tempfile,' <hr width=40%>  '
  793. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  794. call lineout tempfile,' <hr width=40%>  '
  795. call lineout tempfile,'<H3><A name="section3"> Access and Auditing </a></H3>'
  796. call lineout tempfile,'<dl> '
  797.  
  798. /* ALLOW_ACCESS */
  799. call lineout tempfile,'<p><dt> <strong>ALLOW_ACCESS</strong>:'
  800.   v.1="YES" ; v.2="INHOUSE" ; v.3="NO"
  801.   foo=do_radio(9,3)
  802. call lineout tempfile,'<dd>ALLOW_ACCESS turns on and off "URL" specific access control'
  803. call lineout tempfile,' <ul> <LI>YES = Do not check (allow all requests to go through'
  804. call lineout tempfile,' <LI> INHOUSE = Check access privileges of everyone except OWNERS or INHOUSE requesters.'
  805. call lineout tempfile,' <LI>  NO = Check access privileges of everyone except OWNERS '
  806. call lineout tempfile, ' (those with SUPERUSER privileges) </ul>'
  807. call lineout tempfile,' Notes: <menu><li> ALLOW_ACCESS uses the ACCESS_FILE to store file-specific access information'
  808. call lineout tempfile,'  </ul>'
  809.  
  810.  
  811. /* DO_HTACCESS */
  812. call lineout tempfile,'<hr><dt> <strong>DO_HTACCESS</strong>:'
  813. htfile=get_value('DO_HTACCESS')
  814.   v.1="YES" ;  v.2="NO"
  815.   foo=do_radio(34,2)
  816. call lineout tempfile,'<dd>DO_HTACCESS turns on and off the HTACCESS-file method "directory" specific access controls'
  817. call lineout tempfile,' <ul> <LI>YES = Look for, and use, HTACCESS files to control access '
  818. call lineout tempfile,' <LI>  NO = Do not attempt to use HTACCESS files </ul>'
  819. call lineout tempfile,' Notes: <menu><li> ALLOW_ACCESS and DO_HTACCESS can be used simultaneously '
  820. call lineout tempfile,'<li> The  name of (directory specific) HTACCESS file is set using the <var>HTACCESS_FILE</var> variable.'
  821. call lineout tempfile,' <br> <var> HTACCESS_FILE </var> is currently:<strong> ' htfile '</strong>'
  822.  
  823. call lineout tempfile,'  </ul>'
  824.  
  825.  
  826. /* write common-log */
  827. call lineout tempfile,'<hr><dt> <strong>WRITE_LOGS</strong>:'
  828.   v.1="YES" ; v.2="NO"
  829.   foo=do_radio(43,2)
  830. call lineout tempfile,'<dd> WRITE_LOGS instructs SRE-http to record requests in'
  831. call lineout tempfile,' the <b>common-log</b> audit file (and in the browser and referer log files).'
  832. call lineout tempfile,' <ul> <LI> NO = Do  <b>NOT</b> record requests in the log files.'
  833. call lineout tempfile,' <LI>YES =Record requests </ul>'
  834. call lineout tempfile,' Note: see the SREFLOGS.INI file for additional common-log options. <br>'
  835.  
  836.  
  837. /*RECORD_OPTION */
  838. call lineout tempfile,'<hr><dt> <strong>RECORD_OPTION</strong>:'
  839.   v.1="YES" ; v.2="YES_ALL" ; v.3="FILE" ; v.4="NO" ;
  840.   foo=do_radio(10,4)
  841. call lineout tempfile,'<dd> RECORD_OPTION turns on and off "recording all requests"'
  842. call lineout tempfile,' <ul> <LI>YES = Record all requests, but remove arguments (such as <code>?xxx</code>) first'
  843. call lineout tempfile,' <LI>YES_ALL = Record all requests, but do not remove "arguments" '
  844. call lineout tempfile,' (this can lead to a lot of unique entries!) '
  845. call lineout tempfile,' <li> FILE = Record all request by absolute file name (rather then by "URL") '
  846. call lineout tempfile,' <LI>  NO = Do not record all requests </ul>'
  847. call lineout tempfile,' Notes: <br>'
  848. call lineout tempfile,' i) RECORD_OPTIONS uses the RECORD_ALL_FILE to keep track of the number '
  849. call lineout tempfile,' of requests recieved, and the date of the most recent request.<br>'
  850. call lineout tempfile,' ii) Requests that are not "honored" (due to logon or access constraints) are NOT recorded'
  851.  
  852.  
  853. /* hit_cache_len and hit_cache_duration */
  854. call lineout tempfile,' <hr> <dt> <strong> HIT_CACHE_LEN: '
  855. call lineout tempfile,' <INPUT TYPE="text" NAME="HIT_CACHE_LEN" '
  856. foo=find_val(36)
  857. call lineout tempfile,'value="' strip(foo) '" '
  858. call lineout tempfile,' SIZE=10 MAXLENGTH=10> <br>'
  859. call lineout tempfile,' HIT_CACHE_DURATION: </strong>'
  860. call lineout tempfile,' <INPUT TYPE="text" NAME="HIT_CACHE_DURATION" '
  861. foo=find_val(37)
  862. call lineout tempfile,', value="' strip(foo)'" '
  863. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  864.  
  865. call lineout tempfile,'<dd>'
  866. call lineout tempfile,' The HIT_CACHE_ variables are used to prevent recording of "false requests",'
  867. call lineout tempfile,' that occur when a client repetitively reloads a document<br>'
  868. call lineout tempfile,'  HIT_CACHE_LEN is the number of entries (in menory) set aside for the <em>hit </em> storage cache<br>'
  869. call lineout tempfile,' <blockquote> On busy sites, small values of this will cause entries to be prematurely lost.'
  870. call lineout tempfile,' Alternatively, use a value of <b>FILE</b>  -- entries will be stored in a file'
  871. call lineout tempfile,' (this is slower, but might be safer if you are storing thousands of hits) </blockquote>'
  872. call lineout tempfile,' HIT_CACHE_DURATION is the time (in minutes) each entry is retained.<p>'
  873. call lineout tempfile,' Note that each entry contains a request selector and client IP address '
  874. call lineout tempfile,' (averaging around 50 bytes). '
  875.  
  876.  
  877. call lineout tempfile,'<hr><dt> <strong>HIT_OWNER_SUPPRESS</strong>:'
  878.   v.1="YES" ; v.2="NO"
  879.   foo=do_radio(38,2)
  880. call lineout tempfile,'<dd> HIT_OWNER_SUPPRESS instructs SRE-http to <b>not</b> record '
  881. call lineout tempfile,' from <b>OWNERS</b> (as listed in the OWNERS variable).'
  882. call lineout tempfile,' <ul> <LI>YES = Do NOT record such requests.'
  883. call lineout tempfile,' <LI>NO =allow recording </ul>'
  884.  
  885.  
  886. call lineout tempfile,'<hr><dt> <strong>CHECK_ADD_PRIVS</strong>:'
  887.   v.1="YES" ; v.2="NO"
  888.   foo=do_radio(39,2)
  889. call lineout tempfile,'<dd> CHECK_ADD_PRIVS instructs SRE-http to check the dynamic privileges <code>cache</code>. '
  890. call lineout tempfile," <Ul> <li>YES = Check the dynamic privileges cache for entries that match this client's IP address"
  891. call lineout tempfile,' <LI> NO = Do not check </ul>'
  892. call lineout tempfile,' <em> The dynamic-privileges <code>cache</code> is used to grant additional, "transient", '
  893. call lineout tempfile,' privileges to a client.</em>'
  894.  
  895.  
  896. call lineout tempfile,'</dl>  '
  897. call lineout tempfile,' <hr width=40%>  '
  898. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  899. call lineout tempfile,' <hr width=40%>  '
  900. call lineout tempfile,' <H3><a name="section4">Response Header, Pre-filter, and Uploading </a></H3>'
  901. call lineout tempfile,' <dl> '
  902.  
  903.  
  904. /*AUTO_HEADER */
  905. call lineout tempfile,'<p><dt> <strong>AUTO_HEADER</strong>:'
  906.   v.1="NO" ; v.2="HEAD" ; v.3="ALWAYS"
  907.   foo=do_radio(24,3)
  908. call lineout tempfile,'<dd> AUTO_HEADER controls the "automatic creation of response headers"'
  909. call lineout tempfile,'<ul> <LI>NO = Do not create additional response headers '
  910. call lineout tempfile,'<LI>HEAD = Automatic creation of response headers for HEAD requests'
  911. call lineout tempfile,'<LI>ALWAYS= Automatic creation of response headers fo GET and  HEAD requests'
  912. call lineout tempfile,'</ul> Note: When active, LINK and META HTTP-EQUIV elements found in the '
  913. call lineout tempfile,'<HEAD> portion of an HTML document are used to generate additional response headers'
  914.  
  915. /*PRE_FILTER */
  916. call lineout tempfile,'<hr><dt> <strong>PRE_FILTER</strong>:'
  917.   v.1="NO" ; v.2="YES" ; v.3="FIRST"
  918.   foo=do_radio(29,3)
  919. call lineout tempfile,'<dd> PRE_FILTER controls whether the PREFILTR  "pre-filter" is called '
  920. call lineout tempfile,' before SRE-http processes the request .'
  921. call lineout tempfile,' <ul> <li> NO = Do not call a pre-filter '
  922. call lineout tempfile,'  <li> YES =Call a pre-filter after ascertaining logon rights'
  923. call lineout tempfile,' <li> FIRST = Call a pre-filter before anything else </ul>'
  924. call lineout tempfile,'<br> Notes: <menu><li>The default pre-filter procedure is PREFILTR.80'
  925. call lineout tempfile,' <li> To change the name of the pre-filter procedure, '
  926. call lineout tempfile,' you will have to "hand edit" the PREFILTER_NAME parameter'
  927. call lineout tempfile," <li> SRE-http's default pre-filter (PREFILTR.80) implements"
  928. call lineout tempfile,' the GoRemote server remote control package.'
  929. call lineout tempfile,' <li><em>Suggestion:</em>To perform simple load balancing, change the BackupServerList and '
  930. call lineout tempfile,' LoadThreshold variables in SRE-http.80 (see INITFILT.DOC for details)</menU>'
  931.  
  932. /*POST_FILTER */
  933. call lineout tempfile,'<hr><dt> <strong>POST_FILTER</strong>:'
  934.   v.1="YES" ; v.2="NO"
  935.   foo=do_radio(28,2)
  936. call lineout tempfile,'<dd> POST_FILTER instructs SRE-http to call a set of "post-filters"'
  937. call lineout tempfile,' <ul> <LI>YES = Call the post-filter procedure(s).'
  938. call lineout tempfile,' <LI>NO = do not call </ul>'
  939. call lineout tempfile,' If POST_FILTER=YES, then the postfilter(s) will be called <strong>after</strong>'
  940. call lineout tempfile,' the response has been sent to the client '
  941. call lineout tempfile,' <br> Notes: <menu> <LI> The default Post-filter is POSTFILT.80 '
  942. call lineout tempfile,' <li> To change the name(s) of the pre-filter procedure,'
  943. call lineout tempfile,'  you will have to "hand edit" the POSTFILTER_NAME parameter.'
  944. call lineout tempfile,' <li> SRE-http includes a few sample post-filters (POSTMAIL.80 and POSTRCRD.80) </menu>'
  945.  
  946.  
  947. /* SSI_SHTML_ONLY */
  948. call lineout tempfile,'<hr><dt> <strong>SSI_SHTML_ONLY</strong>:'
  949.   v.1="YES" ; v.2="NO"
  950.   foo=do_radio(32,2)
  951. call lineout tempfile,'<dd> SSI_SHTML_ONLY is used to tell SRE-http to attempt '
  952. call lineout tempfile,' server side includes <em> only </em> on files with a "SHTML" '
  953. call lineout tempfile,' extension -- other html/text files (say, with .HTM or .HTML'
  954. call lineout tempfile,' extensions) will NOT be checked for server side includes. '
  955. call lineout tempfile,'<p> Select <b>YES</b> to turn SSI_SHTML_ONLY on, '
  956. call lineout tempfile,'<Br> <b>NO</b> to attempt server side includes on all html/text files '
  957. call lineout tempfile,'<p>Notes:<menu><li> SRE-http defines four extensions as "SHTML extensions": '
  958. call lineout tempfile,' .SHTML, .SHT, .HTM-SSI and .HTML-SSI.'
  959. call lineout tempfile,' <li> To add or modify this list, change the SSI_EXTENSIONS variable '
  960. call lineout tempfile,' (see INITFILT.DOC for details) </menu>'
  961.  
  962. /* SSI_CACHE_ON*/
  963. call lineout tempfile,'<hr><dt> <strong>SSI_CACHE_ON</strong>:'
  964.   v.1="YES" ; v.2="NO"
  965.   foo=do_radio(42,2)
  966. call lineout tempfile,'<dd> SSI_CACHE_ON is used to enable the <em>server side include cache </em>'
  967. call lineout tempfile,' (the SSI-CACHE). <p> '
  968. call lineout tempfile,' The SSI-cache is used to store "compiled" versions of HTML documents that '
  969. call lineout tempfile,' contain server side includes.  When a request for such document arrives,'
  970. call lineout tempfile,' SRE-http will return it (perhaps with further modifications).'
  971. call lineout tempfile,' <blockquote> Turning off caching is sometimes useful (or necessary) in highly'
  972. call lineout tempfile,'   dynamic environments; say, where INCLUDE files are constantly changing.</blockquote>'
  973. call lineout tempfile,"For more information on SRE-http's server side include caching "
  974. call lineout tempfile,'algorithim, see <a href="/samples/ssicache.htm">SSICACHE.HTM </a>'
  975.  
  976.  
  977. /*SMTP_GATEWAY */
  978. call lineout tempfile,'<hr><dt> <strong>SMTP_GATEWAY</strong>:'
  979. call lineout tempfile,' <INPUT TYPE="text" NAME="SMTP_GATEWAY" '
  980. foo=find_val(31)
  981. call lineout tempfile,'value="' foo '"'
  982. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  983. call lineout tempfile,"<dd> SMTP_GATEWAY is used by SRE-http's <em>e-mail alert</em> facility "
  984. call lineout tempfile," (as implemented in the POSTMAIL.80 post-filter routine). "
  985. call lineout tempfile,' SMTP_GATEWAY should contain the name of your SMTP mail server. <br> '
  986. call lineout tempfile,' If you do not know it, or do not need to use e-mail alerts, leave this field empty (or set it to 0)<p>'
  987. call lineout tempfile,' For more details on SMTP_GATEWAY, see POSTMAIL.80 '
  988.  
  989. /* UPLOAD_Minfree and upload_maxsize */
  990. call lineout tempfile,' <hr> <dt> <strong> UPLOAD_MINFREE: '
  991. call lineout tempfile,' <INPUT TYPE="text" NAME="UPLOAD_MINFREE" '
  992. foo=find_val(26)
  993. call lineout tempfile,'value="' strip(foo) '" '
  994. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  995. call lineout tempfile,' , and UPLOAD_MAXSIZE: </strong>'
  996. call lineout tempfile,' <INPUT TYPE="text" NAME="UPLOAD_MAXSIZE" '
  997. foo=find_val(25)
  998. call lineout tempfile,', value="' strip(foo)'" '
  999. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  1000. call lineout tempfile,'<dd>'
  1001. call lineout tempfile,' The UPLOAD_ variables are needed when GET_URL is used to upload '
  1002. call lineout tempfile,' files from another server. <pr>'
  1003. call lineout tempfile,' UPLOAD_MINFREE is the amount of space (in K bytes) that must be free '
  1004. call lineout tempfile,' in the UPLOAD_DIRECTORY <em> after </em> the file has been uploaded.'
  1005. call lineout tempfile,' <br> UPLOAD_MAXSIZE is the maximum allowable size (in K bytes) of a uploaded file '
  1006. call lineout tempfile, '<p> If either of these limits are exceeded, the file will <strong> not </strong> be uploaded.'
  1007.  
  1008.  
  1009. call lineout tempfile,'</dl>  '
  1010. call lineout tempfile,' <hr width=40%>  '
  1011. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1012. call lineout tempfile,' <hr width=40%>  '
  1013. call lineout tempfile,' <h3> <a name="section5">  String Replacements </a> </h3>'
  1014. call lineout tempfile,' <dl> '
  1015.  
  1016. /* headers */
  1017. foo=find_val(12)
  1018. call lineout tempfile,'<p><dt> <strong>HEADERS.</strong>:'
  1019. call lineout tempfile,' <TEXTAREA NAME="'||param.12||'." ROWS=4 COLS=25>'
  1020. call lineout tempfile,foo
  1021. call lineout tempfile,'</TEXTAREA>'
  1022. call lineout tempfile,'<dd> HEADERS. are added to the top of all requested HTML '
  1023. call lineout tempfile,' documents (they are added just after the first <BODY> tag).'
  1024.  
  1025. call lineout tempfile,' You should enter valid HTML code in this box '
  1026. call lineout tempfile,' (or leave it blank if you do not want a HEADER added). '
  1027. call lineout tempfile,' Note that HEADERS can contain keyphrases. '
  1028.  
  1029. /* footers */
  1030. foo=find_val(13)
  1031. call lineout tempfile,'<hr><dt> <strong>FOOTERS.</strong>:'
  1032. call lineout tempfile,' <TEXTAREA NAME="'||param.13||'." ROWS=4 COLS=25>'
  1033. call lineout tempfile,foo
  1034. call lineout tempfile,'</TEXTAREA>'
  1035. call lineout tempfile,'<dd> FOOTERS. are added to the top of all requested HTML '
  1036. call lineout tempfile,' documents (they are added just before  the last </BODY> tag).'
  1037. call lineout tempfile,' You should enter valid HTML code in this box '
  1038. call lineout tempfile,'(or leave it blank if you do not want a FOOTER added). '
  1039. call lineout tempfile,' Note that FOOTERS can contain keyphrases. '
  1040.  
  1041. /* inhouse. */
  1042. foo=find_val(14)
  1043. if strip(foo)=0 then foo=" "
  1044. call lineout tempfile,'<hr><dt> <strong>INHOUSE.</strong>:'
  1045. call lineout tempfile,' <TEXTAREA NAME="'||param.14||'." ROWS=4 COLS=65>'
  1046. call lineout tempfile,foo
  1047. call lineout tempfile,'</TEXTAREA>'
  1048. call lineout tempfile,'<dd> The INHOUSE. variable(s) are used by the REPLACE INHOUSE.n keyphrase'
  1049. call lineout tempfile,' Each line of this box corresponds to a different value of n '
  1050. call lineout tempfile,' -- the first line is for INHOUSE.1, the second for INHOUSE.2, etc.'
  1051.  
  1052. /* SUPERUSER. */
  1053. foo=find_val(15)
  1054. call lineout tempfile,'<hr><dt> <strong>SUPERUSER.</strong>:'
  1055. if strip(foo)=0 then foo=" "
  1056. call lineout tempfile,' <TEXTAREA NAME="'||param.15||'." ROWS=4 COLS=65>'
  1057. call lineout tempfile,foo
  1058. call lineout tempfile,'</TEXTAREA>'
  1059. call lineout tempfile,'<dd> The SUPERUSER. variable(s) are used by the REPLACE SUPERUSER.n keyphrase'
  1060. call lineout tempfile,' Each line of this box corresponds to a different value of n '
  1061. call lineout tempfile,' -- the first line is for SUPERUSER.1, the second for SUPERUSER.2, etc.'
  1062.  
  1063.  
  1064. /* webmaster */
  1065. call lineout tempfile,'<hR><dt> <strong>WEBMASTER</strong>:'
  1066. foo=find_val(16)
  1067. call lineout tempfile, ' <TEXTAREA NAME="WEBMASTER" ROWS=1 COLS=68>' foo
  1068. call lineout tempfile, ' </TEXTAREA>'
  1069. call lineout tempfile,'<dd>'
  1070. call lineout tempfile,' The WEBMASTER variable is used in the REPLACE WEBMASTER keyphrase,'
  1071. call lineout tempfile,' and is used in some internally generated messages.  It should contain'
  1072. call lineout tempfile,' a contact address (preferably as a MAILTO URL) of the site''s "webmaster"'
  1073.  
  1074.  
  1075. /*HOME_NAME */
  1076. call lineout tempfile,'<hR><dt> <strong>HOME_NAME</strong>:'
  1077. call lineout tempfile,' <INPUT TYPE="text" NAME="HOME_NAME" '
  1078. foo=find_val(17)
  1079. call lineout tempfile,'value="' foo '"'
  1080. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  1081. call lineout tempfile,'<dd>'
  1082. call lineout tempfile,' HOME_NAME is used in the REPLACE HOME_NAME keyphrase, and  is'
  1083. call lineout tempfile,' used in the default Not Found response (see below).  It should contain the '
  1084. call lineout tempfile,' commonly-used name of your organization (not necessarily the IP name!)'
  1085.  
  1086.  
  1087. call lineout tempfile,'</dl>  '
  1088. call lineout tempfile,' <hr width=40%>  '
  1089. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1090. call lineout tempfile,' <hr width=40%>  '
  1091. call lineout tempfile,' <h3> <a name="section5a">  Miscellaneous  </a> </h3>'
  1092. call lineout tempfile,' <dl> '
  1093.  
  1094.  
  1095. /*the_realm */
  1096. call lineout tempfile,'<hR><dt> <strong>THE_REALM</strong>:'
  1097. call lineout tempfile,' <INPUT TYPE="text" NAME="the_realm" '
  1098. foo=find_val(18)
  1099. call lineout tempfile,'value="' foo '"'
  1100. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  1101. call lineout tempfile,'<dd>'
  1102. call lineout tempfile,' THE_REALM is the realm name that will be shown to the client '
  1103. call lineout tempfile,' when  a username/password is requested.  Note that the "realm"'
  1104. call lineout tempfile,' value for a url that is contained in the ACCESS_FILE is also used '
  1105. call lineout tempfile,' (THE_REALM is used first). '
  1106.  
  1107.  
  1108.  
  1109. /*option_hIT_LINE */
  1110. call lineout tempfile,'<hR><dt> <strong>OPTION_HIT_LINE</strong>:'
  1111. call lineout tempfile,' <INPUT TYPE="text" NAME="OPTION_HIT_LINE" '
  1112. foo=find_val(19)
  1113. call lineout tempfile,'value="' foo'"'
  1114. call lineout tempfile,' SIZE=30 MAXLENGTH=180>'
  1115. call lineout tempfile,'<dd> OPTION_HIT_LINE is used by the REPLACE OPTION_HITS.n keyphrase'
  1116.  
  1117.  
  1118. /*NOT_FOUND_URL */
  1119. call lineout tempfile,'<hR><dt> <strong>NOT_FOUND_URL</strong>:'
  1120. foo=find_val(20)
  1121. call lineout tempfile, ' <TEXTAREA NAME="NOT_FOUND_URL" ROWS=1 COLS=60>' foo
  1122. call lineout tempfile, ' </TEXTAREA>'
  1123. call lineout tempfile,'<dd> NOT_FOUND_URL is a string that is displayed when a Not Found '
  1124. call lineout tempfile,' response is generated (say, when a requested file can not be found).'
  1125. call lineout tempfile,' Typically it will contain a link to your home page, or some other ';
  1126. call lineout tempfile,' "catchall" document.  Note that HOME_NAME is used in the default '
  1127. call lineout tempfile,' definition of NOT_FOUND_URL '
  1128.  
  1129. /* FIX_EXPIRE */
  1130. call lineout tempfile,' <hr> <dt> <strong> FIX_EXPIRE: </strong> '
  1131. call lineout tempfile,' <INPUT TYPE="text" NAME="FIX_EXPIRE" '
  1132. foo=find_val(35)
  1133. call lineout tempfile,'value="' foo '" '
  1134. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  1135. call lineout tempfile,'<dd>'
  1136. call lineout tempfile,' The FIX_EXPIRE variable is used to suppress "immediate expiraton" of '
  1137. call lineout tempfile,'  documents containing server side includes, and documents generated by CGI-BIN scripts.'
  1138. call lineout tempfile,' <BR> <em> "Immediate expiration" can cause annoying reloads when clients use the back '
  1139. call lineout tempfile,' arrow key on their browsers </em> <br>'
  1140. call lineout tempfile,' <br> Set FIX_EXPIRE to a fractional value  '
  1141. call lineout tempfile,' to indicate a future expiration date (in 24hrs * FIX_EXPIRE). '
  1142. call lineout tempfile,' <br> To suppress this (and use default "immediate expiration"), set this to 0'
  1143.  
  1144.  
  1145.  
  1146. call lineout tempfile,' </dl> '                 /* END OF PARAMTERS LIST */
  1147. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1148.  
  1149.  
  1150.  
  1151. /* === File info SECTION === */
  1152.  
  1153. wow=find_fnames()
  1154.  
  1155. call lineout tempfile,'<hr> <h3> <a name="section6"> File & Directory Names </a> </h3>'
  1156. if nickname<>' ' then
  1157.   call lineout tempfile,' <em> File and directory names are <strong>not</strong> host-specific </em><p>'
  1158.   call lineout tempfile,' <br> <b> We recommend restarting GoServe immediately after changing any of these filenames or directories!</b>'
  1159. call lineout tempfile,'<dl> <dt> <br> ' fd.1 ' = '
  1160. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.1||'"  VALUE="'||fd.1.val||'"  '
  1161. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1162. Call lineout tempfile,' <dd> The MESSBOX_DIR is where the SRE-http message boxes are stored'
  1163.  
  1164. call lineout tempfile,'<dt> <br> ' fd.15 ' = '
  1165. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.15||'"  VALUE="'||fd.15.val||'"  '
  1166. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1167. Call lineout tempfile,' <dd> The TEMPDATA_DIR is where SRE-http puts temporary  files;  '
  1168. call lineout tempfile,' such as the $xxxx.80 temporary response files, and the SSI-Cache files.'
  1169. call lineout tempfile,' It is <b>not</b> supposed to be used by <em> user supplied programs </em> (see TEMPFILE_DIR) .'
  1170.  
  1171. call lineout tempfile,'<dt> <br> ' fd.20 ' = '
  1172. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.20||'"  VALUE="'||fd.20.val||'"  '
  1173. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1174. Call lineout tempfile,' <dd> The USERINFO_DIR is where SRE-http stores client-specific information;  '
  1175. call lineout tempfile,' such as files used for "client-specific customization".'
  1176.  
  1177.  
  1178. call lineout tempfile,'<dt> <br> ' fd.2 ' = '
  1179. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.2||'"  VALUE="'||fd.2.val||'"  '
  1180. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1181. Call lineout tempfile,' <dd> The TEMPFILE_DIR is working space for your various <em> user supplied programs </em>'
  1182.  
  1183.  
  1184. call lineout tempfile,'<dt> <br> ' fd.16 ' = '
  1185. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.16||'"  VALUE="'||fd.16.val||'"  '
  1186. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1187. Call lineout tempfile,' <dd> The WORKDATA_DIR is where SRE-http puts username, alias, access control'
  1188. call lineout tempfile, ' and other permanent data files.'
  1189.  
  1190.  
  1191. call lineout tempfile,'<dt> <br> ' fd.11 ' = '
  1192. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.11||'"  VALUE="'||fd.11.val||'"  '
  1193. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1194. Call lineout tempfile,' <dd> The UPLOAD_DIR is where "uploaded" files will be put. '
  1195.  
  1196. call lineout tempfile,'<dt> <br> ' fd.12 ' = '
  1197. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.12||'"  VALUE="'||fd.12.val||'"  '
  1198. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1199. Call lineout tempfile,' <dd> The CGI_BIN_DIR is where "CGI-BIN" programs should be stored. '
  1200.  
  1201. call lineout tempfile,'<dt> <br> ' fd.19 ' = '
  1202. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.19||'"  VALUE="'||fd.19.val||'"  '
  1203. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1204. Call lineout tempfile,' <dd> The ADDON_DIR is where various SRE-http configuration tools and <B>addons</b>  programs should be stored. '
  1205.  
  1206. call lineout tempfile,'<dt> <br> ' fd.14 ' = '
  1207. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.14||'"  VALUE="'||fd.14.val||'"  '
  1208. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1209. call lineout tempfile,"<dd> The MAILBOX_DIR is where SRE-http's will read and write e-mail messages from"
  1210. call lineout tempfile,' (it should be the "inbox" directory of an SMTP server).'
  1211.  
  1212. call lineout tempfile,'<dt> <br> ' fd.3 ' = '
  1213. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.3||'"  VALUE="'||fd.3.val||'"  '
  1214. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1215. Call lineout tempfile,' <dd> The COUNTER_FILE is where the REPLACE HITS and REPLACE COUNTS '
  1216. call lineout tempfile,' keyphrases store the "number of hits" statistics. '
  1217.  
  1218.  
  1219. call lineout tempfile,'<dt> <br> ' fd.4 ' = '
  1220. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.4||'"  VALUE="'||fd.4.val||'"  '
  1221. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1222. Call lineout tempfile,' <dd> The RECORD_ALL_FILE is where the RECORD_OPTIONS stores the '
  1223. call lineout tempfile,' "number of hits " statistics. '
  1224.  
  1225. call lineout tempfile,'<dt> <br> ' fd.21 ' = '
  1226. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.21||'"  VALUE="'||fd.21.val||'"  '
  1227. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1228. Call lineout tempfile,' <dd> The ERROR_LOG is where SRE-http stores warnings and error messages'
  1229.  
  1230.  
  1231. call lineout tempfile,'<dt> <br> ' fd.5 ' = '
  1232. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.5||'"  VALUE="'||fd.5.val||'"  '
  1233. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1234. Call lineout tempfile,' <dd> The SENDFILE_FILE is where the SENDFILE facility stores "number of hits"'
  1235. call lineout tempfile,' statistics" '
  1236.  
  1237.  
  1238. call lineout tempfile,'<dt> <br> ' fd.10 ' = '
  1239. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.10||'"  VALUE="'||fd.10.val||'"  '
  1240. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1241. Call lineout tempfile,' <dd> The UPLOAD_LOG is where information on uploaded files '
  1242. call lineout tempfile,' will be stored.  If you do not want to store such info, enter <strong>0</strong> '
  1243.  
  1244.  
  1245.  
  1246. call lineout tempfile,'<dt> <br> ' fd.6 ' = '
  1247. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.6||'"  VALUE="'||fd.6.val||'"  '
  1248. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1249. Call lineout tempfile,' <dd> The ACCESS_FILE is where  ALLOW_ACCESS looks for action-specific'
  1250. call lineout tempfile,' access information'
  1251.  
  1252.  
  1253. call lineout tempfile,'<dt> <br> ' fd.7 ' = '
  1254. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.7||'"  VALUE="'||fd.7.val||'"  '
  1255. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1256. Call lineout tempfile,' <dd> The ALIAS_FILE contains the lists of ALIASES '
  1257.  
  1258. call lineout tempfile,'<dt> <br> ' fd.22 ' = '
  1259. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.22||'"  VALUE="'||fd.22.val||'"  '
  1260. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1261. Call lineout tempfile,' <dd> The PUBURL_FILE contains the lists of PUBLIC_URLS ' 
  1262.  
  1263.  
  1264. call lineout tempfile,'<dt> <br> ' fd.13 ' = '
  1265. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.13||'"  VALUE="'||fd.13.val||'"  '
  1266. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1267. Call lineout tempfile,' <dd> The VIRTUAL_FILE contains the "virtual directory" list '
  1268.  
  1269. call lineout tempfile,'<dt>  <br> ' fd.8 ' = '
  1270. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.8||'"  VALUE="'||fd.8.val||'"  '
  1271. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1272. Call lineout tempfile,' <dd> The REPSTRGS_FILE contains the list of custom "variable names" '
  1273. call lineout tempfile,' for use by the REPLACE keyphrase '
  1274.  
  1275.  
  1276. call lineout tempfile,'<dt> <br> ' fd.9 ' = '
  1277. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.9||'"  VALUE="'||fd.9.val||'"  '
  1278. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1279. Call lineout tempfile,' <dd> The USER_FILE contains logon/password/privileges information '
  1280.  
  1281. call lineout tempfile,'<dt> <br> ' fd.17 ' = '
  1282. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.17||'"  VALUE="'||fd.17.val||'"  '
  1283. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1284. Call lineout tempfile,' <dd> The LOGON_FAIL_FILE is sent when a logon-failure occurs.'
  1285. call lineout tempfile,' <br> The LOGON_FAIL_FILE should contain an "absolute" file name (i.e.;<code> D:\GOSERVE\LOGFAIL.HTM</code>)'
  1286. call lineout tempfile,' <br> If you want to use the generic response, set this to 0. '
  1287. call lineout tempfile,' <br><em> Note that if the LOGON_FAIL_FILE is an HTML document, '
  1288. call lineout tempfile,' SRE-http will perform a few textual substitutions.</em> '
  1289.  
  1290. call lineout tempfile,'<dt> <br> ' fd.18 ' = '
  1291. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.18||'"  VALUE="'||fd.18.val||'"  '
  1292. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1293. Call lineout tempfile,' <dd> The ACCESS_FAIL_FILE is sent when "SEL-specific" access is not allowed.'
  1294. call lineout tempfile,' <br> The ACCESS_FAIL_FILE should contain an "absolute" file name (i.e.;<code> D:\GOSERVE\ACCFAIL.HTM</code>)'
  1295. call lineout tempfile,' <br> If you want to use the generic response, set this to 0. '
  1296. call lineout tempfile,' <br><em> Note that if the ACCESS_FAIL_FILE is an HTML document, '
  1297. call lineout tempfile,' SRE-http will perform a few textual substitutions.</em> '
  1298.  
  1299. /* ----- no longer officially supported
  1300. call lineout tempfile,'<dt> <br> ' fd.10 ' = '
  1301. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.10||'"  VALUE="'||fd.10.val||'"  '
  1302. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  1303. Call lineout tempfile,' <dd> The INTERPRET_FILE contains the "REXX-code blocks" used by the '
  1304. call lineout tempfile,' INTERPRET keyphrase '
  1305. */
  1306.  
  1307. call lineout tempfile,'</dl>'           /* end OF FILE INFO SECTION */
  1308.  
  1309. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  1310.  
  1311.  
  1312. /* Retain current file contents */
  1313. pud=0
  1314.  do bob=1 to filelines.0
  1315.     if filelines.bob.igot=1 then iterate
  1316.     pud=pud+1
  1317.     dog=filelines.bob
  1318.     DOG=sref_REPLACESTRG(DOG,'"','%22','ALL')
  1319.     DOG=sref_REPLACESTRG(DOG,"'",'%27','ALL')
  1320.     DOG=sref_REPLACESTRG(DOG,"+",'%2B','ALL')
  1321.     dog=sref_replacestrg(dog,'&','%26','ALL')
  1322.     DOG=sref_REPLACESTRG(DOG,"<",'%3c','ALL')
  1323.     DOG=sref_REPLACESTRG(DOG,">",'%3e','ALL')
  1324.  
  1325.     DOG=translate(DOG,"+",' ')
  1326.  
  1327.    call lineout tempfile,'<INPUT TYPE="hidden" NAMe="lines.'||pud|| '" value="'||DOG||'" >'
  1328.  
  1329. /*   dog0=strip(filelines.bob.name)
  1330.    call lineout tempfile,'    <INPUT TYPE="hidden" NAMe="lines_name.'||pud|| '" value="'||DOG0||'" >'*/
  1331.  
  1332.  
  1333.  end
  1334.  call lineout tempfile,'<INPUT TYPE="hidden" NAMe="nickname" value="'||nickname||'" >'
  1335.  call lineout tempfile,'<INPUT TYPE="hidden" NAMe="lines.0" value="'||PUD||'" >'
  1336.  
  1337.  
  1338.   call lineout tempfile,'<p> <EM>if you are done you can</EM> <INPUT TYPE="submit" VALUE="make the changes">,'
  1339.   call lineout tempfile,' <EM>or you can </EM><INPUT TYPE="reset" VALUE="reset to current values">'
  1340.   call lineout tempfile,'</FORM> <hr>'
  1341.   call lineout tempfile,' <h3>Special feature: Look up an IP address </h3>'
  1342.    call lineout tempfile,' For several of these variables (i.e.; OWNERS), numeric IP '
  1343.   call lineout tempfile,' addresses are expected.  If you need to lookup a numeric address:'
  1344.   call lineout tempfile,'  <FORM ACTION="!host" METHOD="GET">'
  1345.   call lineout tempfile,'  <em> enter the IP name here and Look It Up: </em> '
  1346.   call lineout tempfile,'  <INPUT TYPE="text" NAME=""  VALUE=""  SIZE=25 MAXLENGTH=25>'
  1347.   call lineout tempfile,'  <INPUT TYPE="submit" VALUE=" Look It Up"> </form>'
  1348.  
  1349.  
  1350.   call lineout tempfile,' <hr> </body> </html> '
  1351.   call lineout tempfile
  1352. end
  1353.  
  1354. foo=sref_gos('FILE ERASE TYPE text/html NAME' tempfile)
  1355. signal off error ; signal off syntax
  1356. return ' Done with Config2 -- submitted parameters '
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362. /****************************************************/
  1363. /*  JUMP HERE ON POST CALLS, which are always "write info" calls */
  1364. /* you should never need to modify this */
  1365.  
  1366. write_It:   nop
  1367. crlf = '0d0a'x
  1368.  
  1369. ooks=fd.1
  1370. do pp=2 to fd.0
  1371.    ooks=ooks||' '||fd.pp
  1372. end
  1373.  
  1374.  call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  1375.         call lineout tempfile, "<html><head><title>CONFIG2 Results </title>"
  1376.         call lineout tempfile, '</head><body bgcolor="#'||usecolor||'">'
  1377.  
  1378.         call lineout tempfile,' <h1> SRE-http Configurator </h1> '
  1379.  
  1380. foo=stream(afile,'c','query exists')
  1381. if foo="" then do
  1382.    call lineout tempfile,' Warning: Old INITFILT.'aport ' did not exist '
  1383. end
  1384. else do
  1385.  acf1='INITFILT.B'
  1386.   do hi=1 to 99
  1387.      try1=acf1||hi
  1388.      if stream(acf1||hi,'c','query exists')='' then leave
  1389.   end /* do */
  1390.  
  1391.   foo=dosrename(aFILE,try1)
  1392.    CALL LINEOUT TEMPFILE,'The old version of ' Afile ' has been saved as ' try1
  1393. end
  1394.  
  1395. /* Parse the argument list.  Extract current file (in LINES.n) variables
  1396. to the FILELINES. array.
  1397.  Check for arguments.  Note that if no arguments, error. */
  1398. param.0=0 ; fparam.0=0
  1399. do until list=""
  1400.     parse var list a0  '&' list
  1401.     parse var  a0 a1 '=' a2
  1402.     a1=packur(a1) ; a2=strip(packur(a2))
  1403.     a1=upper(strip(a1))
  1404.     select
  1405.        when abbrev(a1,'LINES.')=1 then do
  1406.            parse var a1 foo '.' ith
  1407.           a2=translate(a2,' ','+')
  1408.           filelines.ith=packur(a2)
  1409.         end  /* Do */
  1410.         when abbrev(a1,'NICKNAME')=1 then do
  1411.              nickname=a2
  1412.         end
  1413.         otherwise do
  1414.             a2=translate(a2,' ','+')
  1415.             if wordpos(a1,ooks)>0 then do
  1416.                fparam.0=fparam.0+1 ; IARF0=fPARAM.0
  1417.                fparam.iarf0=a2 ; fparam.iarf0.name=a1
  1418.             end  /* Do */
  1419.             else do
  1420.                param.0=param.0+1 ; IARF=PARAM.0
  1421.                param.IARF=a2 ; PARAM.IARF.NAME=A1
  1422.             end
  1423.         end
  1424.      end
  1425. end
  1426.  
  1427.  
  1428. POOP=afile
  1429. call lineout poop,'; Last modified on : ' time() ' ' Date()
  1430. do mm=1 to filelines.0
  1431.    aa=sref_replacestrg(filelines.mm,'<','<','ALL')
  1432.    aa=sref_replacestrg(aa,'>','>','ALL')
  1433.    if aa=' ' then iterate
  1434.    if abbrev(aa,'; Last modified on')=1 then iterate
  1435.    call lineout POOP,packur(aa)
  1436. end /* do */
  1437.  
  1438. do mm=1 to fparam.0
  1439.   yow=fPARAM.MM.NAME "= '"fPARAM.MM "'"
  1440.   yow=translate(yow,' ','000d0a1a'x)
  1441.   call lineout POOP,yow
  1442. end
  1443.  
  1444. do mm=1 to param.0
  1445.  
  1446.  
  1447.    gosh1=param.mm ;   name1=param.mm.name ; inthis=0
  1448.    gosh1=bad_entry(gosh1,name1)
  1449.  
  1450.    if pos('.',name1)>0 then do          /* is a stem var */
  1451.        do until gosh1=""
  1452.           parse var gosh1 al1 (crlf) gosh1
  1453.           al1=packur(translate(al1,' ','0d0a00'x))
  1454.           if al1=' ' then iterate
  1455.           inthis=inthis+1
  1456.           if nickname=' ' | abbrev(upper(name1),'HOSTS')=1 then do
  1457.               yow=name1||inthis " =  '" al1 "'  "
  1458.           end
  1459.           else do
  1460.               yow=name1||inthis||'.'||nickname " =  '" al1 "'  "
  1461.           end
  1462.           yow=translate(yow,' ','000d0a1a'x)
  1463.           call lineout poop, yow
  1464.        end /* do */
  1465.    end  /* Do */
  1466.    else do
  1467.       gosh1=packur(gosh1)
  1468.       if nickname=' '  then do
  1469.           yow=name1 "= '"gosh1 "'"
  1470.       end
  1471.       else do
  1472.           yow=NAME1||'.'||nickname|| "= '"gosh1 "'"
  1473.       end
  1474.       yow=translate(yow,' ','000d0a1a'x)
  1475.  
  1476.       call lineout poop,yow
  1477.    end
  1478. end /* do */
  1479.  
  1480. CALL LINEOUT POOP
  1481. call lineout tempfile,' <p> ' afile  ' succesfully created.'
  1482.  
  1483. call lineout tempfile,'<p> <a href="/config2.htm">Return to Intermediate Mode Configurator</a>'
  1484. call lineout tempfile,' <hr> </body> </html> '
  1485. call lineout tempfile
  1486. foo=value('SREF_REDO',1,'os2environment')
  1487.  
  1488. foo=sref_gos('FILE ERASE TYPE text/html NAME' tempfile)
  1489. signal off error ; signal off syntax
  1490. return 'Done with CONFIG2 -- saved parameters'
  1491.  
  1492.  
  1493. /* jumnp here on error */
  1494. badguys:
  1495. signal off error ; signal off syntax
  1496. call pmprintf_sref(" Config2 error: at line " sigl)
  1497. 'STRING  Config2 error: at line ' sigl
  1498. return ' '
  1499.  
  1500.  
  1501. /********************************************/
  1502. /* --- create a row of radio buttons */
  1503. do_radio: procedure expose param. filelines. v. tempfile nickname quiklist.
  1504. parse arg ith,inlist,nonick
  1505. unickname=nickname
  1506. if nonick=1 then unickname=' '
  1507. got1=0 ;
  1508. domark=1   /* domark=0 prevents marking for comments -- use on 2nd pass */
  1509.  
  1510.  
  1511. foobax:
  1512. do jj=1 to inlist
  1513.    v2.jj=' '
  1514. end
  1515. findit=strip(param.ith)
  1516.  
  1517.  
  1518. if symbol('quiklist.findit')<>'VAR' then   do        /* no candiate entries */
  1519.    call lineout tempfile,' <INPUT TYPE=RADIO NAME="'||param.ith||'" '
  1520.    call lineout tempfile,' VALUE="'   ||v.mm||  '" '  ||v2.mm||  '>'   v.mm  '      , '
  1521.    return ' '
  1522. end
  1523.  
  1524. /* look at candidates only */
  1525. candlist=quiklist.findit
  1526. do mm0=1 to words(candlist)
  1527.     mm=strip(word(candlist,mm0))
  1528.     if mm=' ' then iterate
  1529.  
  1530.     bval=strip(upper(filelines.mm.name))
  1531.  
  1532.     if bval<>findit then iterate
  1533.  
  1534. /* check nickname stuff */
  1535.      if unickname<>' '   then do  /* check for .nickname at end of name */
  1536.         if pos(unickname,filelines.mm.stem)=0 then iterate
  1537.      end  /* Do */
  1538.      if unickname=' ' & filelines.mm.stem<>' ' & nonick<>1 then do /* check for nickname */
  1539.         foo1=lastpos('.',filelines.mm.stem)
  1540.         if datatype(substr(filelines.mm.stem,foo1+1))<>'NUM' then iterate
  1541.      end  /* Do */
  1542.  
  1543.     if domark=1 then FILELINES.MM.IGOT=1
  1544.     got1=1
  1545.     do mm2=1 to inlist
  1546.       cval=strip(filelines.mm.value)
  1547.       if v.mm2=cval then  do
  1548.           v2.mm2="CHECKED"
  1549.       end
  1550.       else do
  1551.           v2.mm2=' '
  1552.           if upper(v.mm2)='NO' & (cval=0 | abbrev(upper(cval),'N')=1 ) then
  1553.               v2.mm2="CHECKED"
  1554.           if upper(V.mm2)='YES' & (cval=1 | abbrev(upper(cval),'Y')=1) then  
  1555.              v2.mm2="CHECKED"
  1556.      end
  1557.     end
  1558. end             /* always use last match, if more then one */
  1559.  
  1560.  
  1561. if got1=0 then  do
  1562.       if unickname=' ' | nonick>0 then
  1563.           nop
  1564.       else do
  1565.          unickname=' ' ; domark=0
  1566.          signal foobax            /* try looking for non host specific value */
  1567.       end
  1568.  end
  1569.  
  1570.  
  1571. do mm=1 to inlist
  1572.    call lineout tempfile,' <INPUT TYPE=RADIO NAME="'||param.ith||'" '
  1573.    call lineout tempfile,' VALUE="'   ||v.mm||  '" '  ||v2.mm||  '>'   v.mm  '      , '
  1574. end
  1575. return isit
  1576.  
  1577.  
  1578.  
  1579. /***********************************/
  1580. /* write out values for a variable (or a stem variable )
  1581. isfile=1 use file list
  1582. isfile=2 don't use hostnickname
  1583.  */
  1584. write_1:procedure expose param. filelines. tempfile fd. nickname quiklist.
  1585. parse arg iat,isfile
  1586.  
  1587. unickname=strip(nickname)
  1588. if isfile>0 then unickname=' '
  1589.  
  1590. isstem=0 ;dostem=0
  1591. if isfile<>1 then do
  1592.   findit=param.iat
  1593.   dostem=param.iat.stem
  1594. end
  1595. else do
  1596.   findit=fd.iat
  1597. end
  1598.  
  1599. towrite=0                 /* search filelines for findit */
  1600. if symbol('quiklist.findit')<>'VAR' then    do       /* no candiate entries */
  1601.    call lineout tempfile, "  <li> <b>" findit  "</b> =<tt> n.a. </tt> <br>"
  1602.    return ' '
  1603. end
  1604.  
  1605.  
  1606.  
  1607. /* look at candidates only */
  1608. candlist=quiklist.findit
  1609. do mm0=1 to words(candlist)
  1610.     mm=strip(word(candlist,mm0))
  1611.  
  1612.     if mm=' ' then iterate
  1613.     if unickname<>' ' & filelines.mm.stem=' ' then iterate
  1614.    if filelines.mm.name=findit then do
  1615.       if unickname<>' ' & pos(unickname,filelines.mm.stem)=0 then iterate
  1616.       if unickname=' ' & filelines.mm.stem<>' '  then do /* check for unickname */
  1617.         foo1=lastpos('.',filelines.mm.stem)
  1618.         if datatype(substr(filelines.mm.stem,foo1+1))<>'NUM' then iterate
  1619.       end  /* Do */
  1620.  
  1621.       wow1=filelines.mm.value
  1622.       filelines.mm.igot=1
  1623.       if dostem=0 then do
  1624.            towrite=1
  1625.            dowrite=" <li> <b>" ||findit ||"</b> =<tt> "|| wow1 ||'</tt> <br>'
  1626.            iterate              /* get latter ones? */
  1627.       end
  1628.       astem=filelines.mm.stem
  1629.       if unickname=' ' & pos('.',astem)>0 then iterate
  1630.       poop='.'||unickname
  1631.       if unickname<>' ' then astem=sref_replacestrg(astem,poop,'')
  1632.       if unickname<>' ' then astem=sref_replacestrg(astem,unickname||'.','')
  1633.       towrite=towrite+1
  1634.       dowrite.towrite="  <li> <b>"|| findit ||'.' ||astem ||"</b> =<tt> " ||wow1|| '</tt> <br>'
  1635.       isstem=1+isstem
  1636.    end
  1637. end
  1638.  
  1639. select
  1640.    when towrite=0 then
  1641.       call lineout tempfile, "  <li> <b>" findit  "</b> =<tt> n.a. </tt> <br>"
  1642.    when dostem=0 then
  1643.        call lineout tempfile,dowrite
  1644.    otherwise do
  1645.         do mm=1 to towrite
  1646.            call lineout tempfile,dowrite.mm
  1647.         end
  1648.    end
  1649. end
  1650. return ' '
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656. /* ----------- */
  1657. /* get environment value, possibly host specific */
  1658. /* ------------ */
  1659. get_value: procedure expose enmadd host_nickname
  1660. parse arg vname,hname0
  1661. if hname0=0 then
  1662.         hname=' '
  1663. else
  1664.     hname=strip(host_nickname)
  1665.  
  1666. vname=strip(vname) ;
  1667. if hname<>' ' then do
  1668.    aval=value(enmadd||vname||'.'||hname,,'os2environment')
  1669.    if aval<>' ' Then
  1670.         return aval
  1671. end
  1672. aval=value(enmadd||vname,,'os2environment')
  1673. return aval
  1674.  
  1675.  
  1676. /* **************************************
  1677.  get current value of a parameter.  If stem variable, return
  1678. in sorted order
  1679. nonick=' ' -- check for nickname
  1680. 1= never check nickname
  1681. 2= only check for nickname
  1682. */
  1683.  
  1684. find_val:procedure expose param. filelines. nickname quiklist.
  1685.  
  1686.  parse arg ith,nonick
  1687.  unickname=nickname
  1688.  if nonick=1 then unickname=' '
  1689.   findit=param.ith
  1690.   isstem=param.ith.stem
  1691.   domark=1   /* domark=0 prevents marking for comments -- use on 2nd pass */
  1692.  
  1693. if symbol('quiklist.findit')<>'VAR' then do          /* no candiate entries */
  1694.    return ' '
  1695. end
  1696.  
  1697.  
  1698. bowser:
  1699.  
  1700.   gots=0
  1701.   dowrite=0
  1702.  
  1703. /* look at candidates only */
  1704. candlist=quiklist.findit
  1705. do mm0=1 to words(candlist)
  1706.     mm=strip(word(candlist,mm0))
  1707.     if mm=' ' then iterate
  1708.  
  1709.      aval=filelines.mm.name
  1710.      if aval<>findit then iterate
  1711.      if unickname<>' ' then do  /* check for unickname at end of name */
  1712.         if pos(unickname,filelines.mm.stem)=0 then iterate
  1713.      end  /* Do */
  1714.      if unickname=' ' & filelines.mm.stem<>' '  then do /* check for unickname */
  1715.         foo1=lastpos('.',filelines.mm.stem)
  1716.         if datatype(substr(filelines.mm.stem,foo1+1))<>'NUM' then iterate
  1717.      end  /* Do */
  1718.      if domark=1 then FILELINES.MM.IGOT=1
  1719.      gogo=translate(filelines.mm.value, ' ','00090a0d'x)
  1720.      if isstem=0 then do
  1721.         dowrite=1
  1722.         towrite=gogo
  1723.       end
  1724.       else do
  1725.           dowrite=1
  1726.           if filelines.mm.stem=' ' then iterate /* bad entry */
  1727.           fii=translate(filelines.mm.stem,' ','.') ; fii=strip(word(fii,1))
  1728.           if datatype(fii)<>'NUM' then iterate
  1729.           got.value.fii=gogo
  1730.           gots=max(gots,fii)
  1731.       end
  1732.    end          /* all lines in file */
  1733.  
  1734.    if dowrite=0 then  do
  1735.       if unickname=' ' | nonick>0 then return ' '
  1736.       unickname=' ' ; domark=0
  1737.       signal bowser             /* try looking for non host specific value */
  1738.    end
  1739.  
  1740.    if isstem=0 then return towrite
  1741.    eek=' '
  1742.    do jj=1 to gots
  1743.       if symbol('got.value.jj')<>'VAR' then iterate
  1744.       eek=eek||strip(got.value.jj)||'0d0a'x
  1745.    end /* do */
  1746.  
  1747. return strip(eek)
  1748.  
  1749.  
  1750.  
  1751. /* ***************** fill in file names */
  1752. find_fnames: procedure expose fd. filelines.
  1753. do mm=1 to fd.0
  1754.    findit=strip(fd.mm)
  1755.    do mm2=1 to filelines.0
  1756.       aval=strip(filelines.mm2.name)
  1757.       if aval<>findit then iterate
  1758.       fd.mm.val=filelines.mm2.value
  1759.       FILELINES.MM2.IGOT=1
  1760.       leave
  1761.    end /* do */
  1762. end /* do */
  1763.  
  1764. return 0
  1765.  
  1766. /* --- variable names of convert foo.bar.1 to foo.1.bar */
  1767. fix_me:procedure
  1768. parse arg a1
  1769.  
  1770. if a1=' '  then return a1
  1771. a1=strip(a1)
  1772. if abbrev(a1,';') then return a1
  1773.  
  1774. parse var a1  aname '=' avalue
  1775. if pos('.',aname)=0 then return a1
  1776.  
  1777. foo=translate(aname,' ','.')
  1778. if words(foo)<>3 then return a1
  1779.  
  1780. /* if here, array.x.y (3 elements) */
  1781. if datatype(word(foo,3))='NUM' & datatype(word(foo,2))<>'NUM' then do  /* rearrange */
  1782.    foo2=word(foo,1)||'.'||word(foo,3)||'.'||word(foo,2)||' = '||avalue
  1783.    return foo2
  1784. end  /* Do */
  1785. else do
  1786.    return a1
  1787. end  /* Do */
  1788.  
  1789.  
  1790.  
  1791. /* */
  1792. badguys:
  1793. signal off error ; signal off syntax
  1794. call pmprintf_sref(" Config2 error: at line " sigl)
  1795. 'STRING  Config2 error: at line ' sigl
  1796. return ' '
  1797.  
  1798.  
  1799. /********/
  1800. /* check for bad syntax in an initfilt.80 entry */
  1801. bad_entry:procedure expose tempfile
  1802.  
  1803. parse arg anent,fullent
  1804. anent1=sref_replacestrg(anent,"''","'",'ALL')
  1805. if pos("'",anent1)>0 then do
  1806.  call lineout tempfile," <p><b>WARNING!</b> converting ' in: "fullent'='anent
  1807.  anent=sref_replacestrg(anent1,"'","''",'ALL')
  1808. end
  1809. return anent
  1810.  
  1811.