1<?php
2/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
3/**
4 *
5 * LICENSE: GNU Affero General Public License, version 3 (AGPL-3.0-or-later)
6 * Copyright 2001 - 2020 Ampache.org
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20 *
21 */
22
23use Ampache\Config\AmpConfig;
24use Ampache\Module\System\AmpError;
25use Ampache\Module\System\Core;
26use Ampache\Module\Util\Ui;
27
28?>
29<?php Ui::show_box_top(T_('Add Label'), 'box box_add_label'); ?>
30<form name="label" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/labels.php?action=add_label">
31<table class="tabledata">
32<tr>
33    <td><?php echo T_('Name'); ?></td>
34    <td><input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" />
35        <?php echo AmpError::display('name'); ?>
36    </td>
37</tr>
38    <tr>
39        <td><?php echo T_('MusicBrainz ID'); ?></td>
40        <td><input type="text" name="mbid" value="<?php echo scrub_out($_REQUEST['mbid']); ?>" />
41            <?php echo AmpError::display('mbid'); ?>
42        </td>
43    </tr>
44<tr>
45    <td><?php echo T_('Category'); ?></td>
46        <td>
47            <select name="category">
48                <option value="personal" <?php if (empty($_REQUEST['category']) || $_REQUEST['category'] === "personal") {
49    echo "selected";
50} ?>><?php echo T_('Personal'); ?></option>
51                <option value="association" <?php if (Core::get_request('category') === "association") {
52    echo "selected";
53} ?>><?php echo T_('Association'); ?></option>
54                <option value="company" <?php if (Core::get_request('category') === "company") {
55    echo "selected";
56} ?>><?php echo T_('Company'); ?></option>
57                <option value="imprint" <?php if (Core::get_request('category') === "imprint") {
58    echo "selected";
59} ?>><?php echo T_('Imprint'); ?></option>
60                <option value="production" <?php if (Core::get_request('category') === "production") {
61    echo "selected";
62} ?>><?php echo T_('Production'); ?></option>
63                <option value="original production" <?php if (Core::get_request('category') === "original production") {
64    echo "selected";
65} ?>><?php echo T_('Original Production'); ?></option>
66                <option value="bootleg production" <?php if (Core::get_request('category') === "bootleg production") {
67    echo "selected";
68} ?>><?php echo T_('Bootleg Production'); ?></option>
69                <option value="reissue production" <?php if (Core::get_request('category') === "reissue production") {
70    echo "selected";
71} ?>><?php echo T_('Reissue Production'); ?></option>
72                <option value="distributor" <?php if (Core::get_request('category') === "distributor") {
73    echo "selected";
74} ?>><?php echo T_('Distributor'); ?></option>
75                <option value="holding" <?php if (Core::get_request('category') === "holding") {
76    echo "selected";
77} ?>><?php echo T_('Holding'); ?></option>
78                <option value="rights society" <?php if (Core::get_request('category') === "rights society") {
79    echo "selected";
80} ?>><?php echo T_('Rights Society'); ?></option>
81                <option value="tag_generated" <?php if (Core::get_request('category') === "tag_generated") {
82    echo "selected";
83} ?>><?php echo T_('Tag Generated'); ?></option>
84            </select>
85        </td>
86</tr>
87<tr>
88    <td><?php echo T_('Summary'); ?></td>
89    <td>
90        <textarea name="summary" cols="44" rows="4"><?php echo scrub_out($_REQUEST['summary']); ?></textarea>
91        <?php echo AmpError::display('summary'); ?>
92    </td>
93</tr>
94<tr>
95    <td><?php echo T_('Address'); ?></td>
96    <td><input type="text" name="address" value="<?php echo scrub_out($_REQUEST['address']); ?>" />
97        <?php echo AmpError::display('address'); ?>
98    </td>
99</tr>
100    <tr>
101        <td><?php echo T_('Country'); ?></td>
102        <td><input type="text" name="country" value="<?php echo scrub_out($_REQUEST['country']); ?>" />
103            <?php echo AmpError::display('country'); ?>
104        </td>
105    </tr>
106<tr>
107    <td><?php echo T_('E-mail'); ?></td>
108    <td><input type="text" name="email" value="<?php echo scrub_out($_REQUEST['email']); ?>" />
109        <?php echo AmpError::display('email'); ?>
110    </td>
111</tr>
112<tr>
113    <td><?php echo T_('Website'); ?></td>
114    <td><input type="text" name="website" value="<?php echo scrub_out($_REQUEST['website']); ?>" />
115        <?php echo AmpError::display('website'); ?>
116    </td>
117</tr>
118<tr>
119    <td><?php echo T_('Status'); ?></td>
120    <td>
121        <select name="active">
122            <option value="1" <?php if ((int)$_REQUEST['active'] === 1) {
123    echo "selected";
124} ?>><?php echo T_('Active'); ?></option>
125            <option value="0" <?php if (empty($_REQUEST['active']) || (int)$_REQUEST['active'] === 0) {
126    echo "selected";
127} ?>><?php echo T_('Inactive'); ?></option>
128        </select>
129    </td>
130</tr>
131</table>
132<div class="formValidation">
133    <?php echo Core::form_register('add_label'); ?>
134    <input class="button" type="submit" value="<?php echo T_('Add'); ?>" />
135</div>
136</form>
137<?php Ui::show_box_bottom(); ?>
138