themes/grey/config.tpl
author Dan
Sun, 23 Nov 2008 23:43:52 -0500
changeset 57 31ce64a3ff6c
parent 50 1b4288399b1f
child 72 b8730fcd64a9
permissions -rw-r--r--
Some backend changes to webserver to allow IPv6 binding

{**
 * Template file for default Funky Monkey theme
 * Web control interface script for Amarok
 * Written by Dan Fuhry - 2008
 *
 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
 *}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
  <head>
    <title>Greyhound: Configuration</title>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="/themes/{$theme|escape}/style.css" />
    <link rel="favorite icon" type="image/ico" href="/favicon.ico" />
    <script type="text/javascript" src="/scripts/config.js"></script>
  </head>
  <body>
  
    <div class="greylogo"></div>
    <a class="backlink" href="/index">&laquo; Return to playlist</a>
    <div class="clearer"></div>
  
    <form action="/config" method="post">
    
      <div class="tblholder">
        <table border="0" cellspacing="1" cellpadding="4" style="width: 100%;">
          <tr>
            <th colspan="2">Greyhound configuration</th>
          </tr>
          
          {if $tried}
          <tr>
            <td class="row3" colspan="2">
            {if $success}
              <p class="success">{$success|nl2br}</p>
            {else}
              <p class="error">{$error|nl2br}</p>
            {/if}
            </td>
          </tr>
          {/if}
          
          <!-- field - current config pass -->
          {if $needpass}
          <tr>
            <td class="row2" style="width: 50%;">
              <b>Current configuration password:</b><br />
              <small>Please input the current configuration password to make changes below.</small>
            </td>
            <td class="row1" style="width: 50%;">
              <input type="password" name="configpass" />
            </td>
          </tr>
          {/if}
          
          <!-- field - public IP -->
          <tr>
            <td class="row2" style="width: 50%;">
              <label for="chk_public"><b>Publicly accessible IP</b></label><br />
              <small>
                This controls whether Greyhound can be accessed from other computers on the network interface level. For the nerds, this
                means that Greyhound will bind to 127.0.0.1 if unchecked or 0.0.0.0 if checked.
              </small>
            </td>
            <td class="row1" style="width: 50%;">
              <input type="checkbox"
                     name="public"
                     id="chk_public"
                     {if $public}checked="checked"{/if}
                />
            </td>
          </tr>
          
          <!-- field - allow control -->
          <tr>
            <td class="row2" style="width: 50%;">
              <label for="chk_allowcontrol"><b>Allow control of Amarok</b></label><br />
              <small>
                Tick this option to enable full playback controls (recommended). Otherwise, Greyhound will just be a playlist viewer and
                won't be able to do anything to control what Amarok is doing.
              </small>
            </td>
            <td class="row1" style="width: 50%;">
              <input type="checkbox"
                     name="allowcontrol"
                     id="chk_allowcontrol"
                     {if $allowcontrol}checked="checked"{/if}
                />
            </td>
          </tr>
          
          <!-- field - allow multi-process -->
          <tr>
            <td class="row2" style="width: 50%;">
              <label for="chk_allow_fork"><b>Enable multi-process webserving</b></label><br />
              <small>
                If this is enabled, Greyhound will use fork() to allow serving multiple HTTP requests at the same time. It is recommended
                that you enable this to improve performance. In some rare cases, this results in a large number of zombie processes and
                sometimes locks up the server, so disable this if you're experiencing problems.
              </small>
            </td>
            <td class="row1" style="width: 50%;">
              <input type="checkbox"
                     name="allow_fork"
                     id="chk_allow_fork"
                     {if $allow_fork}checked="checked"{/if}
                />
            </td>
          </tr>
          
          <!-- section - auth config -->
          <tr>
            <th colspan="2">
              Authentication
            </th>
          </tr>
          
          <!-- field - enable auth -->
          <tr>
            <td class="row2" style="width: 50%;">
              <label for="chk_use_auth"><b>Require login</b></label><br />
              <small>
                Check this box to require a login to Greyhound's interface. The logins are cookie based, so make sure your browser supports
                cookies and has them enabled before you enable this. You have to create at least one user for this to work.
              </small>
            </td>
            <td class="row1" style="width: 50%;">
              <input type="checkbox"
                     name="use_auth"
                     id="chk_use_auth"
                     {if $use_auth}checked="checked"{/if}
                />
            </td>
          </tr>
          
          <!-- field - user list -->
          <tr>
            <td class="row2" style="width: 50%;">
              <b>User list</b><br />
              <small>
                This is the list of valid users for Greyhound. Passwords aren't encrypted in the config file to make editing easier.
              </small>
            </td>
            <td class="row1" style="width: 50%;">
              {strip}
              {foreach key=username item=password from=$users}
                <script type="text/javascript">register_user('{$username|escape:'quotes'}');</script>
              {/foreach}
              {/strip}
              <ul id="userlist">
                <li><a href="#" onclick="add_user_form(); return false;">add user</a></li>
              </ul>
            </td>
          </tr>
          
          <!-- field - config PW -->
          <tr>
            <td class="row2" style="width: 50%;">
              <b>Config password</b><br />
              <small>
                Enter a password here to protect your configuration from being modified.
              </small>
            </td>
            <td class="row1" style="width: 50%;">
              <input type="password" name="newconfigpass" value="____________________" />
            </td>
          </tr>
          
          <!-- submit -->
          <tr>
            <th colspan="2">
              <input type="hidden" name="submit" value="true" />
              <input type="submit" value="Save changes" />
            </th>
          </tr>
          
        </table>
      </div>
    
    </form>
    
    <a class="backlink" href="/index">&laquo; Return to playlist</a>
  
    <div class="poweredby">
      {include file="footer.tpl"}
    </div>
  </body>
</html>