po/src/album.add.php

108 lines
3.5 KiB
PHP

<?php
// Copyright (C) 2002-2006 Balint Kis (balint@k-i-s.net)
// Copyright (C) 2005-2013 Solomon Peachy (pizza@shaftnet.org)
// 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 3 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 more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
include_once "include/config.php";
include_once "include/site.php";
include_once "include/common.php";
include_once "include/contacts.php";
$database = site_prolog(PO_USER_TYPE_CLIENT);
$parent_album = pg_escape_string($database, $_REQUEST['parent']);
if ($parent_album)
$path_to_album = get_path_to_album($database, $parent_album);
else
$path_to_album = "";
$album_all = get_users_album($database);
site_header($strings['generic_add_album']);
site_navigator(5);
site_navigator_status(disp_user_string($database, $po_user['id'])." $path_to_album : ".$strings['generic_add_album'], "");
print "&nbsp;<br/>\n";
print "<form method=\"post\" action=\"album.add.2.php\" accept-charset=\"".$strings['formats_encoding']."\">";
print "<table class=\"listing\">\n";
print "<tr>";
print emit_td($strings['generic_album_name'], "width=\"40%\"");
print emit_td("<input id=\"template_editor\" type=\"text\" name=\"album_caption\" size=\"80%\"/>");
print "</tr>";
print "<tr>";
print emit_td($strings['generic_description']);
print emit_td("<textarea wrap=\"physical\" rows=4 size=\"100%\" name=\"album_description\"></textarea>");
print "</tr>";
print "<tr>";
print emit_td($strings['generic_parent'], "width=\"20%\"");
print "<td>";
print emit_album_combo("parent", $album_all, $parent_album, "null");
print "</td>\n";
print "</tr>";
print "<tr>";
print emit_td($strings['generic_order_by']);
print "<td>";
display_order_by_combo($po_options['order_by']);
print "</td>";
print "</tr>";
if ($po_user['type'] > PO_USER_TYPE_CLIENT) {
print "<tr>";
print emit_td($strings['generic_access'], "width=\"15%\"");
print "<td>";
print emit_access_combo("album_access_rights", "t", "");
print "</td>\n";
print "</tr>";
print "<tr>";
print emit_td($strings['generic_password'], "width=\"25%\"");
print "<td><input type=\"text\" name=\"password\" value=\"\"></td>";
print "</tr>";
} else {
print "<input type=\"hidden\" name=\"album_access_rights\" value=\"$access[private]\"/></td>";
}
print "<input type=\"hidden\" name=\"return\" value=\"$_SERVER[HTTP_REFERER]\"/>";
print "<tr>";
print emit_td($strings['datebook_event']);
print emit_td(emit_event_combo($database, "event", $po_user['id'], "null"));
print "</tr>";
if (photos_in_spool($database) > 0) {
print "<tr>";
print emit_td($strings['generic_populate_from_spool']);
print emit_td(emit_yes_no_combo("spool_seed", 'f'));
print "</tr>";
} else {
print "<input type=\"hidden\" name=\"spool_seed\" value=\"f\" />";
}
print "</table>";
print "&nbsp;<br/>\n";
print "<div align=\"center\">\n";
print $thm_elem['button.add'];
print $thm_elem['button.clear'];
print $thm_elem['button.cancel'];
print "</div>\n";
print "</form>";
site_footer($database);
site_epilog($database);
?>