<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%Links::Config::load_vars%>
<html>

<head>
  <title>Gossamer Links Setup: Miscellaneous Options</title>
  <%include include_style.html%>
</head>

<body>

<form method="post" action="setup.cgi">
<input type=hidden name="do" value="setup_misc">

<%set header_title = 'Miscellaneous Options'%>
<%set header_details = 'These are other options that you can change.'%>
<%include include_header.html%>

<table>
  <tr>
    <th class="heading" colspan="2">Miscellaneous Options:</th>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Registration Number:
    </td>
  </tr>
  <tr>
    <td class="option">reg_number</td>
    <td class="value"><input type="text" name="reg_number" value="<%cfg_reg_number%>" size="40"></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Use Non Parsed Headers. You should leave this as is unless you are
      running under a cgi wrapper and nph scripts don't work (cobalt raq for
      example)
    </td>
  </tr>
  <tr>
    <td class="option">nph_headers</td>
    <td class="value">
      <input type="radio" value="1" name="nph_headers" id="nh1"<%if cfg_nph_headers%> checked="checked"<%endif%> /><label for="nh1">Yes</label>
      <input type="radio" value="0" name="nph_headers" id="nh0"<%ifnot cfg_nph_headers%> checked="checked"<%endif%> /><label for="nh0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      This is the character set that will be sent to the web browser for admin
      and browser pages.  This should match the character set of your actual
      link data that is stored in the database.  The character set will also be
      used in the luna template set, but can be changed to something else (e.g.
      if you have template sets in several languages), by modifying the
      include_common_head.html template.
    </td>
  </tr>
  <tr>
    <td class="option">header_charset</td>
    <td class="value">
      <select name="header_charset">
        <option value="ISO-8859-1"<%if cfg_header_charset ieq 'ISO-8859-1'%> selected="selected"<%endif%>>Western (ISO-8859-1)</option>
        <option value="ISO-8859-15"<%if cfg_header_charset ieq 'ISO-8859-15'%> selected="selected"<%endif%>>Western (ISO-8859-15)</option>
        <option value="windows-1252"<%if cfg_header_charset ieq 'windows-1252'%> selected="selected"<%endif%>>Western (windows-1252)</option>
        <option value="us-ascii"<%if cfg_header_charset ieq 'us-ascii'%> selected="selected"<%endif%>>Western (us-ascii)</option>
        <option value="IBM850"<%if cfg_header_charset ieq 'IBM850'%> selected="selected"<%endif%>>Western (IBM850)</option>
        <option value="UTF-8"<%if cfg_header_charset ieq 'UTF-8'%> selected="selected"<%endif%>>Unicode (UTF-8)</option>
        <option value="IBM864"<%if cfg_header_charset ieq 'IBM864'%> selected="selected"<%endif%>>Arabic (IBM864)</option>
        <option value="ISO-8859-6"<%if cfg_header_charset ieq 'ISO-8859-6'%> selected="selected"<%endif%>>Arabic (ISO-8859-6)</option>
        <option value="windows-1256"<%if cfg_header_charset ieq 'windows-1256'%> selected="selected"<%endif%>>Arabic (windows-1256)</option>
        <option value="ARMSCII-8"<%if cfg_header_charset ieq 'ARMSCII-8'%> selected="selected"<%endif%>>Armenian (ARMSCII-8)</option>
        <option value="ISO-8859-13"<%if cfg_header_charset ieq 'ISO-8859-13'%> selected="selected"<%endif%>>Baltic (ISO-8859-13)</option>
        <option value="ISO-8859-4"<%if cfg_header_charset ieq 'ISO-8859-4'%> selected="selected"<%endif%>>Baltic (ISO-8859-4)</option>
        <option value="windows-1257"<%if cfg_header_charset ieq 'windows-1257'%> selected="selected"<%endif%>>Baltic (windows-1257)</option>
        <option value="ISO-8859-14"<%if cfg_header_charset ieq 'ISO-8859-14'%> selected="selected"<%endif%>>Celtic (ISO-8859-14)</option>
        <option value="IBM852"<%if cfg_header_charset ieq 'IBM852'%> selected="selected"<%endif%>>Central European (IBM852)</option>
        <option value="ISO-8859-2"<%if cfg_header_charset ieq 'ISO-8859-2'%> selected="selected"<%endif%>>Central European (ISO-8859-2)</option>
        <option value="windows-1250"<%if cfg_header_charset ieq 'windows-1250'%> selected="selected"<%endif%>>Central European (windows-1250)</option>
        <option value="gb18030"<%if cfg_header_charset ieq 'gb18030'%> selected="selected"<%endif%>>Chinese Simplified (gb18030)</option>
        <option value="gb2312"<%if cfg_header_charset ieq 'gb2312'%> selected="selected"<%endif%>>Chinese Simplified (gb2312)</option>
        <option value="HZ-GB-2312"<%if cfg_header_charset ieq 'HZ-GB-2312'%> selected="selected"<%endif%>>Chinese Simplified (HZ-GB-2312)</option>
        <option value="ISO-2022-CN"<%if cfg_header_charset ieq 'ISO-2022-CN'%> selected="selected"<%endif%>>Chinese Simplified (ISO-2022-CN)</option>
        <option value="Big5"<%if cfg_header_charset ieq 'Big5'%> selected="selected"<%endif%>>Chinese Traditional (Big5)</option>
        <option value="Big5-HKSCS"<%if cfg_header_charset ieq 'Big5-HKSCS'%> selected="selected"<%endif%>>Chinese Traditional (Big5-HKSCS)</option>
        <option value="IBM855"<%if cfg_header_charset ieq 'IBM855'%> selected="selected"<%endif%>>Cyrillic (IBM855)</option>
        <option value="ISO-8859-5"<%if cfg_header_charset ieq 'ISO-8859-5'%> selected="selected"<%endif%>>Cyrillic (ISO-8859-5)</option>
        <option value="ISO-IR-111"<%if cfg_header_charset ieq 'ISO-IR-111'%> selected="selected"<%endif%>>Cyrillic (ISO-IR-111)</option>
        <option value="KOI8-R"<%if cfg_header_charset ieq 'KOI8-R'%> selected="selected"<%endif%>>Cyrillic (KOI8-R)</option>
        <option value="IBM866"<%if cfg_header_charset ieq 'IBM866'%> selected="selected"<%endif%>>Cyrillic/Russian (IBM866)</option>
        <option value="KOI8-U"<%if cfg_header_charset ieq 'KOI8-U'%> selected="selected"<%endif%>>Cyrillic/Ukrainian (KOI8-U)</option>
        <option value="windows-1251"<%if cfg_header_charset ieq 'windows-1251'%> selected="selected"<%endif%>>Cyrillic (windows-1251)</option>
        <option value="GEOSTD8"<%if cfg_header_charset ieq 'GEOSTD8'%> selected="selected"<%endif%>>Georgian (GEOSTD8)</option>
        <option value="ISO-8859-7"<%if cfg_header_charset ieq 'ISO-8859-7'%> selected="selected"<%endif%>>Greek (ISO-8859-7)</option>
        <option value="windows-1253"<%if cfg_header_charset ieq 'windows-1253'%> selected="selected"<%endif%>>Greek (windows-1253)</option>
        <option value="IBM862"<%if cfg_header_charset ieq 'IBM862'%> selected="selected"<%endif%>>Hebrew (IBM862)</option>
        <option value="ISO-8859-8"<%if cfg_header_charset ieq 'ISO-8859-8'%> selected="selected"<%endif%>>Hebrew Visual (ISO-8859-8)</option>
        <option value="ISO-8859-8-I"<%if cfg_header_charset ieq 'ISO-8859-8-I'%> selected="selected"<%endif%>>Hebrew (ISO-8859-8-I)</option>
        <option value="windows-1255"<%if cfg_header_charset ieq 'windows-1255'%> selected="selected"<%endif%>>Hebrew (windows-1255)</option>
        <option value="EUC-JP"<%if cfg_header_charset ieq 'EUC-JP'%> selected="selected"<%endif%>>Japanese (EUC-JP)</option>
        <option value="ISO-2022-JP"<%if cfg_header_charset ieq 'ISO-2022-JP'%> selected="selected"<%endif%>>Japanese (ISO-2022-JP)</option>
        <option value="Shift_JIS"<%if cfg_header_charset ieq 'Shift_JIS'%> selected="selected"<%endif%>>Japanese (Shift_JIS)</option>
        <option value="EUC-KR"<%if cfg_header_charset ieq 'EUC-KR'%> selected="selected"<%endif%>>Korean (EUC-KR)</option>
        <option value="ISO-2022-KR"<%if cfg_header_charset ieq 'ISO-2022-KR'%> selected="selected"<%endif%>>Korean (ISO-2022-KR)</option>
        <option value="ISO-8859-10"<%if cfg_header_charset ieq 'ISO-8859-10'%> selected="selected"<%endif%>>Nordic (ISO-8859-10)</option>
        <option value="ISO-8859-16"<%if cfg_header_charset ieq 'ISO-8859-16'%> selected="selected"<%endif%>>Romanian (ISO-8859-16)</option>
        <option value="ISO-8859-3"<%if cfg_header_charset ieq 'ISO-8859-3'%> selected="selected"<%endif%>>South European (ISO-8859-3)</option>
        <option value="ISO-8859-11"<%if cfg_header_charset ieq 'ISO-8859-11'%> selected="selected"<%endif%>>Thai (ISO-8859-11)</option>
        <option value="TIS-620"<%if cfg_header_charset ieq 'TIS-620'%> selected="selected"<%endif%>>Thai (TIS-620)</option>
        <option value="windows-874"<%if cfg_header_charset ieq 'windows-874'%> selected="selected"<%endif%>>Thai (windows-874)</option>
        <option value="IBM857"<%if cfg_header_charset ieq 'IBM857'%> selected="selected"<%endif%>>Turkish (IBM857)</option>
        <option value="ISO-8859-9"<%if cfg_header_charset ieq 'ISO-8859-9'%> selected="selected"<%endif%>>Turkish (ISO-8859-9)</option>
        <option value="windows-1254"<%if cfg_header_charset ieq 'windows-1254'%> selected="selected"<%endif%>>Turkish (windows-1254)</option>
        <option value="VISCII"<%if cfg_header_charset ieq 'VISCII'%> selected="selected"<%endif%>>Vietnamese (VISCII)</option>
        <option value="windows-1258"<%if cfg_header_charset ieq 'windows-1258'%> selected="selected"<%endif%>>Vietnamese (windows-1258)</option>
      </select>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Gossamer Links debugging.  If enabled, debugging information will be displayed
      in the error logs, and extra debugging information will be displayed on
      any fatal error screen.  Leaving this enabled is not recommended as it
      reduces performance.
    </td>
  </tr>
  <tr>
    <td class="option">debug_level</td>
    <td class="option">
      <select name="debug_level">
        <option value="0"<%ifnot cfg_debug_level%> selected<%endifnot%>>Debugging disabled</option>
        <option value="1"<%if cfg_debug_level%> selected<%endif%>>Debugging enabled</option>
      </select>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Custom Error Handler. Gossamer Links will display the following HTML on any
      error message that is generated. If left blank, the default error will be
      shown. You can only use two template tags in this: &lt;%error%&gt; for
      the error message, and &lt;%environment%&gt; for a complete debug
      message.
    </td>
  </tr>
  <tr>
    <td class="option">error_message</td>
    <td class="value">
      <textarea rows="8" name="error_message" cols="39"><%cfg_error_message%></textarea>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Disable Site.  Gossamer Links will display the 'error.html' template for any
      access to a user cgi script.
    </td>
  </tr>
  <tr>
    <td class="option">disabled</td>
    <td class="value">
      <input type="radio" value="1" name="disabled" id="d1"<%if cfg_disabled%> checked="checked"<%endif%> /><label for="d1">Yes</label>
      <input type="radio" value="0" name="disabled" id="d0"<%ifnot cfg_disabled%> checked="checked"<%endif%> /><label for="d0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Banned Hosts.  Enter a list of hostnames and/or IP addresses to ban, one
      per line. '?' may be used to match any single character, and '*' to match
      anything (including nothing).  The template 'banned.html' will be
      displayed to anyone attempting to access any dynamic section of the site
      from a banned address.
    </td>
  </tr>
  <tr>
    <td class="option">bans</td>
    <td class="value">
      <textarea rows="8" name="bans" cols="39"><%Links::Config::textarea('bans')%></textarea>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Check for updates on home page.  If enabled, a check for updates will be
      performed on the "Home" page of the Gossamer Links admin panel.  This
      check can save you time by making it not necessary to constantly check
      the "Updates" page for program updates.
    </td>
  </tr>
  <tr>
    <td class="option">updates_check_on_home</td>
    <td class="value">
      <input type="radio" value="1" name="updates_check_on_home" id="upcheck1"<%if config.updates_check_on_home%> checked="checked"<%endif%> /><label for="upcheck1">Yes</label>
      <input type="radio" value="0" name="updates_check_on_home" id="upcheck0"<%ifnot config.updates_check_on_home%> checked="checked"<%endif%> /><label for="upcheck0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Display the advanced re-run upgrade code menu on the Updates admin menu.
      This code is not normally needed in Gossamer Links and its use is not
      recommended unless advised by Gossamer Threads support staff.
    </td>
  </tr>
  <tr>
    <td class="option">show_upgrade_rerun</td>
    <td class="value">
      <input type="radio" value="0" name="show_upgrade_rerun" id="rerun0"<%ifnot config.show_upgrade_rerun%> checked="checked"<%endif%> /><label for="rerun0">Hidden</label>
      <input type="radio" value="1" name="show_upgrade_rerun" id="rerun1"<%if config.show_upgrade_rerun%> checked="checked"<%endif%> /><label for="rerun1">Shown</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      This setting controls which date we should use for the Add Date when validating links.
      If this option is set to "Original," then the date that the link was submitted will be
      used.  If "Current" is selected, then the date the link was validated will be used.
    </td>
  </tr>
  <tr>
    <td class="option">link_validate_date</td>
    <td class="value">
      <input type="radio" value="0" name="link_validate_date" id="lvd0"<%ifnot config.link_validate_date%> checked="checked"<%endif%> /><label for="lvd0">Original</label>
      <input type="radio" value="1" name="link_validate_date" id="lvd1"<%if config.link_validate_date%> checked="checked"<%endif%> /><label for="lvd1">Current</label>
    </td>
  </tr>
</table>

<div class="submit">
  <input type="submit" value="Submit Changes" />
  <input type="submit" name="reset_defaults" value="Restore System Defaults" />
</div>

</form>
</body>
</html>
