You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/12/31 08:00:15 UTC

Just for kicks...

the follow SSI illustrates the versitility of the new regex features 
of mod_include.  Throw it in a HEADER.html, turn on the INCLUDES filter,
and play :)



<form>
  Show me a
    <select name=F>
      <option <!--#if expr="$QUERY_STRING = /F=0/" -->selected 
              <!--#endif --> value=0> Plain 
      <option <!--#if expr="$QUERY_STRING = /F=1/" -->selected 
              <!--#endif --> value=1> Fancy 
      <option <!--#if expr="$QUERY_STRING = /F=2/" -->selected 
              <!--#endif --> value=2> Table 
    </select>
  list sorted by
    <select name=C>
      <option <!--#if expr="$QUERY_STRING = /C=N/" -->selected 
              <!--#endif --> value=N> Name
      <option <!--#if expr="$QUERY_STRING = /C=M/" -->selected 
              <!--#endif --> value=M> Date Modified
      <option <!--#if expr="$QUERY_STRING = /C=S/" -->selected 
              <!--#endif --> value=S> Size
      <option <!--#if expr="$QUERY_STRING = /C=D/" -->selected 
              <!--#endif --> value=D> Description
    </select>
  in
    <select name=V>
      <option <!--#if expr="$QUERY_STRING = /V=0/" -->selected 
              <!--#endif --> value=0> Normal
      <option <!--#if expr="$QUERY_STRING = /V=1/" -->selected 
              <!--#endif --> value=1> Version
    </select>
    <select name=O>
      <option <!--#if expr="$QUERY_STRING = /O=A/" -->selected 
              <!--#endif --> value=A> Ascending
      <option <!--#if expr="$QUERY_STRING = /O=D/" -->selected 
              <!--#endif --> value=D> Descending
    </select>
  order, matching
    <input type=text name=P <!--#if expr="$QUERY_STRING = /P=([^&]*)(&.*)*$/" -->
                                value="<!--#echo var="1" -->" 
                            <!--#endif --> >
    <input type=submit value="go" >
</form>