summaryrefslogtreecommitdiff
path: root/includes/functions
diff options
context:
space:
mode:
Diffstat (limited to 'includes/functions')
-rw-r--r--includes/functions/functions.php66
-rw-r--r--includes/functions/functions_mediadb.php60
-rw-r--r--includes/functions/functions_places.php24
-rw-r--r--includes/functions/functions_print.php79
-rw-r--r--includes/functions/functions_print_facts.php124
-rw-r--r--includes/functions/functions_print_lists.php104
6 files changed, 219 insertions, 238 deletions
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index 0a85f59150..d1f4432c14 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -110,23 +110,6 @@ function safe_REQUEST($arr, $var, $regex=WT_REGEX_NOSCRIPT, $default=null) {
}
}
-function encode_url($url, $entities=true) {
- $url = decode_url($url, $entities); // Make sure we don't do any double conversions
- $url = str_replace(array(' ', '+', '@#', '"', "'"), array('%20', '%2b', '@%23', '%22', '%27'), $url);
- if ($entities) {
- $url = htmlspecialchars($url);
- }
- return $url;
-}
-
-function decode_url($url, $entities=true) {
- if ($entities) {
- $url = html_entity_decode($url, ENT_COMPAT, 'UTF-8');
- }
- $url = rawurldecode($url); // GEDCOM names can legitimately contain " " and "+"
- return $url;
-}
-
function preg_match_recursive($regex, $var) {
if (is_scalar($var)) {
return preg_match($regex, $var);
@@ -315,7 +298,7 @@ function wt_error_handler($errno, $errstr, $errfile, $errline) {
if (stristr($errstr, "by reference")==true) {
return;
}
- $fmt_msg="\n<br />ERROR {$errno}: {$errstr}<br />\n";
+ $fmt_msg="<br />ERROR {$errno}: {$errstr}<br />";
$log_msg="ERROR {$errno}: {$errstr};";
// Although debug_backtrace should always exist in PHP5, without this check, PHP sometimes crashes.
// Possibly calling it generates an error, which causes infinite recursion??
@@ -341,7 +324,7 @@ function wt_error_handler($errno, $errstr, $errfile, $errline) {
$fmt_msg.=" in function <b>".$backtrace[$i+1]['function']."</b>";
$log_msg.=" in function ".$backtrace[$i+1]['function'];
}
- $fmt_msg.="<br />\n";
+ $fmt_msg.="<br />";
}
}
echo $fmt_msg;
@@ -366,7 +349,6 @@ function wt_error_handler($errno, $errstr, $errfile, $errline) {
*/
function get_first_tag($level, $tag, $gedrec, $num=1) {
$temp = get_sub_record($level, $level." ".$tag, $gedrec, $num)."\n";
- $temp = str_replace("\r\n", "\n", $temp);
$length = strpos($temp, "\n");
if ($length===false) {
$length = strlen($temp);
@@ -405,7 +387,7 @@ function get_sub_record($level, $tag, $gedrec, $num=1) {
$pos1=0;
$subrec = "";
$tag = trim($tag);
- $searchTarget = "~[\r\n]".$tag."[\s]~";
+ $searchTarget = "~[\n]".$tag."[\s]~";
$ct = preg_match_all($searchTarget, $gedrec, $match, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
if ($ct==0) {
$tag = preg_replace('/(\w+)/', "_$1", $tag);
@@ -713,7 +695,7 @@ function breakConts($newline) {
}
$newged = "";
- $newlines = preg_split("/\r?\n/", rtrim(stripLRMRLM($newline)));
+ $newlines = preg_split("/\n/", rtrim(stripLRMRLM($newline)));
for ($k=0; $k<count($newlines); $k++) {
if ($k>0) {
$newlines[$k] = "{$level} CONT ".$newlines[$k];
@@ -3075,10 +3057,10 @@ function get_query_string() {
foreach ($_GET as $key => $value) {
if ($key != "view") {
if (!is_array($value)) {
- $qstring .= "{$key}={$value}&";
+ $qstring .= "&amp;{$key}={$value}";
} else {
foreach ($value as $k=>$v) {
- $qstring .= "{$key}[{$k}]={$v}&";
+ $qstring .= "&amp;{$key}[{$k}]={$v}";
}
}
}
@@ -3088,11 +3070,11 @@ function get_query_string() {
foreach ($_POST as $key => $value) {
if ($key != "view") {
if (!is_array($value)) {
- $qstring .= "{$key}={$value}&";
+ $qstring .= "&amp;{$key}={$value}";
} else {
foreach ($value as $k=>$v) {
if (!is_array($v)) {
- $qstring .= "{$key}[{$k}]={$v}&";
+ $qstring .= "&amp;{$key}[{$k}]={$v}";
}
}
}
@@ -3100,8 +3082,8 @@ function get_query_string() {
}
}
}
- $qstring = rtrim($qstring, "&"); // Remove trailing "&"
- return encode_url($qstring);
+ $qstring = substr($qstring, 5); // Remove leading "&amp;"
+ return $qstring;
}
//This function works with a specified generation limit. It will completely fill
@@ -3363,28 +3345,28 @@ function mediaFileInfo($fileName, $thumbName, $mid, $name='', $notes='', $obeyVi
require_once WT_ROOT.'modules/lightbox/lb_defaultconfig.php';
switch ($type) {
case 'url_flv':
- $url = encode_url('js/jw_player/flvVideo.php?flvVideo='.($fileName)) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
+ $url = 'js/jw_player/flvVideo.php?flvVideo='.rawurlencode($fileName) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
break 2;
case 'local_flv':
- $url = encode_url('js/jw_player/flvVideo.php?flvVideo='.(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName)) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
+ $url = 'js/jw_player/flvVideo.php?flvVideo='.rawurlencode(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
break 2;
case 'url_wmv':
- $url = encode_url('js/jw_player/wmvVideo.php?wmvVideo='.($fileName)) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
+ $url = 'js/jw_player/wmvVideo.php?wmvVideo='.rawurlencode($fileName) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
break 2;
case 'local_audio':
case 'local_wmv':
- $url = encode_url('js/jw_player/wmvVideo.php?wmvVideo='.(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName)) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
+ $url = 'js/jw_player/wmvVideo.php?wmvVideo='.rawurlencode(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName) . "\" rel='clearbox(500, 392, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
break 2;
case 'url_image':
case 'local_image':
- $url = encode_url($fileName) . "\" rel=\"clearbox[general]\" rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
+ $url = $fileName . "\" rel=\"clearbox[general]\" rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
break 2;
case 'url_picasa':
case 'url_page':
case 'url_other':
case 'local_page':
// case 'local_other':
- $url = encode_url($fileName) . "\" rel='clearbox({$LB_URL_WIDTH}, {$LB_URL_HEIGHT}, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
+ $url = $fileName . "\" rel='clearbox({$LB_URL_WIDTH}, {$LB_URL_HEIGHT}, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "::" . htmlspecialchars($notes);
break 2;
case 'url_streetview':
if (WT_SCRIPT_NAME != "media.php") {
@@ -3397,32 +3379,32 @@ function mediaFileInfo($fileName, $thumbName, $mid, $name='', $notes='', $obeyVi
// Lightbox is not installed or Lightbox is not appropriate for this media type
switch ($type) {
case 'url_flv':
- $url = "javascript:;\" onclick=\" var winflv = window.open('".encode_url('js/jw_player/flvVideo.php?flvVideo='.($fileName)) . "', 'winflv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winflv.focus();}";
+ $url = "javascript:;\" onclick=\" var winflv = window.open('".'js/jw_player/flvVideo.php?flvVideo='.rawurlencode($fileName) . "', 'winflv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winflv.focus();}";
break 2;
case 'local_flv':
- $url = "javascript:;\" onclick=\" var winflv = window.open('".encode_url('js/jw_player/flvVideo.php?flvVideo='.(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName)) . "', 'winflv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winflv.focus();}";
+ $url = "javascript:;\" onclick=\" var winflv = window.open('".'js/jw_player/flvVideo.php?flvVideo='.rawurlencode(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName) . "', 'winflv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winflv.focus();}";
break 2;
case 'url_wmv':
- $url = "javascript:;\" onclick=\" var winwmv = window.open('".encode_url('js/jw_player/wmvVideo.php?wmvVideo='.($fileName)) . "', 'winwmv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winwmv.focus();}";
+ $url = "javascript:;\" onclick=\" var winwmv = window.open('".'js/jw_player/wmvVideo.php?wmvVideo='.rawurlencode($fileName) . "', 'winwmv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winwmv.focus();}";
break 2;
case 'local_wmv':
case 'local_audio':
- $url = "javascript:;\" onclick=\" var winwmv = window.open('".encode_url('js/jw_player/wmvVideo.php?wmvVideo='.(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName)) . "', 'winwmv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winwmv.focus();}";
+ $url = "javascript:;\" onclick=\" var winwmv = window.open('".'js/jw_player/wmvVideo.php?wmvVideo='.rawurlencode(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName) . "', 'winwmv', 'width=500, height=392, left=600, top=200'); if (window.focus) {winwmv.focus();}";
break 2;
case 'url_image':
$imgsize = findImageSize($fileName);
$imgwidth = $imgsize[0]+40;
$imgheight = $imgsize[1]+150;
- $url = "javascript:;\" onclick=\"var winimg = window.open('".encode_url($fileName)."', 'winimg', 'width=".$imgwidth.", height=".$imgheight.", left=200, top=200'); if (window.focus) {winimg.focus();}";
+ $url = "javascript:;\" onclick=\"var winimg = window.open('".$fileName."', 'winimg', 'width=".$imgwidth.", height=".$imgheight.", left=200, top=200'); if (window.focus) {winimg.focus();}";
break 2;
case 'url_picasa':
case 'url_page':
case 'url_other':
case 'local_other';
- $url = "javascript:;\" onclick=\"var winurl = window.open('".encode_url($fileName)."', 'winurl', 'width=900, height=600, left=200, top=200'); if (window.focus) {winurl.focus();}";
+ $url = "javascript:;\" onclick=\"var winurl = window.open('".$fileName."', 'winurl', 'width=900, height=600, left=200, top=200'); if (window.focus) {winurl.focus();}";
break 2;
case 'local_page':
- $url = "javascript:;\" onclick=\"var winurl = window.open('".encode_url(WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName)."', 'winurl', 'width=900, height=600, left=200, top=200'); if (window.focus) {winurl.focus();}";
+ $url = "javascript:;\" onclick=\"var winurl = window.open('".WT_SERVER_NAME.WT_SCRIPT_PATH.$fileName."', 'winurl', 'width=900, height=600, left=200, top=200'); if (window.focus) {winurl.focus();}";
break 2;
case 'url_streetview':
echo '<iframe style="float:left; padding:5px;" width="264" height="176" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="', $fileName, '&amp;output=svembed"></iframe>';
@@ -3430,7 +3412,7 @@ function mediaFileInfo($fileName, $thumbName, $mid, $name='', $notes='', $obeyVi
break 2;
}
if ($USE_MEDIA_VIEWER && $obeyViewerOption) {
- $url = encode_url('mediaviewer.php?mid='.$mid);
+ $url = 'mediaviewer.php?mid='.$mid;
} else {
$imgsize = findImageSize($fileName);
$imgwidth = $imgsize[0]+40;
diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php
index 96019b2bc2..694ae0db8a 100644
--- a/includes/functions/functions_mediadb.php
+++ b/includes/functions/functions_mediadb.php
@@ -984,14 +984,14 @@ function process_uploadMedia_form() {
}
}
// Let's see if there are any errors generated and print it
- if (!empty($error)) echo '<span class="error">', $error, "</span><br />\n";
+ if (!empty($error)) echo '<span class="error">', $error, "</span><br />";
// No errors found then tell the user all is successful
else {
print i18n::translate('Upload successful.')."<br /><br />";
$imgsize = findImageSize($folderName.$mediaFile);
$imgwidth = $imgsize[0]+40;
$imgheight = $imgsize[1]+150;
- print "<a href=\"#\" onclick=\"return openImage('".encode_url($folderName.$mediaFile)."', $imgwidth, $imgheight);\">".$mediaFile."</a>";
+ print "<a href=\"#\" onclick=\"return openImage('".htmlspecialchars($folderName.$mediaFile)."', $imgwidth, $imgheight);\">".$mediaFile."</a>";
print"<br /><br />";
}
}
@@ -1028,7 +1028,7 @@ function show_mediaUpload_form($URL='media.php', $showthumb=false) {
if (empty($filesize)) $filesize = "2M";
// Print the form
- echo '<form name="uploadmedia" enctype="multipart/form-data" method="post" action="', encode_url($URL), '">';
+ echo '<form name="uploadmedia" enctype="multipart/form-data" method="post" action="', $URL, '">';
echo '<input type="hidden" name="action" value="upload" />';
echo '<input type="hidden" name="showthumb" value="', $showthumb, '" />';
echo '<table class="list_table ', $TEXT_DIRECTION, ' width100">';
@@ -1083,20 +1083,20 @@ function show_mediaUpload_form($URL='media.php', $showthumb=false) {
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 '<span dir="ltr"><select name="folder_list', $i, '" onchange="document.uploadmedia.folder', $i, '.value=this.options[this.selectedIndex].value;">';
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";
+ if (WT_USER_IS_ADMIN) echo '<option value="other" disabled>', i18n::translate('Other folder... please type in'), "</option>";
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 '>', $f, "</option>";
}
}
- print "</select></span>\n";
+ print "</select></span>";
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>';
@@ -1135,15 +1135,15 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
$AUTO_GENERATE_THUMBS=get_gedcom_setting(WT_GED_ID, 'AUTO_GENERATE_THUMBS');
// NOTE: add a table and form to easily add new values to the table
- echo "<form method=\"post\" name=\"newmedia\" action=\"addmedia.php\" enctype=\"multipart/form-data\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"", $action, "\" />\n";
- echo "<input type=\"hidden\" name=\"ged\" value=\"", WT_GEDCOM, "\" />\n";
- echo "<input type=\"hidden\" name=\"pid\" value=\"", $pid, "\" />\n";
+ echo "<form method=\"post\" name=\"newmedia\" action=\"addmedia.php\" enctype=\"multipart/form-data\">";
+ echo "<input type=\"hidden\" name=\"action\" value=\"", $action, "\" />";
+ echo "<input type=\"hidden\" name=\"ged\" value=\"", WT_GEDCOM, "\" />";
+ echo "<input type=\"hidden\" name=\"pid\" value=\"", $pid, "\" />";
if (!empty($linktoid)) {
- echo "<input type=\"hidden\" name=\"linktoid\" value=\"", $linktoid, "\" />\n";
+ echo "<input type=\"hidden\" name=\"linktoid\" value=\"", $linktoid, "\" />";
}
- echo "<input type=\"hidden\" name=\"level\" value=\"", $level, "\" />\n";
- echo "<table class=\"facts_table center ", $TEXT_DIRECTION, "\">\n";
+ echo "<input type=\"hidden\" name=\"level\" value=\"", $level, "\" />";
+ echo "<table class=\"facts_table center ", $TEXT_DIRECTION, "\">";
echo "<tr><td class=\"topbottombar\" colspan=\"2\">";
if ($action == "newentry") {
echo i18n::translate('Add a new media item');
@@ -1159,7 +1159,7 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
print_findindi_link("gid", "");
print_findfamily_link("gid");
print_findsource_link("gid");
- echo "<br /><sub>", i18n::translate('Enter or search for the ID of the person, family, or source to which this media item should be linked.'), "</sub></td></tr>\n";
+ echo "<br /><sub>", i18n::translate('Enter or search for the ID of the person, family, or source to which this media item should be linked.'), "</sub></td></tr>";
}
$gedrec=find_gedcom_record($pid, WT_GED_ID, true);
@@ -1233,11 +1233,11 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
$folder = $parts["dirname"] . "/";
}
- echo "\n<tr>";
- echo "<td class=\"descriptionbox $TEXT_DIRECTION wrap width25\">\n";
+ echo "<tr>";
+ echo "<td class=\"descriptionbox $TEXT_DIRECTION wrap width25\">";
echo "<input name=\"oldFilename\" type=\"hidden\" value=\"" . htmlspecialchars($fileName) . "\" />";
echo i18n::translate('File name on server'), help_link('upload_server_file');
- echo "</td>\n";
+ echo "</td>";
echo "<td class=\"optionbox wrap $TEXT_DIRECTION wrap\">";
if (WT_USER_GEDCOM_ADMIN) {
echo "<input name=\"filename\" type=\"text\" value=\"" . htmlspecialchars($fileName) . "\" size=\"40\"";
@@ -1273,11 +1273,11 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
//-- don't let regular users change the location of media items
if ($action!='update' || WT_USER_GEDCOM_ADMIN) {
$mediaFolders = get_media_folders();
- echo '<span dir="ltr"><select name="folder_list" onchange="document.newmedia.folder.value=this.options[this.selectedIndex].value;">', "\n";
+ echo '<span dir="ltr"><select name="folder_list" onchange="document.newmedia.folder.value=this.options[this.selectedIndex].value;">';
echo '<option';
if ($folder == '/') echo ' selected="selected"';
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";
+ if (WT_USER_IS_ADMIN) echo '<option value="other" disabled>', i18n::translate('Other folder... please type in'), "</option>";
foreach ($mediaFolders as $f) {
if (!strpos($f, ".svn")) { //Do not print subversion directories
// Strip $MEDIA_DIRECTORY from the folder name
@@ -1286,10 +1286,10 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
echo '<option value="', $f, '"';
if ($folder == $f && $f != '/')
echo ' selected="selected"';
- echo '>', $f, "</option>\n";
+ echo '>', $f, "</option>";
}
}
- print "</select></span>\n";
+ print "</select></span>";
}
else echo $folder;
echo '<input name="oldFolder" type="hidden" value="', addslashes($folder), '" />';
@@ -1468,18 +1468,18 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
}
if (WT_USER_IS_ADMIN) {
echo "<tr><td class=\"descriptionbox ", $TEXT_DIRECTION, " wrap width25\">";
- echo i18n::translate('Admin Option'), help_link('no_update_CHAN'), "</td><td class=\"optionbox wrap\">\n";
+ echo i18n::translate('Admin Option'), help_link('no_update_CHAN'), "</td><td class=\"optionbox wrap\">";
if ($NO_UPDATE_CHAN) {
- echo "<input type=\"checkbox\" checked=\"checked\" name=\"preserve_last_changed\" />\n";
+ echo "<input type=\"checkbox\" checked=\"checked\" name=\"preserve_last_changed\" />";
} else {
- echo "<input type=\"checkbox\" name=\"preserve_last_changed\" />\n";
+ echo "<input type=\"checkbox\" name=\"preserve_last_changed\" />";
}
- echo i18n::translate('Do not update the CHAN (Last Change) record'), "<br />\n";
+ echo i18n::translate('Do not update the CHAN (Last Change) record'), "<br />";
$event = new Event(get_sub_record(1, "1 CHAN", $gedrec));
echo format_fact_date($event, false, true);
- echo "</td></tr>\n";
+ echo "</td></tr>";
}
- print "</table>\n";
+ print "</table>";
?>
<script language="JavaScript" type="text/javascript">
var formid = '<?php echo $formid; ?>';
@@ -1502,7 +1502,7 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid =
print_add_layer("SHARED_NOTE", 1);
print_add_layer("RESN", 1);
print "<input type=\"submit\" value=\"" . i18n::translate('Save') . "\" />";
- print "</form>\n";
+ print "</form>";
}
// looks in both the standard and protected media directories
@@ -1583,7 +1583,7 @@ function PrintMediaLinks($links, $size = "small") {
if ($prev_record && $prev_record->getType()!=$record->getType()) {
echo '<br />';
}
- echo '<br /><a href="', encode_url($record->getLinkUrl()), '">';
+ echo '<br /><a href="', $record->getHtmlUrl(), '">';
switch ($record->getType()) {
case 'INDI':
echo i18n::translate('View Person');
diff --git a/includes/functions/functions_places.php b/includes/functions/functions_places.php
index feae04b1bf..eada0cb502 100644
--- a/includes/functions/functions_places.php
+++ b/includes/functions/functions_places.php
@@ -289,7 +289,7 @@ function print_place_subfields($element_id) {
$cols=40;
print "&nbsp;<a href=\"javascript:;\" onclick=\"expand_layer('".$element_id."_div'); toggleplace('".$element_id."'); return false;\"><img id=\"".$element_id."_div_img\" src=\"".$WT_IMAGES["plus"]."\" border=\"0\" width=\"11\" height=\"11\" alt=\"\" title=\"\" />&nbsp;</a>";
- print "<br /><div id=\"".$element_id."_div\" style=\"display: none; border-width:thin; border-style:none; padding:0px\">\n";
+ print "<br /><div id=\"".$element_id."_div\" style=\"display: none; border-width:thin; border-style:none; padding:0px\">";
// subtags creation : _0 _1 _2 etc...
$icountry=-1;
$istate=-1;
@@ -326,28 +326,28 @@ function print_place_subfields($element_id) {
print " onblur=\"updatewholeplace('".$element_id."'); splitplace('".$element_id."');\" ";
print " onchange=\"updatewholeplace('".$element_id."'); splitplace('".$element_id."');\" ";
print " onmouseout=\"updatewholeplace('".$element_id."'); splitplace('".$element_id."');\" ";
- if ($icountry<$i and $i<=$icity) print " acdropdown=\"true\" autocomplete_list=\"url:".encode_url("places/getdata.php?localized=".WT_LOCALE."&field={$subtagname}&s=")."\" autocomplete=\"off\" autocomplete_matchbegin=\"false\"";
- print " />\n";
+ if ($icountry<$i and $i<=$icity) print " acdropdown=\"true\" autocomplete_list=\"url:places/getdata.php?localized=".WT_LOCALE."&amp;field={$subtagname}&amp;s=\" autocomplete=\"off\" autocomplete_matchbegin=\"false\"";
+ print " />";
// country selector
if ($i==$icountry) {
print " <img id=\"".$element_id."_PLAC_CTRY_flag\" name=\"".$element_id."_PLAC_CTRY_flag\" src=\"places/flags/blank.gif\" class=\"brightflag border1\" style=\"vertical-align:bottom\" alt=\"\" /> ";
print "<select id=\"".$subtagid."_select\" name=\"".$subtagname."_select\" class=\"submenuitem\"";
print " onchange=\"setPlaceCountry(this.value, '".$element_id."');\"";
- print " >\n";
- print "<option value=\"???\">??? : ".i18n::translate('???')."</option>\n";
+ print " >";
+ print "<option value=\"???\">??? : ".i18n::translate('???')."</option>";
foreach (array_keys($iso3166) as $alpha3) {
if ($alpha3!="???") {
$txt=$alpha3." : ".i18n::translate($alpha3);
if (utf8_strlen($txt)>32) $txt = utf8_substr($txt, 0, 32).i18n::translate('…');
- print "<option value=\"".$alpha3."\">".$txt."</option>\n";
+ print "<option value=\"".$alpha3."\">".$txt."</option>";
}
}
- print "</select>\n";
+ print "</select>";
} else {
print_specialchar_link($subtagid, false);
}
// clickable map
- if ($i<$icountry or $i>$icounty) print "<br />\n";
+ if ($i<$icountry or $i>$icounty) print "<br />";
else print "<div id='".$subtagname."_div' name='".$subtagname."_div' style='overflow:hidden; height:32px; width:auto; border-width:thin; border-style:none;'><img name='".$subtagname."_img' src='".$WT_IMAGES["spacer"]."' usemap='usemap' border='0' alt='' title='' style='height:inherit; width:inherit;' /></div>";
}
print "</div>";
@@ -359,13 +359,13 @@ function print_place_subfields($element_id) {
*/
function get_place_url($gedcom_place) {
global $GEDCOM;
- $exp = explode(",", $gedcom_place);
+ $exp = explode(', ', $gedcom_place);
$level = count($exp);
- $url = "placelist.php?action=show&level=".$level;
+ $url = "placelist.php?action=show&amp;level=".$level;
for ($i=0; $i<$level; $i++) {
- $url .= "&parent[".$i."]=".trim($exp[$level-$i-1]);
+ $url .= "&amp;parent[".$i."]=".rawurlencode($exp[$level-$i-1]);
}
- $url .= "&ged=".$GEDCOM;
+ $url .= "&amp;ged=".rawurlencode($GEDCOM);
return $url;
}
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index c0e061cc89..a62fe6c2d0 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -104,35 +104,35 @@ function print_pedigree_person($pid, $style=1, $count=0, $personcount="1") {
// NOTE: Start div I.$pid.$personcount.$count.links
$personlinks .= "<table class=\"person_box$isF\"><tr><td class=\"details1\">";
// NOTE: Zoom
- $personlinks .= "<a href=\"".encode_url("pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged={$GEDCOM}")."\" $mouseAction1><b>".i18n::translate('Pedigree Tree')."</b></a>";
+ $personlinks .= "<a href=\"pedigree.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&Pamp;EDIGREE_GENERATIONS={$OLD_PGENS}&amp;talloffset={$talloffset}&amp;ged={$GEDCOM}\" $mouseAction1><b>".i18n::translate('Pedigree Tree')."</b></a>";
if (file_exists(WT_ROOT.'modules/googlemap/pedigree_map.php')) {
- $personlinks .= "<br /><a href=\"".encode_url("module.php?mod=googlemap&mod_action=pedigree_map&rootid={$pid}&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Pedigree Map')."</b></a>";
+ $personlinks .= "<br /><a href=\"module.php?mod=googlemap&amp;mod_action=pedigree_map&amp;rootid={$pid}&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Pedigree Map')."</b></a>";
}
$username = WT_USER_NAME;
if (!empty($username)) {
$myid=WT_USER_GEDCOM_ID;
if ($myid && $myid!=$pid) {
- $personlinks .= "<br /><a href=\"".encode_url("relationship.php?show_full={$PEDIGREE_FULL_DETAILS}&pid1={$myid}&pid2={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&pretty=2&followspouse=1&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Relationship to me')."</b></a>";
+ $personlinks .= "<br /><a href=\"relationship.php?show_full={$PEDIGREE_FULL_DETAILS}&amp;pid1={$myid}&amp;pid2={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;pretty=2&amp;followspouse=1&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Relationship to me')."</b></a>";
}
}
- $personlinks .= "<br /><a href=\"".encode_url("descendancy.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged={$GEDCOM}")."\" $mouseAction1><b>".i18n::translate('Descendancy chart')."</b></a><br />";
+ $personlinks .= "<br /><a href=\"descendancy.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;generations={$generations}&amp;box_width={$box_width}&amp;ged={$GEDCOM}\" $mouseAction1><b>".i18n::translate('Descendancy chart')."</b></a><br />";
if (file_exists(WT_ROOT.'ancestry.php')) {
- $personlinks .= "<a href=\"".encode_url("ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Ancestry chart')."</b></a><br />";
+ $personlinks .= "<a href=\"ancestry.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Ancestry chart')."</b></a><br />";
}
if (file_exists(WT_ROOT.'compact.php')) {
- $personlinks .= "<a href=\"".encode_url("compact.php?rootid={$pid}&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Compact Chart')."</b></a><br />";
+ $personlinks .= "<a href=\"compact.php?rootid={$pid}&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Compact Chart')."</b></a><br />";
}
if (file_exists(WT_ROOT.'fanchart.php') and defined("IMG_ARC_PIE") and function_exists("imagettftext")) {
- $personlinks .= "<a href=\"".encode_url("fanchart.php?rootid={$pid}&PEDIGREE_GENERATIONS={$OLD_PGENS}&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Circle diagram')."</b></a><br />";
+ $personlinks .= "<a href=\"fanchart.php?rootid={$pid}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Circle diagram')."</b></a><br />";
}
if (file_exists(WT_ROOT.'hourglass.php')) {
- $personlinks .= "<a href=\"".encode_url("hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged={$GEDCOM}&show_spouse={$show_spouse}")."\" ".$mouseAction1."><b>".i18n::translate('Hourglass chart')."</b></a><br />";
+ $personlinks .= "<a href=\"hourglass.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged={$GEDCOM}&amp;show_spouse={$show_spouse}\" ".$mouseAction1."><b>".i18n::translate('Hourglass chart')."</b></a><br />";
}
if (file_exists(WT_ROOT.'treenav.php')) {
- $personlinks .= "<a href=\"".encode_url("treenav.php?rootid={$pid}&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Interactive tree')."</b></a><br />";
+ $personlinks .= "<a href=\"treenav.php?rootid={$pid}&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Interactive tree')."</b></a><br />";
}
$fams = $person->getSpouseFamilies();
@@ -144,9 +144,9 @@ function print_pedigree_person($pid, $style=1, $count=0, $personcount="1") {
$children = $family->getChildren();
$num = count($children);
if ((!empty($spouse))||($num>0)) {
- $personlinks .= "<a href=\"".encode_url("family.php?famid={$famid}&show_full=1&ged={$GEDCOM}")."\" ".$mouseAction1."><b>".i18n::translate('Family with spouse')."</b></a><br />";
+ $personlinks .= "<a href=\"family.php?famid={$famid}&amp;show_full=1&amp;ged={$GEDCOM}\" ".$mouseAction1."><b>".i18n::translate('Family with spouse')."</b></a><br />";
if (!empty($spouse)) {
- $personlinks .= "<a href=\"".encode_url($spouse->getLinkUrl())."\" $mouseAction1>";
+ $personlinks .= "<a href=\"".$spouse->getHtmlUrl()."\" $mouseAction1>";
if ($spouse->canDisplayName()) $personlinks .= PrintReady($spouse->getFullName());
else $personlinks .= i18n::translate('Private');
$personlinks .= "</a><br />";
@@ -154,7 +154,7 @@ function print_pedigree_person($pid, $style=1, $count=0, $personcount="1") {
}
/* @var $child Person */
foreach($children as $c=>$child) {
- $personlinks .= "&nbsp;&nbsp;<a href=\"".encode_url($child->getLinkUrl())."\" $mouseAction1>";
+ $personlinks .= "&nbsp;&nbsp;<a href=\"".$child->getHtmlUrl()."\" $mouseAction1>";
if ($child->canDisplayName()) $personlinks .= PrintReady($child->getFullName());
else $personlinks .= i18n::translate('Private');
$personlinks .= "<br /></a>";
@@ -183,32 +183,32 @@ function print_pedigree_person($pid, $style=1, $count=0, $personcount="1") {
if ($LINK_ICONS!="disabled") {
$click_link="javascript:;";
if (WT_SCRIPT_NAME=='pedigree.php') {
- $click_link=encode_url("pedigree.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&PEDIGREE_GENERATIONS={$OLD_PGENS}&talloffset={$talloffset}&ged={$GEDCOM}");
+ $click_link="pedigree.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;talloffset={$talloffset}&amp;ged={$GEDCOM}";
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='hourglass.php') {
- $click_link=encode_url("hourglass.php?pid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&generations={$generations}&box_width={$box_width}&ged={$GEDCOM}");
+ $click_link="hourglass.php?pid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;generations={$generations}&amp;box_width={$box_width}&amp;ged={$GEDCOM}";
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='ancestry.php') {
- $click_link=encode_url("ancestry.php?rootid={$pid}&show_full={$PEDIGREE_FULL_DETAILS}&chart_style={$chart_style}&PEDIGREE_GENERATIONS={$OLD_PGENS}&box_width={$box_width}&ged={$GEDCOM}");
+ $click_link="ancestry.php?rootid={$pid}&amp;show_full={$PEDIGREE_FULL_DETAILS}&amp;chart_style={$chart_style}&amp;PEDIGREE_GENERATIONS={$OLD_PGENS}&amp;box_width={$box_width}&amp;ged={$GEDCOM}";
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='descendancy.php') {
- $click_link=encode_url("descendancy.php?&show_full={$PEDIGREE_FULL_DETAILS}&pid={$pid}&agenerations={$generations}&box_width={$box_width}&ged={$GEDCOM}");
+ $click_link="descendancy.php?show_full={$PEDIGREE_FULL_DETAILS}&amp;pid={$pid}&amp;generations={$generations}&box_width={$box_width}&amp;ged={$GEDCOM}";
$whichID=$pid;
}
if (WT_SCRIPT_NAME=='family.php' && !empty($famid)) {
- $click_link=encode_url("family.php?famid={$famid}&show_full=1&ged={$GEDCOM}");
+ $click_link="family.php?famid={$famid}&amp;show_full=1&amp;ged={$GEDCOM}";
$whichID=$famid;
}
if (WT_SCRIPT_NAME=='individual.php') {
- $click_link=encode_url("individual.php?pid={$pid}&ged={$GEDCOM}");
+ $click_link="individual.php?pid={$pid}&amp;ged={$GEDCOM}";
$whichID=$pid;
}
@@ -263,7 +263,7 @@ function print_pedigree_person($pid, $style=1, $count=0, $personcount="1") {
if (WT_USE_LIGHTBOX) {
$thumbnail .= "<a href=\"" . $object["file"] . "\" rel=\"clearbox[general_2]\" rev=\"" . $object['mid'] . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "\">";
} else if (!empty($object['mid']) && $USE_MEDIA_VIEWER) {
- $thumbnail .= "<a href=\"".encode_url("mediaviewer.php?mid=".$object['mid'])."\" >";
+ $thumbnail .= "<a href=\"mediaviewer.php?mid=".$object['mid']."\" >";
} else {
$thumbnail .= "<a href=\"javascript:;\" onclick=\"return openImage('".rawurlencode($object["file"])."', $imgwidth, $imgheight);\">";
}
@@ -786,7 +786,8 @@ function print_favorite_selector($option=0) {
$menu->addSubMenu($submenu);
if ($gid!='') {
- $submenu = new Menu('<em>'.i18n::translate('Add to My Favorites').'</em>', encode_url(WT_SCRIPT_NAME.normalize_query_string($QUERY_STRING.'&amp;action=addfav&amp;gid='.$gid)), "right");
+ $url=$url=WT_SCRIPT_NAME.'?'.get_query_string(array('action'=>'addfav', 'gid'=>$gid));
+ $submenu = new Menu('<em>'.i18n::translate('Add to My Favorites').'</em>', $url, "right");
$submenu->addClass("favsubmenuitem", "favsubmenuitem_hover");
$menu->addSubMenu($submenu);
}
@@ -795,14 +796,14 @@ function print_favorite_selector($option=0) {
$GEDCOM = $favorite["file"];
$submenu = new Menu();
if ($favorite["type"]=="URL" && !empty($favorite["url"])) {
- $submenu->addLink(encode_url($favorite["url"]));
+ $submenu->addLink($favorite["url"]);
$submenu->addLabel(PrintReady($favorite["title"]), "right");
$submenu->addClass("favsubmenuitem", "favsubmenuitem_hover");
$menu->addSubMenu($submenu);
} else {
$record=GedcomRecord::getInstance($favorite["gid"]);
if ($record && $record->canDisplayName()) {
- $submenu->addLink(encode_url($record->getLinkUrl()));
+ $submenu->addLink($record->getHtmlUrl());
$slabel = PrintReady($record->getFullName());
$submenu->addLabel($slabel, "right");
$submenu->addClass("favsubmenuitem", "favsubmenuitem_hover");
@@ -822,14 +823,14 @@ function print_favorite_selector($option=0) {
$GEDCOM = $favorite["file"];
$submenu = new Menu();
if ($favorite["type"]=="URL" && !empty($favorite["url"])) {
- $submenu->addLink(encode_url($favorite["url"]));
+ $submenu->addLink($favorite["url"]);
$submenu->addLabel(PrintReady($favorite["title"]), "right");
$submenu->addClass("favsubmenuitem", "favsubmenuitem_hover");
$menu->addSubMenu($submenu);
} else {
$record=GedcomRecord::getInstance($favorite["gid"]);
if ($record && $record->canDisplayName()) {
- $submenu->addLink(encode_url($record->getLinkUrl()));
+ $submenu->addLink($record->getHtmlUrl());
$slabel = PrintReady($record->getFullName());
$submenu->addLabel($slabel, "right");
$submenu->addClass("favsubmenuitem", "favsubmenuitem_hover");
@@ -855,7 +856,7 @@ function print_favorite_selector($option=0) {
foreach($userfavs as $key=>$favorite) {
$GEDCOM = $favorite["file"];
if ($favorite["type"]=="URL" && !empty($favorite["url"])) {
- echo "<option value=\"", encode_url($favorite["url"]), "\">", PrintReady($favorite["title"]);
+ echo "<option value=\"", $favorite["url"], "\">", PrintReady($favorite["title"]);
echo "</option>";
} else {
switch ($favorite['type']) {
@@ -880,7 +881,7 @@ function print_favorite_selector($option=0) {
}
if ($record && $record->canDisplayName()) {
$name=$record->getFullName();
- echo "<option value=\"", encode_url($record->getLinkUrl()), "\">", $name, "</option>";
+ echo "<option value=\"", $record->getHtmlUrl(), "\">", $name, "</option>";
}
}
}
@@ -892,13 +893,13 @@ function print_favorite_selector($option=0) {
echo "<optgroup label=\"", i18n::translate('This GEDCOM\'s Favorites'), "\">";
foreach($gedcomfavs as $key=>$favorite) {
if ($favorite["type"]=="URL" && !empty($favorite["url"])) {
- echo "<option value=\"", encode_url($favorite["url"]), "\">", PrintReady($favorite["title"]);
+ echo "<option value=\"", $favorite["url"], "\">", PrintReady($favorite["title"]);
echo "</option>";
} else {
$record=GedcomRecord::getInstance($favorite["gid"]);
if ($record && $record->canDisplayName()) {
$name=$record->getFullName();
- echo "<option value=\"", encode_url($record->getLinkUrl()), "\">", $name, "</option>";
+ echo "<option value=\"", $record->getHtmlUrl(), "\">", $name, "</option>";
}
}
}
@@ -1437,7 +1438,7 @@ function print_asso_rela_record($pid, $factrec, $linebr=false, $type='INDI') {
} else {
$label='';
}
- echo '<a href="', $person->getLinkUrl().'">', $name, $relationship, '</a><br />', $label;
+ echo '<a href="', $person->getHtmlUrl().'">', $name, $relationship, '</a><br />', $label;
}
// Level 2 ASSO
@@ -1491,7 +1492,7 @@ function print_asso_rela_record($pid, $factrec, $linebr=false, $type='INDI') {
}
break;
}
- echo '<br/>', $label, '<a href="', $person->getLinkUrl().'">', $name, '</a>', $relationship;
+ echo '<br/>', $label, '<a href="', $person->getHtmlUrl().'">', $name, '</a>', $relationship;
} else {
echo '<br/>', $label, $amatch[1];
}
@@ -1709,19 +1710,17 @@ function format_fact_place(&$eventObj, $anchor=false, $sub=false, $lds=false) {
$ct = preg_match("/2 PLAC (.*)/", $factrec, $match);
if ($ct>0) {
$html.=' ';
- $levels = explode(',', $match[1]);
+ $levels = explode(', ', $match[1]);
if ($anchor && (empty($SEARCH_SPIDER))) {
$place = trim($match[1]);
// reverse the array so that we get the top level first
$levels = array_reverse($levels);
- $tempURL = "placelist.php?action=show&";
+ $tempURL = "placelist.php?action=show&amp;";
foreach($levels as $pindex=>$ppart) {
- // routine for replacing ampersands
- $ppart = preg_replace("/amp\%3B/", "", trim($ppart));
- $tempURL .= "parent[{$pindex}]=".PrintReady($ppart).'&';
+ $tempURL .= "parent[{$pindex}]=".rawurlencode($ppart).'&amp;';
}
$tempURL .= 'level='.count($levels);
- $html .= '<a href="'.encode_url($tempURL).'"> '.PrintReady($place).'</a>';
+ $html .= '<a href="'.$tempURL.'"> '.PrintReady($place).'</a>';
} else {
if (!$SEARCH_SPIDER) {
$html.=' -- ';
@@ -1771,10 +1770,10 @@ function format_fact_place(&$eventObj, $anchor=false, $sub=false, $lds=false) {
if ($map_lati && $map_long && empty($SEARCH_SPIDER)) {
$map_lati=trim(strtr($map_lati, "NSEW,�", " - -. ")); // S5,6789 ==> -5.6789
$map_long=trim(strtr($map_long, "NSEW,�", " - -. ")); // E3.456� ==> 3.456
- $html.=' <a target="_BLANK" href="'.encode_url("http://www.mapquest.com/maps/map.adp?searchtype=address&formtype=latlong&latlongtype=decimal&latitude={$map_lati}&longitude={$map_long}").'"><img src="images/mapq.gif" border="0" alt="Mapquest &copy;" title="Mapquest &copy;" /></a>';
- $html.=' <a target="_BLANK" href="'.encode_url("http://maps.google.com/maps?q={$map_lati},{$map_long}(".encode_url($place).")").'"><img src="images/bubble.gif" border="0" alt="Google Maps &copy;" title="Google Maps &copy;" /></a>';
- $html.=' <a target="_BLANK" href="'.encode_url("http://www.multimap.com/map/browse.cgi?lat={$map_lati}&lon={$map_long}&scale=&icon=x").'"><img src="images/multim.gif" border="0" alt="Multimap &copy;" title="Multimap &copy;" /></a>';
- $html.=' <a target="_BLANK" href="'.encode_url("http://www.terraserver.com/imagery/image_gx.asp?cpx={$map_long}&cpy={$map_lati}&res=30&provider_id=340").'"><img src="images/terrasrv.gif" border="0" alt="TerraServer &copy;" title="TerraServer &copy;" /></a>';
+ $html.=' <a target="_BLANK" href="'."http://www.mapquest.com/maps/map.adp?searchtype=address&amp;formtype=latlong&amp;latlongtype=decimal&amp;latitude={$map_lati}&amp;longitude={$map_long}".'"><img src="images/mapq.gif" border="0" alt="Mapquest &copy;" title="Mapquest &copy;" /></a>';
+ $html.=' <a target="_BLANK" href="'."http://maps.google.com/maps?q={$map_lati},{$map_long}(".rawurlencode($place).")".'"><img src="images/bubble.gif" border="0" alt="Google Maps &copy;" title="Google Maps &copy;" /></a>';
+ $html.=' <a target="_BLANK" href="'."http://www.multimap.com/map/browse.cgi?lat={$map_lati}&amp;lon={$map_long}&amp;scale=&amp;icon=x".'"><img src="images/multim.gif" border="0" alt="Multimap &copy;" title="Multimap &copy;" /></a>';
+ $html.=' <a target="_BLANK" href="'."http://www.terraserver.com/imagery/image_gx.asp?cpx={$map_long}&amp;cpy={$map_lati}&amp;res=30&amp;provider_id=340".'"><img src="images/terrasrv.gif" border="0" alt="TerraServer &copy;" title="TerraServer &copy;" /></a>';
}
if (preg_match('/\d NOTE (.*)/', $placerec, $match)) {
ob_start();
diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php
index 39f7eefdbb..b287458f91 100644
--- a/includes/functions/functions_print_facts.php
+++ b/includes/functions/functions_print_facts.php
@@ -141,8 +141,8 @@ function print_fact(&$eventObj, $noedit=false) {
$factref = $fact;
if ($styleadd=="") $rowID = "row_".floor(microtime()*1000000);
else $rowID = "row_".$styleadd;
- echo "\n\t\t<tr class=\"", $rowID, "\">";
- echo "\n\t\t\t<td class=\"descriptionbox $styleadd width20\">";
+ echo "<tr class=\"", $rowID, "\">";
+ echo "<td class=\"descriptionbox $styleadd width20\">";
if ($SHOW_FACT_ICONS)
echo $eventObj->Icon(), ' ';
if (!$noedit && WT_USER_CAN_EDIT && $styleadd!="change_old" && $linenum>0 && $eventObj->canEdit()) {
@@ -165,7 +165,7 @@ function print_fact(&$eventObj, $noedit=false) {
else $factref = $fact;
if ($styleadd=="") $rowID = "row_".floor(microtime()*1000000);
else $rowID = "row_".$styleadd;
- echo "\n\t\t<tr class=\"", $rowID, "\">";
+ echo "<tr class=\"", $rowID, "\">";
echo "<td class=\"descriptionbox $styleadd width20\">";
if ($SHOW_FACT_ICONS)
echo $eventObj->Icon(), ' ';
@@ -215,7 +215,7 @@ function print_fact(&$eventObj, $noedit=false) {
if (preg_match("/_WTS @(.*)@/", $factrec, $match)) {
$spouse=Person::getInstance($match[1]);
if ($spouse) {
- echo " <a href=\"", encode_url($spouse->getLinkUrl()), "\">";
+ echo " <a href=\"", $spouse->getHtmlUrl(), "\">";
if ($spouse->canDisplayName()) {
echo PrintReady($spouse->getFullName());
} else {
@@ -225,7 +225,7 @@ function print_fact(&$eventObj, $noedit=false) {
}
if ($spouse) echo " - ";
if (empty($SEARCH_SPIDER)) {
- echo "<a href=\"", encode_url("family.php?famid={$pid}"), "\">";
+ echo "<a href=\"family.php?famid={$pid}\">";
echo i18n::translate('View Family');
echo "</a>";
echo "<br />";
@@ -241,7 +241,7 @@ function print_fact(&$eventObj, $noedit=false) {
$gedrec=GedcomRecord::getInstance($match[1]);
if (is_object($gedrec)) {
if ($gedrec->getType()=='INDI') {
- echo '<a href="', encode_url($gedrec->getLinkUrl()), '">', $gedrec->getFullName(), '</a><br />';
+ echo '<a href="', $gedrec->getHtmlUrl(), '">', $gedrec->getFullName(), '</a><br />';
} elseif ($fact=='REPO') {
print_repository_record($match[1]);
} else {
@@ -294,14 +294,14 @@ function print_fact(&$eventObj, $noedit=false) {
if ($ct>0) echo PrintReady($match[1]);
// -- print PLACe, TEMPle and STATus
echo '<div class="place">', format_fact_place($eventObj, true, true, true), '</div>';
- if (preg_match("/ (PLAC)|(STAT)|(TEMP)|(SOUR) /", $factrec)>0 || ($event && $fact!="ADDR")) print "<br />\n";
+ if (preg_match("/ (PLAC)|(STAT)|(TEMP)|(SOUR) /", $factrec)>0 || ($event && $fact!="ADDR")) print "<br />";
// -- print BURIal -> CEMEtery
$ct = preg_match("/2 CEME (.*)/", $factrec, $match);
if ($ct>0) {
if ($SHOW_FACT_ICONS && file_exists(WT_THEME_DIR."images/facts/CEME.gif"))
//echo $eventObj->Icon(), ' '; // echo incorrect fact icon !!!
echo "<img src=\"".WT_THEME_DIR."images/facts/CEME.gif\" alt=\"".translate_fact('CEME')."\" title=\"".translate_fact('CEME')."\" align=\"middle\" /> ";
- echo "<b>", translate_fact('CEME'), ":</b> ", $match[1], "<br />\n";
+ echo "<b>", translate_fact('CEME'), ":</b> ", $match[1], "<br />";
}
//-- print address structure
if ($fact!="ADDR") {
@@ -331,7 +331,7 @@ function print_fact(&$eventObj, $noedit=false) {
echo "<br/><span class=\"label\">", translate_fact('FAMC'), ":</span> ";
$family=Family::getInstance($match[1]);
if ($family) { // May be a pointer to a non-existant record
- echo '<a href="', $family->getLinkUrl(), '">', $family->getFullName(), '</a>';
+ echo '<a href="', $family->getHtmlUrl(), '">', $family->getFullName(), '</a>';
} else {
echo '<span class="error">', $match[1], '</span>';
}
@@ -407,7 +407,7 @@ function print_fact(&$eventObj, $noedit=false) {
}
echo "<br />";
echo "</td>";
- echo "\n\t\t</tr>";
+ echo "</tr>";
}
//------------------- end print fact function
@@ -438,7 +438,7 @@ function print_submitter_info($sid) {
function print_repository_record($xref) {
$repository=Repository::getInstance($xref);
if ($repository && $repository->canDisplayDetails()) {
- echo '<a class="field" href="', $repository->getLinkUrl(), '">', $repository->getFullName(), '</a><br />';
+ echo '<a class="field" href="', $repository->getHtmlUrl(), '">', $repository->getFullName(), '</a><br />';
print_address_structure($repository->getGedcomRecord(), 1);
print_fact_notes($repository->getGedcomRecord(), 1);
}
@@ -483,7 +483,7 @@ function print_fact_sources($factrec, $level, $return=false) {
$srec = substr($factrec, $spos1, $spos2-$spos1);
$lt = preg_match_all("/$nlevel \w+/", $srec, $matches);
$data .= "<br />";
- $data .= "\n\t\t<span class=\"label\">";
+ $data .= "<span class=\"label\">";
$elementID = $sid."-".floor(microtime()*1000000);
if ($EXPAND_SOURCES) $plusminus="minus"; else $plusminus="plus";
if ($lt>0) {
@@ -494,7 +494,7 @@ function print_fact_sources($factrec, $level, $return=false) {
$data .= i18n::translate('Source').":</span> <span class=\"field\">";
$source=Source::getInstance($sid);
if ($source) {
- $data .= "<a href=\"".encode_url($source->getLinkUrl())."\">".PrintReady($source->getFullName())."</a>";
+ $data .= "<a href=\"".$source->getHtmlUrl()."\">".PrintReady($source->getFullName())."</a>";
} else {
$data .= $sid;
}
@@ -574,24 +574,24 @@ function print_media_links($factrec, $level, $pid='') {
//LBox -------- change for Lightbox Album --------------------------------------------
if (WT_USE_LIGHTBOX && preg_match("/\.(jpe?g|gif|png)$/i", $mainMedia)) {
$name = trim($row["m_titl"]);
- echo "<a href=\"" . $mainMedia . "\" rel=\"clearbox[general_1]\" rev=\"" . $media_id . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "\">" . "\n";
+ echo "<a href=\"" . $mainMedia . "\" rel=\"clearbox[general_1]\" rev=\"" . $media_id . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "\">";
} else if (WT_USE_LIGHTBOX && preg_match("/\.(pdf|avi|txt)$/i", $mainMedia)) {
require_once WT_ROOT.'modules/lightbox/lb_defaultconfig.php';
$name = trim($row["m_titl"]);
- echo "<a href=\"" . $mainMedia . "\" rel='clearbox({$LB_URL_WIDTH}, {$LB_URL_HEIGHT}, click)' rev=\"" . $media_id . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "\">" . "\n";
+ echo "<a href=\"" . $mainMedia . "\" rel='clearbox({$LB_URL_WIDTH}, {$LB_URL_HEIGHT}, click)' rev=\"" . $media_id . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name)) . "\">";
// extra for Streetview ----------------------------------------
} else if (WT_USE_LIGHTBOX && strpos($row["m_file"], 'http://maps.google.')===0) {
echo '<iframe style="float:left; padding:5px;" width="264" height="176" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="', $row["m_file"], '&amp;output=svembed"></iframe>';
// --------------------------------------------------------------------------------------
} else if ($USE_MEDIA_VIEWER) {
- echo "<a href=\"", encode_url("mediaviewer.php?mid={$media_id}"), "\">";
+ echo "<a href=\"mediaviewer.php?mid={$media_id}\">";
} else if (preg_match("/\.(jpe?g|gif|png)$/i", $mainMedia)) {
echo "<a href=\"javascript:;\" onclick=\"return openImage('", rawurlencode($mainMedia), "', $imgwidth, $imgheight);\">";
// extra for Streetview ----------------------------------------
} else if (strpos($row["m_file"], 'http://maps.google.')===0) {
echo '<iframe width="300" height="200" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="', $row["m_file"], '&amp;output=svembed"></iframe>';
} else {
- echo "<a href=\"", encode_url("mediaviewer.php?mid={$media_id}"), "\">";
+ echo "<a href=\"mediaviewer.php?mid={$media_id}\">";
}
echo "<img src=\"", $thumbnail, "\" border=\"0\" align=\"" , $TEXT_DIRECTION== "rtl"?"right": "left" , "\" class=\"thumbnail\"";
@@ -613,7 +613,7 @@ function print_media_links($factrec, $level, $pid='') {
}
echo "</td><td>";
if(empty($SEARCH_SPIDER)) {
- echo "<a href=\"", encode_url("mediaviewer.php?mid={$media_id}"), "\">";
+ echo "<a href=\"mediaviewer.php?mid={$media_id}\">";
}
if ($TEXT_DIRECTION=="rtl" && !hasRTLText($mediaTitle)) echo "<i>" , getLRM() , PrintReady($mediaTitle), "</i>";
else echo "<i>", PrintReady($mediaTitle), "</i><br />";
@@ -624,15 +624,15 @@ function print_media_links($factrec, $level, $pid='') {
echo print_fact_notes($row["m_gedrec"], 1);
// NOTE: echo the format of the media
if (!empty($row["m_ext"])) {
- echo "\n\t\t\t<br /><span class=\"label\">", translate_fact('FORM'), ": </span> <span class=\"field\">", $row["m_ext"], "</span>";
+ echo "<br /><span class=\"label\">", translate_fact('FORM'), ": </span> <span class=\"field\">", $row["m_ext"], "</span>";
if($imgsize[2]!==false) {
- echo "\n\t\t\t<span class=\"label\"><br />", i18n::translate('Image Dimensions'), ": </span> <span class=\"field\" style=\"direction: ltr;\">" , $imgsize[0] , ($TEXT_DIRECTION =="rtl"?(" " . getRLM() . "x" . getRLM() . " ") : " x ") , $imgsize[1] , "</span>";
+ echo "<span class=\"label\"><br />", i18n::translate('Image Dimensions'), ": </span> <span class=\"field\" style=\"direction: ltr;\">" , $imgsize[0] , ($TEXT_DIRECTION =="rtl"?(" " . getRLM() . "x" . getRLM() . " ") : " x ") , $imgsize[1] , "</span>";
}
}
if (preg_match('/2 DATE (.+)/', get_sub_record("FILE", 1, $row["m_gedrec"]), $match)) {
$media_date=new GedcomDate($match[1]);
$md = $media_date->Display(true);
- echo "\n\t\t\t<br /><span class=\"label\">", translate_fact('DATE'), ": </span> ", $md;
+ echo "<br /><span class=\"label\">", translate_fact('DATE'), ": </span> ", $md;
}
$ttype = preg_match("/".($nlevel+1)." TYPE (.*)/", $row["m_gedrec"], $match);
if ($ttype>0) {
@@ -643,16 +643,16 @@ function print_media_links($factrec, $level, $pid='') {
} else {
$mediaType = i18n::translate('Other');
}
- echo "\n\t\t\t<br /><span class=\"label\">", i18n::translate('Type'), ": </span> <span class=\"field\">$mediaType</span>";
+ echo "<br /><span class=\"label\">", i18n::translate('Type'), ": </span> <span class=\"field\">$mediaType</span>";
}
//echo "</span>";
- echo "<br />\n";
+ echo "<br />";
//-- print spouse name for marriage events
$ct = preg_match("/WT_SPOUSE: (.*)/", $factrec, $match);
if ($ct>0) {
$spouse=Person::getInstance($match[1]);
if ($spouse) {
- echo "<a href=\"", encode_url($spouse->getLinkUrl()), "\">";
+ echo "<a href=\"", $spouse->getHtmlUrl(), "\">";
if ($spouse->canDisplayName()) {
echo PrintReady($spouse->getFullName());
} else {
@@ -665,15 +665,15 @@ function print_media_links($factrec, $level, $pid='') {
if ($ct>0) {
$famid = trim($match[1]);
if(empty($SEARCH_SPIDER)) {
- echo "<a href=\"", encode_url("family.php?famid={$famid}"), "\">", i18n::translate('View Family');
- echo "</a>\n";
+ echo "<a href=\"family.php?famid={$famid}\">", i18n::translate('View Family');
+ echo "</a>";
}
}
}
- echo "<br />\n";
+ echo "<br />";
print_fact_notes($row["m_gedrec"], $nlevel);
print_fact_sources($row["m_gedrec"], $nlevel);
- echo "</td></tr></table>\n";
+ echo "</td></tr></table>";
}
$objectNum ++;
}
@@ -699,9 +699,9 @@ function print_address_structure($factrec, $level) {
for($i=0; $i<$ct; $i++) {
$arec = get_sub_record($level, "$level ADDR", $factrec, $i+1);
$resultText = "";
- if ($level>1) $resultText .= "\n\t\t<span class=\"label\">".translate_fact('ADDR').": </span><br /><div class=\"indent\">";
+ if ($level>1) $resultText .= "<span class=\"label\">".translate_fact('ADDR').": </span><br /><div class=\"indent\">";
$cn = preg_match("/$nlevel _NAME (.*)/", $arec, $cmatch);
- if ($cn>0) $resultText .= str_replace("/", "", $cmatch[1])."<br />\n";
+ if ($cn>0) $resultText .= str_replace("/", "", $cmatch[1])."<br />";
$resultText .= PrintReady(trim($omatch[$i][1]));
$cont = get_cont($nlevel, $arec);
if (!empty($cont)) $resultText .= str_replace(array(" ", "<br&nbsp;"), array("&nbsp;", "<br "), PrintReady($cont));
@@ -758,7 +758,7 @@ function print_address_structure($factrec, $level) {
$resultText .= "<br />".PrintReady($cmatch[1]);
}
}
- if ($level>1) $resultText .= "</div>\n";
+ if ($level>1) $resultText .= "</div>";
// Here we can examine the resultant text and remove empty tags
echo $resultText;
}
@@ -768,36 +768,36 @@ function print_address_structure($factrec, $level) {
if ($ct>0) {
for($i=0; $i<$ct; $i++) {
$resultText .= "<tr>";
- $resultText .= "\n\t\t<td><span class=\"label\"><b>".translate_fact('PHON').": </b></span></td><td><span class=\"field\">";
+ $resultText .= "<td><span class=\"label\"><b>".translate_fact('PHON').": </b></span></td><td><span class=\"field\">";
$resultText .= getLRM() . $omatch[$i][1] . getLRM();
- $resultText .= "</span></td></tr>\n";
+ $resultText .= "</span></td></tr>";
}
}
$ct = preg_match_all("/$level FAX (.*)/", $factrec, $omatch, PREG_SET_ORDER);
if ($ct>0) {
for($i=0; $i<$ct; $i++) {
$resultText .= "<tr>";
- $resultText .= "\n\t\t<td><span class=\"label\"><b>".translate_fact('FAX').": </b></span></td><td><span class=\"field\">";
+ $resultText .= "<td><span class=\"label\"><b>".translate_fact('FAX').": </b></span></td><td><span class=\"field\">";
$resultText .= getLRM() . $omatch[$i][1] . getLRM();
- $resultText .= "</span></td></tr>\n";
+ $resultText .= "</span></td></tr>";
}
}
$ct = preg_match_all("/$level EMAIL (.*)/", $factrec, $omatch, PREG_SET_ORDER);
if ($ct>0) {
for($i=0; $i<$ct; $i++) {
$resultText .= "<tr>";
- $resultText .= "\n\t\t<td><span class=\"label\"><b>".translate_fact('EMAIL').": </b></span></td><td><span class=\"field\">";
- $resultText .= "<a href=\"mailto:".$omatch[$i][1]."\">".$omatch[$i][1]."</a>\n";
- $resultText .= "</span></td></tr>\n";
+ $resultText .= "<td><span class=\"label\"><b>".translate_fact('EMAIL').": </b></span></td><td><span class=\"field\">";
+ $resultText .= "<a href=\"mailto:".$omatch[$i][1]."\">".$omatch[$i][1]."</a>";
+ $resultText .= "</span></td></tr>";
}
}
$ct = preg_match_all("/$level (WWW|URL) (.*)/", $factrec, $omatch, PREG_SET_ORDER);
if ($ct>0) {
for($i=0; $i<$ct; $i++) {
$resultText .= "<tr>";
- $resultText .= "\n\t\t<td><span class=\"label\"><b>".translate_fact($omatch[$i][1]).": </b></span></td><td><span class=\"field\">";
- $resultText .= "<a href=\"".$omatch[$i][2]."\" target=\"_blank\">".$omatch[$i][2]."</a>\n";
- $resultText .= "</span></td></tr>\n";
+ $resultText .= "<td><span class=\"label\"><b>".translate_fact($omatch[$i][1]).": </b></span></td><td><span class=\"field\">";
+ $resultText .= "<a href=\"".$omatch[$i][2]."\" target=\"_blank\">".$omatch[$i][2]."</a>";
+ $resultText .= "</span></td></tr>";
}
}
$resultText .= "</table>";
@@ -856,11 +856,11 @@ function print_main_sources($factrec, $level, $pid, $linenum, $noedit=false) {
echo "</div>";
} else {echo translate_fact($factname, $parent);}
echo "</td>";
- echo "\n\t\t\t<td class=\"optionbox $styleadd wrap\">";
- //echo "\n\t\t\t<td class=\"facts_value$styleadd\">";
+ echo "<td class=\"optionbox $styleadd wrap\">";
+ //echo "<td class=\"facts_value$styleadd\">";
$source=Source::getInstance($sid);
if ($source) {
- echo "<a href=\"", encode_url($source->getLinkUrl()), "\">", PrintReady($source->getFullName()), "</a>";
+ echo "<a href=\"", $source->getHtmlUrl(), "\">", PrintReady($source->getFullName()), "</a>";
// PUBL
$text = get_gedcom_value("PUBL", "1", $source->getGedcomRecord());
if (!empty($text)) {
@@ -879,7 +879,7 @@ function print_main_sources($factrec, $level, $pid, $linenum, $noedit=false) {
if ($cs>0) {
echo "<br /><span class=\"label\">", translate_fact('EVEN'), " </span><span class=\"field\">", $cmatch[1], "</span>";
$cs = preg_match("/".($nlevel+1)." ROLE (.*)/", $srec, $cmatch);
- if ($cs>0) echo "\n\t\t\t<br />&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"label\">", translate_fact('ROLE'), " </span><span class=\"field\">$cmatch[1]</span>";
+ if ($cs>0) echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"label\">", translate_fact('ROLE'), " </span><span class=\"field\">$cmatch[1]</span>";
}
if ($source) {
echo printSourceStructure(getSourceStructure($srec));
@@ -1093,7 +1093,7 @@ function print_main_notes($factrec, $level, $pid, $linenum, $noedit=false) {
}
$text .= get_cont(1, $noterec);
$text = expand_urls($text);
- $text = PrintReady($text)." <br />\n";
+ $text = PrintReady($text)." <br />";
// If Census assistant installed, and if Formatted Shared Note (using pipe "|" as delimiter) -------
if ( strstr($text, "|") && file_exists(WT_ROOT.'modules/GEDFact_assistant/_CENS/census_note_decode.php') ) {
require WT_ROOT.'modules/GEDFact_assistant/_CENS/census_note_decode.php';
@@ -1119,7 +1119,7 @@ function print_main_notes($factrec, $level, $pid, $linenum, $noedit=false) {
echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />';
echo help_link('RESN');
}
- echo "<br />\n";
+ echo "<br />";
print_fact_sources($nrec, $nlevel);
}
echo "</td></tr>";
@@ -1347,7 +1347,7 @@ function print_main_media_row($rtype, $rowm, $pid) {
$isExternal = isFileExternal($thumbnail);
$linenum = 0;
- echo "\n\t\t<tr><td class=\"descriptionbox $styleadd width20\">";
+ echo "<tr><td class=\"descriptionbox $styleadd width20\">";
if ($rowm['mm_gid']==$pid && WT_USER_CAN_EDIT && (!FactEditRestricted($rowm['m_media'], $rowm['m_gedrec'])) && ($styleadd!="change_old")) {
echo "<a onclick=\"return window.open('addmedia.php?action=editmedia&pid={$rowm['m_media']}&linktoid={$rowm['mm_gid']}', '_blank', 'top=50, left=50, width=600, height=500, resizable=1, scrollbars=1');\" href=\"javascript:;\" title=\"".i18n::translate('Edit')."\">";
echo "<img class=\"icon\" src=\"", $WT_IMAGES["media"], "\" alt=\"\" />". translate_fact('OBJE'). "</a>";
@@ -1411,7 +1411,7 @@ function print_main_media_row($rtype, $rowm, $pid) {
}
if(empty($SEARCH_SPIDER)) {
- echo "<a href=\"", encode_url("mediaviewer.php?mid={$rowm['m_media']}"), "\">";
+ echo "<a href=\"mediaviewer.php?mid={$rowm['m_media']}\">";
}
if ($TEXT_DIRECTION=="rtl" && !hasRTLText($mediaTitle)) {
echo "<i>", getLRM(), PrintReady(htmlspecialchars($mediaTitle));
@@ -1420,10 +1420,10 @@ function print_main_media_row($rtype, $rowm, $pid) {
}
$addtitle = get_gedcom_value("TITL:_HEB", 2, $rowm["m_gedrec"]);
if (empty($addtitle)) $addtitle = get_gedcom_value("TITL:_HEB", 1, $rowm["m_gedrec"]);
- if (!empty($addtitle)) echo "<br />\n", PrintReady(htmlspecialchars($addtitle));
+ if (!empty($addtitle)) echo "<br />", PrintReady(htmlspecialchars($addtitle));
$addtitle = get_gedcom_value("TITL:ROMN", 2, $rowm["m_gedrec"]);
if (empty($addtitle)) $addtitle = get_gedcom_value("TITL:ROMN", 1, $rowm["m_gedrec"]);
- if (!empty($addtitle)) echo "<br />\n", PrintReady(htmlspecialchars($addtitle));
+ if (!empty($addtitle)) echo "<br />", PrintReady(htmlspecialchars($addtitle));
echo "</i>";
if(empty($SEARCH_SPIDER)) {
echo "</a>";
@@ -1431,15 +1431,15 @@ function print_main_media_row($rtype, $rowm, $pid) {
// NOTE: echo the format of the media
if (!empty($rowm["m_ext"])) {
- echo "\n\t\t\t<br /><span class=\"label\">", translate_fact('FORM'), ": </span> <span class=\"field\">", $rowm["m_ext"], "</span>";
+ echo "<br /><span class=\"label\">", translate_fact('FORM'), ": </span> <span class=\"field\">", $rowm["m_ext"], "</span>";
if(isset($imgsize) and $imgsize[2]!==false) {
- echo "\n\t\t\t<span class=\"label\"><br />", i18n::translate('Image Dimensions'), ": </span> <span class=\"field\" style=\"direction: ltr;\">", $imgsize[0], $TEXT_DIRECTION =="rtl"?(" " . getRLM() . "x" . getRLM(). " ") : " x ", $imgsize[1], "</span>";
+ echo "<span class=\"label\"><br />", i18n::translate('Image Dimensions'), ": </span> <span class=\"field\" style=\"direction: ltr;\">", $imgsize[0], $TEXT_DIRECTION =="rtl"?(" " . getRLM() . "x" . getRLM(). " ") : " x ", $imgsize[1], "</span>";
}
}
if (preg_match('/2 DATE (.+)/', get_sub_record("FILE", 1, $rowm["m_gedrec"]), $match)) {
$media_date=new GedcomDate($match[1]);
$md = $media_date->Display(true);
- echo "\n\t\t\t<br /><span class=\"label\">", translate_fact('DATE'), ": </span> ", $md;
+ echo "<br /><span class=\"label\">", translate_fact('DATE'), ": </span> ", $md;
}
$ttype = preg_match("/\d TYPE (.*)/", $rowm["m_gedrec"], $match);
if ($ttype>0) {
@@ -1450,10 +1450,10 @@ function print_main_media_row($rtype, $rowm, $pid) {
} else {
$mediaType = i18n::translate('Other');
}
- echo "\n\t\t\t<br /><span class=\"label\">", i18n::translate('Type'), ": </span> <span class=\"field\">$mediaType</span>";
+ echo "<br /><span class=\"label\">", i18n::translate('Type'), ": </span> <span class=\"field\">$mediaType</span>";
}
echo "</span>";
- echo "<br />\n";
+ echo "<br />";
//-- print spouse name for marriage events
if ($rowm['mm_gid']!=$pid) {
$spouse=null;
@@ -1467,7 +1467,7 @@ function print_main_media_row($rtype, $rowm, $pid) {
}
}
if ($spouse) {
- echo "<a href=\"", $spouse->getLinkUrl(), "\">";
+ echo "<a href=\"", $spouse->getHtmlUrl(), "\">";
if ($spouse->canDisplayName()) {
echo PrintReady($spouse->getFullName());
} else {
@@ -1478,10 +1478,10 @@ function print_main_media_row($rtype, $rowm, $pid) {
if(empty($SEARCH_SPIDER)) {
if ($spouse) echo " - ";
$famid = $rowm['mm_gid'];
- echo "<a href=\"", encode_url("family.php?famid={$famid}"), "\">", i18n::translate('View Family');
- echo "</a>\n";
+ echo "<a href=\"family.php?famid={$famid}\">", i18n::translate('View Family');
+ echo "</a>";
}
- echo "<br />\n";
+ echo "<br />";
}
//-- don't show _PRIM option to regular users
if (WT_USER_GEDCOM_ADMIN) {
@@ -1489,7 +1489,7 @@ function print_main_media_row($rtype, $rowm, $pid) {
if (!empty($prim)) {
echo "<span class=\"label\">", translate_fact('_PRIM'), ":</span> ";
if ($prim=="Y") echo i18n::translate('Yes'); else echo i18n::translate('No');
- echo "<br />\n";
+ echo "<br />";
}
}
//-- don't show _THUM option to regular users
@@ -1498,7 +1498,7 @@ function print_main_media_row($rtype, $rowm, $pid) {
if (!empty($thum)) {
echo "<span class=\"label\">", translate_fact('_THUM'), ":</span> ";
if ($thum=="Y") echo i18n::translate('Yes'); else echo i18n::translate('No');
- echo "<br />\n";
+ echo "<br />";
}
}
print_fact_notes($rowm["m_gedrec"], 1);
diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php
index d921e476d2..1170b50788 100644
--- a/includes/functions/functions_print_lists.php
+++ b/includes/functions/functions_print_lists.php
@@ -126,7 +126,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo "<th class=\"list_label\" style=\"display:none\">BIRT</th>";
echo "<th class=\"list_label\" style=\"display:none\">DEAT</th>";
echo "<th class=\"list_label\" style=\"display:none\">TREE</th>";
- echo "</tr></thead>\n";
+ echo "</tr></thead>";
//-- table body
echo "<tbody>";
$hidden = 0;
@@ -198,7 +198,7 @@ function print_indi_table($datalist, $legend="", $option="") {
$class='list_item';
$sex_image='';
}
- echo '<a ', $title, ' href="', encode_url($person->getLinkUrl()), '" class="', $class, '">', PrintReady($name['list']), '</a>', $sex_image, "<br/>";
+ echo '<a ', $title, ' href="', $person->getHtmlUrl(), '" class="', $class, '">', PrintReady($name['list']), '</a>', $sex_image, "<br/>";
}
// Indi parents
echo $person->getPrimaryParentsNames("parents_$table_id details1", 'none');
@@ -210,7 +210,7 @@ function print_indi_table($datalist, $legend="", $option="") {
if ($option=='sosa') {
echo
'<td class="list_value_wrap"><a href="',
- encode_url('relationship.php?pid1='.$datalist[1].'&pid2='.$person->getXref()),
+ 'relationship.php?pid1=', $datalist[1], '&amp;pid2=', $person->getXref(),
'" title="', i18n::translate('Relationship Chart'), '"',
' name="', $key, '" class="list_item name2">', $key, '</a></td>';
}
@@ -257,7 +257,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo get_place_short($birth_place), ' ';
} else {
echo '<div align="', get_align($birth_place), '">';
- echo '<a href="', encode_url(get_place_url($birth_place)), '" class="list_item" title="', $birth_place, '">';
+ echo '<a href="', get_place_url($birth_place), '" class="list_item" title="', $birth_place, '">';
echo PrintReady(get_place_short($birth_place)), '</a>';
echo '</div>';
}
@@ -269,7 +269,7 @@ function print_indi_table($datalist, $legend="", $option="") {
//-- Number of children
if ($tiny) {
echo "<td class=\"list_value_wrap\">";
- echo "<a href=\"", encode_url($person->getLinkUrl()), "\" class=\"list_item\" name=\"", $person->getNumberOfChildren(), "\">", $person->getNumberOfChildren(), "</a>";
+ echo "<a href=\"", $person->getHtmlUrl(), "\" class=\"list_item\" name=\"", $person->getNumberOfChildren(), "\">", $person->getNumberOfChildren(), "</a>";
echo "</td>";
}
//-- Death date
@@ -328,7 +328,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo get_place_short($death_place), ' ';
} else {
echo '<div align="', get_align($death_place), '">';
- echo '<a href="', encode_url(get_place_url($death_place)), '" class="list_item" title="', $death_place, '">';
+ echo '<a href="', get_place_url($death_place), '" class="list_item" title="', $death_place, '">';
echo PrintReady(get_place_short($death_place)), '</a>';
echo '</div>';
}
@@ -373,7 +373,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo "L"; // leaves
}
echo "</td>";
- echo "</tr>\n";
+ echo "</tr>";
$unique_indis[$person->getXref()]=true;
}
echo "</tbody>";
@@ -408,7 +408,7 @@ function print_indi_table($datalist, $legend="", $option="") {
echo "<td style=\"display:none\">TREE</td>";
echo "</tr>";
echo "</tfoot>";
- echo "</table>\n";
+ echo "</table>";
echo "</div>";
//-- charts
echo "<div class=\"", $table_id, "-charts\" style=\"display:none\">";
@@ -421,7 +421,7 @@ function print_indi_table($datalist, $legend="", $option="") {
print_chart_by_age($deat_by_age, i18n::translate('Age related to death year'));
echo "</td></tr></table>";
echo "</div>";
- echo "</fieldset>\n";
+ echo "</fieldset>";
}
/**
@@ -497,9 +497,9 @@ function print_fam_table($datalist, $legend="", $option="") {
echo "<th style=\"display:none\">MARR</th>";
echo "<th style=\"display:none\">DEAT</th>";
echo "<th style=\"display:none\">TREE</th>";
- echo "</tr></thead>\n";
+ echo "</tr></thead>";
//-- table body
- echo "<tbody>\n";
+ echo "<tbody>";
$hidden = 0;
$num = 0;
$d100y=new GedcomDate(date('Y')-100); // 100 years ago
@@ -546,10 +546,10 @@ function print_fam_table($datalist, $legend="", $option="") {
if (!$husb->isDead()) $tdclass .= " alive";
if (!$husb->getChildFamilyIds()) $tdclass .= " patriarch";
echo "<td class=\"", $tdclass, "\" align=\"", get_align($names[$n1]['list']), "\">";
- echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']), "</a>";
+ echo "<a href=\"", $family->getHtmlUrl(), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']), "</a>";
if ($tiny) echo $husb->getSexImage();
if ($n1!=$n2) {
- echo "<br /><a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item\">", PrintReady($names[$n2]['list']), "</a>";
+ echo "<br /><a href=\"", $family->getHtmlUrl(), "\" class=\"list_item\">", PrintReady($names[$n2]['list']), "</a>";
}
// Husband parents
echo $husb->getPrimaryParentsNames("parents_$table_id details1", "none");
@@ -592,10 +592,10 @@ function print_fam_table($datalist, $legend="", $option="") {
if (!$wife->isDead()) $tdclass .= " alive";
if (!$wife->getChildFamilyIds()) $tdclass .= " patriarch";
echo "<td class=\"", $tdclass, "\" align=\"", get_align($names[$n1]['list']), "\">";
- echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']), "</a>";
+ echo "<a href=\"", $family->getHtmlUrl(), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($names[$n1]['list']), "</a>";
if ($tiny) echo $wife->getSexImage();
if ($n1!=$n2) {
- echo "<br /><a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item\">", PrintReady($names[$n2]['list']), "</a>";
+ echo "<br /><a href=\"", $family->getHtmlUrl(), "\" class=\"list_item\">", PrintReady($names[$n2]['list']), "</a>";
}
// Wife parents
echo $wife->getPrimaryParentsNames("parents_$table_id details1", "none");
@@ -677,7 +677,7 @@ function print_fam_table($datalist, $legend="", $option="") {
echo get_place_short($marriage_place), ' ';
} else {
echo '<div align="', get_align($marriage_place), '">';
- echo '<a href="', encode_url(get_place_url($marriage_place)), '" class="list_item" title="', $marriage_place, '">';
+ echo '<a href="', get_place_url($marriage_place), '" class="list_item" title="', $marriage_place, '">';
echo PrintReady(get_place_short($marriage_place)), '</a>';
echo '</div>';
}
@@ -689,7 +689,7 @@ function print_fam_table($datalist, $legend="", $option="") {
//-- Number of children
if ($tiny) {
echo "<td class=\"list_value_wrap\">";
- echo "<a href=\"", encode_url($family->getLinkUrl()), "\" class=\"list_item\" name=\"", $family->getNumberOfChildren(), "\">", $family->getNumberOfChildren(), "</a>";
+ echo "<a href=\"", $family->getHtmlUrl(), "\" class=\"list_item\" name=\"", $family->getNumberOfChildren(), "\">", $family->getNumberOfChildren(), "</a>";
echo "</td>";
}
//-- Last change
@@ -730,7 +730,7 @@ function print_fam_table($datalist, $legend="", $option="") {
echo "L"; // leaves
}
echo "</td>";
- echo "</tr>\n";
+ echo "</tr>";
}
echo "</tbody>";
//-- table footer
@@ -759,7 +759,7 @@ function print_fam_table($datalist, $legend="", $option="") {
echo "<td style=\"display:none\">DEAT</td>";
echo "<td style=\"display:none\">TREE</td>";
echo "</tr></tfoot>";
- echo "</table>\n";
+ echo "</table>";
echo "</div>";
//-- charts
echo "<div class=\"", $table_id, "-charts\" style=\"display:none\">";
@@ -772,7 +772,7 @@ function print_fam_table($datalist, $legend="", $option="") {
print_chart_by_age($marr_by_age, i18n::translate('Age in year of marriage'));
echo "</td></tr></table>";
echo "</div>";
- echo "</fieldset>\n";
+ echo "</fieldset>";
}
/**
@@ -837,7 +837,7 @@ function print_sour_table($datalist, $legend=null) {
if (!$source || !$source->canDisplayDetails()) {
continue;
}
- $link_url=encode_url($source->getLinkUrl());
+ $link_url=$source->getHtmlUrl();
//-- Counter
echo '<tr><td class="list_value_wrap rela list_item">', ++$n, '</td>';
//-- Source name(s)
@@ -874,7 +874,7 @@ function print_sour_table($datalist, $legend=null) {
if ($SHOW_LAST_CHANGE) {
print '<td class="list_value_wrap rela">'.$source->LastChangeTimestamp(empty($SEARCH_SPIDER)).'</td>';
}
- echo "</tr>\n";
+ echo "</tr>";
}
//-- table footer
echo '<tr class="sortbottom"><td></td>';
@@ -945,7 +945,7 @@ function print_note_table($datalist, $legend=null) {
if (!$note->canDisplayDetails()) {
continue;
}
- $link_url=encode_url($note->getLinkUrl());
+ $link_url=$note->getHtmlUrl();
//-- Counter
echo '<tr><td class="list_value_wrap rela list_item">', ++$n, '</td>';
//-- Shared Note name(s)
@@ -967,7 +967,7 @@ function print_note_table($datalist, $legend=null) {
if ($SHOW_LAST_CHANGE) {
print '<td class="list_value_wrap rela">'.$note->LastChangeTimestamp(empty($SEARCH_SPIDER)).'</td>';
}
- echo "</tr>\n";
+ echo "</tr>";
}
//-- table footer
echo '<tr class="sortbottom"><td></td>';
@@ -1016,15 +1016,15 @@ function print_repo_table($repos, $legend='') {
echo '<tr><td class="list_value_wrap rela list_item">', ++$n, '</td>';
//-- Repository name(s)
$name = $repo->getFullName();
- echo '<td class="list_value_wrap" align="', get_align($name), '"><a href="', encode_url($repo->getLinkUrl()), '" class="list_item name2">', PrintReady(htmlspecialchars($name)), '</a>';
+ echo '<td class="list_value_wrap" align="', get_align($name), '"><a href="', $repo->getHtmlUrl(), '" class="list_item name2">', PrintReady(htmlspecialchars($name)), '</a>';
$addname=$repo->getAddName();
if ($addname) {
- echo '<br /><a href="', encode_url($repo->getLinkUrl()), '" class="list_item">', PrintReady(htmlspecialchars($addname)), '</a>';
+ echo '<br /><a href="', $repo->getHtmlUrl(), '" class="list_item">', PrintReady(htmlspecialchars($addname)), '</a>';
}
echo '</td>';
//-- Linked SOURces
$tmp=$repo->countLinkedSources();
- echo '<td class="list_value_wrap"><a href="', encode_url($repo->getLinkUrl()), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
+ echo '<td class="list_value_wrap"><a href="', $repo->getHtmlUrl(), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
//-- Last change
if ($SHOW_LAST_CHANGE) {
echo '<td class="list_value_wrap rela">', $repo->LastChangeTimestamp(!$SEARCH_SPIDER), '</td>';
@@ -1060,7 +1060,7 @@ function print_media_table($datalist, $legend="") {
echo "<th class=\"list_label\">", i18n::translate('Families'), "</th>";
echo "<th class=\"list_label\">", i18n::translate('Sources'), "</th>";
if ($SHOW_LAST_CHANGE) echo "<th class=\"list_label rela\">", translate_fact('CHAN'), "</th>";
- echo "</tr>\n";
+ echo "</tr>";
//-- table body
$n = 0;
foreach ($datalist as $key => $value) {
@@ -1077,12 +1077,12 @@ function print_media_table($datalist, $legend="") {
//-- Object name(s)
$name = $media->getFullName();
echo "<td class=\"list_value_wrap\" align=\"", get_align($name), "\">";
- echo "<a href=\"", encode_url($media->getLinkUrl()), "\" class=\"list_item name2\">";
+ echo "<a href=\"", $media->getHtmlUrl(), "\" class=\"list_item name2\">";
if ($media->canDisplayDetails())
echo '<img src=', thumbnail_file($media->file, false), ' height="15" /> ';
echo PrintReady($name), "</a>";
if ($SHOW_MEDIA_FILENAME || WT_USER_IS_ADMIN)
- echo "<br /><a href=\"", encode_url($media->getLinkUrl()), "\">", basename($media->file), "</a>";
+ echo "<br /><a href=\"", $media->getHtmlUrl(), "\">", basename($media->file), "</a>";
//echo "<br />", $media->getFiletype();
//echo "&nbsp;&nbsp;", $media->width, "x", $media->height;
//echo "&nbsp;&nbsp;", $media->getFilesize(), "kB";
@@ -1091,13 +1091,13 @@ function print_media_table($datalist, $legend="") {
//-- Linked INDIs
$tmp=$media->countLinkedIndividuals();
- echo '<td class="list_value_wrap"><a href="', encode_url($media->getLinkUrl()), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
+ echo '<td class="list_value_wrap"><a href="', $media->getHtmlUrl(), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
//-- Linked FAMs
$tmp=$media->countLinkedfamilies();
- echo '<td class="list_value_wrap"><a href="', encode_url($media->getLinkUrl()), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
+ echo '<td class="list_value_wrap"><a href="', $media->getHtmlUrl(), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
//-- Linked SOURces
$tmp=$media->countLinkedSources();
- echo '<td class="list_value_wrap"><a href="', encode_url($media->getLinkUrl()), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
+ echo '<td class="list_value_wrap"><a href="', $media->getHtmlUrl(), '" class="list_item" name="', $tmp, '">', $tmp, '</a></td>';
/*
//-- Linked records
foreach (array("INDI", "FAM", "SOUR") as $rectype) {
@@ -1110,17 +1110,17 @@ function print_media_table($datalist, $legend="") {
}
sort($resu);
echo "<td class=\"list_value_wrap\" align=\"", get_align(@$resu[0]), "\">";
- foreach ($resu as $txt) echo "<a href=\"", encode_url($record->getLinkUrl()), "\" class=\"list_item\">", PrintReady("&bull; ".$txt), "</a><br />";
+ foreach ($resu as $txt) echo "<a href=\"", $record->getHtmlUrl(), "\" class=\"list_item\">", PrintReady("&bull; ".$txt), "</a><br />";
echo "</td>";
}
*/
//-- Last change
if ($SHOW_LAST_CHANGE)
print "<td class=\"list_value_wrap rela\">".$media->LastChangeTimestamp(empty($SEARCH_SPIDER))."</td>";
- echo "</tr>\n";
+ echo "</tr>";
}
- echo "</table>\n";
- echo "</fieldset>\n";
+ echo "</table>";
+ echo "</fieldset>";
}
// Print a table of surnames.
@@ -1345,7 +1345,7 @@ function print_changes_table($change_ids) {
echo "<th style=\"display:none\">GIVN</th>";
echo "<th class=\"list_label\">", translate_fact('CHAN'), "</th>";
echo "<th class=\"list_label\">", translate_fact('_WT_USER'), "</th>";
- echo "</tr>\n";
+ echo "</tr>";
//-- table body
$n = 0;
$NMAX = 1000;
@@ -1362,20 +1362,20 @@ function print_changes_table($change_ids) {
//-- Record name(s)
$name = $record->getFullName();
echo "<td class=\"list_value_wrap\" align=\"", get_align($name), "\">";
- echo "<a href=\"", encode_url($record->getLinkUrl()), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($name), "</a>";
+ echo "<a href=\"", $record->getHtmlUrl(), "\" class=\"list_item name2\" dir=\"", $TEXT_DIRECTION, "\">", PrintReady($name), "</a>";
if ($record->getType()=="INDI") {
echo $record->getSexImage();
$indi=true;
}
$addname=$record->getAddName();
if ($addname) {
- echo "<br /><a href=\"", encode_url($record->getLinkUrl()), "\" class=\"list_item\">", PrintReady($addname), "</a>";
+ echo "<br /><a href=\"", $record->getHtmlUrl(), "\" class=\"list_item\">", PrintReady($addname), "</a>";
}
if ($record->getType()=='INDI') {
if ($SHOW_MARRIED_NAMES) {
foreach ($record->getAllNames() as $name) {
if ($name['type']=='_MARNM') {
- echo "<br /><a title=\"_MARNM\" href=\"", encode_url($record->getLinkUrl()), "\" class=\"list_item\">", PrintReady($name['full']), "</a>";
+ echo "<br /><a title=\"_MARNM\" href=\"", $record->getHtmlUrl(), "\" class=\"list_item\">", PrintReady($name['full']), "</a>";
}
}
}
@@ -1391,7 +1391,7 @@ function print_changes_table($change_ids) {
print "<td class=\"list_value_wrap rela\">".$record->LastChangeTimestamp(empty($SEARCH_SPIDER))."</td>";
//-- Last change user
print "<td class=\"list_value_wrap rela\">".$record->LastChangeUser(empty($SEARCH_SPIDER))."</td>";
- echo "</tr>\n";
+ echo "</tr>";
}
//-- table footer
echo "<tr class=\"sortbottom\">";
@@ -1410,7 +1410,7 @@ function print_changes_table($change_ids) {
echo "<td></td>";
echo "<td></td>";
echo "</tr>";
- echo "</table>\n";
+ echo "</table>";
}
/**
@@ -1472,11 +1472,11 @@ function print_events_table($startjd, $endjd, $events='BIRT MARR DEAT', $only_li
$return .= "<th class=\"list_label\">".translate_fact('DATE')."</th>";
$return .= "<th class=\"list_label\"><img src=\"".$WT_IMAGES["reminder"]."\" alt=\"".i18n::translate('Anniversary')."\" title=\"".i18n::translate('Anniversary')."\" border=\"0\" /></th>";
$return .= "<th class=\"list_label\">".translate_fact('EVEN')."</th>";
- $return .= "</tr>\n";
+ $return .= "</tr>";
}
$value['name'] = $record->getListName();
- $value['url'] = $record->getLinkUrl();
+ $value['url'] = $record->getHtmlUrl();
if ($record->getType()=="INDI") {
$value['sex'] = $record->getSexImage();
} else {
@@ -1505,7 +1505,7 @@ function print_events_table($startjd, $endjd, $events='BIRT MARR DEAT', $only_li
$name = implode("<div></div>", $exp); // <div></div> is better here than <br />
}
$return .= "<td class=\"list_value_wrap\" align=\"".get_align($name)."\">";
- $return .= "<a href=\"".encode_url($value['url'])."\" class=\"list_item name2\" dir=\"".$TEXT_DIRECTION."\">".PrintReady($name)."</a>";
+ $return .= "<a href=\"".$value['url']."\" class=\"list_item name2\" dir=\"".$TEXT_DIRECTION."\">".PrintReady($name)."</a>";
if ($value['record']->getType()=="INDI") {
$return .= $value['sex'];
$return .= $value['record']->getPrimaryParentsNames("parents_$table_id details1", "none");
@@ -1528,10 +1528,10 @@ function print_events_table($startjd, $endjd, $events='BIRT MARR DEAT', $only_li
$return .= "</td>";
//-- Event name
$return .= "<td class=\"list_value_wrap\">";
- $return .= "<a href=\"".encode_url($value['url'])."\" class=\"list_item\">".translate_fact($value['fact'])."</a>";
+ $return .= "<a href=\"".$value['url']."\" class=\"list_item\">".translate_fact($value['fact'])."</a>";
$return .= "&nbsp;</td>";
- $return .= "</tr>\n";
+ $return .= "</tr>";
}
if ($output!=0) {
@@ -1545,7 +1545,7 @@ function print_events_table($startjd, $endjd, $events='BIRT MARR DEAT', $only_li
$return .= "<td></td>";
$return .= "<td></td>";
$return .= "</tr>";
- $return .= "</table>\n";
+ $return .= "</table>";
}
// Print a final summary message about restricted/filtered facts
@@ -1631,7 +1631,7 @@ function print_events_list($startjd, $endjd, $events='BIRT MARR DEAT', $only_liv
$output ++;
$value['name'] = $record->getListName();
- $value['url'] = $record->getLinkUrl();
+ $value['url'] = $record->getHtmlUrl();
if ($record->getType()=="INDI") {
$value['sex'] = $record->getSexImage();
} else {
@@ -1648,11 +1648,11 @@ function print_events_list($startjd, $endjd, $events='BIRT MARR DEAT', $only_liv
}
foreach($filtered_events as $value) {
- $return .= "<a href=\"".encode_url($value['url'])."\" class=\"list_item name2\" dir=\"".$TEXT_DIRECTION."\">".PrintReady($value['name'])."</a>".$value['sex'];
+ $return .= "<a href=\"".$value['url']."\" class=\"list_item name2\" dir=\"".$TEXT_DIRECTION."\">".PrintReady($value['name'])."</a>".$value['sex'];
$return .= "<br /><div class=\"indent\">";
$return .= translate_fact($value['fact']).' - '.$value['date']->Display(true);
if ($value['anniv']!=0) $return .= " (" . i18n::translate('%s year anniversary', $value['anniv']).")";
- if (!empty($value['plac'])) $return .= " - <a href=\"".encode_url(get_place_url($value['plac']))."\">".$value['plac']."</a>";
+ if (!empty($value['plac'])) $return .= " - <a href=\"".get_place_url($value['plac'])."\">".$value['plac']."</a>";
$return .= "</div>";
}