home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / FAQ / cgi-bin / discus4_00 / source / cussedit.tmpl < prev    next >
Text File  |  2009-11-06  |  4KB  |  160 lines

  1. # FILE: cussedit.tmpl
  2. # DESCRIPTION: Edit cuss words
  3. # Copyright (c) 2002, DiscusWare, LLC, all rights reserved
  4. # -------------------------------------------------------------------------------------------
  5.  
  6. <!--BEGIN-->
  7.  
  8. <html><head><title>Profanity Filter - Word List</title>
  9. <script language="JavaScript">
  10. <!--
  11. function changer () {
  12.     document.cuss.changed.value = 1;
  13. }
  14. function openwin(url) {
  15.     return window.open(url, 'X', 'height=400,width=600,scrollbars=yes,resizable');
  16. }
  17. function testwords () {
  18.     if (document.cuss.changed.value == 1) {
  19.         alert('You must save your changes to the word list before you can test words.');
  20.         return false;
  21.     }
  22.     document.cuss.changed.value = 2;
  23.     document.cuss.submit();
  24. }
  25. function initpage () {
  26.     <#if $general->{screen} == 1#>
  27.         document.cuss.testword.focus();
  28.     <#endif#>
  29. }
  30.  
  31. // -->
  32. </script>
  33. <style>
  34. td.nb {font: 9pt verdana,arial,helvetica}
  35. td.b {font: 9pt verdana,arial,helvetica; font-weight: bold}
  36. </style>
  37. </head>
  38. <body bgcolor="#ffffff" text="#000000" link="#0000FF" vlink="#0000FF" onLoad="initpage()">
  39. $fs<font size=3><center><b>Profanity Filter - Word List</b></center></font>
  40. <hr>
  41.  
  42. <#if $general->{screen} == 0#>
  43.     <form action="$cgiurl" method="post" name="cuss">
  44.     <p>
  45.     Use this screen to enter profanity words, one per line.  You may use the
  46.     following expressions to match characters if you desire:
  47.     </p>
  48.     <ul>
  49.     <li><b>+</b> matches 1 or more characters
  50.     <li><b>*</b> matches 0 or more characters
  51.     <li><b>?</b> matches any 1 character
  52.     <input type=hidden name="username" value="$general->{username}">
  53.     <input type=hidden name="action" value="options_profanity">
  54.     <input type=hidden name="changed" value="0">
  55.     <textarea name="words" rows=10 cols=30 wrap=none onKeyPress="changer()">
  56.     <#foreach $word (@words)#>
  57.         <#form escape "$word->{word}"#>
  58.     <#endloop#>
  59.     </textarea>
  60.     </ul>
  61.     <p>
  62.     <input type=submit value="Save List">
  63.     <input type=button value="Close" onClick="self.close()">
  64.     </p>
  65.     <p>
  66.     Test a word: <input type=text name="testword" value="" size=20>
  67.     <input type=button name="clickbut" onClick="testwords()" value="Go">
  68.     </p>    
  69.     </form>
  70.     <#if $checkup->{duplicate_keys} > 0#>
  71.         <hr>
  72.         <p><b><font color="#ff0000">WARNING: Duplicate Words</font></b></p>
  73.         <p>
  74.         You have repeated the following words or expressions in your profanity list.
  75.         Repeating words will adversely affect the performance of your profanity
  76.         filter.
  77.         </p>
  78.         <ul>
  79.         <#reference array @keys from $checkup->{duplicate}#>
  80.         <#foreach $word (@keys)#>
  81.             <li>$word->{word}</li>
  82.         <#endloop#>
  83.         </ul>
  84.     <#endif#>
  85.     <#if $checkup->{caughtby_keys} > 0#>
  86.         <hr>
  87.         <p><b><font color="#ff0000">WARNING: Unnecessary Words</font></b></p>
  88.         <p>
  89.         You have entered certain words into your profanity list that are always caught
  90.         by other expressions on your list.  These unnecessary words will adversely
  91.         affect the performance of your profanity filter.
  92.         </p>
  93.         <p>
  94.         The following "good" patterns:
  95.         </p>
  96.         <ul>
  97.         <#reference array @keys from $checkup->{caughtby}#>
  98.         <#foreach $word (@keys)#>
  99.             <li>$word->{word}</li>
  100.         <#endloop#>
  101.         </ul>
  102.         <p>
  103.         also will always match the following "unnecessary" patterns:
  104.         </p>
  105.         <ul>
  106.         <#reference array @keys from $checkup->{caughtby_2}#>
  107.         <#foreach $word (@keys)#>
  108.             <li>$word->{word}</li>
  109.         <#endloop#>
  110.         </ul>
  111.     <#endif#>
  112.     
  113.     
  114.     
  115.     
  116.     
  117.     
  118. <#endif#>
  119.  
  120. <#if $general->{screen} == 1#>
  121.     <table>
  122.     <tr>
  123.     <td class="nb">You Entered:</td>
  124.     <td class="b">$general->{entry}</td>
  125.     </tr>
  126.     <tr>
  127.     <td class="nb">Was This Profanity?</td>
  128.     <td class="b">\
  129.     <#if $general->{match} eq ""#>
  130.         <font color="#00aa00">No</font></td>
  131.     <#else#>
  132.         <font color="#ff0000">Yes</font></td>
  133.         </tr>
  134.         <tr>
  135.         <td class="nb">This Matched:</td>
  136.         <td class="b">$general->{match}</td>
  137.     <#endif#>
  138.     </tr>
  139.     </table>
  140.     <form action="$cgiurl" method="post" name="cuss">
  141.     <p>
  142.     Try Another Word or
  143.     <a href="$cgiurl?username=$general->{username}&action=options_profanity">Edit the List</a>:
  144.     </p>
  145.     <p>
  146.     Test a word: <input type=text name="testword" value="" size=20>
  147.     <input type=submit value="Go">
  148.     <input type=hidden name="username" value="$general->{username}">
  149.     <input type=hidden name="action" value="options_profanity">
  150.     <input type=hidden name="changed" value="2">
  151.     </p>    
  152.     </form>
  153. <#endif#>
  154.  
  155.  
  156.  
  157. </font>
  158. </body></html>
  159. <!--END-->
  160.