summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_mediadb.php82
1 files changed, 39 insertions, 43 deletions
diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php
index ddd611dec7..fa4f906d7a 100644
--- a/includes/functions/functions_mediadb.php
+++ b/includes/functions/functions_mediadb.php
@@ -1043,37 +1043,35 @@ function show_mediaUpload_form($URL='media.php', $showthumb=false) {
// Print 5 forms for uploading images
for($i=1; $i<6; $i++) {
echo '<tr><td class="descriptionbox ', $TEXT_DIRECTION, ' wrap width25">';
- echo i18n::translate('Media file to upload'), help_link('upload_media_file');
- echo '</td>';
- echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
- echo '<input name="mediafile', $i, '" type="file" size="40" />';
- if ($i==1) echo '<br /><sub>', i18n::translate('Use the &laquo;Browse&raquo; button to search your local computer for the desired file.'), '</sub>';
+ echo i18n::translate('Media file to upload'), help_link('upload_media_file');
+ echo '</td>';
+ echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
+ echo '<input name="mediafile', $i, '" type="file" size="40" />';
echo '</td></tr>';
if ($thumbSupport != "") {
echo '<tr><td class="descriptionbox ', $TEXT_DIRECTION, ' wrap width25">';
- echo i18n::translate('Automatic thumbnail'), help_link('generate_thumb');
- echo '</td><td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
- echo '<input type="checkbox" name="genthumb', $i, '" value="yes" checked="checked" />';
- echo '&nbsp;&nbsp;&nbsp;', i18n::translate('Generate thumbnail automatically from '), $thumbSupport;
+ echo i18n::translate('Automatic thumbnail'), help_link('generate_thumb');
+ echo '</td><td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
+ echo '<input type="checkbox" name="genthumb', $i, '" value="yes" checked="checked" />';
+ echo '&nbsp;&nbsp;&nbsp;', i18n::translate('Generate thumbnail automatically from '), $thumbSupport;
echo '</td></tr>';
}
echo '<tr><td class="descriptionbox ', $TEXT_DIRECTION, ' wrap width25">';
- echo i18n::translate('Thumbnail to upload'), help_link('upload_thumbnail_file');
- echo '</td>';
- echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
- echo '<input name="thumbnail', $i, '" type="file" size="40" />';
- if ($i==1) echo '<br /><sub>', i18n::translate('Use the &laquo;Browse&raquo; button to search your local computer for the desired file.'), '</sub>';
+ echo i18n::translate('Thumbnail to upload'), help_link('upload_thumbnail_file');
+ echo '</td>';
+ echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
+ echo '<input name="thumbnail', $i, '" type="file" size="40" />';
echo '</td></tr>';
if (WT_USER_GEDCOM_ADMIN) {
echo '<tr><td class="descriptionbox ', $TEXT_DIRECTION, ' wrap width25">';
- echo i18n::translate('File name on server'), help_link('upload_server_file');
- echo '</td>';
- echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
- echo '<input name="filename', $i, '" type="text" size="40" />';
- if ($i==1) echo "<br /><sub>", i18n::translate('Do not change to keep original file name.'), "</sub>";
+ echo i18n::translate('File name on server'), help_link('upload_server_file');
+ echo '</td>';
+ echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
+ echo '<input name="filename', $i, '" type="text" size="40" />';
+ if ($i==1) echo "<br /><sub>", i18n::translate('Do not change to keep original file name.'), "</sub>";
echo '</td></tr>';
} else {
echo '<input type="hidden" name="filename', $i, '" value="" />';
@@ -1081,28 +1079,28 @@ function show_mediaUpload_form($URL='media.php', $showthumb=false) {
if (WT_USER_GEDCOM_ADMIN && $MEDIA_DIRECTORY_LEVELS>0) {
echo '<tr><td class="descriptionbox ', $TEXT_DIRECTION, ' wrap width25">';
- echo i18n::translate('Folder name on server'), help_link('upload_server_folder');
- echo '</td>';
- echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
+ echo i18n::translate('Folder name on server'), help_link('upload_server_folder');
+ echo '</td>';
+ echo '<td class="optionbox ', $TEXT_DIRECTION, ' wrap">';
- echo '<span dir="ltr"><select name="folder_list', $i, '" onchange="document.uploadmedia.folder', $i, '.value=this.options[this.selectedIndex].value;">', "\n";
- echo '<option';
- echo ' value="/"> ', i18n::translate('Choose: '), ' </option>';
- if (WT_USER_IS_ADMIN) echo '<option value="other" disabled>', i18n::translate('Other folder... please type in'), "</option>\n";
- foreach ($mediaFolders as $f) {
- if (!strpos($f, ".svn")) { //Do not print subversion directories
- // Strip $MEDIA_DIRECTORY from the folder name
- if (substr($f, 0, strlen($MEDIA_DIRECTORY)) == $MEDIA_DIRECTORY) $f = substr($f, strlen($MEDIA_DIRECTORY));
- if ($f == '') $f = '/';
- echo '<option value="', $f, '"';
- echo '>', $f, "</option>\n";
- }
+ echo '<span dir="ltr"><select name="folder_list', $i, '" onchange="document.uploadmedia.folder', $i, '.value=this.options[this.selectedIndex].value;">', "\n";
+ echo '<option';
+ echo ' value="/"> ', i18n::translate('Choose: '), ' </option>';
+ if (WT_USER_IS_ADMIN) echo '<option value="other" disabled>', i18n::translate('Other folder... please type in'), "</option>\n";
+ foreach ($mediaFolders as $f) {
+ if (!strpos($f, ".svn")) { //Do not print subversion directories
+ // Strip $MEDIA_DIRECTORY from the folder name
+ if (substr($f, 0, strlen($MEDIA_DIRECTORY)) == $MEDIA_DIRECTORY) $f = substr($f, strlen($MEDIA_DIRECTORY));
+ if ($f == '') $f = '/';
+ echo '<option value="', $f, '"';
+ echo '>', $f, "</option>\n";
}
- print "</select></span>\n";
- if (WT_USER_IS_ADMIN) {
- echo '<br /><span dir="ltr"><input name="folder', $i, '" type="text" size="40" value="" onblur="checkpath(this)" /></span>';
- if ($i==1) echo '<br /><sub>', i18n::translate('You can enter up to %s folder names to follow the default &laquo;%s&raquo;.<br />Do not enter the &laquo;%s&raquo; part of the destination folder name.', $MEDIA_DIRECTORY_LEVELS, $MEDIA_DIRECTORY, $MEDIA_DIRECTORY), '</sub>';
- } else echo '<input name="folder', $i, '" type="hidden" value="" />';
+ }
+ print "</select></span>\n";
+ if (WT_USER_IS_ADMIN) {
+ echo '<br /><span dir="ltr"><input name="folder', $i, '" type="text" size="40" value="" onblur="checkpath(this)" /></span>';
+ if ($i==1) echo '<br /><sub>', i18n::translate('You can enter up to %s folder names to follow the default &laquo;%s&raquo;.<br />Do not enter the &laquo;%s&raquo; part of the destination folder name.', $MEDIA_DIRECTORY_LEVELS, $MEDIA_DIRECTORY, $MEDIA_DIRECTORY), '</sub>';
+ } else echo '<input name="folder', $i, '" type="hidden" value="" />';
echo '</td></tr>';
} else {
echo '<input name="folder', $i, '" type="hidden" value="" />';
@@ -1186,9 +1184,7 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
if ($gedfile == "FILE") {
// Box for user to choose to upload file from local computer
print "<tr><td class=\"descriptionbox $TEXT_DIRECTION wrap width25\">";
- print i18n::translate('Media file to upload').help_link('upload_media_file')."</td><td class=\"optionbox wrap\"><input type=\"file\" name=\"mediafile\"";
- print " onchange=\"updateFormat(this.value);\"";
- print " size=\"40\" /><br /><sub>" . i18n::translate('Use the &laquo;Browse&raquo; button to search your local computer for the desired file.') . "</sub></td></tr>";
+ print i18n::translate('Media file to upload').help_link('upload_media_file')."</td><td class=\"optionbox wrap\"><input type=\"file\" name=\"mediafile\" onchange=\"updateFormat(this.value);\" size=\"40\" /></td></tr>";
// Check for thumbnail generation support
if (WT_USER_GEDCOM_ADMIN) {
$ThumbSupport = "";
@@ -1213,7 +1209,7 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
echo "</td></tr>";
}
echo "<tr><td class=\"descriptionbox $TEXT_DIRECTION wrap width25\">";
- echo i18n::translate('Thumbnail to upload').help_link('upload_thumbnail_file')."</td><td class=\"optionbox wrap\"><input type=\"file\" name=\"thumbnail\" size=\"40\" /><br /><sub>" . i18n::translate('Use the &laquo;Browse&raquo; button to search your local computer for the desired file.') . "</sub></td></tr>";
+ echo i18n::translate('Thumbnail to upload').help_link('upload_thumbnail_file')."</td><td class=\"optionbox wrap\"><input type=\"file\" name=\"thumbnail\" size=\"40\" /></td></tr>";
}
else print "<input type=\"hidden\" name=\"genthumb\" value=\"yes\" />";
}