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 / quota.tmpl < prev    next >
Text File  |  2009-11-06  |  7KB  |  196 lines

  1. # FILE: quota.tmpl
  2. # DESCRIPTION: Disk Quota Manager screen
  3. # Copyright (c) 2002, DiscusWare, LLC, all rights reserved
  4. # -------------------------------------------------------------------------------------------
  5.  
  6. <!--BEGIN-->
  7. <#define array @menubar (number,name)#>
  8. 0    Events
  9. <#if $event->{isevent} == 0#>    1    Tests
  10. <#if $event->{isevent} == 1#>    2    Enable Board
  11. <#/define#>
  12. <#define array @skin_alt (_index, color)#>
  13. 1    #c0c0c0
  14. 2    #d0d0d0
  15. <#/define#>
  16.  
  17. <html>
  18. <head>
  19. <title>Disk Quota Diagnostics</title>
  20. <style>
  21. td.unselected {font: bold 9pt verdana,arial,helvetica; background-color: #d0d0d0}
  22. td.selected {font: bold 9pt verdana,arial,helvetica; background-color: #f7f757}
  23. td.ub {font: bold 8pt verdana,arial,helvetica}
  24. td.eb {font: bold 9pt verdana,arial,helvetica}
  25. td.enb {font: 9pt verdana,arial,helvetica}
  26. a.bar {text-decoration: none}
  27. p { margin-left: 2pt; }
  28. p.blbar {margin-left: 0pt; font: 11pt verdana,arial,helvetica; color: #ffff00; background-color: #000000; width: 100% }
  29. .surround {border: thin black inset; width: 100%; font: 10pt verdana,arial,helvetica }
  30. .normal {font: 10pt verdana,arial,helvetica}
  31. .comment {font: 9pt verdana,arial,helvetica; margin-left: 20pt; }
  32. </style>
  33. </head>
  34. <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000ff">
  35. $fs<font size=3><center><b>Disk Quota Diagnostics</b></center></font>
  36. <hr>
  37. <table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td bgcolor=#d0d0d0>
  38. <table cellpadding=5 cellspacing=0><tr>
  39. <#foreach $barid (@menubar)#>
  40.     <#if $general->{menu} == $barid->{number}#>
  41.         <td class="selected">
  42.     <#else#>
  43.         <td class="unselected">
  44.     <#endif#>
  45.     <a class="bar" href="$general->{url}&menu=$barid->{number}">$barid->{name}</a>
  46.     </td>
  47. <#endloop#>
  48. </tr></table>
  49. </td></tr></table>
  50. <hr>
  51. <p>
  52.  
  53. <#if $general->{menu} == 0#>
  54.     <div class="surround">
  55.         {#if $browser->{ieX}#}<p class="blbar">Disk Quota Events</p>{#else#}<table width=100% bgcolor=#000000><tr><td>$fs<font color=#ffff00>Disk Quota Events</font></font></td></tr></table>{#endif#}
  56.         <#if $event->{isevent} == 0#>
  57.             <p>
  58.             No disk quota events have been detected! You are encouraged to use the test
  59.             utilities to help prevent problems before they can occur.
  60.             </p>
  61.         <#else#>
  62.             <p>
  63.             At the time indicated below, a disk quota error situation occurred.  The board
  64.             was automatically disabled to prevent damage to your data.  If normal use of the
  65.             board had been permitted to continue, serious corruption of the Discus board could
  66.             have taken place.
  67.             </p><p>
  68.             In order to enable this board, you must go to the "Enable" link above.  We
  69.             suggest that you enable your board only when you understand the cause of this
  70.             error message and have addressed it.
  71.             </p>
  72.             <ul>
  73.             <li><b>Error Date:</b> $event->{errdate}
  74.             <li><b>Condition:</b> $event->{description}
  75.             </ul>
  76.         <#endif#>
  77.     </div>
  78.     <br><br>
  79.     <#if $lgfile->{count} > 0#>
  80.         <div class="surround">
  81.             {#if $browser->{ieX}#}<p class="blbar">Large File Scan</p>{#else#}<table width=100% bgcolor=#000000><tr><td>$fs<font color=#ffff00>Large File Scan</font></font></td></tr></table>{#endif#}
  82.             <p>
  83.             This section scans for files larger than 1 MB.  It is very possible that you will
  84.             have large files if you have a long message page or you have uploading enabled.
  85.             You should not delete any files unless you understand exactly what they do and you
  86.             are sure that you do not need them!
  87.             </p>
  88.     
  89.             <p>
  90.             <table border=0 cellpadding=0 cellspacing=0 width=98%><tr><td bgcolor="#000000">
  91.             <table border=0 cellpadding=2 cellspacing=1 width=100%>
  92.             <tr bgcolor=#ffffcc>
  93.             <td class=eb>File (with full directory path)</td>
  94.             <td class=eb align=right>Size(kB)</td>
  95.             </tr>
  96.             <#foreach $file (@lgfiles)#>
  97.                 <tr bgcolor="<#pick color $file->{_iteration} from @skin_alt (1,2)#>">
  98.                 <td class=enb>$file->{filename}</td>
  99.                 <td align=right class=enb>$file->{filesize}</td>
  100.                 </tr>
  101.             <#endloop#>
  102.             </table>
  103.             </td></tr></table>
  104.             </p>
  105.             <br>
  106.         </div>
  107.     <#endif#>
  108. <#endif#>
  109.  
  110. <#if $general->{menu} == 1#>
  111. <#define array @sizes (size, selected)#>
  112. 1    0
  113. 5    0
  114. 10    0
  115. 15    0
  116. 20    0
  117. 25    1
  118. 50    0
  119. <#/define#>
  120.     <form action="$cgiurl" method=post>
  121.     <input type=hidden name="username" value="$general->{username}">
  122.     <input type=hidden name="action" value="quotatest">
  123.     <div class="surround">
  124.         {#if $browser->{ieX}#}<p class="blbar">Disk Quota Tests</p>{#else#}<table width=100% bgcolor=#000000><tr><td>$fs<font color=#ffff00>Disk Quota Tests</font></font></td></tr></table>{#endif#}
  125.         <p>
  126.         This option allows you to test your free disk space.  This is done by having Discus
  127.         attempt to create a file of the size that you specify below.  Note that if you do
  128.         this, it might automatically notify your web host that you are running out of space
  129.         even though you are well below your quota.  This should not cause any damage on your
  130.         site, but should be used at your own risk.
  131.         </p>
  132.         <ul>
  133.             <table>
  134.             <tr><td class="eb">File Size:</td>
  135.             <td><select name=size>
  136.             <#foreach $size (@sizes)#>
  137.             <option value="$size->{size}"{#if $size->{selected} == 1#} selected{#endif#}>$size->{size} MB</option>
  138.             <#endloop#>
  139.             </select></td>
  140.             <td><input type=submit value="Test Free Space"></td>
  141.             </tr></table>
  142.         </ul>
  143.         <p>
  144.         Discus has automatically performed a test to make sure that it can remove files in
  145.         your 'locks' and 'backups' directories.
  146.         </p>
  147.         <ul>
  148.             <table>
  149.             <tr><td class="eb">Directory</td>
  150.             <td>  </td>
  151.             <td class="eb">Result</td>
  152.             </tr>
  153.             <tr>
  154.             <td class=enb>'locks' directory</td>
  155.             <td>  </td>
  156.             <td class=eb><#if $test->{locks} eq ""#><font color=#119911>PASSED!</font><#else#><font color=#ff0000>FAILED: $test->{locks}<#endif#></td>
  157.             </tr>
  158.             <tr>
  159.             <td class=enb>'backups' directory</td>
  160.             <td>  </td>
  161.             <td class=eb><#if $test->{backups} eq ""#><font color=#119911>PASSED!</font><#else#><font color=#ff0000>FAILED: $test->{backups}<#endif#></td>
  162.             </tr>
  163.             </table>
  164.         </ul>
  165.     </div>
  166.     </form>
  167. <#endif#>
  168.  
  169. <#if $general->{menu} == 2#>
  170.     <form action="$cgiurl" method=post>
  171.     <input type=hidden name="username" value="$general->{username}">
  172.     <input type=hidden name="action" value="quotaon">
  173.     <div class="surround">
  174.         {#if $browser->{ieX}#}<p class="blbar">Enable Board</p>{#else#}<table width=100% bgcolor=#000000><tr><td>$fs<font color=#ffff00>Enable Board</font></font></td></tr></table>{#endif#}
  175.         Records indicate that your board has been disabled for the following reason:
  176.         <p>
  177.         <ul>
  178.         <li><b>Error Date:</b> $event->{errdate}
  179.         <li><b>Condition:</b> $event->{description}
  180.         </ul>
  181.         <p>
  182.         You can enable your board by clicking on the following button.  However, you are urged
  183.         to identify the problem responsible for causing this error condition and resolve it
  184.         before you turn your board back on!
  185.         <p>
  186.         <center>
  187.         <input type="submit" value="Enable Board">
  188.         </center>
  189.     </div>
  190.     </form>
  191. <#endif#>
  192.  
  193. </body>
  194. </html>
  195. <!--END-->
  196.