} } print $pgv_lang["update_successful"]; } } // **** end action "newentry" // **** begin action "update" if ($action == "update") { if (empty($level)) { $level = 1; } //-- check if the file is used in more than one gedcom //-- do not allow it to be moved or renamed if it is $myFile = str_replace($MEDIA_DIRECTORY, "", $oldFolder . $oldFilename); $multi_gedcom = is_media_used_in_other_gedcom($myFile, PGV_GED_ID); $isExternal = isFileExternal($oldFilename) || isFileExternal($filename); $finalResult = true; // Handle Admin request to rename or move media file if (!$isExternal) { if ($filename != $oldFilename) { $parts = pathinfo_utf($filename); if (empty($parts["extension"]) || !in_array(strtolower($parts["extension"]), $MEDIATYPE)) { $parts = pathinfo_utf($oldFilename); $filename .= "." . $parts["extension"]; } } if (!isset($folder) && isset($oldFolder)) { $folder = $oldFolder; } $folder = trim($folder); if (substr($folder, -1) != "/") {
/** * print a media row in a table * @param string $rtype whether this is a 'new', 'old', or 'normal' media row... this is used to determine if the rows should be printed with an outline color * @param array $rowm An array with the details about this media item * @param string $pid The record id this media item was attached to */ function media_reorder_row($rtype, $rowm, $pid) { global $PGV_IMAGE_DIR, $PGV_IMAGES, $view, $MEDIA_DIRECTORY, $TEXT_DIRECTION; global $SHOW_ID_NUMBERS, $GEDCOM, $factarray, $pgv_lang, $THUMBNAIL_WIDTH, $USE_MEDIA_VIEWER; global $SEARCH_SPIDER; global $t, $n, $item, $items, $p, $edit, $SERVER_URL, $reorder, $LB_AL_THUMB_LINKS, $note, $rowm; global $LB_URL_WIDTH, $LB_URL_HEIGHT, $order1, $mediaType; if (!isset($rowm)) { $rowm = $row; } print "<li class=\"facts_value\" style=\"list-style:none;cursor:move;margin-bottom:2px;\" id=\"li_" . $rowm['m_media'] . "\" >"; //print $rtype." ".$rowm["m_media"]." ".$pid; if (!displayDetailsById($rowm['m_media'], 'OBJE') || FactViewRestricted($rowm['m_media'], $rowm['m_gedrec'])) { //print $rowm['m_media']." no privacy "; return false; } $styleadd = ""; if ($rtype == 'new') { $styleadd = "change_new"; } if ($rtype == 'old') { $styleadd = "change_old"; } // NOTE Start printing the media details $thumbnail = thumbnail_file($rowm["m_file"], true, false, $pid); // $isExternal = stristr($thumbnail,"://"); $isExternal = isFileExternal($thumbnail); $linenum = 0; // NOTE Get the title of the media if (showFactDetails("OBJE", $pid)) { $mediaTitle = $rowm["m_titl"]; $subtitle = get_gedcom_value("TITL", 2, $rowm["mm_gedrec"]); if (!empty($subtitle)) { $mediaTitle = $subtitle; } $mainMedia = check_media_depth($rowm["m_file"], "NOTRUNC"); if ($mediaTitle == "") { $mediaTitle = basename($rowm["m_file"]); } print "\n" . "<table class=\"pic\"><tr>" . "\n"; print "<td width=\"80\" valign=\"top\" align=\"center\" >" . "\n"; // Get info on how to handle this media file $mediaInfo = mediaFileInfo($mainMedia, $thumbnail, $rowm["m_media"], $mediaTitle, ''); //-- Thumbnail field print "<img src=\"" . $mediaInfo['thumb'] . "\" height=\"38\" border=\"0\" "; if (eregi("1 SOUR", $rowm['m_gedrec'])) { print " alt=\"" . PrintReady($mediaTitle) . "\" title=\"" . PrintReady($mediaTitle) . "\nSource info available\" />"; } else { print " alt=\"" . PrintReady($mediaTitle) . "\" title=\"" . PrintReady($mediaTitle) . "\" />"; } //print media info $ttype2 = preg_match("/\\d TYPE (.*)/", $rowm["m_gedrec"], $match); if ($ttype2 > 0) { $mediaType = trim($match[1]); $varName = "TYPE__" . strtolower($mediaType); if (isset($pgv_lang[$varName])) { $mediaType = $pgv_lang[$varName]; } // print "\n\t\t\t<br /><span class=\"label\">".$pgv_lang["type"].": </span> <span class=\"field\">$mediaType</span>"; } print "\n" . "</td><td> </td>" . "\n"; print "<td valign=\"top\" align=\"left\">"; //print "<font color=\"blue\">"; print $rowm['m_media']; //print "</font>"; print "<b>"; print " " . $mediaType; print "</b>"; print "<br>" . "\n"; print $mediaTitle . "\n"; print "</td>" . "\n"; print "</tr>"; print "</table>" . "\n"; } if (!isset($j)) { $j = 0; } else { $j = $j; } $media_data = $rowm['m_media']; print "<input type=\"hidden\" name=\"order1[{$media_data}]\" value=\"{$j}\" />"; print "</li>"; print "\n\n"; return true; }
?> " size="40" dir ="ltr" tabindex="<?php $i++; print $i; ?> " onfocus="getHelp('gedcom_path_help');" /> <?php } if ($source != "replace_form" && ($GEDCOMPATH != "" || $GEDFILENAME != "")) { if (!file_exists($path . $GEDFILENAME) && !empty($GEDCOMPATH)) { //-- gedcom not found so try looking for it with a .ged extension if (strtolower(substr(trim($path . $GEDFILENAME), -4)) != ".ged") { $GEDFILENAME .= ".ged"; } } if (!isFileExternal($GEDCOMPATH) && !file_exists($path . $GEDFILENAME)) { print "<br /><span class=\"error\">" . str_replace("#GEDCOM#", $GEDCOMPATH, $pgv_lang["error_header"]) . "</span>\n"; } } ?> </td> </tr> <?php if ($source == "upload_form") { ?> <tr> <td class="descriptionbox wrap width20"> <?php print_help_link("gedcom_path_help", "qm", "gedcom_path"); print $pgv_lang["gedcom_path"]; ?>
/** * get the highlighted object HTML * @return string HTML string for the <img> tag */ function getHighlightedObject() { global $USE_THUMBS_MAIN, $THUMBNAIL_WIDTH, $USE_MEDIA_VIEWER, $GEDCOM; if ($this->canShowHighlightedObject()) { $firstmediarec = $this->indi->findHighlightedMedia(); if (!empty($firstmediarec)) { $filename = thumb_or_main($firstmediarec); // Do we send the main image or a thumbnail? if (!$USE_THUMBS_MAIN || $firstmediarec["_THUM"] == 'Y') { $class = "image"; } else { $class = "thumbnail"; } $isExternal = isFileExternal($filename); if ($isExternal && $class == "thumbnail") { $class .= "\" width=\"" . $THUMBNAIL_WIDTH; } if (!empty($filename)) { $result = ""; $imgsize = findImageSize($firstmediarec["file"]); $imgwidth = $imgsize[0] + 40; $imgheight = $imgsize[1] + 150; //Gets the Media View Link Information and Concatenate $mid = $firstmediarec['mid']; $name = $this->indi->getFullName(); if (file_exists("modules/lightbox/album.php")) { print "<a href=\"" . $firstmediarec["file"] . "\" rel=\"clearbox[general_1]\" rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name, ENT_QUOTES, 'UTF-8')) . "\">" . "\n"; } else { if (!$USE_MEDIA_VIEWER && $imgsize) { $result .= "<a href=\"javascript:;\" onclick=\"return openImage('" . encode_url(encrypt($firstmediarec["file"])) . "',{$imgwidth}, {$imgheight});\">"; } else { $result .= "<a href=\"mediaviewer.php?mid={$mid}\">"; } } $result .= "<img src=\"{$filename}\" align=\"left\" class=\"" . $class . "\" border=\"none\" title=\"" . PrintReady(htmlspecialchars(strip_tags($name), ENT_QUOTES, 'UTF-8')) . "\" alt=\"" . PrintReady(htmlspecialchars(strip_tags($name), ENT_QUOTES, 'UTF-8')) . "\" />"; $result .= "</a>"; return $result; } } } }
/** * get the relative filename for a media item * * gets the relative file path from the full media path for a media item. checks the * <var>$MEDIA_DIRECTORY_LEVELS</var> to make sure the directory structure is maintained. * @param string $fullpath the full path from the media record * @return string a relative path that can be appended to the <var>$MEDIA_DIRECTORY</var> to reference the item */ function extract_filename($fullpath) { global $MEDIA_DIRECTORY_LEVELS, $MEDIA_DIRECTORY; $filename = ""; $regexp = "'[/\\\\]'"; $srch = "/" . addcslashes($MEDIA_DIRECTORY, '/.') . "/"; $repl = ""; if (!isFileExternal($fullpath)) { $nomedia = stripcslashes(preg_replace($srch, $repl, $fullpath)); } else { $nomedia = $fullpath; } $ct = preg_match($regexp, $nomedia, $match); if ($ct > 0) { $subelements = preg_split($regexp, $nomedia); $subelements = array_reverse($subelements); $max = $MEDIA_DIRECTORY_LEVELS; if ($max >= count($subelements)) { $max = count($subelements) - 1; } for ($s = $max; $s >= 0; $s--) { if ($s != $max) { $filename = $filename . "/" . $subelements[$s]; } else { $filename = $subelements[$s]; } } } else { $filename = $nomedia; } return $filename; }
echo "(", $media["XREF"], ")"; if ($TEXT_DIRECTION == "rtl") { echo getRLM(); } echo "<br />"; } if (!$embed) { echo "<a href=\"javascript:;\" onclick=\"pasteid('", addslashes($media["FILE"]), "');\"><span dir=\"ltr\">", $media["FILE"], "</span></a> -- "; } else { echo "<a href=\"javascript:;\" onclick=\"pasteid('", $media["XREF"], "', '", addslashes($media["TITL"]), "', '", addslashes($media["THUMB"]), "');\"><span dir=\"ltr\">", $media["FILE"], "</span></a> -- "; } echo "<a href=\"javascript:;\" onclick=\"return openImage('", rawurlencode($media["FILE"]), "', {$imgwidth}, {$imgheight});\">", $pgv_lang["view"], "</a><br />"; if (!$media["EXISTS"] && !isFileExternal($media["FILE"])) { echo $media["FILE"], "<br /><span class=\"error\">", $pgv_lang["file_not_exists"], "</span><br />"; } else { if (!isFileExternal($media["FILE"]) && !empty($imgsize[0])) { echo "<br /><sub> ", $pgv_lang["image_size"], " -- ", $imgsize[0], "x", $imgsize[1], "</sub><br />"; } } if ($media["LINKED"]) { echo $pgv_lang["media_linked"], "<br />"; foreach ($media["LINKS"] as $indi => $type_record) { if ($type_record != 'INDI' && $type_record != 'FAM' && $type_record != 'SOUR' && $type_record != 'OBJE') { continue; } $record = GedcomRecord::getInstance($indi); echo '<br /><a href="', encode_url($record->getLinkUrl()), '">'; switch ($type_record) { case 'INDI': echo $pgv_lang['view_person'], ' - '; break;
function print_random_media($block = true, $config = "", $side, $index) { global $pgv_lang, $foundlist, $MULTI_MEDIA, $TEXT_DIRECTION, $PGV_IMAGE_DIR, $PGV_IMAGES; global $MEDIA_EXTERNAL, $MEDIA_DIRECTORY, $SHOW_SOURCES; global $MEDIATYPE, $THUMBNAIL_WIDTH, $USE_MEDIA_VIEWER; global $PGV_BLOCKS, $ctype, $action; global $PGV_IMAGE_DIR, $PGV_IMAGES; if (!$MULTI_MEDIA) { return; } if (empty($config)) { $config = $PGV_BLOCKS["print_random_media"]["config"]; } if (isset($config["filter"])) { $filter = $config["filter"]; } else { $filter = "all"; } if (!isset($config['controls'])) { $config['controls'] = "yes"; } if (!isset($config['start'])) { $config['start'] = "no"; } $medialist = array(); $foundlist = array(); $medialist = get_medialist(false, '', true, true); $ct = count($medialist); if ($ct > 0) { $i = 0; $disp = false; //-- try up to 40 times to get a media to display while ($i < 40) { $error = false; $value = array_rand($medialist); if (PGV_DEBUG) { print "<br />"; print_r($medialist[$value]); print "<br />"; print "Trying " . $medialist[$value]["XREF"] . "<br />"; } $links = $medialist[$value]["LINKS"]; $disp = $medialist[$value]["EXISTS"] > 0 && $medialist[$value]["LINKED"] && $medialist[$value]["CHANGE"] != "delete"; if (PGV_DEBUG && !$disp && !$error) { $error = true; print "<span class=\"error\">" . $medialist[$value]["XREF"] . " File does not exist, or is not linked to anyone, or is marked for deletion.</span><br />"; } $disp &= displayDetailsById($medialist[$value]["XREF"], "OBJE"); $disp &= !FactViewRestricted($medialist[$value]["XREF"], $medialist[$value]["GEDCOM"]); if (PGV_DEBUG && !$disp && !$error) { $error = true; print "<span class=\"error\">" . $medialist[$value]["XREF"] . " Failed to pass privacy</span><br />"; } $isExternal = isFileExternal($medialist[$value]["FILE"]); if ($block && !$isExternal) { $disp &= $medialist[$value]["THUMBEXISTS"] > 0; } if (PGV_DEBUG && !$disp && !$error) { $error = true; print "<span class=\"error\">" . $medialist[$value]["XREF"] . " thumbnail file could not be found</span><br />"; } // Filter according to format and type (Default: unless configured otherwise, don't filter) if (!empty($medialist[$value]["FORM"]) && isset($config["filter_" . $medialist[$value]["FORM"]]) && $config["filter_" . $medialist[$value]["FORM"]] != "yes") { $disp = false; } if (!empty($medialist[$value]["TYPE"]) && isset($config["filter_" . $medialist[$value]["TYPE"]]) && $config["filter_" . $medialist[$value]["TYPE"]] != "yes") { $disp = false; } if (PGV_DEBUG && !$disp && !$error) { $error = true; print "<span class=\"error\">" . $medialist[$value]["XREF"] . " failed Format or Type filters</span><br />"; } if ($disp && count($links) != 0) { /** link privacy allready checked in displayDetailsById foreach($links as $key=>$type) { $gedrec = find_gedcom_record($key, PGV_GED_ID); $disp &= !empty($gedrec); //-- source privacy is now available through the display details by id method // $disp &= $type!="SOUR"; $disp &= displayDetailsById($key, $type); } if (PGV_DEBUG && !$disp && !$error) {$error = true; print "<span class=\"error\">".$medialist[$value]["XREF"]." failed link privacy</span><br />";} */ if ($disp && $filter != "all") { // Apply filter criteria $ct = preg_match("/0\\s(@.*@)\\sOBJE/", $medialist[$value]["GEDCOM"], $match); $objectID = $match[1]; //-- we could probably use the database for this filter foreach ($links as $key => $type) { $gedrec = find_gedcom_record($key, PGV_GED_ID); $ct2 = preg_match("/(\\d)\\sOBJE\\s{$objectID}/", $gedrec, $match2); if ($ct2 > 0) { $objectRefLevel = $match2[1]; if ($filter == "indi" && $objectRefLevel != "1") { $disp = false; } if ($filter == "event" && $objectRefLevel == "1") { $disp = false; } if (PGV_DEBUG && !$disp && !$error) { $error = true; print "<span class=\"error\">" . $medialist[$value]["XREF"] . " failed to pass config filter</span><br />"; } } else { $disp = false; } } } } //-- leave the loop if we find an image that works if ($disp) { break; } else { if (PGV_DEBUG) { print "<span class=\"error\">" . $medialist[$value]["XREF"] . " Will not be shown</span><br />"; } unset($medialist[$value]); } //-- if there are no more media items, then try to get some more if (count($medialist) == 0) { $medialist = get_medialist(false, '', true, true); } $i++; } if (!$disp) { return false; } $content = ""; $id = ""; $id = "random_picture{$index}"; $title = print_help_link("index_media_help", "qm", "random_picture", false, true); if ($PGV_BLOCKS["print_random_media"]["canconfig"]) { if ($ctype == "gedcom" && PGV_USER_GEDCOM_ADMIN || $ctype == "user" && PGV_USER_ID) { if ($ctype == "gedcom") { $name = PGV_GEDCOM; } else { $name = PGV_USER_NAME; } $title .= "<a href=\"javascript: configure block\" onclick=\"window.open('" . encode_url("index_edit.php?name={$name}&ctype={$ctype}&action=configure&side={$side}&index={$index}") . "', '_blank', 'top=50,left=50,width=600,height=350,scrollbars=1,resizable=1'); return false;\">"; $title .= "<img class=\"adminicon\" src=\"{$PGV_IMAGE_DIR}/{$PGV_IMAGES['admin']['small']}\" width=\"15\" height=\"15\" border=\"0\" alt=\"{$pgv_lang['config_block']}\" /></a>"; } } $title .= $pgv_lang["random_picture"]; $content = "<div id=\"random_picture_container{$index}\">"; if ($config['controls'] == 'yes') { if ($config['start'] == 'yes' || isset($_COOKIE['rmblockplay']) && $_COOKIE['rmblockplay'] == 'true') { $image = "stop"; } else { $image = "rarrow"; } $linkNextImage = "<a href=\"javascript: " . $pgv_lang["next_image"] . "\" onclick=\"return ajaxBlock('random_picture{$index}', 'print_random_media', '{$side}', {$index}, '{$ctype}', true);\"><img src=\"{$PGV_IMAGE_DIR}/{$PGV_IMAGES['rdarrow']['other']}\" border=\"0\" alt=\"{$pgv_lang['next_image']}\" title=\"{$pgv_lang['next_image']}\" /></a>"; $content .= "<div class=\"center\" id=\"random_picture_controls{$index}\"><br />"; if ($TEXT_DIRECTION == "rtl") { $content .= $linkNextImage; } $content .= "<a href=\"javascript: " . $pgv_lang["play"] . "/" . $pgv_lang["stop"] . "\" onclick=\"togglePlay(); return false;\">"; if (isset($PGV_IMAGES[$image]['other'])) { $content .= "<img id=\"play_stop\" src=\"{$PGV_IMAGE_DIR}/{$PGV_IMAGES[$image]['other']}\" border=\"0\" alt=\"{$pgv_lang['play']}/{$pgv_lang['stop']}\" title=\"{$pgv_lang['play']}/{$pgv_lang['stop']}\" />"; } else { $content .= $pgv_lang["play"] . "/" . $pgv_lang["stop"]; } $content .= "</a>"; if ($TEXT_DIRECTION == "ltr") { $content .= $linkNextImage; } $content .= ' </div> <script language="JavaScript" type="text/javascript"> <!-- var play = false; function togglePlay() { if (play) { play = false; imgid = document.getElementById("play_stop"); imgid.src = \'' . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["rarrow"]['other'] . '\'; } else { play = true; playSlideShow(); imgid = document.getElementById("play_stop"); imgid.src = \'' . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["stop"]['other'] . '\'; } } function playSlideShow() { if (play) { ajaxBlock(\'random_picture' . $index . '\', \'print_random_media\', \'' . $side . '\', ' . $index . ', \'' . $ctype . '\', false); window.setTimeout(\'playSlideShow()\', 6000); } } //--> </script>'; } if ($config['start'] == 'yes') { $content .= ' <script language="JavaScript" type="text/javascript"> <!-- play = true; imgid = document.getElementById("play_stop"); imgid.src = \'' . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["stop"]['other'] . '\'; window.setTimeout("playSlideShow()", 6000); //--> </script>'; } $content .= "<div class=\"center\" id=\"random_picture_content{$index}\">"; $imgsize = findImageSize($medialist[$value]["FILE"]); $imgwidth = $imgsize[0] + 40; $imgheight = $imgsize[1] + 150; $content .= "<table id=\"random_picture_box\" width=\"100%\"><tr><td valign=\"top\""; if ($block) { $content .= " align=\"center\" class=\"details1\""; } else { $content .= " class=\"details2\""; } $mediaid = $medialist[$value]["XREF"]; //LBox -------- change for Lightbox Album -------------------------------------------- ?> <script language="JavaScript" type="text/javascript"> <!-- function openPic(filename, width, height) { height=height+50; screenW = screen.width; screenH = screen.height; if (width>screenW-100) width=screenW-100; if (height>screenH-110) height=screenH-120; if ((filename.search(/\.je?pg$/gi)!=-1)||(filename.search(/\.gif$/gi)!=-1)||(filename.search(/\.png$/gi)!=-1)||(filename.search(/\.bmp$/gi)!=-1)) win02 = window.open('imageview.php?filename='+filename,'win02','top=50,left=150,height='+height+',width='+width+',scrollbars=1,resizable=1'); // win03.resizeTo(winWidth 2,winHeight 30); else window.open(unescape(filename),'win02','top=50,left=150,height='+height+',width='+width+',scrollbars=1,resizable=1'); win02.focus(); } --> </script><?php if (PGV_USE_LIGHTBOX) { // $content .= " ><a href=\"javascript:;\" onclick=\"return openPic('".$medialist[$value]["FILE"]."', $imgwidth, $imgheight);\">"; // $content .= " ><a href=\"javascript:;\" onclick=\"return openImage('".$medialist[$value]["FILE"]."', $imgwidth, $imgheight);\">"; // $content .= "><a href=\"" . $medialist[$value]["FILE"] . "\" rel=\"clearbox[general_4]\" title=\"" . $mediaid . "\">" . "\n"; $content .= " ><a href=\"mediaviewer.php?mid=" . $mediaid . "\">"; } else { // --------------------------------------------------------------------------------------------- if ($USE_MEDIA_VIEWER) { $content .= " ><a href=\"mediaviewer.php?mid=" . $mediaid . "\">"; } else { $content .= " ><a href=\"javascript:;\" onclick=\"return openImage('" . $medialist[$value]["FILE"] . "', {$imgwidth}, {$imgheight});\">"; } } $mediaTitle = ""; if (!empty($medialist[$value]["TITL"])) { $mediaTitle = PrintReady($medialist[$value]["TITL"]); } else { $mediaTitle = basename($medialist[$value]["FILE"]); } if ($block) { $content .= "<img src=\"" . $medialist[$value]["THUMB"] . "\" border=\"0\" class=\"thumbnail\""; if ($isExternal) { $content .= " width=\"" . $THUMBNAIL_WIDTH . "\""; } } else { $content .= "<img src=\"" . $medialist[$value]["FILE"] . "\" border=\"0\" class=\"thumbnail\" "; $imgsize = findImageSize($medialist[$value]["FILE"]); if ($imgsize[0] > 175) { $content .= "width=\"175\" "; } } $content .= " alt=\"{$mediaTitle}\" title=\"{$mediaTitle}\" />"; $content .= "</a>"; if ($block) { $content .= "<br />"; } else { $content .= "</td><td class=\"details2\">"; } $content .= "<a href=\"mediaviewer.php?mid=" . $mediaid . "\">"; $content .= "<b>" . $mediaTitle . "</b>"; $content .= "</a><br />"; ob_start(); PrintMediaLinks($medialist[$value]["LINKS"], "normal"); $content .= ob_get_clean(); $content .= "<br /><div class=\"indent" . ($TEXT_DIRECTION == "rtl" ? "_rtl" : "") . "\">"; $content .= print_fact_notes($medialist[$value]["GEDCOM"], "1", false, true); $content .= "</div>"; $content .= "</td></tr></table>"; $content .= "</div>"; // random_picture_content $content .= "</div>"; // random_picture_container global $THEME_DIR; require $THEME_DIR . 'templates/block_main_temp.php'; } }
} if ($gedfile != 'FILE') { $gedfile = 'FILE ' . substr($gedfile, 5); } if ($gedfile == 'FILE') { // Box for user to choose to upload file from local computer echo '<tr><td class="descriptionbox wrap width25">'; echo WT_I18N::translate('Media file to upload') . '</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) { echo '<tr><td class="descriptionbox wrap width25">'; echo WT_I18N::translate('Thumbnail to upload') . help_link('upload_thumbnail_file') . '</td><td class="optionbox wrap"><input type="file" name="thumbnail" size="40"></td></tr>'; } } // Filename on server $isExternal = isFileExternal($gedfile); if ($gedfile == 'FILE') { if (WT_USER_GEDCOM_ADMIN) { add_simple_tag("1 {$gedfile}", '', WT_I18N::translate('File name on server'), WT_I18N::translate('Do not change to keep original file name.') . '<br>' . WT_I18N::translate('You may enter a URL, beginning with “http://”.')); } $fileName = ''; $folder = ''; } else { if ($isExternal) { $fileName = substr($gedfile, 5); $folder = ''; } else { $tmp = substr($gedfile, 5); $fileName = basename($tmp); $folder = dirname($tmp); if ($folder == '.') {