home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13g.zip / iftest.sht < prev    next >
Text File  |  1999-06-01  |  2KB  |  85 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3 Organization//DTD W3 HTML 2.0//EN">
  2. <html>   
  3. <head> 
  4. <title>Test of #IF</title>
  5. </head>      
  6. <body> 
  7. <h1>Test of #IF</h1>
  8.  
  9. This document contains a simple demonstration of the <code>#IF</code>
  10. <em>XSSI</em> conditional server side include.   
  11. <p>            
  12.  
  13.  
  14. <!-- You can change these set variables to change what is included -->
  15. <!-- #set var="FOOBAR" value="sample" --> 
  16. <!-- #set var="BARFOO" value="2" -->
  17. <!-- #set var="FOO" value="A" -->
  18. <!-- #set var="BAR" value="B" -->
  19.  
  20. <b>Note:</b> the following #SET variables are equal to:<ul>
  21.  
  22. <li><TT>FOOBAR = </tt> <!-- #echo var="FOOBAR" -->
  23. <li><TT>BARFOO = </tt> <!-- #echo var="BARFOO" -->
  24. <li><TT>FOO = </tt> <!-- #echo var="FOO" -->
  25. <li><TT>BAR = </tt> <!-- #echo var="BAR" -->
  26. </ul>
  27.  
  28. <hr width="30%"><center>Begin the the test ....</centeR> <hr width="30%">
  29.    
  30. <!-- #IF expr="(\"$FOOBAR\"=\"HELP\")" -->
  31.     Help Mode   
  32.  
  33. <!-- #elif expr="$FOOBAR=SAMPLE" -->  
  34.   Samples:  
  35.   <!-- #if expr="$BARFOO=1" --> 
  36.        mode 1 ,   
  37.   <!-- #elif expr="$BARFOO=2" -->     
  38.        mode 2 ,        
  39.        <!-- #if expr="$FOO=A" --> 
  40.             submode A  
  41.         <!-- #else -->
  42.              no submode 
  43.         <!-- #endif -->
  44.   <!-- #elif expr="$BARFOO=3" -->   
  45.        mode 3         
  46.   <!-- #else  -->    
  47.         Default   
  48.   <!-- #endif -->  
  49.       
  50. <!-- #else -->     
  51.    Default mode :
  52.        <!-- #if expr="$FOO=A" --> 
  53.             submode A of default mode  
  54.         <!-- #else -->
  55.              normal default mode  
  56.        <!-- #endif -->
  57.        <!-- #if expr="$BAR=B" --> 
  58.             : submode2 B of default mode  
  59.         <!-- #endif -->  
  60.  
  61. <!-- #endif -->  
  62.   
  63. <p>   
  64.  
  65. <ul>
  66. <li>$bar != $foo : 
  67. <!-- #if expr="$bar != $foo" -->
  68. true
  69. <!-- #else -->
  70. false 
  71. <!-- #endif -->
  72. <li> ($foo="A") && ($bar != "B"): 
  73. <!-- #if expr=" ($foo=\"A\") && ($bar !=\"B\")" -->
  74. true
  75. <!-- #else -->
  76. false
  77. <!-- #endif -->
  78. </ul>
  79. That's all. 
  80.  
  81. </body>   
  82. </html>  
  83.  
  84.  
  85.