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

<head>
  <title>Gossamer Links Setup: SQL Information</title>
  <%include include_style.html%>
  <style type="text/css">
    .value input {
      width: 250px;
    }
    .value select {
      width: 255px;
    }
    p {
      font-family: Tahoma,Arial,Helvetica,sans-serif;
      font-size: 12px;
    }
  </style>
</head>

<body>

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

<%set header_title = 'SQL Server Settings'%>
<%set header_details = 'All data in Gossamer Links is stored in an SQL database.
This screen allows you to change which SQL server to use:'%>

<%include include_header.html%>

<table>
  <tr>
    <th class="heading" colspan="2">Current Settings:</th>
  </tr>
  <tr>
    <td class="setting" style="width: 20%">SQL Server Type:</td>
    <td class="value" style="width: 80%">
      <select size="1" name="driver">
        <option value="mysql"<%if driver eq 'mysql'%> selected="selected"<%endif%>>MySQL</option>
        <option value="Pg"<%if driver eq 'Pg'%> selected="selected"<%endif%>>PostgreSQL</option>
        <option value="MSSQL"<%if driver eq 'MSSQL' or driver eq 'ODBC'%> selected="selected"<%endif%>>Microsoft SQL Server</option>
        <option value="Oracle"<%if driver eq 'Oracle'%> selected="selected"<%endif%>>Oracle</option>
      </select>
    </td>
  </tr>
  <tr>
    <td class="setting">SQL Hostname:</td>
    <td class="value"><input type="text" name="host" value="<%host%>" /></td>
  </tr>
  <tr>
    <td class="setting">SQL Database:</td>
    <td class="value"><input type="text" name="database" value="<%database%>" /></td>
  </tr>
  <tr>
    <td class="setting">SQL Username:</td>
    <td class="value"><input type="text" name="login" value="<%login%>" /></td>
  </tr>
  <tr>
    <td class="setting">SQL Password:</td>
    <td class="value"><input type="password" name="password" value="<%password%>" /></td>
  </tr>
  <tr>
    <td class="setting">Table Prefix:</font></td>
    <td class="value"><input type="text" name="prefix" value="<%prefix%>" /></td>
  </tr>
</table>

<p>If you make changes here, Gossamer Links needs to examine the new database. Your
choices are:</p>

<p>
  <input type="radio" value="create" name="action" checked="checked" id="acreate" />
  <label for="acreate">
    Create new default Gossamer Links tables in this database but do not overwrite
    any existing data.
  </label>
</p>

<p>
  <input type="radio" value="overwrite" name="action" id="aover" />
  <label for="aover">
    Create new default Gossamer Links tables in this database
    <b>and overwrite/erase any existing data</b>.
  </label>
</p>

<p>
  <input type="radio" value="load" name="action" id="aload" />
  <label for="aload">
    Load table info from an existing set of tables (or resync the def files if
    you have changed your defs manually).
  </label>
</p>

<div class="submit">
  <input type="submit" value="Submit Changes" />
</div>

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