<?php
/**************************************************
  Coppermine Plugin - Search Album
  *************************************************
  Copyright (c) 2005 Paul Van Rompay
  *************************************************
  Portions taken from Coppermine core code:
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR
  *************************************************
  This program is free software; you can redistribute it 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.
***************************************************/

define('IN_COPPERMINE', true);
define('SEARCH_PHP', true);

require('include/init.inc.php');

if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
    $redirect = $redirect . "login.php";
    header("Location: $redirect");
    exit();
}

pageheader($lang_search_php['title']);
echo <<< EOT

<form method="post" action="thumbnails.php" name="searchcpg">
EOT;

starttable('60%', $lang_main_menu['search_title']);

echo <<< EOT
        <tr>
            <td class="tableb" align="center" >
                <input type="text" style="width: 80%" name="search" maxlength="255" value="" class="textinput" />
                <input type="submit" value="{$lang_search_php['submit_search']}" class="button" />
                <input type="hidden" name="album" value="search" />
		<input type="hidden" name="plugin_search_album" value="true" />
            </td>
        </tr>
                <tr>
                        <td>
                                <table align="center" width="60%">
                                        <tr>
                                                <td><input type="checkbox" name="album_title" id="album_title" class="checkbox" checked="checked" /><label for="album_title" class="clickable_option">Album Title</label></td>
                                                <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="album_description" id="album_description" class="checkbox" checked="checked" /><label for="album_description" class="clickable_option">Album Description</label></td>
                                                <td>&nbsp;</td>
                                        </tr>
                                </table>
                        </td>
                </tr>
EOT;


endtable();
echo '</form>';

echo <<< EOT
      <script language="javascript" type="text/javascript">
      <!--
      document.searchcpg.search.focus();
      -->
      </script>
EOT;

pagefooter();
ob_end_flush();
?>
