diff -r TNG/addnewacct.php TNG1403/addnewacct.php 2,3d1 < include("begin.php"); < include($cms['tngpath'] . "genlib.php"); 5c3,4 < include($cms['tngpath'] . "$languages_path$language/text.php"); --- > include("tng_begin.php"); > 7d5 < include($cms['tngpath'] . "getlang.php"); 21c19 < eval("\$email = \$$emailfield;"); --- > $email = $$emailfield; 90c88 < $dt_consented = $tng_user_consent ? $today : ""; --- > $dt_consented = !empty($tng_user_consent) ? $today : ""; 111c109 < $gedcom = $assignedtree ? $assignedtree : ""; --- > $gedcom = !empty($assignedtree) ? $assignedtree : ""; diff -r TNG/admin_add2albumxml.php TNG1403/admin_add2albumxml.php 15a16,17 > $curpage = 0; > $pagenav = $prevlink = $firstlink = $lastlink = $nextlink = ""; 56c58 < if( $searchtree ) --- > if( !empty($searchtree) ) 60c62 < if( $fileext ) --- > if( !empty($fileext) ) 62c64 < if( $hsstat ) --- > if( !empty($hsstat) ) 64c66 < if( $cemeteryID ) --- > if( !empty($cemeteryID) ) 79c81 < $query = "SELECT $media_table.mediaID as mediaID, $medialinkID description, notes, thumbpath, mediatypeID, usecollfolder, datetaken, $media_table.gedcom FROM $media_table $join $wherestr ORDER BY description LIMIT $newoffset" . $maxsearchresults; --- > $query = "SELECT $media_table.mediaID as mediaID, description, notes, thumbpath, mediatypeID, usecollfolder, datetaken, $media_table.gedcom FROM $media_table $wherestr ORDER BY description LIMIT $newoffset" . $maxsearchresults; 84c86 < $query = "SELECT count($media_table.mediaID) as mcount FROM $media_table $join $wherestr"; --- > $query = "SELECT count($media_table.mediaID) as mcount FROM $media_table $wherestr"; 93c95 < if($albumID) { --- > if( !empty($albumID) ) { 123a126 > $label = $mediatypes_display[$mtypeID] ? $mediatypes_display[$mtypeID] : $text[$mtypeID]; 145c148 < echo "\n"; --- > echo "\n"; 154c157 < echo "" . $text[$mtypeID] . " \n"; --- > echo "" . $label . " \n"; diff -r TNG/admin_addalbum.php TNG1403/admin_addalbum.php 27c27 < if( !$alwayson ) $alwayson = 0; --- > if( empty($alwayson) ) $alwayson = 0; 32a33 > $_SESSION['albumcount'] = isset($_SESSION['albumcount']) ? $_SESSION['albumcount'] + 1 : 1; diff -r TNG/admin_addassoc.php TNG1403/admin_addassoc.php 7a8 > $admin_login = 1; 26a28 > $passocID = strtoupper($passocID); 32c34 < if($revassoc) { --- > if(!empty($revassoc)) { 41,42c43,44 < $query = "SELECT firstname, lastname, lnprefix, nameorder, prefix, suffix FROM $people_table < WHERE personID=\"$passocID\" AND gedcom=\"$tree\""; --- > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, title, sex, nameorder, living, private, branch, birthdate, birthdatetr, altbirthdatetr, deathdate > FROM $people_table WHERE personID=\"$passocID\" AND gedcom=\"$tree\""; diff -r TNG/admin_addbranch.php TNG1403/admin_addbranch.php 27c27 < if(!$dospouses) --- > if( empty($dospouses) ) 36c36 < adminwritelog( $admtext['addnewbranch'] . " : $gedcom/$description" ); --- > adminwritelog( $admtext['addnewbranch'] . " : $tree/$description" ); 42c42 < if($submitx) { --- > if( !empty($submitx) ) { diff -r TNG/admin_addcitation.php TNG1403/admin_addcitation.php 7a8 > $admin_login = 1; 37,45d37 < $query = "INSERT INTO $citations_table (gedcom, persfamID, eventID, sourceID, page, quay, citedate, citedatetr, citetext, note, description, ordernum) < VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,'', 999)"; < $params = array(&$template,&$tree, &$persfamID, &$eventID, &$sourceID, &$citepage, &$quay, &$citedate, &$citedatetr, &$citetext, &$citenote); < tng_execute($query,$params); < $citationID = tng_insert_id(); < < $_SESSION['lastcite'] = $tree . "|" . $citationID; < < adminwritelog( $admtext['addnewcite'] . ": $citationID/$tree/$persfamID/$eventID/$sourceID" ); 49d40 < $row = tng_fetch_assoc($result); 51,55c42,68 < $citationsrc = "[$sourceID] " . $row['title']; < $citationsrc = cleanIt($citationsrc); < $truncated = truncateIt($citationsrc,75); < header("Content-type:text/html; charset=" . $session_charset); < echo "{\"id\":\"$citationID\",\"persfamID\":\"$persfamID\",\"tree\":\"$tree\",\"eventID\":\"$eventID\",\"display\":\"$truncated\",\"allow_edit\":$allow_edit,\"allow_delete\":$allow_delete}"; --- > if ($row = tng_fetch_assoc($result)) { > header("Content-type:text/html; charset=" . $session_charset); > $returnvals = ""; > if(!isset($events)) $events = [$eventID]; > foreach($events as $event) { > $query = "INSERT INTO $citations_table (gedcom, persfamID, eventID, sourceID, page, quay, citedate, citedatetr, citetext, note, description, ordernum) > VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,'', 999)"; > $params = array(&$template,&$tree, &$persfamID, &$event, &$sourceID, &$citepage, &$quay, &$citedate, &$citedatetr, &$citetext, &$citenote); > tng_execute($query,$params); > $citationID = tng_insert_id(); > > $_SESSION['lastcite'] = $tree . "|" . $citationID; > adminwritelog( $admtext['addnewcite'] . ": $citationID/$tree/$persfamID/$event/$sourceID" ); > > $citationsrc = "[$sourceID] " . $row['title']; > $citationsrc = cleanIt($citationsrc); > $truncated = truncateIt($citationsrc,75); > if($returnvals) $returnvals .= ","; > $returnvals .= "{\"id\":\"$citationID\",\"persfamID\":\"$persfamID\",\"tree\":\"$tree\",\"eventID\":\"$event\",\"display\":\"$truncated\",\"allow_edit\":$allow_edit,\"allow_delete\":$allow_delete}"; > } > echo "[{$returnvals}]"; > } > else { > header("Content-type:text/html; charset=" . $session_charset); > echo "[{\"display\":\"[$sourceID] - Not a Valid Source - CITATION NOT ADDED!\"}]"; > } > tng_free_result($result); diff -r TNG/admin_addcollection.php TNG1403/admin_addcollection.php 7a8 > $admin_login = 1; diff -r TNG/admin_add_dna_group.php TNG1403/admin_add_dna_group.php 1,32c1,30 < include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > > if( !$allow_add ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > require("adminlog.php"); > > $dna_group = addslashes($dna_group); > $test_type = addslashes($test_type); > $description = addslashes($description); > > $query = "INSERT INTO $dna_groups_table (dna_group,test_type,gedcom,description,action) VALUES (\"$dna_group\",\"$test_type\",\"$tree\",\"$description\",\"2\")"; > $result = tng_query($query); > $success = tng_affected_rows(); > > adminwritelog( "{$admtext['addgroup']}: $dna_group" ); > > $message = $admtext['dna_group'] . " $dna_group {$admtext['succadded']}."; > header( "Location: admin_dna_groups.php?message=$message&dna_group=$dna_group&test_type=$test_type&tree=$tree" ); diff -r TNG/admin_add_dna_test.php TNG1403/admin_add_dna_test.php 19c19 < $thumbpath = stripslashes($thumbpath); --- > $thumbpath = isset($thumbpath) ? stripslashes($thumbpath) : ""; 40a41 > if( !isset($dna_group) ) $dna_group = ""; 48a50 > $match_date = convertDate( $match_date ); 53,56c55,58 < $template = "sssssssssssssssssssssssss"; < $query = "INSERT IGNORE INTO $dna_tests_table (test_type, test_number, notes, vendor, test_date, personID, gedcom, urls, markers, y_results, hvr1_results, hvr2_results, person_name, confirmed, markeropt, notesopt, linksopt, surnamesopt, private_dna, dna_group, dna_group_desc, surnames, haplogroup, significant_snp, terminal_snp) < VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; < $params = array(&$template,&$test_type, &$test_number, &$notes, &$vendor, &$test_date, &$personID, &$mynewgedcom, &$urls, &$markers, &$y_results, &$hvr1_results, &$hvr2_results, &$person_name, &$confirmed, &$markeropt, &$notesopt, &$linksopt, &$surnamesopt, &$private_dna, &$dna_group, &$dna_group_desc, &$surnames, &$haplogroup, &$signsnp, &$termsnp); --- > $template = "sssssssssssssssssssssssssssss"; > $query = "INSERT IGNORE INTO $dna_tests_table (test_type, test_number, notes, vendor, test_date, match_date, personID, gedcom, urls, markers, y_results, hvr1_results, hvr2_results, person_name, ydna_confirmed, mtdna_confirmed,markeropt, notesopt, linksopt, surnamesopt, private_dna, private_test, dna_group, dna_group_desc, surnames, mtdna_haplogroup, ydna_haplogroup, significant_snp, terminal_snp) > VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; > $params = array(&$template,&$test_type, &$test_number, &$notes, &$vendor, &$test_date, &$match_date, &$personID, &$mynewgedcom, &$urls, &$markers, &$y_results, &$hvr1_results, &$hvr2_results, &$person_name, &$ydna_confirmed, &$mtdna_confirmed, &$markeropt, &$notesopt, &$linksopt, &$surnamesopt, &$private_dna, &$private_test, &$dna_group, &$dna_group_desc, &$surnames, &$mtdna_haplogroup, &$ydna_haplogroup, &$signsnp, &$termsnp); 69c71 < adminwritelog( "{$admtext['addnewtest']}: $testID" ); --- > adminwritelog( "{$admtext['addnewdna']}: $testID" ); diff -r TNG/admin_addevent.php TNG1403/admin_addevent.php 7a8 > $admin_login = 1; 101c102 < adminwritelog( "$admtext[addnewevent]: $eventtypeID/$tree/$persfamID" ); --- > adminwritelog( $admtext['addnewevent'] . ": $eventtypeID/$tree/$persfamID" ); diff -r TNG/admin_addeventtype.php TNG1403/admin_addeventtype.php 7a8 > $admin_login = 1; diff -r TNG/admin_addfamily.php TNG1403/admin_addfamily.php 13c13 < $message = "$admtext[norights]"; --- > $message = $admtext['norights']; 28a29,30 > if(!isset($newfamily)) $newfamily = ""; > if(!isset($cw)) $cw = ""; 72c74 < $template = "sss"; --- > $template = "sssds"; 75,76c77,78 < $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,zoom,geoignore,temple) VALUES (?,?,\"0\",\"0\",\"0\",?)"; < $params = array(&$template,&$placetree,&$place,&$temple); --- > $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,zoom,geoignore,temple,changedate,changedby) VALUES (?,?,\"0\",\"0\",\"0\",?,?,?)"; > $params = array(&$template,&$placetree,&$place,&$temple,&$newdate,&$currentuser); 97c99 < $husborder = $husbrow['husborder'] + 1; --- > $husborder = !empty($husbrow['husborder']) ? ($husbrow['husborder'] + 1) : 0; 116c118 < $wifeorder = $wiferow['wifeorder'] + 1; --- > $wifeorder = !empty($wiferow['wifeorder']) ? ($wiferow['wifeorder'] + 1) : 0; 122,123c124,125 < $familyliving = ($living || $husbliving || $wifeliving) ? 1 : 0; < if( !$private ) $private = 0; --- > $familyliving = (!empty($living) || $husbliving || $wifeliving) ? 1 : 0; > if( empty($private) ) $private = 0; 124a127 > $allbranches = ""; 130c133 < else --- > elseif(!empty($branch)) 132d134 < if( !$allbranches ) $allbranches = ""; diff -r TNG/admin_addlanguage.php TNG1403/admin_addlanguage.php 34,35c34,40 < $message = $admtext['language'] . " $display {$admtext['succadded']}."; < header( "Location: admin_languages.php?message=" . urlencode($message) ); --- > if( !empty($submitx) || !empty($message) ) { > $message = $admtext['language'] . " $display {$admtext['succadded']}."; > header( "Location: admin_languages.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_editlanguage.php?languageID=$languageID" ); > } diff -r TNG/admin_addmedia.php TNG1403/admin_addmedia.php 34c34 < $treestr = $tngconfig['mediatrees'] ? $tree . "/" : ""; --- > $treestr = $tngconfig['mediatrees'] && $tree ? $tree . "/" : ""; 37,82d36 < if( $newfile && $newfile != "none" ) { < if( @move_uploaded_file($newfile, $newpath) ) < @chmod( $newpath, 0644 ); < else { < //improper permissions or folder doesn't exist (root path may be wrong) < $message = $admtext['notcopied'] . " $newpath {$admtext['improperpermissions']}."; < header( "Location: admin_media.php?message=" . urlencode($message) ); < exit; < } < } < < if( substr( $thumbpath, 0, 1 ) == "/" ) < $thumbpath = substr( $thumbpath, 1 ); < $newthumbpath = "$rootpath$usefolder/$treestr$thumbpath"; < < if( function_exists( 'imageJpeg' ) && $thumbcreate == "auto" ) { < ///$cleanpath = $session_charset == "UTF-8" ? utf8_decode($newpath) : $newpath; < //$cleannewthumbpath = $session_charset == "UTF-8" ? utf8_decode($newthumbpath) : $newthumbpath; < if( image_createThumb( $newpath, $newthumbpath, $thumbmaxw, $thumbmaxh, $thumbquality ) ) { < $destInfo = pathInfo( $newthumbpath ); < if( strtoupper( $destInfo['extension'] ) == "GIF" || strtoupper( $destInfo['extension'] ) == "PDF") { < $thumbpath = substr_replace( $thumbpath, 'jpg', -3 ); < $newthumbpath = substr_replace( $newthumbpath, 'jpg', -3 ); < } < @chmod( $newthumbpath, 0644 ); < } < else { < //could not create thumbnail (size or type problem) or permissions (root path may be wrong) < $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improper2']}."; < header( "Location: admin_media.php?message=" . urlencode($message) ); < exit; < } < } < else { < if( $newthumb && $newthumb != "none" ) { < if( @move_uploaded_file($newthumb, $newthumbpath) ) < @chmod( $newthumbpath, 0644 ); < else { < //improper permissions or folder doesn't exist (root path may be wrong) < $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improperpermissions']}."; < header( "Location: admin_media.php?message=" . urlencode($message) ); < exit; < } < } < } < 97c51 < if($latitude && $longitude && !$zoom) --- > if( !empty($latitude) && !empty($longitude) && empty($zoom) ) 99c53 < if( $abspath ) --- > if( !empty($abspath) ) 103,124c57,77 < if( !$showmap ) $showmap = "0"; < if( !$usenl ) $usenl = 0; < if( !$alwayson ) $alwayson = 0; < if( !$newwindow ) $newwindow = 0; < if( !$usecollfolder ) $usecollfolder = 0; < if( !$width ) $width = 0; < if( !$height ) $height = 0; < if( !$cemeteryID ) $cemeteryID = 0; < if( !$linktocem ) $linktocem = 0; < if( !$zoom ) $zoom = 0; < < $fileparts = pathinfo( $path ); < $form = strtoupper( $fileparts['extension'] ); < $newdate = date ("Y-m-d H:i:s", time() + ( 3600 * $time_offset ) ); < $mediakey = $path ? "$usefolder/$path" : time(); < $template = "ssssssssssssssssssssssssssssss"; < $query = "INSERT IGNORE INTO $media_table (mediatypeID,mediakey,gedcom,path,thumbpath,description,notes,width,height,datetaken,placetaken,owner,changedate,changedby,form,alwayson,map,abspath,status,cemeteryID,plot,showmap,linktocem,latitude,longitude,zoom,bodytext,usenl,newwindow,usecollfolder) < VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; < $params = array(&$template, &$mediatypeID, &$mediakey, &$tree, &$path, &$thumbpath, &$description, &$notes, &$width, &$height, &$datetaken, &$placetaken, &$owner, &$newdate, &$currentuser, &$form, &$alwayson, &$imagemap, &$abspath, &$status, &$cemeteryID, &$plot, &$showmap, &$linktocem, &$latitude, &$longitude, &$zoom, &$bodytext, &$usenl, &$newwindow, &$usecollfolder); < $affected_rows = tng_execute_noerror($query,$params); < if($affected_rows == 1) { < $mediaID = tng_insert_id(); --- > if( empty($showmap) ) $showmap = "0"; > if( empty($usenl) ) $usenl = 0; > if( empty($alwayson) ) $alwayson = 0; > if( empty($newwindow) ) $newwindow = 0; > if( empty($private) ) $private = 0; > if( empty($usecollfolder) ) $usecollfolder = 0; > if( empty($width) ) $width = 0; > if( empty($height) ) $height = 0; > if( empty($cemeteryID) ) $cemeteryID = 0; > if( empty($linktocem) ) $linktocem = 0; > if( empty($zoom) ) $zoom = 0; > > if(!empty($place)) { > $placetree = $tngconfig['places1tree'] ? "" : $tree; > $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,latitude,longitude,zoom,geoignore,temple,changedate,changedby) VALUES (\"$placetree\",\"$place\",\"0\",\"$latitude\",\"$longitude\",\"$zoom\",\"0\",\"\",\"$newdate\",\"$currentuser\")"; > $result = @tng_query( $query ) or die ($admtext['cannotexecutequery'] . ": $query"); > if($tngconfig['autogeo'] && tng_affected_rows() && (!$latitude || !$longitude)) { > $ID = tng_insert_id(); > $message = geocode($place, 0, $ID); > } > } 126,132c79,100 < if($link_personID) { < $query = "SELECT count(medialinkID) as count FROM $medialinks_table WHERE personID = \"$link_personID\" AND gedcom = \"$link_tree\""; < $result = @tng_query($query); < if( $result ) { < $row = tng_fetch_assoc($result); < $newrow = $row['count'] + 1; < tng_free_result($result); --- > try { > $fileparts = pathinfo( $path ); > $form = strtoupper( $fileparts['extension'] ); > $newdate = date ("Y-m-d H:i:s", time() + ( 3600 * $time_offset ) ); > $mediakey = $path ? "$usefolder/$path" : time(); > $template = "sssssssssssssssssssssssssssssss"; > $query = "INSERT IGNORE INTO $media_table (mediatypeID,mediakey,gedcom,path,thumbpath,description,notes,width,height,datetaken,placetaken,owner,changedate,changedby,form,alwayson,map,abspath,status,cemeteryID,plot,showmap,linktocem,latitude,longitude,zoom,bodytext,usenl,newwindow,private,usecollfolder) > VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; > $params = array(&$template, &$mediatypeID, &$mediakey, &$tree, &$path, &$thumbpath, &$description, &$notes, &$width, &$height, &$datetaken, &$placetaken, &$owner, &$newdate, &$currentuser, &$form, &$alwayson, &$imagemap, &$abspath, &$status, &$cemeteryID, &$plot, &$showmap, &$linktocem, &$latitude, &$longitude, &$zoom, &$bodytext, &$usenl, &$newwindow, &$private, &$usecollfolder); > $affected_rows = tng_execute_noerror($query,$params); > if($affected_rows == 1) { > $mediaID = tng_insert_id(); > > if( $newfile && $newfile != "none" ) { > if( @move_uploaded_file($newfile, $newpath) ) > @chmod( $newpath, 0644 ); > else { > //improper permissions or folder doesn't exist (root path may be wrong) > $message = $admtext['notcopied'] . " $newpath {$admtext['improperpermissions']}."; > header( "Location: admin_media.php?message=" . urlencode($message) ); > exit; > } 134,135d101 < else < $newrow = 1; 137,140c103,139 < $defval = ""; < /* < if($mediatypeID == "photos" && $thumbpath) { < $query = "SELECT medialinkID FROM $medialinks_table WHERE personID = \"$link_personID\" AND gedcom = \"$link_tree\" AND defphoto = \"1\""; --- > if($thumbpath) { > if( substr( $thumbpath, 0, 1 ) == "/" ) > $thumbpath = substr( $thumbpath, 1 ); > $newthumbpath = "$rootpath$usefolder/$treestr$thumbpath"; > > if( function_exists( 'imageJpeg' ) && $thumbcreate == "auto" ) { > ///$cleanpath = $session_charset == "UTF-8" ? utf8_decode($newpath) : $newpath; > //$cleannewthumbpath = $session_charset == "UTF-8" ? utf8_decode($newthumbpath) : $newthumbpath; > if( image_createThumb( $newpath, $newthumbpath, $thumbmaxw, $thumbmaxh, $thumbquality ) ) { > $destInfo = pathInfo( $newthumbpath ); > if( strtoupper( $destInfo['extension'] ) == "GIF" || strtoupper( $destInfo['extension'] ) == "PDF") { > $thumbpath = substr_replace( $thumbpath, 'jpg', -3 ); > $newthumbpath = substr_replace( $newthumbpath, 'jpg', -3 ); > } > @chmod( $newthumbpath, 0644 ); > } > else { > //could not create thumbnail (size or type problem) or permissions (root path may be wrong) > $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improper2']}."; > $thumbpath = ""; > } > } > else { > if( $newthumb && $newthumb != "none" ) { > if( @move_uploaded_file($newthumb, $newthumbpath) ) > @chmod( $newthumbpath, 0644 ); > else { > //improper permissions or folder doesn't exist (root path may be wrong) > $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improperpermissions']}."; > $thumbpath = ""; > } > } > } > } > > if($link_personID) { > $query = "SELECT count(medialinkID) as count FROM $medialinks_table WHERE personID = \"$link_personID\" AND gedcom = \"$link_tree\""; 143c142,143 < $defval = 1; --- > $row = tng_fetch_assoc($result); > $newrow = $row['count'] + 1; 146,147c146,147 < } < */ --- > else > $newrow = 1; 149,155c149,159 < $template = "ssssss"; < $query = "INSERT IGNORE INTO $medialinks_table (personID,mediaID,ordernum,gedcom,linktype,eventID,defphoto) VALUES (?,?,?,?,?,'',?)"; < $params = array(&$template, &$link_personID, &$mediaID, &$newrow, &$link_tree, &$link_linktype, &$defval); < tng_execute_noerror($query,$params); < } < $query = "UPDATE $mediatypes_table SET disabled=\"0\" where mediatypeID=\"$mediatypeID\""; < $result = @tng_query($query); --- > $defval = ""; > /* > if($mediatypeID == "photos" && $thumbpath) { > $query = "SELECT medialinkID FROM $medialinks_table WHERE personID = \"$link_personID\" AND gedcom = \"$link_tree\" AND defphoto = \"1\""; > $result = @tng_query($query); > if( $result ) { > $defval = 1; > tng_free_result($result); > } > } > */ 157c161,167 < adminwritelog( "{$admtext['addnewmedia']}: $mediaID" ); --- > $template = "ssssss"; > $query = "INSERT IGNORE INTO $medialinks_table (personID,mediaID,ordernum,gedcom,linktype,eventID,defphoto) VALUES (?,?,?,?,?,'',?)"; > $params = array(&$template, &$link_personID, &$mediaID, &$newrow, &$link_tree, &$link_linktype, &$defval); > tng_execute_noerror($query,$params); > } > $query = "UPDATE $mediatypes_table SET disabled=\"0\" where mediatypeID=\"$mediatypeID\""; > $result = @tng_query($query); 159,162c169,178 < header( "Location: admin_editmedia.php?mediaID=$mediaID&newmedia=1&added=1" ); < } < else { < $message = $admtext['photonotadded'] . "."; --- > adminwritelog( "{$admtext['addnewmedia']}: $mediaID" ); > > header( "Location: admin_editmedia.php?mediaID=$mediaID&newmedia=1&added=1" ); > } > else { > $message = $admtext['photonotadded'] . "."; > header( "Location: admin_media.php?message=" . urlencode($message) ); > } > } catch (mysqli_sql_exception $e) { > $message = $admtext['photonotuploaded'] . "."; diff -r TNG/admin_addnote.php TNG1403/admin_addnote.php 7a8 > $admin_login = 1; 31c32 < if( !$private ) $private = "0"; --- > if( !isset($private) ) $private = "0"; diff -r TNG/admin_addperson2.php TNG1403/admin_addperson2.php 27a28 > if(!isset($altbirthtype)) $altbirthtype = ""; 48a50 > /* 65a68 > */ 105c108 < $template = "ssd"; --- > $template = "ssss"; 108,109c111,112 < $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,zoom,geoignore,temple) VALUES (?,?,\"0\",\"0\",\"0\",?)"; < $params = array(&$template,&$placetree,&$place,&$temple); --- > $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,zoom,geoignore,temple,changedate,changedby) VALUES (?,?,\"0\",\"0\",\"0\",?,\"$newdate\",?)"; > $params = array(&$template,&$placetree,&$place,&$temple,&$currentuser); 120,123c123,126 < if( !$allbranches ) $allbranches = ""; < if( !$living ) $living = 0; < if( !$private ) $private = 0; < if( !$burialtype ) $burialtype = 0; --- > if( empty($allbranches) ) $allbranches = ""; > if( empty($living) ) $living = 0; > if( empty($private) ) $private = 0; > if( empty($burialtype) ) $burialtype = 0; 127c130,131 < $query = "INSERT INTO $people_table (personID,firstname,lnprefix,lastname,nickname,prefix,suffix,title,nameorder,living,private,birthdate,birthdatetr,birthplace,sex,altbirthdate,altbirthdatetr, --- > if(!$sex && isset($other_gender)) $sex = $other_gender; > $query = "INSERT INTO $people_table (personID,firstname,lnprefix,lastname,nickname,prefix,suffix,title,nameorder,living,private,birthdate,birthdatetr,birthplace,sex,altbirthtype,altbirthdate,altbirthdatetr, 130c134 < VALUES(?,?,?,?,?,?,?,?,'0',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\"\",\"0\")"; --- > VALUES(?,?,?,?,?,?,?,?,'0',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\"$newdate\",?,?,?,?,?,\"\",\"0\")"; 133c137 < &$birthplace,&$sex,&$altbirthdate,&$altbirthdatetr,&$altbirthplace,&$deathdate,&$deathdatetr,&$deathplace,&$burialdate,&$burialdatetr,&$burialplace, --- > &$birthplace,&$sex,&$altbirthtype,&$altbirthdate,&$altbirthdatetr,&$altbirthplace,&$deathdate,&$deathdatetr,&$deathplace,&$burialdate,&$burialdatetr,&$burialplace, 135c139 < &$newdate,&$tree,&$allbranches,&$currentuser,&$familyID,&$meta); --- > &$tree,&$allbranches,&$currentuser,&$familyID,&$meta); 139c143 < $query = "SELECT personID, lastname, firstname, lnprefix, birthdate, altbirthdate, prefix, suffix, nameorder FROM $people_table WHERE ID=\"$ID\""; --- > $query = "SELECT personID, lastname, firstname, lnprefix, birthdate, altbirthdate, birthdatetr, altbirthdatetr, deathdate, deathdatetr, prefix, suffix, title, nickname, nameorder, gedcom, branch, living, private FROM $people_table WHERE ID=\"$ID\""; 200c204 < $rval .= "
{$admtext['remove']}   |   {$admtext['text_delete']}
"; --- > $rval .= "
{$admtext['unlink']}   |   {$admtext['text_delete']}
"; diff -r TNG/admin_addperson.php TNG1403/admin_addperson.php 30a31 > if(!isset($altbirthtype)) $altbirthtype = ""; 32a34,35 > if(!isset($newperson)) $newperson = ""; > if(!isset($type)) $type = ""; 116c119 < $template = "ssd"; --- > $template = "ssss"; 119,120c122,123 < $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,zoom,geoignore,temple) VALUES (?,?,\"0\",\"0\",\"0\",?)"; < $params = array(&$template,&$placetree,&$place,&$temple); --- > $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,zoom,geoignore,temple,changedate,changedby) VALUES (?,?,\"0\",\"0\",\"0\",?,\"$newdate\",?)"; > $params = array(&$template,&$placetree,&$place,&$temple,&$currentuser); 127a131 > $allbranches = ""; 133c137 < else --- > elseif(!empty($branch)) 135,138c139,141 < if( !$allbranches ) $allbranches = ""; < if( !$living ) $living = 0; < if( !$private ) $private = 0; < if( !$burialtype ) $burialtype = 0; --- > if( empty($living) ) $living = 0; > if( empty($private) ) $private = 0; > if( empty($burialtype) ) $burialtype = 0; 140c143,144 < $query = "INSERT INTO $people_table (personID,firstname,lnprefix,lastname,nickname,prefix,suffix,title,nameorder,living,private,birthdate,birthdatetr,birthplace,sex,altbirthdate,altbirthdatetr, --- > if(!$sex && isset($other_gender)) $sex = $other_gender; > $query = "INSERT INTO $people_table (personID,firstname,lnprefix,lastname,nickname,prefix,suffix,title,nameorder,living,private,birthdate,birthdatetr,birthplace,sex,altbirthtype,altbirthdate,altbirthdatetr, 143c147 < VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\"\",?,\"\",\"0\")"; --- > VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,\"$newdate\",?,?,?,\"\",?,\"\",\"0\")"; 146c150 < &$birthplace,&$sex,&$altbirthdate,&$altbirthdatetr,&$altbirthplace,&$deathdate,&$deathdatetr,&$deathplace,&$burialdate,&$burialdatetr,&$burialplace, --- > &$birthplace,&$sex,&$altbirthtype,&$altbirthdate,&$altbirthdatetr,&$altbirthplace,&$deathdate,&$deathdatetr,&$deathplace,&$burialdate,&$burialdatetr,&$burialplace, 148c152 < &$newdate,&$tree,&$allbranches,&$currentuser,&$meta); --- > &$tree,&$allbranches,&$currentuser,&$meta); 223c227 < $name = $session_charset == "UTF-8" ? getName($row) : utf8_encode(getName($row)); --- > $name = $session_charset == "UTF-8" ? getName($row) : mb_convert_encoding(getName($row), 'UTF-8', 'ISO-8859-1'); diff -r TNG/admin_addplace.php TNG1403/admin_addplace.php 37c37 < if( !$temple ) $temple = 0; --- > if( empty($temple) ) $temple = 0; 43,45c43,47 < $template = "ssssssss"; < $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,temple,latitude,longitude,zoom,notes,geoignore) VALUES (?,?,?,?,?,?,?,?,'0')"; < $params = array(&$template, &$tree, &$place, &$placelevel, &$temple, &$latitude, &$longitude, &$zoom, &$notes); --- > $newdate = date ("Y-m-d H:i:s", time() + ( 3600 * $time_offset ) ); > > $template = "ssssssssss"; > $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,temple,latitude,longitude,zoom,notes,geoignore,changedate,changedby) VALUES (?,?,?,?,?,?,?,?,'0',?,?)"; > $params = array(&$template, &$tree, &$place, &$placelevel, &$temple, &$latitude, &$longitude, &$zoom, &$notes, &$newdate, &$currentuser); 60c62,67 < header( "Location: admin_places.php?message=" . urlencode($message) ); --- > if( !empty($submitx) ) { > header( "Location: admin_places.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_editplace.php?ID=$placeID&message=" . urlencode($message) ); > } diff -r TNG/admin_addrepo.php TNG1403/admin_addrepo.php 56c56 < adminwritelog( "{$admtext['addnewrepo']}: $tree/$repoID" ); --- > adminwritelog( "{$admtext['addnewrepo']}: $tree/$repoID" ); diff -r TNG/admin_addreport.php TNG1403/admin_addreport.php 29,30c29,30 < $query = "INSERT INTO $reports_table (reportname, reportdesc, rank, active, display, criteria, orderby, sqlselect) VALUES (?,?,?,?,?,?,?,?)"; < $params = array(&$template, &$reportname, &$reportdesc, &$rank, &$active, &$display, &$criteria, &$orderby, &$sqlselect); --- > $query = "INSERT INTO $reports_table (reportname, reportdesc, ranking, active, display, criteria, orderby, sqlselect) VALUES (?,?,?,?,?,?,?,?)"; > $params = array(&$template, &$reportname, &$reportdesc, &$ranking, &$active, &$display, &$criteria, &$orderby, &$sqlselect); 34c34 < adminwritelog( "{$admtext['addnewreport']}: $reportID/$reportname" ); --- > adminwritelog( "{$admtext['addnewreport']}: $reportID $reportname" ); 37a38,45 > > if( !empty($submitx) ) { > $message = $admtext['report'] . " $reportID {$admtext['succadded']}."; > header( "Location: admin_reports.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_editreport.php?reportID=$reportID" ); > } diff -r TNG/admin_addsource.php TNG1403/admin_addsource.php 11c11 < $error_pfx = $ajax ? "error:" : ""; --- > $error_pfx = !empty($ajax) ? "error:" : ""; Only in TNG1403: admin_addtemplatemsg.php diff -r TNG/admin_addtlevent.php TNG1403/admin_addtlevent.php 38c38 < $message = $admtext['tlevent'] . " $tleventID {$admtext['succadded']}."; --- > $message = $admtext['newtleventinfo'] . " $tleventID {$admtext['succadded']}."; diff -r TNG/admin_addtree.php TNG1403/admin_addtree.php 37,39c37,39 < if( !$disallowgedcreate ) $disallowgedcreate = 0; < if( !$disallowpdf ) $disallowpdf = 0; < if( !$private ) $private = 0; --- > if( empty($disallowgedcreate) ) $disallowgedcreate = 0; > if( empty($disallowpdf) ) $disallowpdf = 0; > if( empty($private) ) $private = 0; 47d46 < $message = $admtext['tree'] . " $treenamedisp {$admtext['succadded']}."; 50,51c49,57 < else < header( "Location: admin_trees.php?message=" . urlencode($message) ); --- > else { > if( !empty($submitx) || !empty($message) ) { > $message = $admtext['tree'] . " $treenamedisp {$admtext['succadded']}."; > header( "Location: admin_trees.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_edittree.php?tree=$gedcom" ); > } > } diff -r TNG/admin_adduser.php TNG1403/admin_adduser.php 20c20 < if($gedcom_mult) { --- > if( !empty($gedcom_mult) ) { 58,66c58,67 < if( !$form_allow_ged ) $form_allow_ged = 0; < if( !$form_allow_pdf ) $form_allow_pdf = 0; < if( !$form_allow_living ) $form_allow_living = 0; < if( !$form_allow_private ) $form_allow_private = 0; < if( !$form_allow_lds ) $form_allow_lds = 0; < if( !$form_allow_profile ) $form_allow_profile = 0; < if( !$no_email ) $no_email = 0; < if( !$disabled ) $disabled = 0; < if( !$preflang ) $preflang = 0; --- > if( empty($form_allow_ged) ) $form_allow_ged = 0; > if( empty($form_allow_pdf) ) $form_allow_pdf = 0; > if( empty($form_allow_living) ) $form_allow_living = 0; > if( empty($form_allow_private) ) $form_allow_private = 0; > if( empty($form_allow_private_notes) ) $form_allow_private_notes = 0; > if( empty($form_allow_lds) ) $form_allow_lds = 0; > if( empty($form_allow_profile) ) $form_allow_profile = 0; > if( empty($no_email) ) $no_email = 0; > if( empty($disabled) ) $disabled = 0; > if( empty($preflang) ) $preflang = 0; 69c70 < $dt_consent = $consented == 1 ? $today : ""; --- > $dt_consent = !empty($consented) && $consented == 1 ? $today : ""; 80,83c81,84 < $template = "ssssssssssssssssssssssssssssssssss"; < $query = "INSERT IGNORE INTO $users_table (description,username,password,password_type,realname,phone,email,website,address,city,state,zip,country,languageID,notes,gedcom,mygedcom,personID,role,allow_edit,allow_add,tentative_edit,allow_delete,allow_lds,allow_living,allow_private,allow_ged,allow_pdf,allow_profile,branch,dt_activated,dt_consented,no_email,disabled) < VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; < $params = array(&$template, &$description,&$username,&$password,&$password_type,&$realname,&$phone,&$email,&$website,&$address,&$city,&$state,&$zip,&$country,&$preflang,&$notes,&$gedcom,&$mynewgedcom,&$personID,&$role,&$form_allow_edit,&$form_allow_add,&$form_tentative_edit,&$form_allow_delete,&$form_allow_lds,&$form_allow_living,&$form_allow_private,&$form_allow_ged,&$form_allow_pdf,&$form_allow_profile,&$branch,&$today,&$dt_consent,&$no_email,&$disabled); --- > $template = "sssssssssssssssssssssssssssssssssss"; > $query = "INSERT IGNORE INTO $users_table (description,username,password,password_type,realname,phone,email,website,address,city,state,zip,country,languageID,notes,gedcom,mygedcom,personID,role,allow_edit,allow_add,tentative_edit,allow_delete,allow_lds,allow_living,allow_private,allow_private_notes,allow_ged,allow_pdf,allow_profile,branch,dt_activated,dt_consented,no_email,disabled) > VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; > $params = array(&$template, &$description,&$username,&$password,&$password_type,&$realname,&$phone,&$email,&$website,&$address,&$city,&$state,&$zip,&$country,&$preflang,&$notes,&$gedcom,&$mynewgedcom,&$personID,&$role,&$form_allow_edit,&$form_allow_add,&$form_tentative_edit,&$form_allow_delete,&$form_allow_lds,&$form_allow_living,&$form_allow_private,&$form_allow_private_notes,&$form_allow_ged,&$form_allow_pdf,&$form_allow_profile,&$branch,&$today,&$dt_consent,&$no_email,&$disabled); 86c87 < if( $notify && $email ) { --- > if( !empty($notify) && !empty($email) ) { 89c90 < tng_sendmail($owner, $emailaddr, $realname, $email, $admtext['activated'], $welcome, $emailaddr, $emailaddr); --- > tng_sendmail($owner, $emailaddr, $realname, $email, $admtext['subjectline'], $welcome, $emailaddr, $emailaddr); 95d95 < $message = $admtext['user'] . " $username {$admtext['succadded']}."; 107c107,113 < header( "Location: admin_users.php?message=" . urlencode($message) ); --- > if( !empty($submitx) || !empty($message) ) { > $message = $admtext['user'] . " $username {$admtext['succadded']}."; > header( "Location: admin_users.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_edituser.php?userID=$userID" ); > } diff -r TNG/admin_albums.php TNG1403/admin_albums.php 11a12,13 > if( !isset($offset) ) $offset = 0; > 13c15 < if( $newsearch ) { --- > if( !empty($newsearch) ) { 21,24c23,26 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_album_post']['search']); < if( !$tree ) < $tree = $_COOKIE['tng_search_album_post']['tree']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_album_post']['search']) ? stripslashes($_COOKIE['tng_search_album_post']['search']) : ""; > if( empty($tree) ) > $tree = isset($_COOKIE['tng_search_album_post']['tree']) ? $_COOKIE['tng_search_album_post']['tree'] : ""; 26,27c28,29 < $tngpage = $_COOKIE['tng_search_album_post']['tngpage']; < $offset = $_COOKIE['tng_search_album_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_album_post']['tngpage']) ? $_COOKIE['tng_search_album_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_album_post']['offset']) ? $_COOKIE['tng_search_album_post']['offset'] : 0; 30a33 > if( !isset($tngpage) ) $tngpage = 1; 35,40c38,39 < if (get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } < else < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); 83d81 < $flags['tabs'] = $tngconfig['tabs']; 89,90d86 < < 91a88,89 > echo tng_adminlayout(); > 100,103c98,99 < < < < <
<
--- >
>
124c120 < $pagenav = get_browseitems_nav( $totrows, "admin_albums.php?searchstring=$searchstring&exactmatch=$exactmatch&offset", $maxsearchresults, 5 ); --- > $pagenav = get_browseitems_nav( $totrows, "admin_albums.php?searchstring=$searchstring&offset", $maxsearchresults, 5 ); 128c124 < --- >
156,157c152,153 < $tmediatypeID = $trow['mediatypeID']; < $tusefolder = $trow['usecollfolder'] ? $mediatypes_assoc[$tmediatypeID] : $mediapath; --- > $tmediatypeID = isset($trow['mediatypeID']) ? $trow['mediatypeID'] : ""; > $tusefolder = !empty($trow['usecollfolder']) ? $mediatypes_assoc[$tmediatypeID] : $mediapath; 161c157 < if( $trow['thumbpath'] && file_exists( "$rootpath$tusefolder/" . $trow['thumbpath'] ) ) { --- > if( !empty($trow['thumbpath']) && file_exists( "$rootpath$tusefolder/" . $trow['thumbpath'] ) ) { 163c159 < echo "\"{$row['albumname']}\""; --- > echo "\"{$row['albumname']}\""; 183,184c179,181 < $query = "SELECT people.personID as personID2, familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, nameorder, < $album2entities_table.entityID as personID, $sources_table.title, $sources_table.sourceID, $repositories_table.repoID, reponame --- > $query = "SELECT people.personID as personID2, people.gedcom as pgedcom, familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, nameorder, people.title, > people.living, people.private, people.branch, people.gedcom, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, $families_table.familyID, $families_table.gedcom as fgedcom, $families_table.branch as fbranch, > $album2entities_table.entityID as personID, $sources_table.title as stitle, $sources_table.sourceID, $sources_table.gedcom as sgedcom, $repositories_table.repoID, reponame, $repositories_table.gedcom as rgedcom 194d190 < $prow['allow_living'] = 1; 196c192,195 < $alinktext .= "
  • " . getName( $prow ) . " ({$prow['personID2']})
  • \n"; --- > $rights = determineLivingPrivateRights($prow); > $prow['allow_living'] = $rights['living']; > $prow['allow_private'] = $rights['private']; > $alinktext .= "
  • " . getName( $prow ) . " ({$prow['personID2']})
  • \n"; 199,200c198,199 < $sourcetext = $prow['title'] ? "{$admtext['source']}: {$prow['title']}" : "{$admtext['source']}: {$prow['sourceID']}"; < $alinktext .= "
  • $sourcetext ({$prow['sourceID']})
  • \n"; --- > $sourcetext = $prow['stitle'] ? "{$admtext['source']}: {$prow['stitle']}" : "{$admtext['source']}: {$prow['sourceID']}"; > $alinktext .= "
  • $sourcetext ({$prow['sourceID']})
  • \n"; 204c203,212 < $alinktext .= "
  • $repotext ({$prow['repoID']})
  • \n"; --- > $alinktext .= "
  • $repotext ({$prow['repoID']})
  • \n"; > } > elseif( $prow['familyID'] != NULL ) { > $prow['linktype'] = "F"; > $prow['gedcom'] = $prow['fgedcom']; > $prow['branch'] = $prow['fbranch']; > $rights = determineLivingPrivateRights($prow); > $prow['allow_living'] = $rights['living']; > $prow['allow_private'] = $rights['private']; > $alinktext .= "
  • {$admtext['family']}: " . getFamilyName( $prow ) . "
  • \n"; 206,207d213 < elseif( $prow['familyID'] != NULL ) < $alinktext .= "
  • {$admtext['family']}: " . getFamilyName( $prow ) . "
  • \n"; 228,233c234,237 < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file Only in TNG: admin_analyzemods.php diff -r TNG/admin_associations.php TNG1403/admin_associations.php 7a8 > $admin_login = 1; 10c11 < $query = "SELECT firstname, lastname, lnprefix, nameorder, prefix, suffix, branch, living, private, gedcom FROM $people_table --- > $query = "SELECT firstname, lastname, lnprefix, nameorder, prefix, suffix, title, branch, living, private, gedcom FROM $people_table 15,19c16,25 < $righttree = checktree($tree); < $rightbranch = $righttree ? checkbranch($row['branch']) : false; < $rights = determineLivingPrivateRights($row, $righttree, $rightbranch); < $row['allow_living'] = $rights['living']; < $row['allow_private'] = $rights['private']; --- > $namestr = ""; > if($row) { > $righttree = checktree($tree); > $rightbranch = $righttree ? checkbranch($row['branch']) : false; > $rights = determineLivingPrivateRights($row, $righttree, $rightbranch); > $row['allow_living'] = $rights['living']; > $row['allow_private'] = $rights['private']; > > $namestr = getName($row); > } 21d26 < $namestr = getName($row); 56c61 < $query = "SELECT firstname, lastname, lnprefix, nameorder, prefix, suffix, living, private, branch FROM $people_table WHERE personID=\"{$assoc['passocID']}\" AND gedcom=\"$tree\""; --- > $query = "SELECT firstname, lastname, lnprefix, nameorder, prefix, suffix, title, birthplace, birthdate, birthdatetr, deathplace, deathdate, altbirthdate, altbirthdatetr, altbirthplace, burialdate, living, private, branch, gedcom FROM $people_table WHERE personID=\"{$assoc['passocID']}\" AND gedcom=\"$tree\""; 78,79c83,84 < $actionstr = $allow_edit ? "" : ""; < $actionstr .= $allow_delete ? "" : ""; --- > $actionstr = $allow_edit ? "" : ""; > $actionstr .= $allow_delete ? "" : ""; diff -r TNG/admin_backup.php TNG1403/admin_backup.php 20a21,22 > $fullbackuppath = !empty($tngconfig['saveconfig']) ? $subroot . $backuppath : $rootpath . $backuppath; > 22c24 < global $rootpath, $backuppath, $largechunk, $admtext; --- > global $rootpath, $fullbackuppath, $largechunk, $admtext, $dosql, $docreate, $dodrop; 27,28c29,34 < $filename = "$rootpath$backuppath/$table.bak"; < if( file_exists( $filename ) ) unlink( $filename ); --- > $dosql = $dosql == "true" || $dosql == 1 ? true : false; > $docreate = $docreate == "true" || $docreate == 1 ? true : false; > $dodrop = $dodrop == "true" || $dodrop == 1? true : false; > > $filename = $dosql ? "$fullbackuppath/$table.sql" : "$fullbackuppath/$table.bak"; > delbackup($table); 32a39,51 > $insertline = ""; > if($dosql) { > if($docreate) { > if($dodrop) { > fwrite( $fp, "DROP TABLE IF EXISTS $table;\n" ); > } > $query = "SHOW CREATE TABLE $table"; > $result = tng_query($query); > $row = tng_fetch_array( $result, 'num' ); > fwrite( $fp, "$row[1];\n" ); > } > } > $firstline = true; 37c56,57 < $more_rows = ( $largechunk == tng_num_rows( $result )); --- > $total_chunk_rows = tng_num_rows( $result ); > $more_rows = ( $largechunk == $total_chunk_rows); 39c59 < if ($writeflds) { --- > if( $writeflds || ($dosql && !$insertline)) { 41c61 < for ($i=0; $i < $nflds; $i++) { --- > for($i = 0; $i < $nflds; $i++) { 45c65,74 < fwrite($fp, trim($fields,',')."\n"); --- > if($dosql) { > if( $total_chunk_rows > 0 ) { > $insertline = "INSERT INTO $table (" . trim($fields,',') . ") VALUES\n"; > fwrite($fp, $insertline); > } > else > $insertline = "empty"; > } > else > fwrite($fp, trim($fields,',')."\n"); 49a79,86 > if($firstline) > $firstline = false; > else { > if($dosql) > fwrite($fp, ",\n"); > else > fwrite($fp, "\n"); > } 52,54c89,94 < if($row[$i] == "" && ($fieldtypes[$i] == 3 || $fieldtypes[$i] == 2 || $fieldtypes[$i] == 1)) $row[$i] = "0"; < if($row[$i] == "" && ($fieldtypes[$i] == 12)) $row[$i] = "0000-00-00 00:00:00"; < $line .= '"' . addslashes( $row[$i] ) . '",'; --- > if($row[$i] == "" && isset($fieldtypes[$i]) && ($fieldtypes[$i] == 3 || $fieldtypes[$i] == 2 || $fieldtypes[$i] == 1)) $row[$i] = "0"; > if($row[$i] == "" && isset($fieldtypes[$i]) && ($fieldtypes[$i] == 12)) $row[$i] = "0000-00-00 00:00:00"; > $line .= '"' . (isset($row[$i]) ? addslashes( $row[$i] ) : $row[$i]) . '",'; > $line = preg_replace("/\r/", "\\\\r", $line); > $line = preg_replace("/\n/", "\\\\n", $line); > //$line = preg_replace("/[\n\r]/", "\\\\n", $line); 56c96,103 < fwrite($fp, trim($line,',')."\n"); --- > if($dosql) > fwrite($fp, "(" . trim($line,',') . ")"); > else > fwrite($fp, trim($line,',').""); > } > if(!$dosql) { > fwrite($fp, "\n"); > $firstline = true; 59a107,108 > if($dosql && $insertline != "empty") > fwrite($fp, ";"); 71c120 < global $rootpath, $backuppath; --- > global $rootpath, $fullbackuppath; 73c122,124 < $filename = "$rootpath$backuppath/$table.bak"; --- > $filename = "$fullbackuppath/$table.sql"; > if( file_exists( $filename ) ) unlink( $filename ); > $filename = "$fullbackuppath/$table.bak"; 101c152 < $languages_table, $places_table, $states_table, $countries_table, $sources_table, $repositories_table, $citations_table, $reports_table, --- > $image_tags_table, $languages_table, $places_table, $states_table, $countries_table, $sources_table, $repositories_table, $citations_table, $reports_table, 104a156 > foreach($tablelist as $tablecheck) if(!isset(${$tablecheck})) ${$tablecheck} = false; 107,108c159,163 < $filename = "$rootpath$backuppath/tng_tablestructure.bak"; < if( file_exists( $filename ) ) unlink( $filename ); --- > $filename = "$fullbackuppath/tng_tablestructure.sql"; > if( file_exists( $filename ) ) > unlink( $filename ); > elseif( file_exists( "$fullbackuppath/tng_tablestructure.bak" ) ) > unlink( "$fullbackuppath/tng_tablestructure.bak" ); 133c188 < eval( "\$dothistable = \"\$$table\";" ); --- > $dothistable = $$table; 144c199 < eval( "\$dothistable = \"\$$table\";" ); --- > $dothistable = $$table; 159,162c214,219 < $fileflag = $tablename && file_exists("$rootpath$backuppath/$tablename.bak"); < $timestamp = getfiletime( "$rootpath$backuppath/$tablename.bak" ); < $size = getfilesize("$rootpath$backuppath/$tablename.bak"); < $ajaxmsg = "$tablename&$timestamp&$size&" . (($ajaxmsg) ? $ajaxmsg : $admtext['succbackedup']); --- > $ext = $dosql == "true" || $dosql == "1" || $dosql == 1 ? ".sql" : ".bak"; > $filename = "$fullbackuppath/$tablename$ext"; > $fileflag = $tablename && file_exists($filename); > $timestamp = getfiletime($filename); > $size = getfilesize($filename); > $ajaxmsg = "$tablename&$timestamp&$size&$backuppath/$tablename$ext&" . (($ajaxmsg) ? $ajaxmsg : $admtext['succbackedup']); diff -r TNG/admin_branches.php TNG1403/admin_branches.php 32,33c32,33 < if( $newsearch ) { < $exptime = 05; --- > $exptime = 0; > if( !empty($newsearch) ) { 41,44c41,44 < if( !$searchstring ) < $searchstring = $_COOKIE['tng_search_branches_post']['search']; < if( !$tree ) < $tree = $_COOKIE['tng_tree']; --- > if( empty($searchstring) ) > $searchstring =isset($_COOKIE['tng_search_branches_post']['search']) ? $_COOKIE['tng_search_branches_post']['search'] : ""; > if( empty($tree) ) > $tree = isset($_COOKIE['tng_tree']) ? $_COOKIE['tng_tree'] : ""; 46,47c46,47 < $tngpage = $_COOKIE['tng_search_branches_post']['tngpage']; < $offset = $_COOKIE['tng_search_branches_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_branches_post']['tngpage']) ? $_COOKIE['tng_search_branches_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_branches_post']['offset']) ? $_COOKIE['tng_search_branches_post']['offset'] : 0; 50c50,51 < $exptime = 0; --- > if( !isset($tngpage) ) $tngpage = 1; > if( !isset($offset) ) $offset = 0; 55,58c56,60 < if (get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } --- > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); > > if(!empty($order)) > setcookie("tng_search_branches_post[order]", $order, $exptime); 60c62 < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > $order = isset($_COOKIE['tng_search_branches_post']['order']) ? $_COOKIE['tng_search_branches_post']['order'] : "desc"; 61a64 > if( !isset($offset) ) $offset = 0; 80a84,108 > $idsort = "id"; > $descsort = "descup"; > $descicon = "\"\""; > $ascicon = "\"\""; > > if($order == "id") { > $orderstr = "branch, $branches_table.description"; > $idsort = "{$admtext['branchid']} $descicon"; > } > else { > $idsort = "{$admtext['branchid']} $ascicon"; > if($order == "idup") > $orderstr = "branch DESC, $branches_table.description DESC"; > } > > if($order == "desc") { > $orderstr = "$branches_table.description"; > $descsort = "{$admtext['description']} $descicon"; > } > else { > $descsort = "{$admtext['description']} $ascicon"; > if($order == "descup") > $orderstr = "$branches_table.description DESC"; > } > 84c112,113 < $query = "SELECT $branches_table.gedcom as gedcom, branch, $branches_table.description as description, personID, treename FROM $branches_table LEFT JOIN $trees_table ON $trees_table.gedcom = $branches_table.gedcom $wherestr ORDER BY $branches_table.description LIMIT $newoffset" . $maxsearchresults; --- > $query = "SELECT $branches_table.gedcom as gedcom, branch, $branches_table.description as description, personID, treename > FROM $branches_table LEFT JOIN $trees_table ON $trees_table.gedcom = $branches_table.gedcom $wherestr ORDER BY $orderstr LIMIT $newoffset" . $maxsearchresults; 100d128 < $flags['tabs'] = $tngconfig['tabs']; 113,114d140 < < 115a142,143 > echo tng_adminlayout(); > 123,126c151,152 < < < --- > 191c190 <
    --- >
    197,199c196,198 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_cemeteries.php TNG1403/admin_cemeteries.php 12a13,15 > if(!isset($searchstring)) $searchstring = ""; > if(!isset($tngpage)) $tngpage = ""; > 14c17 < if( $newsearch ) { --- > if(!empty($newsearch)) { 19d21 < setcookie("tng_search_cemeteries_post[offset]", 0, $exptime); 22c24 < if( !$searchstring ) --- > if(!$searchstring && isset($_COOKIE['tng_search_cemeteries_post']['search'])) 25,26c27,28 < $tngpage = $_COOKIE['tng_search_cemeteries_post']['tngpage']; < $offset = $_COOKIE['tng_search_cemeteries_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_cemeteries_post']['tngpage']) ? $_COOKIE['tng_search_cemeteries_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_cemeteries_post']['offset']) ? $_COOKIE['tng_search_cemeteries_post']['offset'] : 0; 30,31c32,33 < setcookie("tng_search_cemeteries_post[tngpage]", $tngpage, $exptime); < setcookie("tng_search_cemeteries_post[offset]", $offset, $exptime); --- > setcookie("tng_search_cemeteries_post[tngpage]", (isset($tngpage) ? $tngpage : 1), $exptime); > setcookie("tng_search_cemeteries_post[offset]", (isset($offset) ? $offset : 0), $exptime); 34,39c36,38 < if(get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } < else < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > if(!isset($offset)) $offset = 0; > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); 98d96 < $flags['tabs'] = $tngconfig['tabs']; 111,112d108 < < 113a110,111 > echo tng_adminlayout(); > 121,124c119,120 <
    <
    --- >
    >
    172c198 < --- > 177,179c203,205 < < < --- >
      
    > > 183c209 < --- > 187,192c213,218 < < < < < < --- > > > > > > 208c234 < echo "\n"; --- > echo "\n"; 210,211c236,237 < echo ""; < $editlink = "admin_editbranch.php?branch={$row['branch']}&tree={$row['gedcom']}"; --- > echo ""; > $editlink = "admin_editbranch.php?branch={$row['branch']}&tree={$row['gedcom']}"; 234c260 < echo $admtext['notrees']; --- > echo $admtext['nobranch']; 238,244c264,267 < < < <
                                  
    $newactionstr
    $newactionstr
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_branchlabels.php TNG1403/admin_branchlabels.php 380d379 < $flags['tabs'] = $tngconfig['tabs']; 385,386d383 < < 387a385,386 > echo tng_adminlayout(); > 451,453c450,452 < $tng_title, v.$tng_version
    "; ?> < < --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_branchmenu.php TNG1403/admin_branchmenu.php 36d35 < $flags['tabs'] = $tngconfig['tabs']; 110,111d108 < < 112a110,111 > echo tng_adminlayout(); > 150c149 <

    :

    :
    < < > > diff -r TNG/admin_changetree.php TNG1403/admin_changetree.php 7a8 > $admin_login = 1; 21,49c22,74 < $query = "UPDATE $people_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $mostwanted_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $temp_events_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $users_table SET mygedcom=\"$newtree\", personID=\"$newID\" WHERE mygedcom=\"$oldtree\" AND personID=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $families_table SET husband=\"\" WHERE gedcom=\"$oldtree\" AND husband=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $families_table SET wife=\"\" WHERE gedcom=\"$oldtree\" AND wife=\"$entityID\""; < $result = tng_query($query); < < $query = "DELETE FROM $branchlinks_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; < $result = tng_query($query); < < $query = "DELETE FROM $citations_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; < $result = tng_query($query); < < $query = "DELETE FROM $children_table WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; < $result = tng_query($query); < < $query = "DELETE FROM $assoc_table WHERE gedcom=\"$oldtree\" AND (personID=\"$entityID\" OR passocID=\"$entityID\")"; < $result = tng_query($query); --- > if($operation == "0") { > $query = "UPDATE $people_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $mostwanted_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $temp_events_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $users_table SET mygedcom=\"$newtree\", personID=\"$newID\" WHERE mygedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $families_table SET husband=\"\" WHERE gedcom=\"$oldtree\" AND husband=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $families_table SET wife=\"\" WHERE gedcom=\"$oldtree\" AND wife=\"$entityID\""; > $result = tng_query($query); > > $query = "DELETE FROM $branchlinks_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; > $result = tng_query($query); > > $query = "DELETE FROM $citations_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; > $result = tng_query($query); > > $query = "DELETE FROM $children_table WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > > $query = "DELETE FROM $assoc_table WHERE gedcom=\"$oldtree\" AND (personID=\"$entityID\" OR passocID=\"$entityID\")"; > $result = tng_query($query); > } > else { > $query = "SELECT * FROM $people_table WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > $row = tng_fetch_assoc($result); > tng_free_result($result); > > $newrow = array(); > foreach($row as $key => $value) { > $newrow[$key] = addslashes($value); > } > $row = $newrow; > $query = "INSERT INTO $people_table (personID,firstname,lnprefix,lastname,nickname,prefix,suffix,title,nameorder,living,private,birthdate,birthdatetr,birthplace,sex,altbirthtype,altbirthdate, > altbirthdatetr,altbirthplace,deathdate,deathdatetr,deathplace,burialdate,burialdatetr,burialplace,burialtype,baptdate,baptdatetr,baptplace,confdate,confdatetr,confplace,initdate,initdatetr, > initplace,endldate,endldatetr,endlplace,changedate,gedcom,branch,changedby,famc,metaphone,edituser,edittime) > VALUES(\"$newID\",\"{$row['firstname']}\",\"{$row['lnprefix']}\",\"{$row['lastname']}\",\"{$row['nickname']}\",\"{$row['prefix']}\",\"{$row['suffix']}\",\"{$row['title']}\",\"{$row['nameorder']}\", > \"{$row['living']}\",\"{$row['private']}\",\"{$row['birthdate']}\",\"{$row['birthdatetr']}\",\"{$row['birthplace']}\",\"{$row['sex']}\",\"{$row['altbirthtype']}\",\"{$row['altbirthdate']}\", > \"{$row['altbirthdatetr']}\",\"{$row['altbirthplace']}\",\"{$row['deathdate']}\",\"{$row['deathdatetr']}\",\"{$row['deathplace']}\",\"{$row['burialdate']}\",\"{$row['burialdatetr']}\", > \"{$row['burialplace']}\",\"{$row['burialtype']}\",\"{$row['baptdate']}\",\"{$row['baptdatetr']}\",\"{$row['baptplace']}\",\"{$row['confdate']}\",\"{$row['confdatetr']}\", > \"{$row['confplace']}\",\"{$row['initdate']}\",\"{$row['initdatetr']}\",\"{$row['initplace']}\",\"{$row['endldate']}\",\"{$row['endldatetr']}\",\"{$row['endlplace']}\", > \"{$row['changedate']}\",\"$newtree\",\"\",\"$currentuser\",\"{$row['famc']}\",\"{$row['metaphone']}\",\"{$row['edituser']}\",\"{$row['edittime']}\")"; > $result = tng_query($query); > } 55,59c80,102 < $query = "UPDATE $sources_table SET gedcom=\"$newtree\", sourceID=\"$newID\" WHERE gedcom=\"$oldtree\" AND sourceID=\"$entityID\""; < $result = tng_query($query); < < $query = "DELETE FROM $citations_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; < $result = tng_query($query); --- > if($operation == "0") { > $query = "UPDATE $sources_table SET gedcom=\"$newtree\", sourceID=\"$newID\" WHERE gedcom=\"$oldtree\" AND sourceID=\"$entityID\""; > $result = tng_query($query); > > $query = "DELETE FROM $citations_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; > $result = tng_query($query); > } > else { > $query = "SELECT * FROM $sources_table WHERE gedcom=\"$oldtree\" AND sourceID=\"$entityID\""; > $result = tng_query($query); > $row = tng_fetch_assoc($result); > tng_free_result($result); > $newrow = array(); > foreach($row as $key => $value) { > $newrow[$key] = addslashes($value); > } > $row = $newrow; > > $query = "INSERT INTO $sources_table (sourceID,shorttitle,title,author,callnum,publisher,repoID,actualtext,changedate,gedcom,changedby,type,other,comments) > VALUES(\"$newID\",\"{$row['shorttitle']}\",\"{$row['title']}\",\"{$row['author']}\",\"{$row['callnum']}\",\"{$row['publisher']}\",\"\",\"{$row['actualtext']}\",\"{$row['changedate']}\", > \"$newtree\",\"{$row['currentuser']}\",\"{$row['type']}\",\"{$row['other']}\",\"{$row['comments']}\")"; > $result = tng_query($query); > } 65,69c108,148 < $query = "UPDATE $repositories_table SET gedcom=\"$newtree\", repoID=\"$newID\" WHERE gedcom=\"$oldtree\" AND repoID=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $sources_table SET repoID=\"\" WHERE gedcom=\"$oldtree\" AND repoID=\"$entityID\""; < $result = tng_query($query); --- > if($operation == "0") { > $query = "UPDATE $repositories_table SET gedcom=\"$newtree\", repoID=\"$newID\" WHERE gedcom=\"$oldtree\" AND repoID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $sources_table SET repoID=\"\" WHERE gedcom=\"$oldtree\" AND repoID=\"$entityID\""; > $result = tng_query($query); > } > else { > $query = "SELECT * FROM $repositories_table WHERE gedcom=\"$oldtree\" AND repoID=\"$entityID\""; > $result = tng_query($query); > $row = tng_fetch_assoc($result); > tng_free_result($result); > $newrow = array(); > foreach($row as $key => $value) { > $newrow[$key] = addslashes($value); > } > $row = $newrow; > > if($row['addressID']) { > $query = "SELECT * FROM $address_table WHERE addressID=\"{$row['addressID']}\""; > $result = tng_query($query); > $arow = tng_fetch_assoc($result); > tng_free_result($result); > $addressID = tng_insert_id(); > $newrow = array(); > foreach($arow as $key => $value) { > $newrow[$key] = addslashes($value); > } > $arow = $newrow; > > $query = "INSERT INTO $address_table (addressID,address1, address2, city, state, zip, country, gedcom, phone, email, www) > VALUES(\"$addressID\",\"{$arow['address1']}\",\"{$arow['address2']}\",\"{$arow['city']}\",\"{$arow['state']}\",\"{$arow['zip']}\",\"{$arow['country']}\",\"{$arow['tree']}\",\"{$arow['phone']}\",\"{$arow['email']}\",\"{$arow['www']}\")"; > $result = tng_query($query); > } > else > $addressID = ""; > > $query = "INSERT INTO $repositories_table (repoID,reponame,addressID,changedate,gedcom,changedby) > VALUES(\"$newID\",\"{$row['reponame']}\",\"{$addressID}\",\"{$row['changedate']}\",\"$newtree\",\"{$row['currentuser']}\")"; > $result = tng_query($query); > } 74,86c153,177 < $query = "SELECT addressID FROM $events_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\" AND addressID!=\"\""; < $result = tng_query($query); < while($row = tng_fetch_assoc($result)) { < $query = "UPDATE $address_table SET gedcom=\"$newtree\" WHERE addressID=\"{$row['addressID']}\""; < $result2 = tng_query($query); < } < tng_free_result($result); < < $query = "UPDATE $events_table SET gedcom=\"$newtree\", persfamID=\"$newID\" WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; < $result = tng_query($query); < < $query = "UPDATE $album2entities_table SET gedcom=\"$newtree\", entityID=\"$newID\" WHERE gedcom=\"$oldtree\" AND entityID=\"$entityID\""; < $result = tng_query($query); --- > if($operation == "0") { > $query = "SELECT addressID FROM $events_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\" AND addressID!=\"\""; > $result = tng_query($query); > while($row = tng_fetch_assoc($result)) { > $query = "UPDATE $address_table SET gedcom=\"$newtree\" WHERE addressID=\"{$row['addressID']}\""; > $result2 = tng_query($query); > } > tng_free_result($result); > > $query = "UPDATE $events_table SET gedcom=\"$newtree\", persfamID=\"$newID\" WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $album2entities_table SET gedcom=\"$newtree\", entityID=\"$newID\" WHERE gedcom=\"$oldtree\" AND entityID=\"$entityID\""; > $result = tng_query($query); > > $query = "UPDATE $medialinks_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; > $result = tng_query($query); > > $query = "SELECT xnoteID FROM $notelinks_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\" AND xnoteID!=\"\""; > $result = tng_query($query); > while($row = tng_fetch_assoc($result)) { > $query = "UPDATE $xnotes_table SET gedcom=\"$newtree\" WHERE ID=\"{$row['xnoteID']}\""; > $result2 = tng_query($query); > } > tng_free_result($result); 88,95c179,183 < $query = "UPDATE $medialinks_table SET gedcom=\"$newtree\", personID=\"$newID\" WHERE gedcom=\"$oldtree\" AND personID=\"$entityID\""; < $result = tng_query($query); < < $query = "SELECT xnoteID FROM $notelinks_table WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\" AND xnoteID!=\"\""; < $result = tng_query($query); < while($row = tng_fetch_assoc($result)) { < $query = "UPDATE $xnotes_table SET gedcom=\"$newtree\" WHERE ID=\"{$row['xnoteID']}\""; < $result2 = tng_query($query); --- > $query = "UPDATE $notelinks_table SET gedcom=\"$newtree\", persfamID=\"$newID\" WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; > $result = tng_query($query); > } > else { > //insert copies of events, notelinks and notes 97,100d184 < tng_free_result($result); < < $query = "UPDATE $notelinks_table SET gedcom=\"$newtree\", persfamID=\"$newID\" WHERE gedcom=\"$oldtree\" AND persfamID=\"$entityID\""; < $result = tng_query($query); diff -r TNG/admin_checkemail.php TNG1403/admin_checkemail.php 7a8 > $admin_login = 1; diff -r TNG/admin_checkfile.php TNG1403/admin_checkfile.php 6a7 > $admin_login = 1; diff -r TNG/admin_checkID.php TNG1403/admin_checkID.php 7a8 > $admin_login = 1; diff -r TNG/admin_citations.php TNG1403/admin_citations.php 7a8 > $admin_login = 1; 20c21,26 < if( $eventtype['display'] ) { --- > $query = "SELECT altbirthtype FROM $people_table WHERE personID=\"$persfamID\" AND gedcom=\"$tree\""; > $presult = tng_query($query); > $prow = tng_fetch_assoc( $presult ); > tng_free_result($presult); > > if(!empty($eventtype['display'])) { 36c42 < elseif( $eventtype['tag'] ) --- > elseif(!empty($eventtype['tag'])) 49c55 < $xnotestr = $noteID ? " OR persfamID = \"$noteID\"" : ""; --- > $xnotestr = isset($noteID) ? " OR persfamID = \"$noteID\"" : ""; 72c78 < --- > 142a149,190 > if($eventID != 'SLGC') { > ?> > > > > } > ?> 162c210 < --- > diff -r TNG/admin_cleartree.php TNG1403/admin_cleartree.php 20a21 > if(!isset($gedcom)) $gedcom = ""; diff -r TNG/admin_corner.php TNG1403/admin_corner.php 9c9 <
    The Next Generation of Genealogy Sitebuilding
    --- >
    The Next Generation of Genealogy Sitebuilding
    diff -r TNG/admin_cust_text_update.php TNG1403/admin_cust_text_update.php 83a84,85 > ?> > \ No newline at end of file diff -r TNG/admin_dataimport.php TNG1403/admin_dataimport.php 4c4 < $textpart = "index"; --- > $textpart = "gedimport"; 13,14d12 < //$checksecs = $tngconfig['checksecs'] && is_numeric($tngconfig['checksecs']) ? $tngconfig['checksecs'] : 20; < 28a27,28 > if( !isset($tngimpcfg['defimpopt']) ) $tngimpcfg['defimpopt'] = 0; > if( !isset($debug) ) $debug = false; 42d41 < $flags['tabs'] = $tngconfig['tabs']; 62d60 < var checksecs = ; 68a67,71 > var finished_msg = ""; > var importing_msg = ""; > var removeged_msg = ""; > var close_msg = ""; > var more_options = ""; 86,87d88 < < 88a90,91 > echo tng_adminlayout(); > 101c104 < $datatabs['2'] = array(1,"admin_secondmenu.php",$admtext['secondarymaint'],"second"); --- > $datatabs['2'] = array(1,"admin_secondmenu.php",$admtext['secondary'],"second"); 104c107 < echo displayHeadline($admtext['datamaint'] . " >> " . $admtext['gedimport'],"img/data_icon.gif",$menu,$message); --- > echo displayHeadline($admtext['datamaint'] . " >> " . $admtext['gedimport'], "img/data_icon.gif", $menu, (isset($message) ? $message : "")); 106a110 >
    108,110c112,114 <
    <
    --- >
    >
    144c140 < $pagenav = get_browseitems_nav( $totrows, "admin_cemeteries.php?searchstring=$searchstring&exactmatch=$exactmatch&offset", $maxsearchresults, 5 ); --- > $pagenav = get_browseitems_nav( $totrows, "admin_cemeteries.php?searchstring=$searchstring&exactmatch=" . (isset($exactmatch) ? $exactmatch : "") . "&offset", $maxsearchresults, 5 ); 154c150 < --- > 160c156 < --- >
    193c189 < $actionstr .= ""; --- > $actionstr .= ""; 252,257c248,251 < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_changetreeform.php TNG1403/admin_changetreeform.php 7a8 > $admin_login = 1; 74a76,78 >
     
    > >
    : :
    < <
    --- > > > < > < >
    132,133c136,137 <
    --- >
    145c149 < if( $newtree && $newtree == $trees[$treectr] ) echo " selected"; --- > if( !empty($newtree) && $newtree == $trees[$treectr] ) echo " selected"; 154c158 <   --- >   172,173c176,177 <
    --- >
    182c186 < --- > 204c208,215 <

    --- >
    >

    >

      >
    • >
    • >
    • >
    >

    212a224 >
    214,216c226,228 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_data_validation.php TNG1403/admin_data_validation.php 18c18 < else --- > else { 19a20,22 > if( empty($tree) && isset( $_COOKIE['tng_val_post']['tree']) ) > $tree = $_COOKIE['tng_val_post']['tree']; > } 31,32c34 < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['validation'], $flags ); --- > tng_adminheader( $admtext['dataval'], $flags ); 48,49d49 < < 50a51,52 > echo tng_adminlayout(); > 56d57 < $innermenu .= "  |  {$admtext['test']}"; 60c61 < $reports = array('wr_gender','unk_gender','marr_young','marr_aft_death','marr_bef_birth','died_bef_birth','parents_younger','children_late','not_living','not_dead') --- > $reports = array('wr_gender','unk_gender','marr_young','marr_aft_death','marr_bef_birth','died_bef_birth','parents_younger','children_late','not_living','not_dead'); 63,65c64,65 < < <
    --- >
    >
    78,79c78 < if( !$assignedtree ) < echo " \n"; --- > echo " \n"; 83c82 < if( $treerow['gedcom'] == $tree ) echo " selected"; --- > if( isset($tree) && $treerow['gedcom'] == $tree ) echo " selected"; 95c94 < --- >
    101c100,101 < for($i = 1; $i <= count($reports); $i++) { --- > $num_reports = count($reports); > for($i = 1; $i <= $num_reports; $i++) { 112,122c112,116 < < < < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_defphotos.php TNG1403/admin_defphotos.php 18c18 < $query = "SELECT DISTINCT personID FROM $medialinks_table WHERE gedcom='$tree'"; --- > $query = "SELECT DISTINCT personID FROM $medialinks_table WHERE linktype != 'C' and linktype != '' and gedcom='$tree'"; 59c59 < adminwritelog( $admtext['assigndef'] . ": {$admtext['defsassigned']}: $defsdone;" ); --- > adminwritelog( $admtext['assigndefs'] . ": {$admtext['defsassigned']}: $defsdone;" ); diff -r TNG/admin_deletealbum.php TNG1403/admin_deletealbum.php 24a25,26 > $_SESSION['albumcount'] = isset($_SESSION['albumcount']) ? $_SESSION['albumcount'] - 1 : 0; > diff -r TNG/admin_deleteassoc.php TNG1403/admin_deleteassoc.php 7a8 > $admin_login = 1; 14a16,19 > //delete the association going in the opposite direction > $query = "DELETE FROM $assoc_table WHERE personID=\"$passocID\" AND passocID=\"$personID\" AND gedcom=\"$tree\""; > $result = tng_query($query); > diff -r TNG/admin_deletecitation.php TNG1403/admin_deletecitation.php 7a8 > $admin_login = 1; diff -r TNG/admin_deleteentity.php TNG1403/admin_deleteentity.php 23c23 < $newname = get_magic_quotes_gpc() == 0 ? addslashes( $delitem ) : $delitem; --- > $newname = addslashes( $delitem ); diff -r TNG/admin_deleteevent.php TNG1403/admin_deleteevent.php 31c31 < $query = "SELECT xnoteID FROM $notelinks_table WHERE eventID=\"$eventID\""; --- > $query = "DELETE FROM $medialinks_table WHERE eventID=\"$eventID\""; 33,34d32 < $row = tng_fetch_assoc( $result ); < if($result) tng_free_result( $result ); 36c34 < $query = "SELECT count(ID) as xcount FROM $notelinks_table WHERE xnoteID=\"{$row['xnoteID']}\""; --- > $query = "SELECT xnoteID FROM $notelinks_table WHERE eventID=\"$eventID\""; 40,41c38,40 < if( $row['xcount'] == 1 ) { < $query = "DELETE FROM $xnotes_table WHERE ID=\"{$row['xnoteID']}\""; --- > > if(!empty($row['xnoteID'])) { > $query = "SELECT count(ID) as xcount FROM $notelinks_table WHERE xnoteID=\"{$row['xnoteID']}\""; 42a42,47 > $row = tng_fetch_assoc( $result ); > if($result) tng_free_result( $result ); > if( $row['xcount'] == 1 ) { > $query = "DELETE FROM $xnotes_table WHERE ID=\"{$row['xnoteID']}\""; > $result = tng_query($query); > } diff -r TNG/admin_deletefile.php TNG1403/admin_deletefile.php 16,18c16,25 < $deleted = false; < if( file_exists( $filename ) ) < $deleted = unlink( $filename ); --- > if($upgrade) { > $fullpath = $rootpath . $filename; > if(!empty($dbupgrade) && file_exists($rootpath . $dbupgrade)) > unlink($rootpath . $dbupgrade); > } > else { > include($subroot . "importconfig.php"); > $fullpath = !empty($tngimpcfg['saveconfig']) ? ($subroot . $gedpath . "/" . $filename) : ($rootpath . $gedpath . "/" . $filename); > } > $deleted = file_exists( $fullpath ) ? unlink( $fullpath ) : false; 20c27,30 < echo $deleted ? $admtext['deleted'] . " " : $admtext['notdeleted']; --- > if($upgrade) > header("Location: admin.php"); > else > echo $deleted ? $admtext['deleted'] . " " : $admtext['notdeleted']; diff -r TNG/admin_deletenote.php TNG1403/admin_deletenote.php 7a8 > $admin_login = 1; diff -r TNG/admin_deleteselected.php TNG1403/admin_deleteselected.php 27c27 < if( $xsrcaction ) { --- > if( !empty($xsrcaction) ) { 33c33 < elseif( $xrepoaction ) { --- > elseif( !empty($xrepoaction) ) { 39c39 < elseif( $xperaction ) { --- > elseif( !empty($xperaction) ) { 45c45 < elseif( $xfamaction ) { --- > elseif( !empty($xfamaction) ) { 51c51 < elseif( $xplacaction ) { --- > elseif( !empty($xplacaction) ) { 57c57 < elseif( $xtimeaction ) { --- > elseif( !empty($xtimeaction) ) { 63c63 < elseif( $xuseraction ) { --- > elseif( !empty($xuseraction) ) { 69c69 < elseif( $xbranchaction ) { --- > elseif( !empty($xbranchaction) ) { 75c75,81 < elseif( $xruseraction ) { --- > elseif( !empty($xtreeaction) ) { > $query = "DELETE FROM $trees_table WHERE 1=0"; > $modmsg = "trees"; > $id = "gedcom"; > $location = "admin_trees.php"; > } > elseif( !empty($xruseraction) ) { 81c87 < elseif( $xcemaction ) { --- > elseif( !empty($xcemaction) ) { 87c93 < elseif( $xnoteaction ) { --- > elseif( !empty($xnoteaction) ) { 105c111 < if( $xperaction ) { --- > if( !empty($xperaction) ) { 113c119 < elseif( $xfamaction ) { --- > elseif( !empty($xfamaction) ) { 134c140 < elseif( $xsrcaction ) { --- > elseif( !empty($xsrcaction) ) { 149c155 < elseif( $xrepoaction ) { --- > elseif( !empty($xrepoaction) ) { 171c177 < elseif( $xplacaction ) { --- > elseif( !empty($xplacaction) ) { 180c186 < elseif( $xtimeaction ) { --- > elseif( !empty($xtimeaction) ) { 185c191,195 < elseif( $xuseraction || $xruseraction ) { --- > elseif( !empty($xtreeaction) ) { > include("micro_deletetrees.php"); > $items[] = $thisid; > } > elseif( !empty($xuseraction) || !empty($xruseraction) ) { 195c205 < elseif( $xbranchaction ) { --- > elseif( !empty($xbranchaction) ) { 202c212 < elseif( $xcemaction ) { --- > elseif( !empty($xcemaction) ) { 211c221 < elseif( $xnoteaction ) { --- > elseif( !empty($xnoteaction) ) { 223c233 < $message = $admtext['changestoallitems'] . " " . $admtext['succsaved'] . "."; --- > $message = $admtext['allitemsdeleted']; diff -r TNG/admin_diagnostics.php TNG1403/admin_diagnostics.php 26d25 < $flags['tabs'] = $tngconfig['tabs']; 31,32d29 < < 33a31,32 > echo tng_adminlayout(); > 42c41,42 < --- >
    >
    53c53 < if ($phpver >= 5.3) { --- > if ($phpver >= 7.0) { 219,220c219,221 < if (!(dirExists($backuppath))) { < $ftext .= "

    $orange {$admtext['folderdne']} $backuppath ($rootpath$backuppath)

    "; --- > $fullbackuppath = !empty($tngconfig['saveconfig']) ? $subroot . $backuppath : $rootpath . $backuppath; > if (!(dirExists($fullbackuppath))) { > $ftext .= "

    $orange {$admtext['folderdne']} $backuppath ($fullbackuppath)

    "; 223,224c224,225 < if (!(dirReadWrite($myuserid,$mygroupid,$backuppath))) { < $ftext .= "

    $orange {$admtext['rofolder']} $backuppath ($rootpath$backuppath)

    "; --- > if (!(dirReadWrite($myuserid,$mygroupid,$fullbackuppath))) { > $ftext .= "

    $orange {$admtext['rofolder']} $backuppath ($fullbackuppath)

    "; 227,228c228,230 < if (!(dirExists($gedpath))) { < $ftext .= "

    $orange {$admtext['folderdne']} $gedpath ($rootpath$gedpath)

    "; --- > $fullgedpath = !empty($tngimpcfg['saveconfig']) ? $subroot . $gedpath : $rootpath . $gedpath; > if (!(dirExists($fullgedpath))) { > $ftext .= "

    $orange {$admtext['folderdne']} $gedpath ($fullgedpath)

    "; 231,232c233,234 < if (!(dirReadWrite($myuserid,$mygroupid,$gedpath))) { < $ftext .= "

    $orange {$admtext['rofolder']} $gedpath ($rootpath$gedpath)

    "; --- > if (!(dirReadWrite($myuserid,$mygroupid,$fullgedpath))) { > $ftext .= "

    $orange {$admtext['rofolder']} $gedpath ($fullgedpath)

    "; 254,256c256 < $tng_title, v.$tng_version"; ?> < < --- > 355a356,357 > > echo tng_adminfooter(); diff -r TNG/admin_dna_groups.php TNG1403/admin_dna_groups.php 1,229c1,231 < 1 ) { < $query = "SELECT count(dna_group) as gcount FROM $dna_groups_table LEFT JOIN $trees_table ON $trees_table.gedcom = $dna_groups_table.gedcom $wherestr"; < $result2 = tng_query($query); < $row = tng_fetch_assoc( $result2 ); < $totrows = $row['gcount']; < tng_free_result($result2); < } < else < $totrows = $numrows; < < $helplang = findhelp("dna_help.php"); < < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['dna_groups'], $flags ); < ?> < < < < < < < {$admtext['help']}"; < $menu = doMenu($dnatabs,"findgroup",$innermenu); < echo displayHeadline($admtext['dna_groups'],"img/dna_icon.gif",$menu,$message); < ?> < <
    < < < < <
    <
    < <
    < < < < < < <
    : < < < < <
    < < <

    < < $pagenav

    "; < ?> <
    < <

    < < < <

    < < < < < < < < < < < < < < < "; < if( $allow_delete ) { < if( !$assignedtree ) < $actionstr .= ""; < } < < while( $row = tng_fetch_assoc($result)) { < $newactionstr = preg_replace( "/xxx/", $row['dna_group'], $actionstr ); < $newactionstr = preg_replace( "/yyy/", $row['gedcom'], $newactionstr ); < $newactionstr = preg_replace( "/zzz/", $row['test_type'], $newactionstr ); < echo "\n"; < if($allow_delete) < echo ""; < $editlink = "admin_edit_dna_group.php?dna_group={$row['dna_group']}&tree={$row['gedcom']}"; < $id = $allow_edit ? "" . $row['dna_group'] . "" : $row['dna_group']; < < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < $pcount = getGroupCount($row['gedcom'], $row['dna_group'], $dna_tests_table); < echo "\n"; < echo "\n"; < } < tng_free_result($result); < ?> <
                  
    $newactionstr
     {$row['dna_group']} {$row['description']} {$row['treename']} {$row['test_type']} $pcount 
    < $pagenav

    "; < } < else < echo $admtext['notrees']; < ?> < <
    <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( !$allow_delete || ( $assignedtree && $assignedtree != $tree ) ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > function getGroupCount($tree, $group, $table) { > global $admtext; > > $query = "SELECT count(dna_group) as count FROM $table WHERE gedcom = \"$tree\" and dna_group = \"$group\""; > $result = tng_query($query); > $row = tng_fetch_assoc($result); > $count = $row['count']; > if(!$count) $count = "0"; > tng_free_result($result); > > return $count; > } > if( !isset($offset) ) $offset = 0; > > $tng_search_groups = $_SESSION['tng_search_groups'] = 1; > if( !empty($newsearch) ) { > $exptime = 05; > setcookie("tng_search_groups_post[tree]", $tree, $exptime); > setcookie("tng_search_groups_post[tngpage]", 1, $exptime); > setcookie("tng_search_groups_post[offset]", 0, $exptime); > } > else { > if( empty($tree) ) > $tree = isset($_COOKIE['tng_search_groups_post']['tree']) ? $_COOKIE['tng_search_groups_post']['tree'] : ""; > if( !isset($offset) ) { > $tngpage = isset($_COOKIE['tng_search_groups_post']['tngpage']) ? $_COOKIE['tng_search_groups_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_groups_post']['offset']) ? $_COOKIE['tng_search_groups_post']['offset'] : 0; > } > else { > $exptime = 0; > if( !isset($tngpage) ) $tngpage = 1; > setcookie("tng_search_groups_post[tngpage]", $tngpage, $exptime); > setcookie("tng_search_groups_post[offset]", $offset, $exptime); > } > } > > if( $offset ) { > $offsetplus = $offset + 1; > $newoffset = "$offset, "; > } > else { > $offsetplus = 1; > $newoffset = ""; > $tngpage = 1; > } > > if( $assignedtree ) { > $wherestr = "WHERE gedcom = \"$assignedtree\""; > $tree = $assignedtree; > } > else > $wherestr = ""; > $orgtree = $tree; > $treequery = "SELECT gedcom, treename FROM $trees_table $wherestr ORDER BY treename"; > > $wherestr = ""; > if( $tree ) > $wherestr .= "WHERE $dna_groups_table.gedcom = \"$tree\""; > $query = "SELECT $dna_groups_table.gedcom as gedcom, dna_group, $dna_groups_table.description as description, test_type, treename FROM $dna_groups_table LEFT JOIN $trees_table ON $trees_table.gedcom = $dna_groups_table.gedcom $wherestr ORDER BY $dna_groups_table.description LIMIT $newoffset" . $maxsearchresults; > $result = tng_query($query); > > $numrows = tng_num_rows( $result ); > if( $numrows == $maxsearchresults || $offsetplus > 1 ) { > $query = "SELECT count(dna_group) as gcount FROM $dna_groups_table LEFT JOIN $trees_table ON $trees_table.gedcom = $dna_groups_table.gedcom $wherestr"; > $result2 = tng_query($query); > $row = tng_fetch_assoc( $result2 ); > $totrows = $row['gcount']; > tng_free_result($result2); > } > else > $totrows = $numrows; > > $helplang = findhelp("dna_help.php"); > > tng_adminheader( $admtext['dna_groups'], $flags ); > ?> > > > > echo tng_adminlayout(); > > $dnatabs['0'] = array(1,"admin_dna_groups.php",$admtext['search'],"findgroup"); > $dnatabs['1'] = array($allow_add,"admin_new_dna_group.php",$admtext['addnew'],"addgroup"); > $dnatabs['2'] = array(1,"admin_dna_tests.php",$admtext['dna_tests'],"findtest"); > $innermenu = "{$admtext['help']}"; > $menu = doMenu($dnatabs,"findgroup",$innermenu); > echo displayHeadline($admtext['dna_groups'],"img/dna_icon.gif",$menu,$message); > ?> > >
    >
    > > > > > > > > >
    : > > > > >
    > > >
    > > $numrowsplus = $numrows + $offset; > if( !$numrowsplus ) $offsetplus = 0; > echo displayListLocation($offsetplus,$numrowsplus,$totrows); > $pagenav = get_browseitems_nav( $totrows, "admin_dna_groups.php?offset", $maxsearchresults, 5 ); > echo "   $pagenav

    "; > ?> >
    > if( $allow_delete ) { > ?> >

    > > > >

    > } > ?> > > > > if($allow_delete) { > ?> > > } > ?> > > > > > > > > if( $numrows ) { > $actionstr = ""; > if( $allow_edit ) > $actionstr .= ""; > if( $allow_delete ) { > if( !$assignedtree ) > $actionstr .= ""; > } > > while( $row = tng_fetch_assoc($result)) { > $newactionstr = preg_replace( "/xxx/", $row['dna_group'], $actionstr ); > $newactionstr = preg_replace( "/yyy/", $row['gedcom'], $newactionstr ); > $newactionstr = preg_replace( "/zzz/", $row['test_type'], $newactionstr ); > echo "\n"; > if($allow_delete) > echo ""; > $editlink = "admin_edit_dna_group.php?dna_group={$row['dna_group']}&tree={$row['gedcom']}"; > $id = $allow_edit ? "" . $row['dna_group'] . "" : $row['dna_group']; > > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > $pcount = getGroupCount($row['gedcom'], $row['dna_group'], $dna_tests_table); > echo "\n"; > echo "\n"; > } > tng_free_result($result); > ?> >
                  
    $newactionstr
     {$row['dna_group']} {$row['description']} {$row['treename']} {$row['test_type']} $pcount 
    >
    > echo displayListLocation($offsetplus,$numrowsplus,$totrows); > echo "   $pagenav

    "; > } else { > ?> >
    > > echo $admtext['norecords']; > } > ?> > > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_dna_tests.php TNG1403/admin_dna_tests.php 1,304c1,381 < 1 ) { < $query = "SELECT count($dna_tests_table.testID) as tcount FROM $dna_tests_table $wherestr"; < $result2 = tng_query($query); < $row = tng_fetch_assoc( $result2 ); < $totrows = $row['tcount']; < tng_free_result($result2); < } < else < $totrows = $numrows; < < $helplang = findhelp("dna_help.php"); < < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['dna_tests'], $flags ); < ?> < < < < < < < {$admtext['help']}"; < $menu = doMenu($dnatabs,"findtest",$innermenu); < echo displayHeadline($admtext['dna_tests'],"img/dna_icon.gif",$menu,$message); < ?> < < < <
    <
    < <
    < < < < < < < < < <
    : < < < < <
    : < <
    < < <

    < $pagenav

    "; < ?> <
    < <

    < <    < <    < <

    < < < < < < < < < < < < < < < < < < "; < if( $allow_delete ) < $actionstr .= ""; < $actionstr .= ""; < < while( $row = tng_fetch_assoc($result)) < { < $newactionstr = preg_replace( "/xxx/", $row['testID'], $actionstr ); < echo "\n"; < if($allow_edit || $allow_delete) < echo ""; < $rights = determineLivingPrivateRights($row); < $row['allow_living'] = $rights['living']; < $row['allow_private'] = $rights['private']; < echo "\n"; < echo "\n"; < $dbname = getName($row); < if ($dbname) < echo "\n"; < else < echo "\n"; < < $mdanc_namestr = ""; < if($row['MD_ancestorID']) { < $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MD_ancestorID']); < $ancrow = tng_fetch_assoc($dna_anc_result); < $dna_righttree = checktree($row['gedcom']); < $dna_rightbranch = $dna_righttree ? checkbranch($row['branch']) : false; < $dprights = determineLivingPrivateRights($ancrow, $dna_righttree, $dna_rightbranch); < $ancrow['allow_living'] = $dprights['living']; < $ancrow['allow_private'] = $dprights['private']; < $vitalinfo = getBirthInfo($ancrow); < $mdanc_namestr = getName( $ancrow ) . "
    " . $vitalinfo; < < tng_free_result($dna_anc_result); < } < $mrcanc_namestr = ""; < if($row['MRC_ancestorID']) { < if ($row['MRC_ancestorID'][0] == $tngconfig['personprefix']) { < $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MRC_ancestorID']); < $ancrow = tng_fetch_assoc($dna_anc_result); < $ancrow['allow_living'] = $ancrow['allow_private'] = 1; < $vitalinfo = getBirthInfo($ancrow); < $mrcanc_namestr = getName( $ancrow ) . "
    " . $vitalinfo; < < tng_free_result($dna_anc_result); < } < else if ($row['MRC_ancestorID'][0] == $tngconfig['familyprefix']) { < $mrcaquery = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$row['MRC_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; < $dna_anc_result = tng_query($mrcaquery); < $ancrow = tng_fetch_assoc($dna_anc_result); < tng_free_result($dna_anc_result); < < $ancrow['allow_living'] = $ancrow['allow_private'] = 1; < < $mrcanc_namestr = getFamilyName( $ancrow ); < } < } < $privacy = $row['private_dna'] ? $admtext['text_private'] : $admtext['configsettings']; < $query = "SELECT description FROM $dna_groups_table WHERE dna_group=\"{$row['dna_group']}\""; < $descresult = tng_query($query); < $descrow = tng_fetch_assoc( $descresult ); < tng_free_result($descresult); < $group = $row['dna_group'] ? $descrow['description'] : $text['none']; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < < echo "\n"; < } < ?> <
                        
    $newactionstr
     {$row['test_type']} {$row['test_number']} " . $dbname . " " . $row['person_name'] . "
     " . $admtext['person_name'] . "
     " . $mdanc_namestr . " " . $mrcanc_namestr . " " . $privacy . " " . $group . " " . $row['gedcom'] . "
    < $pagenav

    "; < } < else < echo "
    \n" . $admtext['norecords']; < tng_free_result($result); < ?> < < < <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > include("personlib.php"); > include("tngdblib.php"); > include("$mylanguage/admintext.php"); > > $admin_login = true; > include("checklogin.php"); > include("version.php"); > function get_test_groups($test_type, $test_group) { > global $admtext, $dna_groups_table; > $wherestr2 = $test_type ? " AND test_type = \"$test_type\"" : ""; > $groupquery = "SELECT dna_group, description, test_type, gedcom FROM $dna_groups_table WHERE description IS NOT NULL $wherestr2 ORDER BY description"; > $groupsel = " \n"; > $groupresult = tng_query($groupquery); > while( $grouprow = tng_fetch_assoc($groupresult) ) { > $groupsel .= " \n"; > } > tng_free_result($groupresult); > return $groupsel; > } > > // $tree is not always set when entering with a new search. > if( !isset($tree) ) $tree = ""; > if( !empty($newsearch) ) { > $exptime = 0; > $searchstring = stripslashes(trim($searchstring)); > setcookie("tng_search_dna_post[search]", $searchstring, $exptime); > setcookie("tng_search_dna_post[test_type]", $test_type, $exptime); > setcookie("tng_search_dna_post[test_group]", $test_group, $exptime); > setcookie("tng_search_dna_post[tree]", $tree, $exptime); > setcookie("tng_search_dna_post[tngpage]", 1, $exptime); > setcookie("tng_search_dna_post[offset]", 0, $exptime); > } > else { > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_dna_post']['search']) ? stripslashes($_COOKIE['tng_search_dna_post']['search']) : ""; > if( empty($test_type) ) > $test_type = isset($_COOKIE['tng_search_dna_post']['test_type']) ? $_COOKIE['tng_search_dna_post']['test_type'] : ""; > if( empty($test_group) ) > $test_group = isset($_COOKIE['tng_search_dna_post']['test_group']) ? $_COOKIE['tng_search_dna_post']['test_group'] : ""; > if( empty($tree) ) > $tree = isset($_COOKIE['tng_search_dna_post']['tree']) ? $_COOKIE['tng_search_dna_post']['tree'] : ""; > if( !isset($offset) ) { > $tngpage = isset($_COOKIE['tng_search_dna_post']['tngpage']) ? $_COOKIE['tng_search_dna_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_dna_post']['offset']) ? $_COOKIE['tng_search_dna_post']['offset'] : 0; > } > else { > $exptime = 0; > if( !isset($tngpage) ) $tngpage = 1; > setcookie("tng_search_dna_post[tngpage]", $tngpage, $exptime); > setcookie("tng_search_dna_post[offset]", $offset, $exptime); > } > } > > if(!isset($offset)) $offset = 0; > if( $offset ) { > $offsetplus = $offset + 1; > $newoffset = "$offset, "; > } > else { > $offsetplus = 1; > $newoffset = ""; > $tngpage = 1; > } > > if( $assignedtree ) { > $wherestr = "WHERE gedcom = \"$assignedtree\""; > $wherestr2 = " AND $dna_links_table.gedcom = \"$assignedtree\""; > } > else { > $wherestr = ""; > if($tree) $wherestr2 = " AND $dna_links_table.gedcom = \"$tree\""; > } > $orgwherestr = $wherestr; > $orgtree = $tree; > > $show_dna_test_url = getURL( "show_dna_test", 1 ); > > $originalstring = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); > $wherestr = $searchstring ? "(test_number LIKE \"%$searchstring%\" OR vendor LIKE \"%$searchstring%\" OR urls LIKE \"%$searchstring%\" OR notes LIKE \"%$searchstring%\" OR dna_group LIKE \"%$searchstring%\" OR dna_group_desc LIKE \"%$searchstring%\" OR surnames LIKE \"%$searchstring%\" OR ydna_haplogroup LIKE \"%$searchstring%\" OR mtdna_haplogroup LIKE \"%$searchstring%\")" : ""; > if( $assignedtree ) > $wherestr .= $wherestr ? " AND ($dna_tests_table.gedcom = \"$tree\" || $dna_tests_table.gedcom = \"\")" : "($dna_tests_table.gedcom = \"$tree\" || $dna_tests_table.gedcom = \"\")"; > elseif( $tree ) > $wherestr .= $wherestr ? " AND $dna_tests_table.gedcom = \"$tree\"" : "$dna_tests_table.gedcom = \"$tree\""; > if( $test_type ) > $wherestr .= $wherestr ? " AND test_type = \"" . cleanIt($test_type) . "\"" : "test_type = \"" . cleanIt($test_type) . "\""; > if( $test_group ) > $wherestr .= $wherestr ? " AND dna_group = \"" . cleanIt($test_group) . "\"" : "dna_group = \"" . cleanIt($test_group) . "\""; > if( $wherestr ) $wherestr = "WHERE $wherestr"; > > $query = "SELECT testID, test_type, test_date, match_date, ydna_haplogroup, mtdna_haplogroup, $dna_tests_table.personID, $dna_tests_table.gedcom, test_number, firstname, lastname, lnprefix, nameorder, suffix, prefix, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, branch, living, private, person_name, mtdna_confirmed, ydna_confirmed, markeropt, notesopt, linksopt, surnamesopt, private_dna, private_test, dna_group, dna_group_desc, surnames, MD_ancestorID, MRC_ancestorID > FROM $dna_tests_table > LEFT JOIN $people_table ON $people_table.personID = $dna_tests_table.personID AND $people_table.gedcom = $dna_tests_table.gedcom > $wherestr ORDER BY match_date DESC, test_number ASC LIMIT $newoffset" . $maxsearchresults; > $result = tng_query($query); > > $numrows = tng_num_rows( $result ); > if( $numrows == $maxsearchresults || $offsetplus > 1 ) { > $query = "SELECT count($dna_tests_table.testID) as tcount FROM $dna_tests_table $wherestr"; > $result2 = tng_query($query); > $row = tng_fetch_assoc( $result2 ); > $totrows = $row['tcount']; > tng_free_result($result2); > } > else > $totrows = $numrows; > > $helplang = findhelp("dna_help.php"); > > tng_adminheader( $admtext['dna_tests'], $flags ); > ?> > > > > echo tng_adminlayout(); > > $dnatabs[0] = array(1,"admin_dna_tests.php",$admtext['search'],"findtest"); > $dnatabs[1] = array($allow_add,"admin_new_dna_test.php",$admtext['addnew'],"addtest"); > $dnatabs[2] = array($allow_add,"admin_dna_groups.php",$admtext['dna_groups'],"dnagroups"); > $innermenu = "{$admtext['help']}"; > $menu = doMenu($dnatabs,"findtest",$innermenu); > echo displayHeadline($admtext['dna_tests'],"img/dna_icon.gif",$menu,$message); > ?> > >
    >
    > >
    > > > > > > > > >
    > $newwherestr = $wherestr; > $wherestr = $orgwherestr; > $query = "SELECT gedcom, treename FROM $trees_table ORDER BY treename"; > $treeresult = tng_query($query); > $numtrees = tng_num_rows($treeresult); > if( $numtrees > 1 ) { > echo $admtext['tree'] . ": "; > $ret = ""; > $ret .= "\n"; > tng_free_result($treeresult); > $ret .= "  \"\"\n"; > echo $ret; > } > echo $admtext['test_type'] . ": "; > $wherestr = $newwherestr; > ?> >   style="display:none;" id="treespinner2" alt="" class="spinner">  > : >   style="display:none;" id="treespinner3" alt="" class="spinner"> >

    : >   >    > >
    > > >

    > $numrowsplus = $numrows + $offset; > if( !$numrowsplus ) $offsetplus = 0; > echo displayListLocation($offsetplus,$numrowsplus,$totrows); > $pagenav = get_browseitems_nav( $totrows, "admin_dna_tests.php?searchstring=$searchstring&test_type=$test_type&test_group=$test_group&offset", $maxsearchresults, 5 ); > echo "   $pagenav

    "; > ?> >
    > if($allow_media_delete || $allow_media_edit) { > ?> >

    > >    > if( $allow_delete ) { > ?> >    > } > ?> >

    > } > ?> > > > > > if($allow_edit || $allow_delete) { > ?> > > } > ?> > > > > > > > > > > > > if( $numrows ) { > $actionstr = ""; > if( $allow_edit ) > $actionstr .= ""; > if( $allow_delete ) > $actionstr .= ""; > $actionstr .= ""; > > while( $row = tng_fetch_assoc($result)) > { > $newactionstr = preg_replace( "/xxx/", $row['testID'], $actionstr ); > echo "\n"; > if($allow_edit || $allow_delete) > echo ""; > $rights = determineLivingPrivateRights($row); > $row['allow_living'] = $rights['living']; > $row['allow_private'] = $rights['private']; > echo "\n"; > echo "\n"; > if($row['match_date'] && $row['match_date'] != "0000-00-00") { > $match_date = formatInternalDate($row['match_date']); > echo "\n"; > } else > echo "\n"; > $dbname = getName($row); > if ($dbname) > echo "\n"; > else > echo "\n"; > > $mdanc_namestr = ""; > if($row['MD_ancestorID']) { > $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MD_ancestorID']); > $ancrow = tng_fetch_assoc($dna_anc_result); > if( $ancrow ) { > if( empty($tree) ) $tree = $ancrow['gedcom']; > $placesearch_url = getURL( "placesearch", 1 ); > $ancrow['birthplace'] = ""; > $ancrow['altbirthplace'] = ""; > $ancrow['deathplace'] = ""; > $ancrow['burialplace'] = ""; > $dna_righttree = checktree($row['gedcom']); > $dna_rightbranch = $dna_righttree ? checkbranch($row['branch']) : false; > $dprights = determineLivingPrivateRights($ancrow, $dna_righttree, $dna_rightbranch); > $ancrow['allow_living'] = $dprights['living']; > $ancrow['allow_private'] = $dprights['private']; > $vitalinfo = getBirthInfo($ancrow); > $mdanc_namestr = getName( $ancrow ) . "
    " . str_replace( ', ', ' -', trim(ltrim($vitalinfo,", "))); > } > > tng_free_result($dna_anc_result); > } > $mrcanc_namestr = ""; > if($row['MRC_ancestorID']) { > if ($row['MRC_ancestorID'][0] == $tngconfig['personprefix']) { > $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MRC_ancestorID']); > $ancrow = tng_fetch_assoc($dna_anc_result); > if( $ancrow ) { > if( empty($tree) ) $tree = $ancrow['gedcom']; > $placesearch_url = getURL( "placesearch", 1 ); > $ancrow['birthplace'] = ""; > $ancrow['altbirthplace'] = ""; > $ancrow['deathplace'] = ""; > $ancrow['burialplace'] = ""; > $ancrow['allow_living'] = $ancrow['allow_private'] = 1; > $vitalinfo = getBirthInfo($ancrow); > $mrcanc_namestr = getName( $ancrow ) . "
    " . str_replace( ', ', ' -', trim(ltrim($vitalinfo,", "))); > } > > tng_free_result($dna_anc_result); > } > else if ($row['MRC_ancestorID'][0] == $tngconfig['familyprefix']) { > $mrcaquery = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$row['MRC_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; > $dna_anc_result = tng_query($mrcaquery); > $ancrow = tng_fetch_assoc($dna_anc_result); > tng_free_result($dna_anc_result); > > if( $ancrow ) { > $ancrow['allow_living'] = $ancrow['allow_private'] = 1; > > $famname = getFamilyName( $ancrow ); > $fammarried = "
      {$text['marrabbr']} " . $ancrow['marrdate']; > $mrcanc_namestr = $famname . $fammarried; > } > } > } > $privtest = $row['private_test'] ? $admtext['text_private'] : " "; > $privacy = $row['private_dna'] ? $admtext['text_private'] : $admtext['configsettings']; > $query = "SELECT description FROM $dna_groups_table WHERE dna_group=\"{$row['dna_group']}\""; > $descresult = tng_query($query); > $descrow = tng_fetch_assoc( $descresult ); > tng_free_result($descresult); > $group = $row['dna_group'] ? $descrow['description'] : $text['none']; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > > echo "\n"; > } > ?> >
        
    $newactionstr
     {$row['test_type']} {$row['test_number']} $match_date " . $dbname . "" . $row['person_name'] . "
     " . $admtext['person_name'] . "
    " . $mdanc_namestr . "" . $mrcanc_namestr . "" . $privtest . "" . $privacy . "" . $group . "" . $row['gedcom'] . "
    > echo displayListLocation($offsetplus,$numrowsplus,$totrows); > echo "   $pagenav

    "; > } > else > echo "\n" . $admtext['norecords']; > tng_free_result($result); > ?> >
    > >
    >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editalbum.php TNG1403/admin_editalbum.php 32,35c32,38 < $query3 = "SELECT alinkID, entityID, eventID, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.suffix as suffix, people.nameorder as nameorder, ate.gedcom, treename, < familyID, people.personID as personID, wifepeople.personID as wpersonID, wifepeople.firstname as wfirstname, wifepeople.lnprefix as wlnprefix, wifepeople.lastname as wlastname, wifepeople.prefix as wprefix, wifepeople.suffix as wsuffix, wifepeople.nameorder as wnameorder, < husbpeople.personID as hpersonID, husbpeople.firstname as hfirstname, husbpeople.lnprefix as hlnprefix, husbpeople.lastname as hlastname, husbpeople.prefix as hprefix, husbpeople.suffix as hsuffix, husbpeople.nameorder as hnameorder, < sourceID, sources.title, repositories.repoID as repoID, reponame, linktype --- > $query3 = "SELECT alinkID, entityID, eventID, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, people.nameorder as nameorder, people.title as title, ate.gedcom, treename, > people.birthdate, people.birthdatetr, people.altbirthdate, people.altbirthdatetr, people.deathdate, people.deathdatetr, people.living, people.private, people.branch, > familyID, people.personID as personID, wifepeople.personID as wpersonID, wifepeople.personID as wife, wifepeople.firstname as wfirstname, wifepeople.lnprefix as wlnprefix, wifepeople.lastname as wlastname, wifepeople.prefix as wprefix, wifepeople.suffix as wsuffix, wifepeople.nameorder as wnameorder, > wifepeople.title as wtitle, wifepeople.birthdate as wbirthdate, wifepeople.birthdatetr as wbirthdatetr, wifepeople.altbirthdate as waltbirthdate, wifepeople.altbirthdatetr as waltbirthdatetr, wifepeople.deathdate as wdeathdate, wifepeople.deathdatetr as wdeathdatetr, wifepeople.living as wliving, wifepeople.private as wprivate, wifepeople.branch as wbranch, > husbpeople.personID as hpersonID, husbpeople.personID as husband, husbpeople.firstname as hfirstname, husbpeople.lnprefix as hlnprefix, husbpeople.lastname as hlastname, husbpeople.prefix as hprefix, husbpeople.suffix as hsuffix, husbpeople.nameorder as hnameorder, > husbpeople.title as htitle, husbpeople.birthdate as hbirthdate, husbpeople.birthdatetr as hbirthdatetr, husbpeople.altbirthdate as haltbirthdate, husbpeople.altbirthdatetr as haltbirthdatetr, husbpeople.deathdate as hdeathdate, husbpeople.deathdatetr as hdeathdatetr, husbpeople.living as hliving, husbpeople.private as hprivate, husbpeople.branch as hbranch, > sourceID, sources.title as stitle, repositories.repoID as repoID, reponame, linktype 45c48 < SELECT alinkID, entityID, eventID, null, null, null, null, null, gedcom, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, linktype --- > SELECT alinkID, entityID, eventID, null, null, null, null, null, null, null, gedcom, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, linktype 63d65 < $flags['tabs'] = $tngconfig['tabs']; 72,74c74,76 < $thismediatypeID = $drow['mediatypeID']; < $usefolder = $drow['usecollfolder'] ? $mediatypes_assoc[$thismediatypeID] : $mediapath; < $treestr = $tngconfig['mediatrees'] && $drow['gedcom'] ? $drow['gedcom'] . "/" : ""; --- > $thismediatypeID = isset($drow['mediatypeID']) ? $drow['mediatypeID'] : ""; > $usefolder = !empty($drow['usecollfolder']) ? $mediatypes_assoc[$thismediatypeID] : $mediapath; > $treestr = $tngconfig['mediatrees'] && !empty($drow['gedcom']) ? $drow['gedcom'] . "/" : ""; 77c79 < $photoref = "$usefolder/$treestr" . $drow['thumbpath']; --- > $photoref = "$usefolder/$treestr" . (isset($drow['thumbpath']) ? $drow['thumbpath'] : ""); 79c81 < if( $drow['thumbpath'] && file_exists( "$rootpath$photoref" ) ) { --- > if( !empty($drow['thumbpath']) && file_exists( "$rootpath$photoref" ) ) { 89c91 < $photo = "\"\""; --- > $photo = "\"\""; 95a98 > 128a132,140 > > function validateForm( ) { > var rval = true; > if( document.form1.albumname.value.length == 0 ) { > alert(""); > rval = false; > } > return rval; > } 131,132c143,144 < < --- > > 135,136d146 < < 137a148,149 > echo tng_adminlayout(" onload=\"startMediaSort()\""); > 147a160 >
    149,151c162,164 < < <
    --- > > > < > --- > 184,185c197,198 < < > --- > 199,200c212,213 < < --- > > 227c240 < echo " < >
    161,162c174,175 <
    --- >
    168c181 <
    :
    :
    --- >
    196c209 <             "; --- > echo ""; 230c243 < echo "\"""; --- > echo "\"""; 265,266c278,279 <
    --- >
    311c324 < --- >
    329a343,345 > $prights = determineLivingPrivateRights($plink); > $plink['allow_living'] = $prights['living']; > $plink['allow_private'] = $prights['private']; 339a356,364 > $husb['title'] = $plink['htitle']; > $husb['living'] = $plink['hliving']; > $husb['private'] = $plink['hprivate']; > $husb['birthdate'] = $plink['hbirthdate']; > $husb['birthdatetr'] = $plink['hbirthdatetr']; > $husb['altbirthdate'] = $plink['haltbirthdate']; > $husb['altbirthdatetr'] = $plink['haltbirthdatetr']; > $husb['deathdate'] = $plink['hdeathdate']; > $husb['deathdatetr'] = $plink['hdeathdatetr']; 340a366,368 > $hrights = determineLivingPrivateRights($husb); > $husb['allow_living'] = $hrights['living']; > $husb['allow_private'] = $hrights['private']; 346a375,383 > $wife['title'] = $plink['wtitle']; > $wife['living'] = $plink['wliving']; > $wife['private'] = $plink['wprivate']; > $wife['birthdate'] = $plink['wbirthdate']; > $wife['birthdatetr'] = $plink['wbirthdatetr']; > $wife['altbirthdate'] = $plink['waltbirthdate']; > $wife['altbirthdatetr'] = $plink['waltbirthdatetr']; > $wife['deathdate'] = $plink['wdeathdate']; > $wife['deathdatetr'] = $plink['wdeathdatetr']; 347a385,387 > $wrights = determineLivingPrivateRights($wife); > $wife['allow_living'] = $wrights['living']; > $wife['allow_private'] = $wrights['private']; 359c399 < $name = substr($plink['title'],0,25); --- > $name = substr($plink['stitle'],0,25); 395d434 < 399,401c438,441 < < > --- > diff -r TNG/admin_editbranch.php TNG1403/admin_editbranch.php 31,32c31 < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['modifytree'], $flags ); --- > tng_adminheader( $admtext['modifybranch'], $flags ); 115,116d113 < < 117a115,116 > echo tng_adminlayout(); > 126,128c125,128 <
    <

    --- >

    > " name="cw"> > 403,408c443 < echo $admtext['onsave'] . ":
    "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; --- > if(!empty($cw)) { 410,414c445,457 <

    < < " name="cw"> < "> < --- > > > } else { > ?> > > > } > ?> > > > 418a462 > 420d463 < $tng_title, v.$tng_version"; ?> 424,425c467,469 < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editassoc.php TNG1403/admin_editassoc.php 7a8 > $admin_login = 1; 44,45c45,46 <
       < <?php echo $admtext['find']; ?>>    > <?php echo $admtext['find']; ?>>
    < <
    --- >
    > > >
    170,171c170,173 < < --- > > > >   179,181c181,184 < $tng_title, v.$tng_version"; ?> < < --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editcemetery.php TNG1403/admin_editcemetery.php 4c4,5 < $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] : "";include("adminlib.php"); --- > $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] . "&callback=initMap" : ""; > include("adminlib.php"); 19c20,21 < $tng_search_cemeteries = $_SESSION['tng_search_cemeteries']; --- > if(!isset($tree)) $tree = ""; > $tng_search_cemeteries = !empty($_SESSION['tng_search_cemeteries']) ? $_SESSION['tng_search_cemeteries'] : ""; 36d37 < $flags['tabs'] = $tngconfig['tabs']; 45a47 > 85,86d86 < background="img/background.gif"> < 87a88,90 > $onload = $map['key'] && !$map['startoff'] ? " onload=\"divbox('mapcontainer');\"" : ""; > echo tng_adminlayout($onload); > 92c95 < $innermenu .= "  |  {$admtext['test']}"; --- > $innermenu .= "  |  {$admtext['test']}"; 96a100 >
    98,100c102,104 < < < --- > 49c52 <
    --- > > > < < 187,188c177,193 < " name="cw"> < --- > " name="cw"> > if(!empty($cw)) { > ?> > > > } else { > ?> > > > } > ?> > > > 201,204c206,209 < < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editcitation.php TNG1403/admin_editcitation.php 7a8 > $admin_login = 1; 15,16c16,17 < $row['citetext'] = preg_replace("/\"/", """,$row[citetext]); < $row['note'] = preg_replace("/\"/", """,$row[note]); --- > $row['citetext'] = preg_replace("/\"/", """,$row['citetext']); > $row['note'] = preg_replace("/\"/", """,$row['note']); diff -r TNG/admin_editcollection.php TNG1403/admin_editcollection.php 46c46 < --- > diff -r TNG/admin_edit_dna_group.php TNG1403/admin_edit_dna_group.php 1,85c1,107 < < < < < < < < {$admtext['help']}"; < $menu = doMenu($dnatabs,"edit",$innermenu); < echo displayHeadline($admtext['dna_groups'] . " >> " . $admtext['modifygroup'],"img/dna_icon.gif",$menu,$message); < ?> < <
    113c117 < --- > 129c133 < --- > 171,184d174 <
    < < "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; < ?> <
    <
    :
    :
    < < < < <
    <
    < < < < < < <
    :
    :
    :
    :
    < <
    < < < < <
    <
    < $tng_title, v.$tng_version"; ?> < < --- > include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( !$allow_edit || ( $assignedtree && $assignedtree != $tree ) ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > $dna_group = !empty($dna_group) ? cleanIt($dna_group) : ""; > $tree = !empty($tree) ? cleanIt($tree) : ""; > > $query = "SELECT * FROM $dna_groups_table WHERE gedcom = \"$tree\" AND dna_group = \"$dna_group\""; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > if( !isset($row['description']) ) { > header( "Location: admin_dna_groups.php" ); > exit; > } > $row['description'] = preg_replace("/\"/", """,$row['description']); > tng_free_result($result); > > $query = "SELECT treename FROM $trees_table where gedcom = \"$tree\""; > $treeresult = tng_query($query); > $treerow = tng_fetch_assoc( $treeresult ); > tng_free_result( $treeresult ); > > $helplang = findhelp("dna_help.php"); > > tng_adminheader( $admtext['modifygroup'], $flags ); > ?> > > > > > echo tng_adminlayout(); > > $dnatabs[0] = array(1,"admin_dna_groups.php",$admtext['search'],"findtest"); > $dnatabs[1] = array($allow_add,"admin_new_dna_group.php",$admtext['addgroup'],"addgroup"); > $dnatabs[2] = array($allow_edit,"#",$admtext['edit'],"edit"); > $innermenu = "{$admtext['help']}"; > $menu = doMenu($dnatabs,"edit",$innermenu); > echo displayHeadline($admtext['dna_groups'] . " >> " . $admtext['modifygroup'],"img/dna_icon.gif",$menu,$message); > ?> > >
    > > > > > >
    >
    > > > > > > > > > >
    :
    :
    : > >
    :
    > >
    > > > >
    >
    >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_edit_dna_test.php TNG1403/admin_edit_dna_test.php 1,423c1,601 < < < < < < {$admtext['help']} "; < $innermenu .= " | {$text['expandall']}  |  {$text['collapseall']}"; < $menu = doMenu($dnatabs,"edit",$innermenu); < echo displayHeadline($admtext['dna_tests'] . " >> " . $admtext['modifydna'], "img/dna_icon.gif",$menu,""); < < $surnamesarr = array(); < $surnamesexc = array(); < $surnamesexc = explode(',', $surnameexcl); < $pass1 = true; < < function get_ancestor_surnames($personID, $tree, $type) { < global $surnamesarr, $surnamesexc, $pass1; < < $select = "SELECT p.lastname, p.famc, f.husband, f.wife FROM tng_people AS p LEFT JOIN tng_families AS f ON (p.famc = f.familyID AND p.gedcom = f.gedcom) WHERE p.personID = '" . $personID . "' AND p.gedcom = '" . $tree . "'"; < $result = tng_query($select); < while( $surrow = tng_fetch_assoc($result) ) { < $father = ($type != "mtDNA") ? $surrow['husband'] : ""; < $mother = ($type != "Y-DNA") ? $surrow['wife'] : ""; < if (!in_array($surrow['lastname'], $surnamesarr) && !in_array($surrow['lastname'], $surnamesexc) && !$pass1) < array_push($surnamesarr, $surrow['lastname']); < $pass1 = false; < if ($father) get_ancestor_surnames($father, $tree, $type); < if ($mother) get_ancestor_surnames($mother, $tree, $type); < } < tng_free_result($result); < if ($type == "atDNA") sort($surnamesarr); < $ancestorstr = implode(', ', $surnamesarr); < < return $ancestorstr; < } < ?> < <
    < < < < < < < < < < < < < <
    < < <
    <
    < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <
    : < <
    :
    :
    :

    < : < < <
    : <     < < <?php echo $admtext['find']; ?> < < <
    <
    : >
     
    :  < < <
     
    :
    :
    :  >
     
    :  <
    : 
    : 
    : 
    :  <
    :
    :
    : 
    : 
    :
     
    :
    :
    :
    :
     
    :  < <    < <    <    <
     
    <
    <
    < $numlinks)",$admtext['linkssubt']); ?> < < <
    < " name="cw"> < < < "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; < ?> <

    <
    <
    < $tng_title, v.$tng_version"; ?> < < < < < < < < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > if( $assignedtree ) { > $wherestr = "WHERE gedcom = \"$assignedtree\""; > $tree = $assignedtree; > } > else > $wherestr = ""; > > $treequery = "SELECT gedcom, treename FROM $trees_table $wherestr ORDER BY treename"; > $treeresult = tng_query($treequery) or die ($admtext['cannotexecutequery'] . ": $treequery"); > $treenum = 0; > while( $treerow = tng_fetch_assoc($treeresult) ) { > $treenum++; > $trees[$treenum] = $treerow['gedcom']; > $treename[$treenum] = $treerow['treename']; > } > tng_free_result($treeresult); > $testID = !empty($testID) ? cleanIt($testID) : ""; > > $query = "SELECT * FROM $dna_tests_table WHERE testID = \"$testID\""; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > tng_free_result($result); > if( !isset($row['personID']) ) { > header( "Location: admin_dna_tests.php" ); > exit; > } > > if($row['personID']) { > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, nameorder, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, living, private, branch > FROM $people_table > WHERE personID = \"{$row['personID']}\" AND gedcom = \"{$row['gedcom']}\""; > $result = tng_query($query); > $row2 = tng_fetch_assoc( $result ); > if( $row2 ) { > $row2['allow_living'] = $row2['allow_private'] = 1; > $takername = "(" . getName($row2) . ")"; > } else { > $takername = "()"; > } > tng_free_result($result); > } > else > $takername = ""; > > if($row['MD_ancestorID']) { > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, nameorder, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, living, private, branch > FROM $people_table > WHERE personID = \"{$row['MD_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; > $result = tng_query($query); > $row3 = tng_fetch_assoc( $result ); > $row3['allow_living'] = $row3['allow_private'] = 1; > $mdancestorname = "(" . getName($row3) . ")"; > tng_free_result($result); > } > else > $mdancestorname = ""; > if($row['MRC_ancestorID']) { > if ($row['MRC_ancestorID'][0] == $tngconfig['personprefix']) { > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, nameorder, living, private, branch > FROM $people_table > WHERE personID = \"{$row['MRC_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; > $result = tng_query($query); > $row3 = tng_fetch_assoc( $result ); > $row3['allow_living'] = $row3['allow_private'] = 1; > $mrcancestorname = "(" . getName($row3) . ")"; > tng_free_result($result); > } > else if ($row['MRC_ancestorID'][0] == $tngconfig['familyprefix']) { > $query = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$row['MRC_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; > $result = tng_query($query); > $row3 = tng_fetch_assoc($result); > tng_free_result($result); > > $row3['allow_living'] = $row3['allow_private'] = 1; > > $mrcancestorname = "(" . getFamilyName( $row3 ) . ")"; > } > } > else > $mrcancestorname = $admtext['mrcaiorf']; > > $query = "SELECT $dna_links_table.ID as mlinkID, $dna_links_table.personID as personID, lastname, lnprefix, firstname, prefix, suffix, nameorder, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, $dna_links_table.gedcom as gedcom, branch, treename, living, private > FROM $dna_links_table > LEFT JOIN $trees_table as trees ON $dna_links_table.gedcom = trees.gedcom > LEFT JOIN $people_table AS people ON $dna_links_table.personID = people.personID AND $dna_links_table.gedcom = people.gedcom > WHERE testID = \"$testID\" ORDER BY $dna_links_table.ID DESC"; > $result2 = tng_query($query); > $numlinks = tng_num_rows( $result2 ); > > $helplang = findhelp("dna_help.php"); > > tng_adminheader( $admtext['modifydna'], $flags ); > ?> > > > echo tng_adminlayout(); > > $dnatabs[0] = array(1,"admin_dna_tests.php",$admtext['search'],"findtest"); > $dnatabs[1] = array($allow_add,"admin_new_dna_test.php",$admtext['addnew'],"addtest"); > $dnatabs[2] = array($allow_edit,"#",$admtext['edit'],"edit"); > $innermenu = "{$admtext['help']} "; > $innermenu .= " | {$text['expandall']}  |  {$text['collapseall']}"; > $menu = doMenu($dnatabs,"edit",$innermenu); > echo displayHeadline($admtext['dna_tests'] . " >> " . $admtext['modifydna'], "img/dna_icon.gif",$menu,""); > > $surnamesarr = array(); > $surnamesexc = array(); > $surnamesexc = explode(',', $surnameexcl); > $pass1 = true; > > function get_ancestor_surnames($personID, $tree, $type) { > global $surnamesarr, $surnamesexc, $pass1; > > $select = "SELECT p.lastname, p.famc, f.husband, f.wife FROM tng_people AS p LEFT JOIN tng_families AS f ON (p.famc = f.familyID AND p.gedcom = f.gedcom) WHERE p.personID = '" . $personID . "' AND p.gedcom = '" . $tree . "'"; > $result = tng_query($select); > while( $surrow = tng_fetch_assoc($result) ) { > $father = ($type != "mtDNA") ? $surrow['husband'] : ""; > $mother = ($type != "Y-DNA") ? $surrow['wife'] : ""; > if (!in_array($surrow['lastname'], $surnamesarr) && !in_array($surrow['lastname'], $surnamesexc) && !$pass1) > array_push($surnamesarr, $surrow['lastname']); > $pass1 = false; > if ($father) get_ancestor_surnames($father, $tree, $type); > if ($mother) get_ancestor_surnames($mother, $tree, $type); > } > tng_free_result($result); > if ($type == "atDNA") sort($surnamesarr); > $ancestorstr = implode(', ', $surnamesarr); > > return $ancestorstr; > } > $atsurnamesarr = array(); > $atsurnamesexc = array(); > $atsurnamesexc = explode(',', $surnameexcl); > $perID=array(); > include("tngdblib.php"); > > function get_atdna_ancestor_surnames($personID, $tree, $type) { > global $atsurnamesarr, $atsurnamesexc, $perID, $numgens; > > $perID[0]=$personID; > > for ($a=0; $a <= $numgens; $a++) { > for($b=0; $b < pow(2,$a); $b++) { > if(isset($perID[pow(2,$a)+$b-1])) { > $tID = pow(2,$a)+$b-1; > $result = getPersonFullPlusDates($tree, $perID[$tID]); > $row = tng_fetch_assoc( $result ); > $perName[$tID]= $row['lastname']; > if (!in_array($perName[$tID], $atsurnamesarr) && !in_array($perName[$tID], $atsurnamesexc)) array_push($atsurnamesarr, $perName[$tID]); > $result = getFamilyData($tree,$row['famc']); > $rowM = tng_fetch_assoc( $result ); > $h = 2*($tID)+1; > $w = 2*($tID)+2; > $perID[$h] = $rowM['husband']; > $perID[$w] = $rowM['wife']; > } > } > } > tng_free_result($result); > $atancestorstr = implode(', ', $atsurnamesarr); > > return $atancestorstr; > } > ?> > >
    >
    > > > > > > > > > > > > > >
    > > >
    >
    > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $mt_checkedstr = ($row['mtdna_confirmed']) ? "checked" : ""; ?> > > > > > if( $row['test_type'] == "Y-DNA" || $row['test_type'] == "atDNA") { > $y_checkedstr = ($row['ydna_confirmed']) ? "checked" : ""; ?> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > if ((!$row['surnames'] && $row['test_type'] != "atDNA") && $autofillancsurnames && $row['personID']) > $ancestorstr = get_ancestor_surnames($row['personID'], $row['gedcom'], $row['test_type']); > else if ((!$row['surnames'] && $row['test_type'] == "atDNA") && $autofillancsurnames && $row['personID']) > $ancestorstr = get_atdna_ancestor_surnames($row['personID'], $row['gedcom'], $row['test_type']); > else > $ancestorstr = $row['surnames']; > if ($ancsurnameupper) > $ancestorstr = strtoupper($ancestorstr); > ?> > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
    : > >
    :
    :
    :
    :
    :
    :  > >

    > : > > >
    : >     > > <?php echo $admtext['find']; ?> > > >
    >
    : >
     
    :  > >
     
    :
    :
    :
    :  > >
    :  > >
     
    :  >
    : 
    : 
    : 
    :  >
    :
    :
     

    :
    :

    :
    :
    :
    :
    :
     

    :
    :
    :
    :
     
    :  > >
     

    :     > > <?php echo $admtext['find']; ?> > >

       > >
    :      > <?php echo $admtext['find']; ?> >
    :
     
    :
    :
    :
    :
     
    :  > >    > >    >    >
     
    >
    >
    > echo displayToggle("plus2",1,"links",$admtext['test_links'] . " ($numlinks)",$admtext['dnalinkssubt']); ?> > > >
    > " name="cw"> > > > if(!empty($cw)) { > ?> > > > } else { > ?> > > > } > ?> > > > >
    >
    >
    > $tng_title, v.$tng_version"; ?> > > > > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editevent.php TNG1403/admin_editevent.php 7a8 > $admin_login = 1; 10c11,13 < $query = "SELECT display, $events_table.eventtypeID as eventtypeID, eventdate, eventplace, age, agency, cause, $events_table.gedcom as gedcom, $events_table.addressID, address1, address2, city, state, zip, country, info, phone, email, www, type FROM ($events_table, $eventtypes_table) LEFT JOIN $address_table on $events_table.addressID = $address_table.addressID WHERE eventID = \"$eventID\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID"; --- > $query = "SELECT display, $events_table.eventtypeID as eventtypeID, eventdate, eventplace, tag, age, agency, cause, $events_table.gedcom as gedcom, $events_table.addressID, address1, address2, city, state, zip, country, info, phone, email, www, type FROM ($events_table, $eventtypes_table) > LEFT JOIN $address_table on $events_table.addressID = $address_table.addressID > WHERE eventID = \"$eventID\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID"; 14,24c17,27 < $row['eventplace'] = preg_replace("/\"/", """,$row['eventplace']); < $row['info'] = preg_replace("/\"/", """,$row['info']); < $row['age'] = preg_replace("/\"/", """,$row['age']); < $row['agency'] = preg_replace("/\"/", """,$row['agency']); < $row['cause'] = preg_replace("/\"/", """,$row['cause']); < $row['address1'] = preg_replace("/\"/", """,$row['address1']); < $row['address1'] = preg_replace("/\"/", """,$row['address1']); < $row['city'] = preg_replace("/\"/", """,$row['city']); < $row['state'] = preg_replace("/\"/", """,$row['state']); < $row['zip'] = preg_replace("/\"/", """,$row['zip']); < $row['country'] = preg_replace("/\"/", """,$row['country']); --- > $row['eventplace'] = preg_replace("/\"/", """,$row['eventplace'] ?? ''); > $row['info'] = preg_replace("/\"/", """,$row['info'] ?? ''); > $row['age'] = preg_replace("/\"/", """,$row['age'] ?? ''); > $row['agency'] = preg_replace("/\"/", """,$row['agency'] ?? ''); > $row['cause'] = preg_replace("/\"/", """,$row['cause'] ?? ''); > $row['address1'] = preg_replace("/\"/", """,$row['address1'] ?? ''); > $row['address2'] = preg_replace("/\"/", """,$row['address2'] ?? ''); > $row['city'] = preg_replace("/\"/", """,$row['city'] ?? ''); > $row['state'] = preg_replace("/\"/", """,$row['state'] ?? ''); > $row['zip'] = preg_replace("/\"/", """,$row['zip'] ?? ''); > $row['country'] = preg_replace("/\"/", """,$row['country'] ?? ''); 42c45 <
    :    --- >
    :    44c47 <
    :
    :
    --- >
      
    diff -r TNG/admin_editeventtype.php TNG1403/admin_editeventtype.php 26c26 < switch( $row[type] ) { --- > switch( $row['type'] ) { 43d42 < $flags['tabs'] = $tngconfig['tabs']; 46,47c45,46 < < > --- > 131,132d129 < < 133a131,132 > echo tng_adminlayout(); > 142,144c141,142 <
      
    < < < < <
    --- >
    >
    171c169 < () --- > () 199,206c197,204 < <

    *

    <
    < $tng_title, v.$tng_version
    "; ?> < --- > 268,269d268 < < 270a270,271 > echo tng_adminlayout(); > 274c275 < $familytabs['3'] = array($allow_edit,"admin_editfamily.php?familyID=$familyID&tree=$tree",$admtext['edit'],"edit"); --- > $familytabs['3'] = array($allow_edit,"admin_editfamily.php?familyID=$familyID&tree=$tree",$admtext['edit'],"edit"); 277c278 < $innermenu .= "  |  {$admtext['test']}"; --- > $innermenu .= "  |  {$admtext['test']}"; 283a285 >
    285,287c287,289 < < <
    --- > > > < > < >
    297c299 < echo "

    {$admtext['retry']}

    \n"; --- > echo "

    {$admtext['retry']}

    \n"; 300,301c302,303 < $notesicon = $gotnotes['general'] ? "admin-note-on-icon" : "admin-note-off-icon"; < $citesicon = $gotcites['general'] ? "admin-cite-on-icon" : "admin-cite-off-icon"; --- > $notesicon = !empty($gotnotes['general']) ? "admin-note-on-icon" : "admin-note-off-icon"; > $citesicon = !empty($gotcites['general']) ? "admin-cite-on-icon" : "admin-cite-off-icon"; 303c305,306 < echo "{$admtext['save']}\n"; --- > $return = !empty($cw) ? "saveclose" : "saveret"; > echo "{$admtext['save']}\n"; 320,321c323,324 <
    --- >
    328c331 < $query = "SELECT lastname, lnprefix, firstname, prefix, suffix, nameorder, birthdate, altbirthdate, deathdate, burialdate FROM $people_table WHERE personID = \"{$row['husband']}\" AND gedcom = \"$tree\""; --- > $query = "SELECT personID, lastname, lnprefix, firstname, prefix, suffix, title, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, burialdate, living, private, branch, gedcom FROM $people_table WHERE personID = \"{$row['husband']}\" AND gedcom = \"$tree\""; 350c353 < $query = "SELECT lastname, lnprefix, firstname, prefix, suffix, nameorder, birthdate, altbirthdate, deathdate, burialdate FROM $people_table WHERE personID = \"{$row['wife']}\" AND gedcom = \"$tree\""; --- > $query = "SELECT personID, lastname, lnprefix, firstname, prefix, suffix, title, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, burialdate, living, private, branch, gedcom FROM $people_table WHERE personID = \"{$row['wife']}\" AND gedcom = \"$tree\""; 378c381 < > --- > > 411c414 < echo "  (" . $admtext['edit'] . " )
    "; --- > echo "  (" . $admtext['edit'] . " )
    "; 413c416 <
    --- >
    434c437 < --- >
    448,450d450 <
    <
    < 452,455c452,456 < 462,463d463 < < 468,469c468,469 < < > < >
    < :   <

    \n"; --- >
    >
    >

    > echo $admtext['otherevents'] . ":  \n"; 456a458 >

    458c460 <
    --- >
    --- >
    548,556c548,557 <
    < "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; --- >
    > if(!empty($cw)) { > ?> > > > $close_command = "window.close();"; > } else { 558c559,568 <

    --- > > > $close_command = "window.location.href='admin_families.php';"; > } > ?> > > > > 561d570 < 564c573 < " name="cw"> --- > " name="cw"> 574,577c583,585 < < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editlanguage.php TNG1403/admin_editlanguage.php 25d24 < $flags['tabs'] = $tngconfig['tabs']; 29c28 < 151,152d161 < background="img/background.gif"> < 153a163,164 > echo tng_adminlayout(); > 165c176 < echo displayHeadline($admtext['media'] . " >> " . $admtext['existingmediainfo'],"img/photos_icon.gif",$menu,""); --- > echo displayHeadline($admtext['media'] . " >> " . $admtext['modifymedia'],"img/photos_icon.gif",$menu,""); 167a179 >
    169,171c181,183 < < <
    --- > > > < > --- > 228c241 < --- > 230c243 < --- > 233c246 < --- > 241,242c254,256 <   < --- >   > > 255c269 < --- > 260,261c274,275 < >   < > --- > >   > > 265c279,281 < --- > 277,278c293,294 < < > --- > 325,326c341 <
    >
    <
    > --- >
    328c343 < --- > 330c345 < $query = "SELECT cemname, cemeteryID, city, county, state, country FROM $cemeteries_table ORDER BY country, state, county, city, cemname"; --- > $query = "SELECT cemname, cemeteryID, city, county, state, country FROM $cemeteries_table ORDER BY cemname, city, county, state, country"; 333c348 < $cemetery = "{$cemrow['country']}, {$cemrow['state']}, {$cemrow['county']}, {$cemrow['city']}, {$cemrow['cemname']}"; --- > $cemetery = "{$cemrow['cemname']} - {$cemrow['city']}, {$cemrow['county']}, {$cemrow['state']}, {$cemrow['country']}"; 352a368 > 358,361c374,377 <
    < < < --- > > > > 371,372c387,388 < < > < < < 422,424c398,400 < < > < < > > 449,450c437,438 < $width = $size[0]; < $height = $size[1]; --- > $width = !empty($size[0]) ? $size[0] : 0; > $height = !empty($size[1]) ? $size[1] : 0; 467c455,456 <
    --- >
    >
    468a458,460 > echo getRectangles($mediaID); > ?> 472c464 < --- >
    480,489c472,490 <
    < > > 492a512,513 > > --- > 129c138 < --- > diff -r TNG/admin_editnote2.php TNG1403/admin_editnote2.php 29d28 < $flags['tabs'] = $tngconfig['tabs']; 44,45d42 < < 46a44,45 > echo tng_adminlayout(); > 54,56c53,56 <
    181c193,194 < echo "{$admtext['save']}\n"; --- > $return = !empty($cw) ? "saveclose" : "saveret"; > echo "{$admtext['save']}\n"; 192,193c205,206 <
    --- >
    225c238 <
    *:
    *:
    " name="photoselect" onclick="javascript:var folder = document.form1.usecollfolder[1].checked ? document.form1.mediatypeID.options[document.form1.mediatypeID.selectedIndex].value : 'media';FilePicker('path',folder);"> " name="photoselect" onclick="javascript:var folder = document.form1.usecollfolder[0].checked ? document.form1.mediatypeID.options[document.form1.mediatypeID.selectedIndex].value : 'media';FilePicker('path',folder);">
    :
    :
    " id="thumbpath_org" name="thumbpath_org"> " name="thumbselect" OnClick="javascript:var folder = document.form1.usecollfolder[1].checked ? document.form1.mediatypeID.options[document.form1.mediatypeID.selectedIndex].value : 'media';FilePicker('thumbpath',folder);"> " name="thumbselect" OnClick="javascript:var folder = document.form1.usecollfolder[0].checked ? document.form1.mediatypeID.options[document.form1.mediatypeID.selectedIndex].value : 'media';FilePicker('thumbpath',folder);">
    : ()
    : > >
    --- >
    284c300 <
    :
    :
    >
    >
     
    onchange="if($(this).is(':checked')){$('#img_private').prop('checked',false);}">
    >
    onchange="if($(this).is(':checked')){$('#img_alwayson').prop('checked',false);}">
    --- >
    379,418d394 <
    < < <
    > < < < < < < < < < < < < < < < <
    :
    <
    < <
    <
    :
    :
    :
    <
    <
    < --- >
    > 428c404 <

    --- >

    435,438c411,418 < $treename[$j]\n"; < ?> --- > $lookfortree = !empty($row['gedcom']) ? $row['gedcom'] : $usetree; > for( $j = 1; $j <= $treenum; $j++ ) { > echo " \n"; > } > ?> 441,444c421,429 <
    < {$admtext['forrects']}:
    {$admtext['rectinstr']}";?> --- >
    > 445a431,433 >    
    <

    < "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; --- >

    > > >
    > > > > > > > if( $map['key'] ) { > ?> > > > > } > ?> > > > if( $map['key'] ) { > ?> > > } > ?> >
    :
    >
    > // draw the map here > include "googlemapdrawthemap.php"; 491c492,510 <

    --- >
    >
    :
    :
    :
    >
    >
    496a518,520 > if(!empty($cw)) { > ?> 498c522,537 < --- > > > $close_command = "window.close();"; > } else { > ?> > > > > $close_command = "window.location.href='admin_media.php';"; > } > ?> > > > 502a542 > 504d543 < $tng_title, v.$tng_version"; ?> 557,558c596,597 < if( frm.path.value.length == 0 && frm.mediaurl.value.length == 0 && frm.bodytext.value.length == 0 && frm.mediatypeID.options[frm.mediatypeID.selectedIndex].value != "headstones" ) { < alert(""); --- > if(!frm.notes.value.length && !frm.description.value) { > alert(""); 561,562c600,601 < else if( frm.thumbpath.value.length == 0 && frm.thumbcreate[1].checked == true ) { < alert(""); --- > else if( frm.path.value.length == 0 && frm.mediaurl.value.length == 0 && frm.bodytext.value.length == 0 && frm.mediatypeID.options[frm.mediatypeID.selectedIndex].value != "headstones" ) { > alert(""); 577c616,617 < var params = {path: frm.path.value, thumbpath: frm.thumbpath.value, usecollfolder: usecollfolder, mediatypeID: mediatypeID}; --- > var thumbpath = frm.newthumb.value ? frm.thumbpath.value : ""; > var params = {path: frm.path.value, thumbpath: thumbpath, usecollfolder: usecollfolder, mediatypeID: mediatypeID}; 584c624,625 < frm.thumbpath.value = vars.thumbpath; --- > if(vars.thumbpath) > frm.thumbpath.value = vars.thumbpath; 596d636 < toggleSection('placeinfo','plus3',display); 598c638,639 < toggleSection('imagemapdiv','plus4',display); --- > toggleSection('imagemapdiv','plus3',display); > toggleSection('placeinfo','plus4',display); 609,610c650,651 < var preferDateFormat = ''; < switchOnType(document.form1.mediatypeID.options[document.form1.mediatypeID.selectedIndex].value); --- > var preferDateFormat = ''; > switchOnType(document.form1.mediatypeID.options[document.form1.mediatypeID.selectedIndex].value, ""); 621c662 < new nicEditor({fullPanel : true}).panelInstance('bodytext'); --- > new nicEditor({fullPanel : true, maxHeight: 300}).panelInstance('bodytext'); 628c669 < if($added) { --- > if(!empty($added)) { 636c677,810 < var x1,y1; --- > var boxmoving = false; > var boxdone = true; > var poschanged = false; > var x1,bx,y1,by; > > function saveRectangle(tree, linktype, id, label) { > var current = jQuery('#mlbox'); > var pos = current.position(); > var imgpos = jQuery('#myimg').position(); > > params = { > action: 'saverect', > mediaID: '', > tree: tree, > linktype: linktype, > label: label, > id: id, > top: Math.round(pos.top - imgpos.top), > left: Math.round(pos.left - imgpos.left), > height: current.height(), > width: current.width() > }; > //console.log('rect top: ' + pos.top + ', rect left: ' + pos.left + ', img top: ' + jQuery('#myimg').position().top + ',img left: ' + jQuery('#myimg').position().left); > $("#mlbox").attr({ id: 'mlboxtmp' }); > jQuery.ajax({ > url: 'ajx_updateorder.php', > data: params, > dataType: 'json', > type: 'POST', > success: function(vars){ > //put name in current box > var overhang = 100 - $("#mlboxtmp").width(); > var stylestr = ""; > if(overhang > 0) { > side = -1 * Math.round(overhang/2); > stylestr = "left:" + side + "px;right:" + side + "px;"; > } > else > stylestr = ""; > $("#mlboxtmp").append('
    '+vars.name+'
    ') > $("#mlboxtmp").attr({ id: 'box_' + vars.id }) > //if medialink is new, add that to the page here in a future update > } > }); > } > > function updateRectangle(id) { > var current = jQuery('#'+id); > var pos = current.position(); > var imgpos = jQuery('#myimg').position(); > > params = { > action: 'updaterect', > id: id.substring(4), > top: Math.round(pos.top - imgpos.top), > left: Math.round(pos.left - imgpos.left), > height: current.height(), > width: current.width() > }; > jQuery.ajax({ > url: 'ajx_updateorder.php', > data: params, > dataType: 'json', > type: 'POST' > }); > } > > function deleteRectangle(id) { > params = { > action: 'delrect', > id: id.substring(4) > }; > jQuery.ajax({ > url: 'ajx_updateorder.php', > data: params, > dataType: 'json', > type: 'POST' > }); > } > > function wireUpBox(rbox) { > rbox.mousedown(function(e) { > var target = $(e.target); > if(target.hasClass('imagetag')) > target = target.parent(); > if(!target.hasClass('delx') && !target.find('.delx').length) { > if(!target.hasClass('delx')) > $('.bselected').removeClass('bselected').addClass('bunselected').css('z-index',1); > $('.delx').remove(); > var delbox = $('
     X
    '); > delbox.click(function(e) { > //do ajax to delete rectangle > var deltarget = $(e.target); > //console.log(deltarget.parent().attr('id')); > deleteRectangle(deltarget.parent().attr('id')); > $(e.target).parent().remove(); > e.stopPropagation(); > }); > target.append(delbox); > } > target.removeClass('bunselected').addClass('bselected').css('z-index',2); > bx = e.pageX; > by = e.pageY; > boxmoving = true; > poschanged = false; > e.stopPropagation(); > }); > rbox.mousemove(function(e) { > if(boxmoving) { > //get coords of target > origLeft = parseInt($(e.target).css('left'),10); > origTop = parseInt($(e.target).css('top'),10); > $(e.target).css({ > left:e.pageX - bx + origLeft, //offsets > top:e.pageY - by + origTop //offsets > }); > if(bx != e.pageX || by != e.pageY) { > poschanged = true > bx = e.pageX; > by = e.pageY; > } > } > }); > rbox.mouseup(function(e) { > //if boxmoving, do ajax to save new position > if(poschanged) { > updateRectangle(rbox.attr('id')); > poschanged = false; > } > boxmoving = false; > e.stopPropagation(); > }); > return rbox; > } 642,644c816 < if($("#mlbox").length) < var a = 1;//$("#mlbox").attr({ id: '' }); < else { --- > if(boxdone) { 646d817 < //$("#mlbox").attr({ id: '' }); 648c819 < box = $('
    ').hide(); --- > box = wireUpBox($('
    ').hide()); 659a831 > boxdone = false; 664d835 < 666,669c837,865 < $("#mlbox").css({ < width:Math.abs(e.pageX - x1 - 1), //offsets < height:Math.abs(e.pageY - y1 - 1) //offsets < }).fadeIn(); --- > if(!boxdone) { > $("#mlbox").css({ > width:Math.abs(e.pageX - x1 - 1), //offsets > height:Math.abs(e.pageY - y1 - 1) //offsets > }).fadeIn(); > } > }); > > $('#myimg').mouseup(function(e) { > if(x1 != e.pageX || y1 != e.pageY) { > var tree = jQuery('#maptree').val(); > if(jQuery('#urltitle').val()) { > saveRectangle('', 'U', jQuery('#urladdress').val(), jQuery('#urltitle').val()); > jQuery('#urltitle').val(''); > } > else > findItem(jQuery('#linktype').val(),'imagemap','',tree, assignedbranch); > } > else > box.remove(); > //$("#current").attr({ id: '' }); > boxdone = true; > }); > $('body').mousedown(function(e) { > if(!$(e.target).hasClass('delx')) { > $('.bselected').removeClass('bselected').addClass('bunselected').css('z-index',1); > $('.delx').remove(); > e.stopPropagation(); > } 672,675c868,869 < $('#myimg').mouseup(function() { < var tree = jQuery('#maptree').val(); < findItem('I','imagemap','',tree, assignedbranch); < $("#current").attr({ id: '' }); --- > $('.mlbox').each(function() { > wireUpBox($(this)); 680,681c874,876 < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editmore.php TNG1403/admin_editmore.php 7a8 > $admin_login = 1; 14,22c15,28 < $row['age'] = preg_replace("/\"/", """,$row['age']); < $row['agency'] = preg_replace("/\"/", """,$row['agency']); < $row['cause'] = preg_replace("/\"/", """,$row['cause']); < $row['address1'] = preg_replace("/\"/", """,$row['address1']); < $row['address2'] = preg_replace("/\"/", """,$row['address2']); < $row['city'] = preg_replace("/\"/", """,$row['city']); < $row['state'] = preg_replace("/\"/", """,$row['state']); < $row['zip'] = preg_replace("/\"/", """,$row['zip']); < $row['country'] = preg_replace("/\"/", """,$row['country']); --- > $row['age'] = isset($row['age']) ? preg_replace("/\"/", """,$row['age']) : ""; > $row['agency'] = isset($row['agency']) ? preg_replace("/\"/", """,$row['agency']) : ""; > $row['cause'] = isset($row['cause']) ? preg_replace("/\"/", """,$row['cause']) : ""; > $row['address1'] = isset($row['address1']) ? preg_replace("/\"/", """,$row['address1']) : ""; > $row['address2'] = isset($row['address2']) ? preg_replace("/\"/", """,$row['address2']) : ""; > $row['city'] = isset($row['city']) ? preg_replace("/\"/", """,$row['city']) : ""; > $row['state'] = isset($row['state']) ? preg_replace("/\"/", """,$row['state']) : ""; > $row['zip'] = isset($row['zip']) ? preg_replace("/\"/", """,$row['zip']) : ""; > $row['country'] = isset($row['country']) ? preg_replace("/\"/", """,$row['country']) : ""; > $row['phone'] = isset($row['phone']) ? preg_replace("/\"/", """,$row['phone']) : ""; > $row['email'] = isset($row['email']) ? preg_replace("/\"/", """,$row['email']) : ""; > $row['www'] = isset($row['www']) ? preg_replace("/\"/", """,$row['www']) : ""; > $row['addressID'] = isset($row['addressID']) ? preg_replace("/\"/", """,$row['addressID']) : ""; > $row['eventID'] = isset($row['eventID']) ? preg_replace("/\"/", """,$row['eventID']) : ""; diff -r TNG/admin_editmostwanted.php TNG1403/admin_editmostwanted.php 28a29,37 > $row['personID'] = ""; > $row['mediaID'] = ""; > $row['gedcom'] = ""; > $row['mwtype'] = ""; > $row['thumbpath'] = ""; > $row['usecollfolder'] = ""; > $row['mtitle'] = ""; > $row['mdesc'] = ""; > $row['mediatypeID'] = ""; 43c52 <
    :
    :
    < <
    --- >
    > > > --- > > if($allow_private_notes) { > ?> 40a51,53 > } > ?> diff -r TNG/admin_editperson.php TNG1403/admin_editperson.php 11a12,14 > if(!isset($cw)) $cw = ''; > if(!isset($added)) $added = 0; > 13a17,23 > function initNotesOrCites() { > $notes = array(); > $notes['general'] = ""; > $notes['NAME'] = ""; > return $notes; > } > 15c25 < $query = "SELECT *, DATE_FORMAT(changedate,\"%d %b %Y %H:%i:%s\") as changedate FROM $people_table WHERE personID = \"$personID\" and gedcom = \"$tree\""; --- > $query = "SELECT *, DATE_FORMAT(changedate,\"%d %b %Y %H:%i:%s\") as changedate, IF(birthdate!='',YEAR(birthdatetr),YEAR(altbirthdatetr)) as birth, IF(deathdate!='',YEAR(deathdatetr),YEAR(burialdatetr)) as death FROM $people_table WHERE personID = \"$personID\" and gedcom = \"$tree\""; 54c64 < $tng_search_people = $_SESSION['tng_search_people']; --- > $tng_search_people = isset($_SESSION['tng_search_people']) ? $_SESSION['tng_search_people'] : ''; 71c81,82 < $query = "SELECT DISTINCT eventID as eventID FROM $notelinks_table WHERE persfamID=\"$personID\" AND gedcom =\"$tree\""; --- > $privstr = $rights['private_notes'] ? "" : "AND secret != \"1\""; > $query = "SELECT DISTINCT eventID as eventID FROM $notelinks_table WHERE persfamID=\"$personID\" AND gedcom =\"$tree\" $privstr"; 73c84 < $gotnotes = array(); --- > $gotnotes = initNotesOrCites(); 82c93 < $gotcites = array(); --- > $gotcites = initNotesOrCites(); 103c114 < global $people_table, $families_table, $admtext, $tree, $righttree; --- > global $people_table, $families_table, $admtext, $tree, $righttree, $cw; 106c117 < $query = "SELECT personID, lastname, lnprefix, firstname, birthdate, birthplace, altbirthdate, altbirthplace, deathdate, burialdate, prefix, suffix, nameorder, sex, $people_table.living, $people_table.private FROM $people_table, $families_table WHERE $people_table.personID = $families_table.$spouse AND $families_table.familyID = \"{$parent['familyID']}\" AND $people_table.gedcom = \"$tree\" AND $families_table.gedcom = \"$tree\""; --- > $query = "SELECT personID, lastname, lnprefix, firstname, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, altbirthplace, deathdate, burialdate, title, nickname, prefix, suffix, nameorder, sex, $people_table.branch, $people_table.gedcom, $people_table.living, $people_table.private FROM $people_table, $families_table WHERE $people_table.personID = $families_table.$spouse AND $families_table.familyID = \"{$parent['familyID']}\" AND $people_table.gedcom = \"$tree\" AND $families_table.gedcom = \"$tree\""; 109c120 < if( $gotparent ) { --- > if( tng_num_rows($gotparent) ) { 117c128 < $prights = determineLivingPrivateRights($row, $righttree); --- > $prights = determineLivingPrivateRights($prow, $righttree); 176a188 > $genders = ['M','F','U','']; 178d189 < $flags['tabs'] = $tngconfig['tabs']; 184a196 > 198c210 < if(jQuery('div#parents div').length > 1) --- > if(jQuery('#parents div.sortrow').length > 1) 218c230 < if(jQuery('div#spouses div').length > 1) --- > if(jQuery('#spouses div.sortrow').length > 1) 276c288 < function addNewFamily(radioval,args) { --- > function addNewFamily(submitval) { 278,279c290 < jQuery('#radio'+radioval).attr('checked',true); < document.form1.submit(); --- > jQuery('#'+submitval).click(); 290c301 < top.frames['main'].location = 'admin_newmedia.php?personID=&tree=&linktype=I'; --- > window.location = 'admin_newmedia.php?personID=&tree=&linktype=I'; 297a309,324 > function onGenderChange(gender) { > if(gender.value == 'M' || gender.value == 'F' || gender.value == 'U') { > jQuery('#other_gender').hide(); > } > else { > jQuery('#other_gender').show(); > } > > if(gender.value == 'M' || gender.value == 'F') { > jQuery('#addnewspouse').show(); > } > else { > jQuery('#addnewspouse').hide(); > } > } > 306c333 < --- > 309,310d335 < < 311a337,338 > echo tng_adminlayout(" onload=\"startSort()\""); > 316c343 < $peopletabs[4] = array($allow_edit,"admin_editperson.php?personID=$personID&tree=$tree",$admtext['edit'],"edit"); --- > $peopletabs[4] = array($allow_edit,"admin_editperson.php?personID=$personID&tree=$tree",$admtext['edit'],"edit"); 322a350 > if(!isset($message)) $message = ""; 325a354 >
    327,329c356,358 <
    73,74c73,75 < < --- > > > 80,82c81,84 < $tng_title, v.$tng_version"; ?> < < --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editnote.php TNG1403/admin_editnote.php 7a8 > $admin_login = 1; 15a17,22 > if( (!$allow_edit && (!$allow_add || !$added)) || ( $assignedtree && $assignedtree != $row['gedcom'] ) ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > 32c39,42 <
    < <
    --- > > > < > 404,410d432 < 423a446,471 > > > > > > > > 430c478 < > --- > > 465c513 < echo "  (" . $admtext['edit'] . " )
    "; --- > echo "  (" . $admtext['edit'] . " )
    "; 467c515 < < >
    339c368 < echo "

    {$admtext['retry']}

    \n"; --- > echo "

    {$admtext['retry']}

    \n"; 342,343c371,372 < $notesicon = $gotnotes['general'] ? "admin-note-on-icon" : "admin-note-off-icon"; < $citesicon = $gotcites['general'] ? "admin-cite-on-icon" : "admin-cite-off-icon"; --- > $notesicon = !empty($gotnotes['general']) ? "admin-note-on-icon" : "admin-note-off-icon"; > $citesicon = !empty($gotcites['general']) ? "admin-cite-on-icon" : "admin-cite-off-icon"; 345c374,375 < echo "{$admtext['save']}\n"; --- > $return = !empty($cw) ? "saveclose" : "saveret"; > echo "{$admtext['save']}\n"; 362,363c392,393 <
    --- >
    386,387c416,417 < $notesicon = $gotnotes['NAME'] ? "admin-note-on-icon" : "admin-note-off-icon"; < $citesicon = $gotcites['NAME'] ? "admin-cite-on-icon" : "admin-cite-off-icon"; --- > $notesicon = !empty($gotnotes['NAME']) ? "admin-note-on-icon" : "admin-note-off-icon"; > $citesicon = !empty($gotcites['NAME']) ? "admin-cite-on-icon" : "admin-cite-off-icon"; 396d425 < < <
    > > > if( !in_array($row['sex'], $genders) ) { > echo "\n"; > } > else { > ?> > > } > ?> >
    --- >
    487c535 < --- >
    492c540 < echo showEventRow('altbirthdate','altbirthplace','CHR',$personID); --- > echo showEventRow('altbirthdate','altbirthplace',(!empty($row['altbirthtype']) ? $row['altbirthtype'] : "ALTBE"),$personID); 504,506d551 <
    <
    < 508,511c553,557 < 518,519d564 < < 530,531c575,576 < < > \n"; --- > echo "\n"; 598,599c643,644 < < > < >
    < :   <

    \n"; --- >
    >
    >

    > echo $admtext['otherevents'] . ":  \n"; 512a559 >

    514c561 <
    --- >
    --- >
    533c578 < $newparents = $allow_add && ( !$assignedtree || $assignedtree == $tree ) ? "  \n" : ""; --- > $newparents = $allow_add && ( !$assignedtree || $assignedtree == $tree ) ? "  \n" : ""; 548c593 < echo "\n"; --- > echo "\n"; 570c615 < echo "
    --- >
    602c647 < $newspouse = $allow_add && ( !$assignedtree || $assignedtree == $tree ) ? "  \n" : ""; --- > $newspouse = $allow_add && ( !$assignedtree || $assignedtree == $tree ) ? "  \n" : ""; 626c671 < echo "\n"; --- > echo "\n"; 632c677 < $query = "SELECT personID, lastname, lnprefix, firstname, birthdate, birthplace, altbirthdate, altbirthplace, deathdate, burialdate, prefix, suffix, nameorder, living, private FROM $people_table WHERE personID = \"{$marriagerow[$spouse]}\" AND gedcom = \"$tree\""; --- > $query = "SELECT personID, lastname, lnprefix, firstname, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, altbirthplace, deathdate, burialdate, title, nickname, prefix, suffix, nameorder, living, private, gedcom, branch FROM $people_table WHERE personID = \"{$marriagerow[$spouse]}\" AND gedcom = \"$tree\""; 670c715,717 < --- > if( !empty($marriagerow['marrdate']) || !empty($marriagerow['marrplace']) ) { > ?> 678c725 < $query = "SELECT $people_table.personID as pID, firstname, lnprefix, lastname, birthdate, birthplace, altbirthdate, altbirthplace, deathdate, burialdate, haskids, living, private, branch, prefix, suffix, nameorder, frel, mrel FROM ($people_table, $children_table) WHERE $people_table.personID = $children_table.personID AND $children_table.familyID = \"{$marriagerow['familyID']}\" AND $people_table.gedcom = \"$tree\" AND $children_table.gedcom = \"$tree\" ORDER BY ordernum"; --- > $query = "SELECT $people_table.personID as pID, $people_table.personID, firstname, lnprefix, lastname, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, altbirthplace, deathdate, burialdate, haskids, living, private, branch, $people_table.gedcom, title, nickname, prefix, suffix, nameorder, frel, mrel FROM ($people_table, $children_table) WHERE $people_table.personID = $children_table.personID AND $children_table.familyID = \"{$marriagerow['familyID']}\" AND $people_table.gedcom = \"$tree\" AND $children_table.gedcom = \"$tree\" ORDER BY ordernum"; 751,767c798,799 <
    <

    < "; < if( $allow_add && ( !$assignedtree || $assignedtree == $tree ) ) { < echo "{$admtext['gotonewfamily']} ($personID) {$admtext['aschild']}
    \n"; < if( $row['sex'] ) < echo "{$admtext['gotonewfamily']} ($personID) $selfdisplay
    \n"; < } < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; < ?> <

    --- >
    772c804,836 < --- > > if(!empty($cw)) { > ?> > > > $close_command = "window.close();"; > } else { > ?> > > > $close_command = "window.location.href='admin_people.php';"; > } > ?> > > > >   > if( $allow_add && ( !$assignedtree || $assignedtree == $tree ) ) { > ?> > > if( $row['sex'] ) { > ?> > > } > } > ?> > 794,797c858,861 < < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editplace.php TNG1403/admin_editplace.php 4c4 < $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] : ""; --- > $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] . "&callback=initMap" : ""; 14,15d13 < $tng_search_places = $_SESSION['tng_search_places']; < 23c21 < $query = "SELECT * FROM $places_table WHERE $wherestr"; --- > $query = "SELECT *, DATE_FORMAT(changedate,\"%d %b %Y %H:%i:%s\") as changedate FROM $places_table WHERE $wherestr"; 51d48 < $flags['tabs'] = $tngconfig['tabs']; 57c54,63 < --- > > > > 58a65 > 148,149d154 < background="img/background.gif"> < 150a156,167 > $onload = $map['key'] && !$map['startoff'] ? " onload=\"divbox('mapcontainer');\"" : ""; > echo tng_adminlayout($onload); > > if( !isset($tree) ) { > if( !empty($assignedtree) ) > $tree = $assignedtree; > elseif(!$tngconfig['places1tree']) > $tree = $row['gedcom']; > else > $tree = ""; > } > 158c175 < $innermenu .= "  |  {$admtext['addmedia']}"; --- > $innermenu .= "  |  {$admtext['addmedia']}"; 163,165c180,181 < < < --- > 221,223d237 < 234a249 > 284,287c299 < < --- > 296,307d307 < < < 311,318c311,333 < < < < <
    --- >
    >
    167a184 >

    197c214 <
    :
    :
    :
    :
    < "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; < ?> <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > if(!empty($cw)) { > ?> > > > $close_command = "window.close();"; > } else { > ?> > > > $close_command = "window.location.href='admin_places.php';"; > } > ?> > > > > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editrepo.php TNG1403/admin_editrepo.php 45d44 < $flags['tabs'] = $tngconfig['tabs']; 51a51 > 59,60d58 < < 61a60,61 > echo tng_adminlayout(); > 65c65 < $repotabs[3] = array($allow_edit,"admin_editrepo.php?repoID=$repoID&tree=$tree",$admtext['edit'],"edit"); --- > $repotabs[3] = array($allow_edit,"admin_editrepo.php?repoID=$repoID&tree=$tree",$admtext['edit'],"edit"); 73a74 >
    75,77c76,78 < < <
    --- > > > <
    85,86c86,88 < $notesicon = "img/" . ($gotnotes['general'] ? "tng_anote_on.gif" : "tng_anote.gif"); < echo "{$admtext['save']}\n"; --- > $notesicon = !empty($gotnotes['general']) ? "admin-note-on-icon" : "admin-note-off-icon"; > $return = !empty($cw) ? "saveclose" : "saveret"; > echo "{$admtext['save']}\n"; 97,99c99,101 <
    < --- > >
    > 103c105 <  ( ) --- >  ( ) 116,118d117 <
    <
    < 120,123c119,123 < 130,131d130 < < 135,136c134,135 < < >
    < :   <

    \n"; --- >
    >
    >

    > echo $admtext['otherevents'] . ":  \n"; 124a125 >

    126c127 <
    --- >
    --- >
    139,144c138,150 < echo $admtext['onsave'] . ":
    "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; --- > if(!empty($cw)) { > ?> > > > $close_command = "window.close();"; > } else { > ?> > > > $close_command = "window.location.href='admin_repositories.php';"; > } 145a152,154 > > > 150,151c159 < " name="cw"> < --- > " name="cw"> 156a165 > 158,160c167,169 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editreport.php TNG1403/admin_editreport.php 25,145c25 < $dontdo = array("ADDR","BIRT","CHR","DEAT","BURI","NAME","NICK","TITL","NSFX","NPFX"); < < $dfields = array(); < $dfields['personID'] = "personid"; < $dfields['fullname'] = "fullname"; < $dfields['lastfirst'] = "lastfirst"; < $dfields['firstname'] = "firstname"; < $dfields['lastname'] = "lastname"; < $dfields['nickname'] = "nickname"; < $dfields['birthdate'] = "birthdate"; < $dfields['birthplace'] = "birthplace"; < if(!$tngconfig['hidechr']) { < $dfields['altbirthdate'] = "chrdate"; < $dfields['altbirthplace'] = "chrplace"; < } < $dfields['marrdate'] = "marriagedate"; < $dfields['marrplace'] = "marriageplace"; < $dfields['divdate'] = "divdate"; < $dfields['divplace'] = "divplace"; < $dfields['spouseid'] = "spouseid"; < $dfields['spousename'] = "spousename"; < $dfields['deathdate'] = "deathdate"; < $dfields['deathplace'] = "deathplace"; < $dfields['burialdate'] = "burialdate"; < $dfields['burialplace'] = "burialplace"; < $dfields['changedate'] = "lastmodified"; < $dfields['sex'] = "sex"; < $dfields['title'] = "title"; < $dfields['suffix'] = "suffix"; < $dfields['prefix'] = "prefix"; < $dfields['gedcom'] = "tree"; < if( $allow_lds ) { < $dfields['baptdate'] = "ldsbapldate"; < $dfields['baptplace'] = "ldsbaplplace"; < $dfields['confdate'] = "ldsconfdate"; < $dfields['confplace'] = "ldsconfplace"; < $dfields['initdate'] = "ldsinitdate"; < $dfields['initplace'] = "ldsinitplace"; < $dfields['endldate'] = "ldsendldate"; < $dfields['endlplace'] = "ldsendlplace"; < $dfields['ssealdate'] = "ldssealsdate"; < $dfields['ssealplace'] = "ldssealsplace"; < $dfields['psealdate'] = "ldssealpdate"; < $dfields['psealplace'] = "ldssealpplace"; < } < < $cfields = array(); < $cfields['personID'] = "personid"; < $cfields['firstname'] = "firstname"; < $cfields['lastname'] = "lastname"; < $cfields['lnprefix'] = "lnprefix"; < $cfields['nickname'] = "nickname"; < $cfields['monthonly'] = "monthonlyfrom"; < $cfields['yearonly'] = "yearonlyfrom"; < $cfields['dayonly'] = "dayonlyfrom"; < $cfields['desc'] = "desc"; < $cfields['birthdate'] = "birthdate"; < $cfields['birthdatetr'] = "birthdatetr"; < $cfields['birthplace'] = "birthplace"; < if(!$tngconfig['hidechr']) { < $cfields['altbirthdate'] = "chrdate"; < $cfields['altbirthdatetr'] = "chrdatetr"; < $cfields['altbirthplace'] = "chrplace"; < } < $cfields['marrdate'] = "marriagedate"; < $cfields['marrdatetr'] = "marriagedatetr"; < $cfields['marrplace'] = "marriageplace"; < $cfields['divdate'] = "divdate"; < $cfields['divdatetr'] = "divdatetr"; < $cfields['divplace'] = "divplace"; < $cfields['deathdate'] = "deathdate"; < $cfields['deathdatetr'] = "deathdatetr"; < $cfields['deathplace'] = "deathplace"; < $cfields['burialdate'] = "burialdate"; < $cfields['burialdatetr'] = "burialdatetr"; < $cfields['burialplace'] = "burialplace"; < $cfields['changedate'] = "lastmodified"; < $cfields['sex'] = "sex"; < $cfields['title'] = "title"; < $cfields['prefix'] = "prefix"; < $cfields['suffix'] = "suffix"; < $cfields['gedcom'] = "tree"; < if( $allow_lds ) { < $cfields['baptdate'] = "ldsbapldate"; < $cfields['baptdatetr'] = "ldsbapldatetr"; < $cfields['baptplace'] = "ldsbaplplace"; < $cfields['confdate'] = "ldsconfdate"; < $cfields['confdatetr'] = "ldsconfdatetr"; < $cfields['confplace'] = "ldsconfplace"; < $cfields['initdate'] = "ldsinitdate"; < $cfields['inittdatetr'] = "ldsinitdatetr"; < $cfields['initplace'] = "ldsinitplace"; < $cfields['endldate'] = "ldsendldate"; < $cfields['endldatetr'] = "ldsendldatetr"; < $cfields['endlplace'] = "ldsendlplace"; < $cfields['ssealdate'] = "ldssealsdate"; < $cfields['ssealdatetr'] = "ldssealsdatetr"; < $cfields['ssealplace'] = "ldssealsplace"; < $cfields['psealdate'] = "ldssealpdate"; < $cfields['psealdatetr'] = "ldssealpdatetr"; < $cfields['psealplace'] = "ldssealpplace"; < } < < $ofields = array(); < $ofields['contains'] = "contains"; < $ofields['starts with'] = "startswith"; < $ofields['ends with'] = "endswith"; < $ofields['OR'] = "text_or"; < $ofields['AND'] = "text_and"; < $ofields['currmonth'] = "currentmonth"; < $ofields['currmonthnum'] = "currentmonthnum"; < $ofields['curryear'] = "currentyear"; < $ofields['currday'] = "currentday"; < $ofields['today'] = "today"; < $ofields['to_days'] = "convtodays"; < < $subtypes = array(); < $subtypes['dt'] = $admtext['rptdate']; < $subtypes['tr'] = $admtext['rptdatetr']; < $subtypes['pl'] = $admtext['place']; < $subtypes['fa'] = $admtext['fact']; --- > include("micro_reports.php"); 159d38 < $flags['tabs'] = $tngconfig['tabs']; 171c50 < else if( document.form1.displayfields.options.length == 0 && document.form1.sqlselect.value.length == 0 ) { --- > else if( jQuery('#displayfields li').length == 0 && document.form1.sqlselect.value.length == 0 ) { 181,182d59 < < 183a61,62 > echo tng_adminlayout(); > 192,194c71,72 < < < < < < < < < < --- > > > > > > > >
    --- >
    >
    197,212c75,89 <
    : < < <
    :
    :
    :>   >

    < =    < =    < =    < =   


    <

    :

    : > > >
    :
    :
    :>   >
    > > 217c94,95 < < < < < < < < < < < --- > 459,460c321,325 < < --- > > > > > 464,471c329,333 < < < <
    >

    >


    :

    <  <?php echo $admtext['add']; ?> 

    <  <?php echo $admtext['remove']; ?>  --- > > 236c111,112 <

    <
    <    <?php echo $admtext['moveup']; ?> 

    <    <?php echo $admtext['remove']; ?> 

    <    <?php echo $admtext['movedown']; ?> 

    --- > > >
    276c150,151 < <
    <  <?php echo $admtext['add']; ?> 

    <  <?php echo $admtext['remove']; ?>  --- > > 303c175,176 < <
    <  <?php echo $admtext['moveup']; ?> 

    <  <?php echo $admtext['remove']; ?> 

    <  <?php echo $admtext['movedown']; ?> 







    --- > > 352,359c223,231 < :
    < <
    <  <?php echo $admtext['add']; ?>  --- > foreach( $ofields as $key=>$value ) > echo "
  • {$admtext[$value]}$key
  • \n"; > ?> >
  • (
  • >
  • )
  • >
  • +
  • >
  • -
  • > > 376,380c246,248 < :*
    < <

    <  <?php echo $admtext['add']; ?>  --- > :*
    >   > 385,389c253,255 < :
    < <

    <  <?php echo $admtext['add']; ?>  --- > :
    >   > 393c259 < * --- > * 401c267,268 < <
    <  <?php echo $admtext['add']; ?> 

    <  <?php echo $admtext['remove']; ?>  --- > > 421c285,286 < <
    <  <?php echo $admtext['moveup']; ?> 

    <  <?php echo $admtext['remove']; ?> 

    <  <?php echo $admtext['movedown']; ?>  --- > > 453c315 <
    < < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_editsource.php TNG1403/admin_editsource.php 53d52 < $flags['tabs'] = $tngconfig['tabs']; 59a59 > 68,69d67 < < 70a69,70 > echo tng_adminlayout(); > 72c72 < $sourcetabs[1] = array($allow_add,"admin_newsource.php",$admtext[addnew],"addsource"); --- > $sourcetabs[1] = array($allow_add,"admin_newsource.php",$admtext['addnew'],"addsource"); 74c74 < $sourcetabs[3] = array($allow_edit,"admin_editsource.php?sourceID=$sourceID&tree=$tree",$admtext['edit'],"edit"); --- > $sourcetabs[3] = array($allow_edit,"admin_editsource.php?sourceID=$sourceID&tree=$tree",$admtext['edit'],"edit"); 82a83 >
    84,86c85,87 < < <
    --- > > > <
    94,95c95,97 < $notesicon = $gotnotes['general'] ? "admin-note-on-icon" : "admin-note-off-icon"; < echo "{$admtext['save']}\n"; --- > $notesicon = !empty($gotnotes['general']) ? "admin-note-on-icon" : "admin-note-off-icon"; > $return = !empty($cw) ? "saveclose" : "saveret"; > echo "{$admtext['save']}\n"; 106,108c108,110 <
    < --- > >
    > 127a130,136 > > $treequery = "SELECT count(gedcom) as treecount FROM $trees_table"; > $treeresult = tng_query($treequery); > $treerow = tng_fetch_assoc($treeresult); > $numtrees = $treerow['treecount']; > tng_free_result($treeresult); > 141,144c150 < <
    :
    <
    < --- > 146,149c152,156 < 156,157d163 < < 161,162c167,168 < < >
    :
    < :   <

    \n"; --- >
    >
    >

    > echo $admtext['otherevents'] . ":  \n"; 150a158 >

    152c160 <
    --- >
    --- >
    165,170c171,183 < echo $admtext['onsave'] . ":
    "; < echo " {$admtext['savereturn']}
    \n"; < if( $cw ) < echo " {$text['closewindow']}\n"; < else < echo " {$admtext['saveback']}\n"; --- > if(!empty($cw)) { > ?> > > > $close_command = "window.close();"; > } else { > ?> > > > $close_command = "window.location.href='admin_sources.php';"; > } 171a185,187 > > > 175,176c191 < " name="cw"> < --- > " name="cw"> 181a197 > 183,185c199,201 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file Only in TNG1403: admin_edittemplatemsg.php diff -r TNG/admin_edittlevent.php TNG1403/admin_edittlevent.php 23d22 < $flags['tabs'] = $tngconfig['tabs']; 54,55d52 < < 56a54,55 > echo tng_adminlayout(); > 65,67c64,67 < < <
    --- >
    > > > < < 133c120,124 < --- > > > > > 138,140c129,132 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_edittree.php TNG1403/admin_edittree.php 55d54 < $flags['tabs'] = $tngconfig['tabs']; 58c57 < < < < < < < {$admtext['help']}"; < $innermenu .= "  |  {$text['expandall']}  |  {$text['collapseall']}"; < $menu = doMenu($setuptabs,"gen",$innermenu); < echo displayHeadline($admtext['setup'] . " >> " . $admtext['configuration'] . " >> " . $admtext['configsettings'],"img/setup_icon.gif",$menu,""); < ?> < < < <
    118,130d117 <
    < < "; < echo " {$admtext['savereturn']}
    \n"; < if( $tng_search_tlevents ) { < echo " {$admtext['saveback']}\n"; < } < ?> <
    <
    < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <
    < < < < <
    < < < < <
    < < < < <
    < < < < <
    < < < < <
    < < < < <
    < < < < <
    < < < < <
    < < < <
    < < < <
    < < < <
    < < < <
    < < <
    < < < <
    < < < < < < < < < < < < < < < < <
    < < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "setup"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > $treeList = array(); > if( $link ) { > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > $query = "SELECT gedcom, treename FROM $trees_table ORDER BY treename"; > $result = @tng_query($query); > while( $row = tng_fetch_assoc($result) ) { > $treeList[] = $row; > } > } > else > $result = false; > > if(!$lineendingdisplay) { > if($lineending == "\r\n") > $lineendingdisplay = "\\r\\n"; > elseif($lineending == "\r") > $lineendingdisplay = "\\r"; > elseif($lineending == "\n") > $lineendingdisplay = "\\n"; > } > if( !$tngconfig['backupdays'] ) $tngconfig['backupdays'] = 30; > $tngconfig['doctype'] = preg_replace("/\"/", """,$tngconfig['doctype']); > $sitename = preg_replace("/\"/", """,$sitename); > $site_desc = preg_replace("/\"/", """,$site_desc); > $dbowner = preg_replace("/\"/", """,$dbowner); > $tngconfig['footermsg'] = preg_replace("/\"/", """,$tngconfig['footermsg']); > if(empty($tngconfig['altbirth'])) $tngconfig['altbirth'] = "CHR,BAPM"; > if(!isset($tngconfig['scrollnotes'])) $tngconfig['scrollnotes'] = 1; > > $helplang = findhelp("config_help.php"); > > tng_adminheader( $admtext['modifysettings'], $flags ); > ?> > > > > > echo tng_adminlayout(); > > $setuptabs[0] = array(1,"admin_setup.php",$admtext['configuration'],"configuration"); > $setuptabs[1] = array(1,"admin_diagnostics.php",$admtext['diagnostics'],"diagnostics"); > $setuptabs[2] = array(1,"admin_setup.php?sub=tablecreation",$admtext['tablecreation'],"tablecreation"); > $setuptabs[3] = array(1,"#",$admtext['configsettings'],"gen"); > $innermenu = "{$admtext['help']}"; > $innermenu .= "  |  {$text['expandall']}  |  {$text['collapseall']}"; > $menu = doMenu($setuptabs,"gen",$innermenu); > echo displayHeadline($admtext['setup'] . " >> " . $admtext['configuration'] . " >> " . $admtext['configsettings'],"img/setup_icon.gif",$menu,""); > ?> > >
    >
    > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > > >
    > > > > > > > > > > > > > > > > > > > > >
    >
    >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_generateID.php TNG1403/admin_generateID.php 7a8 > $admin_login = 1; 13,14c14,15 < eval( "\$prefix = \$tngconfig['{$type}prefix'];" ); < eval( "\$suffix = \$tngconfig['{$type}suffix'];" ); --- > $prefix = $tngconfig[$type.'prefix']; > $suffix = $tngconfig[$type.'suffix']; 21c22 < $query = "SELECT MAX(0+SUBSTRING($type" . "ID,$prefixlen)) as newID FROM $table WHERE gedcom = \"$tree\" AND $type" . "ID LIKE \"$prefix%\""; --- > $query = "SELECT /* admin_generateID.php */ MAX(0+SUBSTRING($type" . "ID,$prefixlen)) as newID FROM $table WHERE gedcom = \"$tree\" AND $type" . "ID LIKE \"$prefix%\""; 24c25 < $query = "SELECT MAX(0+SUBSTRING_INDEX($type" . "ID,'$suffix',1)) as newID FROM $table WHERE gedcom = \"$tree\""; --- > $query = "SELECT /* admin_generateID.php */ MAX(0+SUBSTRING_INDEX($type" . "ID,'$suffix',1)) as newID FROM $table WHERE gedcom = \"$tree\""; 33,37c34,40 < if(isset($_COOKIE['tng_'.$type.'lastid_'.$tree])) < $lastid = $_COOKIE['tng_'.$type.'lastid_'.$tree]; < else < $lastid = 1; < if(!trim($lastid)) $lastid = 0; --- > // > // revision: 20200206 by Butch > // > // removed cookies for saving lastid by user > // new SQL scan index only to provide next gap > // > $lastid = 1; 40a44 > 43a48,50 > $numpart2 = "SUBSTRING($typestr," . ($preflen + 1) . ", 1)"; > // numpart3 restricts the ID's selected to those with the same prefix as current > $numpart3 = "SUBSTRING($typestr, 1, $preflen) = \"$prefix\""; 45a53 > 48c56,59 < $numpart = "CAST(SUBSTRING($typestr,0,LENGTH($typestr - " . ($sufflen + 1) . ")) as SIGNED)"; --- > $numpart = "CAST(SUBSTRING($typestr, 1, (length($typestr)- ".$suflen.")) as SIGNED)"; > $numpart2 = "SUBSTRING($typestr, 1, 1)"; > // numpart3 restricts the ID's selected to those with the same suffix as current > $numpart3 = "SUBSTRING($typestr, -$suflen, $suflen) = \"$suffix\""; 50a62 > 52a65,66 > $numpart2 = "1"; > $numpart3 = "1 = 1"; 56,62c70,98 < $maxrows = 10000; < $nextone = 0; < $newnum = ""; < do { < $query = "SELECT $typestr FROM $table WHERE gedcom = \"$tree\" $wherestr < ORDER BY $numpart < LIMIT $nextone, $maxrows"; --- > // SQL does the work > > $query = "SELECT /* admin_generateID.php */ "; > // format of output > $query .= "CAST(z.expected AS UNSIGNED) as gap "; > // remainder of SELECT > $query .= "FROM (SELECT "; > $query .= "@rownum:=if (@rownum > 0,@rownum+1,$lastid) AS expected, "; > $query .= "IF(@rownum=$numpart, 0, @rownum:=$numpart) AS got "; > $query .= "FROM (SELECT @rownum:=0) AS a "; > $query .= "Join $table "; > $query .= "WHERE $numpart3 and $numpart2 != '0' and $numpart >= $lastid and gedcom = \"$tree\" "; > $query .= "ORDER BY $numpart) AS z "; > $query .= "WHERE z.got!=0 "; > $query .= "LIMIT 1"; > > $result = tng_query($query); > > if ($result and tng_num_rows($result) > 0) { > $row = tng_fetch_array($result); > $lastid = $row['gap']; > } > else { > if (!$result){ > echo "SQL Error ID generation
    "; > die ("Cannot continue"); > } > // no gap found so use the last ID number +1 > $query = "Select max($numpart+1) as lastID from $table where $numpart3 and gedcom = \"$tree\""; 64,80c100,102 < $numrows = tng_num_rows($result); < < while(($row = tng_fetch_array($result)) && !$found) { < if($prefix) < $number = intval(substr($row[$typestr],$preflen)); < elseif($suffix) < $number = intval(substr($row[$typestr],0,-$suflen)); < else < $number = intval($row[$typestr]); < < if($number > $lastid) { < $found = true; < $newnum = $lastid; < break; < } < elseif($number == $lastid) < $lastid += 1; --- > if ($result and tng_num_rows($result) > 0) { > $row = tng_fetch_array($result); > $lastid = $row['lastID']; 82,84c104,108 < $nextone += $maxrows; < } while(!$found && $numrows == $maxrows); < --- > // default to the initial value of 1 for empty tables > if ($lastid == "" or !is_numeric($lastid)) { > $lastid = 1; > } > } 86c110 < setcookie('tng_'.$type.'lastid_'.$tree,$newnum,time()+60*60*24*365); --- > diff -r TNG/admin_generatethumbs.php TNG1403/admin_generatethumbs.php 24c24 < $maxsizeallowed = 1000; //KB --- > $maxsizeallowed = 5000; //KB 28c28 < $query = "SELECT mediaID, path, thumbpath, mediatypeID, usecollfolder, form, description FROM $media_table where path != \"\""; --- > $query = "SELECT mediaID, path, thumbpath, mediatypeID, usecollfolder, form, description, gedcom FROM $media_table where path != \"\""; 39a40 > $treestr = $tngconfig['mediatrees'] ? $row['gedcom'] . "/" : ""; 41c42 < if( !$row['form'] ) { --- > if( empty($row['form']) ) { 49,50c50,51 < if( trim($row['thumbpath']) && !$repath ) { < if( (!$regenerate && file_exists( "$rootpath$usefolder/" . $row['thumbpath'] )) || !in_array($ext,$imagetypes) ) --- > if( !empty($row['thumbpath']) && !$repath ) { > if( (!$regenerate && file_exists( "$rootpath$usefolder/$treestr" . $row['thumbpath'] )) || !in_array($ext,$imagetypes) ) 53c54 < $newthumbpath = "$rootpath$usefolder/" . $row['thumbpath']; --- > $newthumbpath = "$rootpath$usefolder/$treestr" . $row['thumbpath']; 64c65 < $newthumbpath = "$rootpath$usefolder/$thumbpath"; --- > $newthumbpath = "$rootpath$usefolder/$treestr$thumbpath"; 72c73 < $path = "$rootpath$usefolder/" . trim($row['path']); --- > $path = "$rootpath$usefolder/$treestr" . trim($row['path']); 74c75 < if(strtoupper( $srcInfo['extension'] ) != "PDF") { --- > if(strtoupper( $destInfo['extension'] ) != "PDF") { diff -r TNG/admin_geocodeform.php TNG1403/admin_geocodeform.php 13d12 < $orgtree = $tree; 16d14 < $flags['tabs'] = $tngconfig['tabs']; 22,23d19 < < 24a21,22 > echo tng_adminlayout(); > 29c27 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 34,36c32,33 < < < < <
    --- >
    >
    61c58 < if( $treerow['gedcom'] == $tree ) echo " selected"; --- > if( isset($tree) && $treerow['gedcom'] == $tree ) echo " selected"; 102,107c99,103 <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_geocode.php TNG1403/admin_geocode.php 15d14 < $orgtree = $tree; 18c17 < if($resetignore) { --- > if( !empty($resetignore) ) { 23d21 < $flags['tabs'] = $tngconfig['tabs']; 29,30d26 < < 31a28,29 > echo tng_adminlayout(); > 36c34 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 41,43c39,40 < < < < <
    --- >
    >
    51c48 < $query = "SELECT ID, place FROM $places_table WHERE (latitude = \"\" OR latitude IS NULL) AND (longitude = \"\" OR longitude IS NULL) AND temple != \"1\" AND geoignore != \"1\"$treestr ORDER BY place $limitstr"; --- > $query = "SELECT ID, place FROM $places_table WHERE (latitude = \"\" OR latitude IS NULL) AND (longitude = \"\" OR longitude IS NULL) AND temple != \"1\" AND placelevel != \"-1\" AND geoignore != \"1\"$treestr ORDER BY place $limitstr"; 77,82c74,78 <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_getphotodetails.php TNG1403/admin_getphotodetails.php 37c37 < echo "\"{$row['mtitle']}\""; --- > echo "\"{$row['description']}\""; diff -r TNG/admin_importconfig.php TNG1403/admin_importconfig.php 29,30c29,31 < if( $localphotopathdisplay && !$locimppath['photos'] ) $locimppath['photos'] = $localphotopathdisplay; < if( $localdocpathdisplay && !$locimppath['histories'] ) $locimppath['histories'] = $localdocpathdisplay; --- > if( isset($localphotopathdisplay) && !$locimppath['photos'] ) $locimppath['photos'] = $localphotopathdisplay; > if( isset($localdocpathdisplay) && !$locimppath['histories'] ) $locimppath['histories'] = $localdocpathdisplay; > if( !isset($tngimpcfg['saveconfig']) ) $tngimpcfg['saveconfig'] = ""; 34d34 < $flags['tabs'] = $tngconfig['tabs']; 40,41d39 < < 42a41,42 > echo tng_adminlayout(); > 47c47 < $innermenu .= "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 52,54c52,53 < < < < --- > > > 62d61 < 97a97 > 105a106,114 > > > > 107c116,118 < --- > > > 110,116c121,125 < < < <
    --- >
    >
    57,59c56,59 <
    : <
    :>
    : >
    >
    :
    : > >
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_languages.php TNG1403/admin_languages.php 17a18,19 > if( !isset($offset) ) $offset = 0; > 19c21 < if( $newsearch ) { --- > if( !empty($newsearch) ) { 26,27c28,29 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_langs_post']['search']); --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_langs_post']['search']) ? stripslashes($_COOKIE['tng_search_langs_post']['search']) : ""; 29,30c31,32 < $tngpage = $_COOKIE['tng_search_langs_post']['tngpage']; < $offset = $_COOKIE['tng_search_langs_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_langs_post']['tngpage']) ? $_COOKIE['tng_search_langs_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_langs_post']['offset']) ? $_COOKIE['tng_search_langs_post']['offset'] : 0; 33a36 > if( !isset($tngpage) ) $tngpage = 1; 66d68 < $flags['tabs'] = $tngconfig['tabs']; 72,73d73 < < 74a75,76 > echo tng_adminlayout(); > 82,85c84,85 < < < \n"; < $tr .= "\n"; < $tr .= "\n"; --- > $tr .= "\n"; > $tr .= "\n"; > $tr .= "\n"; 241c370 < $tr .= "\n"; --- > $tr .= "\n"; 243c372 < $tr .= "\n"; --- > $tr .= "\n"; 245c374 < $tr .= "\n"; --- > $tr .= "\n"; 249a379,400 > function getAltBirthTypes($currentType) { > global $tngconfig, $admtext, $options; > > $typestr = "  "; > > $typestr .= "\n"; > > return $typestr; > } > 268c419 < if(!$editconflict) { --- > if(!$editconflict && isset($row['ID'])) { diff -r TNG/admin_logconfig.php TNG1403/admin_logconfig.php 27a28 > if( !isset($logsaveconfig) ) $logsaveconfig = ""; 29d29 < $flags['tabs'] = $tngconfig['tabs']; 34,35d33 < < 36a35,36 > echo tng_adminlayout(); > 41c41 < $innermenu .= "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 46,48c46,47 <
    <
    --- >
    >
    102c102 < --- >
    138,144c138,141 < < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file Only in TNG: admin_leftbanner.php Only in TNG1403: admin_leftmenu.php diff -r TNG/adminlib.php TNG1403/adminlib.php 8a9 > $flags = array(); 10,11d10 < $http_user_agent = strtolower($_SERVER["HTTP_USER_AGENT"]); < $newbrowser = preg_match("/msie/", $http_user_agent) && preg_match("/mac/", $http_user_agent) ? 0 : 1; 13a13 > if(!isset($message)) $message = ""; 21c21,24 < echo "\n\n"; --- > if( !empty( $flags['modmgr'] ) ) > echo "\n\n"; > else > echo $tngconfig['doctype'] ? $tngconfig['doctype'] . "\n\n" : "\n\n"; 23c26 < echo "\n\n"; --- > echo "\n\n"; 34c37 < if(!$tng_version) $tng_version = "12.0.1"; --- > if(!$tng_version) include_once("version.php"); 41,42c44,46 < if( isset($flags['tabs']) ) < echo "\n"; --- > if( isset( $flags['css'] ) ) > echo $flags['css']; > echo "\n"; 45,46c49,85 < if($sitever != "mobile" && $sitever != "tablet") < echo "\n"; --- > if($sitever != "mobile" && $sitever != "tablet") { > echo "\n"; > // Update to add icons for Windows 8+ and Safari in MacOS El Capitan+. > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > // Update to add icons for Windows 8+ and Safari in MacOS El Capitan+. > } else { > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > > // Update to add icons for Android and iOS 8+. > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > // Update to add icons for Android and iOS 8 and later. > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > } 63c102 < echo "\n"; --- > echo "\n"; 67,68c106,107 < echo "\n"; < echo "\n"; --- > echo "\n"; > echo "\n"; 71a111 > echo "\n"; 76a117,188 > function tng_corner($side) { > return "
    \"The
    \n"; > } > > function tng_adminmasthead() { > global $tng_title, $tng_version, $currentuser, $allow_admin, $admtext, $text, $homepage, $tngconfig, $cms, $sitever; > > $helplang = findhelp("index_help.php"); > > $output = "
    \n"; > $output .= "

    $tng_title, v.$tng_version

    \n"; > $output .= "\n"; > $output .= "{$admtext['adminhome']}\n"; > $output .= " |  {$admtext['publichome']}\n"; > if( $allow_admin ) > $output .= " |  {$admtext['showlog']}\n"; > if($sitever != "mobile") { > $output .= " |  {$admtext['getstart']}\n"; > if($tngconfig['maint']) > $output .= " |  {$text['mainton']}\n"; > } > $output .= " |  {$admtext['logout']}  ($currentuser)\n"; > $output .= "\n"; > $output .= "
    \n"; > > return $output; > } > > function tng_adminlayout($args = "", $showmenu = true) { > global $sitever, $tng_abbrev; > > if($sitever == "mobile") $tng_title = $tng_abbrev; > //$class_str = $class ? " class=\"$class\"" : ""; > $output = "\n"; > > $output .= "
    \n"; > $output .= $sitever == "standard" ? tng_corner('left') : ""; > $output .= $sitever == "standard" ? tng_corner('right') : ""; > $output .= tng_adminmasthead(); > $output .= "
    \n"; > > //left banner > $output .= "
    \n"; > $leftoffset = $mainoffset = ""; > if($sitever == "standard") { > if(isset($_SESSION['tng_menuhidden']) && $_SESSION['tng_menuhidden'] == "on") { > $leftoffset = " style=\"left:-135px\""; > $mainoffset = "style=\"padding-left: 26px\""; > } > if($showmenu) { > $output .= "
    \n"; > include("admin_leftmenu.php"); > $output .= "
    \n"; > } > } > else > $mainoffset = " style=\"padding-left: 0px;\""; > > $classname = $showmenu ? "mainback" : "homeback"; > $output .= "
    \n"; > > return $output; > } > > function tng_adminfooter() { > global $tng_title, $tng_version; > $output = "
    \n"; > $output .= "\n\n"; > > return $output; > } > 80,81c192,193 < eval( "\$prefix = \$tngconfig['{$type}prefix'];" ); < eval( "\$suffix = \$tngconfig['{$type}suffix'];" ); --- > $prefix = $tngconfig[$type.'prefix']; > $suffix = $tngconfig[$type.'suffix']; 112c224 < global $newbrowser, $text, $sitever; --- > global $text, $sitever; 117c229 < $menu .= $newbrowser ? "
      \n" : "
      \n"; --- > $menu .= "
        \n"; 131c243 < $menu .= $newbrowser ? "
      \n" : "
      \n"; --- > $menu .= "
    \n"; 142c254 < global $people_table, $families_table, $temp_events_table, $assignedbranch, $assignedtree, $admtext; --- > global $people_table, $families_table, $temp_events_table, $assignedbranch, $assignedtree, $admtext, $tree; 199,200c311,312 < $rval = "
    \n
    \n"; < $rval .= "\"$headline\"$headline

    \n"; --- > $rval = "
    \n
    \n"; > $rval .= "\"$headline\"$headline

    \n"; 219c331 < global $admtext, $tree, $gotmore, $gotnotes, $gotcites, $row, $dims, $noclass; --- > global $admtext, $tree, $gotmore, $gotnotes, $gotcites, $row, $dims, $noclass, $currentform, $tngconfig; 221,223c333,335 < $notesicon = $gotnotes[$label] ? "admin-note-on-icon" : "admin-note-off-icon"; < $citesicon = $gotcites[$label] ? "admin-cite-on-icon" : "admin-cite-off-icon"; < $moreicon = $gotmore[$label] ? "admin-more-on-icon" : "admin-more-off-icon"; --- > $notesicon = !empty($gotnotes[$label]) ? "admin-note-on-icon" : "admin-note-off-icon"; > $citesicon = !empty($gotcites[$label]) ? "admin-cite-on-icon" : "admin-cite-off-icon"; > $moreicon = !empty($gotmore[$label]) ? "admin-more-on-icon" : "admin-more-off-icon"; 227c339,340 < $blurAction = ($label == "DEAT" || $label == "BURI") ? " updateLivingBox(this);" : ""; --- > if(!isset($currentform)) $currentform = "document.form1"; > $blurAction = ($label == "DEAT" || $label == "BURI") ? " updateLivingBox($currentform,this);" : ""; 230c343,359 < $short = $noclass ? " style=\"width:100px\"" : " class=\"shortfield\""; --- > if($datefield == "altbirthdate") { > if($label == "ALTBE") { > $label = empty($tngconfig['altbirth']) ? "CHR" : explode(',',$tngconfig['altbirth'])[0]; > } > $altbirthtype = ""; > $type_selector = getAltBirthTypes($label); > $fieldlabel = "" . $admtext[$label] . ""; > $dloglabel = "ALTBE"; > } > else { > $altbirthtype = ""; > $type_selector = ""; > $fieldlabel = $admtext[$label]; > $dloglabel = $label; > } > > $short = $noclass ? " style=\"width:140px\"" : " class=\"shortfield\""; 233,235c362,364 < $tr .= "
    " . $admtext[$label] . ":" . $fieldlabel . ":{$type_selector}$altbirthtype
    < <
    --- >
    >
    50,59c49,59 < < < < < < < < < < --- >
    :
    :
    *:
    *:
    :
    :



    *:
    *:
    > > > > > > > > > > 61c61,63 < --- > > > 64,70c66,70 < < < <
    :
    :
    >
    :
    :
    *:
    *:



    *:
    *:
    < $tng_title, v.$tng_version
    "; ?> < < --- >
    > > echo tng_adminfooter(); > ?> diff -r TNG/admin_login.php TNG1403/admin_login.php 10c10 < if(isset( $_SESSION['logged_in'] ) && $_SESSION['session_rp'] == $rootpath && $_SESSION['allow_admin'] && $currentuser) { --- > if(isset( $_SESSION['logged_in'] ) && $_SESSION['session_rp'] == $rootpath && $_SESSION['allow_admin'] && !empty($currentuser)) { 17c17 < if($admtext[$message]) --- > if(!empty($admtext[$message])) 19c19 < elseif($text[$message]) --- > elseif(!empty($text[$message])) 22,31c22,28 < if( !empty( $email ) ) { < < $sendmail = 0; < < //if username is there too, then look up based on username and get password < if( $username ) { < $query = "SELECT username, realname FROM $users_table WHERE username = \"$username\""; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < tng_free_result($result); --- > $sendmail = 0; > > //if username is there too, then look up based on username and get password > if( !empty($pwdreset) && !empty($username) ) { > $query = "SELECT email, realname, userID FROM $users_table WHERE username = \"$username\" AND reset_pwd_code = \"$pwdreset\""; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); 32a30 > if(tng_num_rows($result)) { 34,44c32,38 < $query = "UPDATE $users_table SET password = \"" . PasswordEncode($newpassword) . "\", password_type = \"" . PasswordType() . "\" WHERE email = \"$email\" AND username = \"$username\" AND allow_living != \"-1\""; < $result = tng_query($query); < $success = tng_affected_rows(); < < if( $success ) { < $sendmail = 1; < $content = $text['newpass'] . ": $newpassword"; < $message = $text['pwdsent']; < } < else < $message = $text['loginnotsent3']; --- > $query = "UPDATE $users_table SET password = \"" . PasswordEncode($newpassword) . "\", password_type = \"" . PasswordType() . "\" WHERE userID=\"{$row['userID']}\""; > $result2 = tng_query($query); > $sendmail = tng_affected_rows($result); > > $content = $text['newpass'] . ": $newpassword"; > $message = $text['pwdsent']; > $email = $row['email']; 46,50c40,53 < else { < $query = "SELECT username, realname FROM $users_table WHERE email = \"$email\""; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < tng_free_result($result); --- > else > $message = $text['loginnotsent3']; > tng_free_result($result); > } > elseif( !empty( $email ) && !empty($username) ) { > $query = "SELECT realname, userID FROM $users_table WHERE email = \"$email\" AND username = \"$username\" AND allow_living != \"-1\""; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > > if(tng_num_rows($result)) { > $reset_pwd_code = rand(100000,999999); > $query = "UPDATE $users_table SET reset_pwd_code = \"" . $reset_pwd_code . "\" WHERE userID=\"{$row['userID']}\""; > $result2 = tng_query($query); > $sendmail = tng_affected_rows(); 52,58c55,56 < if( $row['username'] ) { < $sendmail = 1; < $content = "{$text['logininfo']}:\n\n{$admtext['username']}: {$row['username']}"; < $message = $text['usersent']; < } < else < $message = $text['loginnotsent2']; --- > $content = $text['pwdcodelink'] . ": $tngdomain/" . getURL('admin_login',1) . "username=$username&pwdreset={$reset_pwd_code}"; > $message = $text['pwdcodesent']; 59a58,64 > else > $message = $text['loginnotsent3']; > tng_free_result($result); > } > elseif( !empty( $email ) ) { > $query = "SELECT username, realname FROM $users_table WHERE email = \"$email\""; > $result = tng_query($query); 61,65c66,70 < if( $sendmail ) { < $mailmessage = $content; < $owner = preg_replace("/,/", "", ($sitename ? $sitename : ($dbowner ? $dbowner : "TNG"))); < < tng_sendmail($owner, $emailaddr, $row['realname'], $email, $text['logininfo'], $mailmessage, $emailaddr, $emailaddr); --- > if( tng_num_rows($result) >= 1 ) { //if there happens to be more than one, just take the first one and don't worry about it > $row = tng_fetch_assoc( $result ); > $sendmail = 1; > $content = "{$text['logininfo']}:\n\n{$admtext['username']}: {$row['username']}"; > $message = $text['usersent']; 66a72,81 > else > $message = $text['loginnotsent2']; > tng_free_result($result); > } > > if( $sendmail ) { > $mailmessage = $content; > $owner = preg_replace("/,/", "", ($sitename ? $sitename : ($dbowner ? $dbowner : "TNG"))); > > tng_sendmail($owner, $emailaddr, $row['realname'], $email, $text['logininfo'], $mailmessage, $emailaddr, $emailaddr); 92c107 < $_COOKIE[$loggedin]=""; --- > setcookie($loggedin, "", time()-3600); 93a109 > $centering = $sitever == "standard" ? "position:relative;margin-top:10%" : ""; 97c113 < --- >
    99,100c115,116 < < > < < < < < < < < < < < < < < < --- > 248a261,270 > > > > > 266a289 > 271,272c294,298 < < > 316,317c343,344 < < >
    < --- > >

    TNG

    115c131 <
    --- > 117c133 <
    --- >
    119,136c135,145 < < < < < < < < < < < < < < < < < <
    :
    :
     
     
    --- >

    > :
    > >

    >

    > :
    > > >

    >

    > 139c148 < --- > " /> 142,143c151 <
       
    <
    --- >
    145,160c153,162 < < < < < < < < < < < < < < < <
    :

    :
    --- >

    >

    > :
    > >

    >

    >

    > :
    > >

    167c169 < < > "; < } --- > echo tng_adminfooter(); > > ob_end_flush(); 193,196d192 < echo " < < "; < exit; 200,215c196 < function set_horizontal_tabs( $show_analyzer = NO, $show_updates = NO ) { < global $admtext; < < $modtabs = array(); < $modtabs[0] = array(1, "admin_modhandler.php", $admtext['modlist'],"modlist"); < $modtabs[1] = array(1,"admin_showmodslog.php",$admtext['viewlog'],"viewlog"); < $modtabs[2] = array(1,"admin_modoptions.php",$admtext['options'],"options"); < if ( $show_analyzer == YES) { < $modtabs[3] = array(1,"admin_analyzemods.php",$admtext['analyzefiles'],'files'); < $modtabs[4] = array(1,"admin_modtables.php",$admtext['parsetable'],'parser'); < } < if ( $show_updates == YES ) < $modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates'); < return $modtabs; < } < function set_innermenu_links( $tng_version ) { --- > function set_innermenu_links( $tng_version, $pageID='editor' ) { 224c205,206 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']} > "; 227c209,210 < $innermenu .= "  |  {$admtext['modsyntax']}"; --- > $innermenu .= "  |  {$admtext['modsyntax']} > "; 230c213,214 < $innermenu .= "  |  {$admtext['modguidelines']}"; --- > $innermenu .= "  |  {$admtext['modguidelines']} > "; 233c217,218 < $innermenu .= "  |  $tngmodver"; --- > $innermenu .= "  |  $tngmodver > "; diff -r TNG/admin_modhandler.php TNG1403/admin_modhandler.php 3,8c3,14 < Mod Manager 12 < Brian McFadyen: Original concept < Rick Bisbee: Main script, Mod List, Analyzer, OOP class library < Ken Roy: View Log, Options, Test Manager < Robin Richmond: View Log < Jeff Robison: Affected Files Display --- > Mod Manager Mod Handler v14.0.0.1 > Brian McFadyen: Original concept > Rick Bisbee: Main script, Mod List, Analyzer, OOP class library > Ken Roy: View Log, Options, Test Manager > Robin Richmond: View Log > Jeff Robison: Affected Files Display > Michel Kirsch: Mod Analyzer updates > Michel Kirsch and Ron Krzmarzick: Page Display Positioning > > This is the Mod Manager controller. It uses class objects to > acheive various functional ends - verifying, listing, installing > removing, and editing 'mods'. 10,11c16,17 < Uses class objects to acheive various functionality - listing, installing < removing, and editing mod config files. --- > This version is the Final refactoring to separate validation > functions (Modvalidator) from Modlister. 13,16c19,23 < < include("begin.php"); < if( empty( $rootpath ) ) { < echo 'Error ',__LINE__,': $rootpath missing! Please contact your system administrator.';exit; --- > $mmversion = 'mmv14.0.0.1'; > include "begin.php"; > if( empty( $rootpath ) ) > { > echo 'Error ',__LINE__,': $rootpath missing! Please contact your system administrator.';exit; 18c25,26 < include("adminlib.php"); --- > > include "adminlib.php"; 20c28,40 < include("getlang.php"); --- > include "getlang.php"; > > include $mylanguage."/admintext.php"; > if( !$alltextloaded ) > { > require $mylanguage."/alltext.php"; > } > > $admin_login = true; > include "checklogin.php"; > include "version.php"; > include "classes/version.php"; > require "classes/mmtabs.inc"; 22c42,47 < include("$mylanguage/admintext.php"); --- > /* prevent direct URL access to Mod Manager if not the TNG Administrator. */ > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } 24,27c49,51 < $admin_login = 1; < include("checklogin.php"); < include("version.php"); < include("classes/version.php"); --- > /* Suppress PHP notices.*/ > if( !isset( $modspath) ) $modspath = ''; > if( !isset( $extspath) ) $extspath = ''; 35a60 > define( 'ALL', 0 ); 44,58c69 < include $subroot.'mmconfig.php'; < < //suppress PHP notices < if( !isset( $modspath) ) $modspath = ''; < if( !isset( $extspath) ) $extspath = ''; < < // VERIFY TNG FILES WRITEABLE < $message = ''; < if( !is_writable( $rootpath ) ) < $message .= "{$admtext['checkwrite']} {$admtext['cantwrite']} $rootpath "; < < //echo $message;exit; < if( !empty( $message ) ) { < $message = "$message"; < } --- > require_once $subroot.'mmconfig.php'; 68,73c79,81 < // SETUP THE PAGE HEADER AND MENUS < $modtabs = set_horizontal_tabs( $options['show_analyzer'], $options['show_developer'], $options['show_updates']); < $innermenu = set_innermenu_links( $tng_version ); < $menu = "
    "; < $menu .= doMenu($modtabs,"modlist",$innermenu); < $menu .= "
    "; --- > $message = ''; > if( !is_writable( $rootpath ) ) > $message .= "{$admtext['checkwrite']} {$admtext['cantwrite']} $rootpath "; 75,76c83,86 < $headline = displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); < $first_menu=TRUE; --- > //echo $message;exit; > if( !empty( $message ) ) { > $message = "$message"; > } 79c89,90 < $mhuser = isset( $_SESSION['currentuserdesc'] ) ? $_SESSION['currentuser'] : ""; --- > $mhuser = isset( $_SESSION['currentuserdesc'] ) > ? $_SESSION['currentuser'] : ""; 81,98d91 < // INITIALIZATIONS FOR MOD OBJECTS < require 'classes/modobjinits.php'; < < /* < $objinits = array ( < 'rootpath' => $rootpath, < 'subroot' => $subroot, < 'modspath' => $modspath, < 'extspath' => $extspath, < 'options' => $options, < 'time_offset' => $time_offset, < 'sitever' => $sitever, < 'currentuserdesc' => $mhuser, < 'admtext' => $admtext, < 'templatenum' => $templatenum, < 'tng_version' => $tng_version < ); < * 103,172c96,182 < if( !empty( $_POST ) ) { < foreach( $_POST as $key => $value ) { < ${$key} = $value; < } < < // APPLY FILTER TO MODLIST FOR BATCH OPS < if( !empty( $submit ) ) { < if( !empty( $mods ) ) { < foreach( $mods as $mod ) { < if( isset( $mod['selected'] ) ) { < $modlist[] = $cfgfolder.$mod['file']; < } < } < } < < // INSTALL ALL < if( $submit == "installall" ) { < include_once 'classes/modinstaller.class.php'; < $oInstaller = new modinstaller( $objinits ); < if(!$oInstaller->batch_install( $modlist ) || $options['redirect2log'] == ON_ALL ) { < header("Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < < // REMOVE ALL < elseif( $submit == "removeall" ) { < include_once 'classes/modremover.class.php'; < $oRemover = new modremover( $objinits ); < if( !$oRemover->batch_remove( $modlist ) || $options['redirect2log'] == ON_ALL ) { < header("Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < // CLEANUP ALL < elseif( $submit == "cleanupall" ) { < include_once 'classes/modremover.class.php'; < $oRemover = new modremover( $objinits); < if( !$oRemover->batch_remove( $modlist ) || $options['redirect2log'] == ON_ALL ) { < header("Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < // DELETE ALL < elseif( $submit == "deleteall" ) { < //echo __LINE__;print_r($modlist);exit; < include_once 'classes/moddeleter.class.php'; < $oDeleter = new moddeleter( $objinits); < if( !$oDeleter->batch_delete( $modlist ) || $options['redirect2log'] == ON_ALL ) { < header( "Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < } --- > if( !empty( $_POST ) ) > { > foreach( $_POST as $key => $value ) > { > ${$key} = $value; > } > > // APPLY FILTER TO MODLIST FOR BATCH OPS > if( !empty( $submit ) ) > { > if( !empty( $mods ) ) > { > foreach( $mods as $mod ) > { > if( isset( $mod['selected'] ) ) > { > $modlist[] = $cfgfolder.$mod['file']; > } > } > } > > // INSTALL BATCH > if( $submit == "installall" ) > { > include_once 'classes/modinstaller.class.php'; > // $oInstaller = new modinstaller( $objinits ); > $oInstaller = new_modinstaller(); > if(!$oInstaller->batch_install( $modlist ) > || $options['redirect2log'] == ON_ALL ) > { > header("Location:admin_showmodslog.php"); > exit; > } > header('location:admin_modhandler.php'); > exit; > /* Given the redirect, don't think this this will be a problem anymore. > */ > if( function_exists( 'opcache_invalidate' ) ) > { > opcache_invalidate($mylanguage."/cust_text.php"); > } > include $mylanguage."/cust_text.php"; > } > > // REMOVE BATCH > elseif( $submit == "removeall" ) > { > include_once 'classes/modremover.class.php'; > $oRemover = new_modremover( ); > if( !$oRemover->batch_remove( $modlist ) > || $options['redirect2log'] == ON_ALL ) > { > header("Location:admin_showmodslog.php"); > exit; > } > header('location:admin_modhandler.php'); > exit; > } > // CLEANUP BATCH > elseif( $submit == "cleanupall" ) > { > include_once 'classes/modremover.class.php'; > $oRemover = new_modremover(); > if( !$oRemover->batch_remove( $modlist ) > || $options['redirect2log'] == ON_ALL ) > { > header("Location:admin_showmodslog.php"); > exit; > } > header('location:admin_modhandler.php'); > exit; > } > // DELETE BATCH > elseif( $submit == "deleteall" ) > { > include_once 'classes/moddeleter.class.php'; > $oDeleter = new_moddeleter(); > if( !$oDeleter->batch_delete( $modlist ) > || $options['redirect2log'] == ON_ALL ) > { > header( "Location:admin_showmodslog.php"); > exit; > } > header('location:admin_modhandler.php'); > exit; > } > } 177,237c187,292 < elseif( !empty( $_GET ) ) { < foreach( $_GET as $key => $value ) { < ${$key} = $value; < } < if( isset( $a ) ) { < $action = isset( $a ) ? $a : ''; < $cfgpath = isset( $m ) ? $cfgfolder.$m : ''; < < // INSTALL < if( $action == INSTALL ) { < include_once 'classes/modinstaller.class.php'; < $obj = new modinstaller( $objinits ); < if( !$obj->install( $cfgpath ) || $options['redirect2log'] == ON_ALL ) { < header( "Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < // REMOVE < elseif( $action == REMOVE ) { < include_once 'classes/modremover.class.php'; < $obj = new modremover( $objinits ); < if( !$obj->remove( $cfgpath ) || $options['redirect2log'] == ON_ALL ) { < header( "Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < // DELETE < elseif( $action == DELETE ) { < $error = false; < include_once 'classes/moddeleter.class.php'; < $obj = new moddeleter( $objinits ); < if( !$obj->delete_mod( $cfgpath ) || $options['redirect2log'] == ON_ALL ) { < header( "Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } < } < // CLEANUP < elseif( $action == CLEANUP ) { < include_once 'classes/modremover.class.php'; < $obj = new modremover( $objinits ); < $obj->classID = "cleaner"; < if( !$obj->remove( $cfgpath ) || $options['redirect2log'] == ON_ALL ) { < header( "Location:admin_showmodslog.php"); < exit; < } < else { < header( "Location:admin_modhandler.php" ); < exit; < } --- > elseif( !empty( $_GET ) || !empty( $_SESSION['got'] ) ) > { > /* Remove URL parameter string to prevent duplicate processing if > ** page is refreshed. > */ > if( !empty( $_GET ) ) > { > $_SESSION['got'] = $_GET; > header('Location:admin_modhandler.php'); > die; > } > elseif (!empty($_SESSION['got'])) > { > $_GET = $_SESSION['got']; > unset($_SESSION['got']); > } > > foreach( $_GET as $key => $value ) > { > ${$key} = $value; > } > if( isset( $a ) ) > { > $action = isset( $a ) ? $a : ''; > $cfgpath = isset( $m ) ? $cfgfolder.$m : ''; > > // INSTALL SINGLE > if( $action == INSTALL ) > { > require 'classes/modinstaller.class.php'; > /* Get initialized modinstaller */ > $oInstaller = new_modinstaller(); > > if( !$oInstaller->install( $cfgpath ) > || $options['redirect2log'] == ON_ALL ) > { > header( "Location:admin_showmodslog.php"); > exit; > } > else > { > if( function_exists( 'opcache_invalidate' ) ) > { > opcache_invalidate($mylanguage."/cust_text.php"); > } > include $mylanguage."/cust_text.php"; > /* Mod Installed - return to modlisting */ > header( "Location:admin_modhandler.php#flinka".($id-1)); > exit; > } > > } > // REMOVE SINGLE > elseif( $action == REMOVE ) > { > include_once 'classes/modremover.class.php'; > $oRemover = new_modremover( ); > if( !$oRemover->remove( $cfgpath ) > || $options['redirect2log'] == ON_ALL ) > { > header( "Location:admin_showmodslog.php "); > exit; > } > else > { > /* Mod Removed - return to modListing */ > header( "Location:admin_modhandler.php#flinka".($id-1)); > exit; > } > } > // DELETE SINGLE > elseif( $action == DELETE ) > { > $error = false; > include_once 'classes/moddeleter.class.php'; > $oDeleter = new_moddeleter(); > if( !$oDeleter->delete_mod( $cfgpath ) > || $options['redirect2log'] == ON_ALL ) > { > header( "Location:admin_showmodslog.php"); > exit; > } > else > { > /* Mod Deleted - return to modlisting */ > header( "Location:admin_modhandler.php" ); > exit; > } > } > // CLEANUP SINGLE > elseif( $action == CLEANUP ) > { > include_once 'classes/modremover.class.php'; > $oRemover = new_modremover(); > $oRemover->classID = "cleaner"; > if( !$oRemover->remove( $cfgpath ) > || $options['redirect2log'] == ON_ALL ) > { > header( "Location:admin_showmodslog.php"); > exit; > } > else > { > /* Mod Cleaned UP - return to modlister */ > header( "Location:admin_modhandler.php#flinka".($id-1)); > exit; 239c294,295 < } --- > } > } 242d297 < // FILTER IS ONLY RETURNED IF THE 'LOCK' BOX IS CHECKED 244,259d298 < if( !isset( $filter ) ) { < // user not asking for filter change < if( isset( $_SESSION['filter'] ) ) { < $filter = $_SESSION['filter']; < $fbox_checked = true; < } < else { < $filter = 0; < $fbox_checked = false; < } < } < else { < // filter was set from drop down -- starting over with clean filter checkbox < if( isset( $_SESSION['filter'] ) ) < unset( $_SESSION['filter'] ); < } 261,264c300,323 < /************************************************************************* < DISPLAY LIST OF MODS < *************************************************************************/ < $flags['tabs'] = $tngconfig['tabs']; --- > // Requesting a new filter listing > if( isset( $newlist ) ) { > unset( $_SESSION['filter'] ); > unset( $_SESSION['modlist'] ); > } > // submitting with locked filter > elseif( isset( $_SESSION['filter'] ) ) { > $filter = $_SESSION['filter']; > $fbox_checked = true; > } > // submitted using temporary filter > elseif( !empty( $filter ) ) { > $filter = 0; > } > // no filter applied > elseif( !isset( $filter ) ) > { > $filter = 0; > } > > /*************************************************************** > OUTPUT STD ADMIN PAGE HTML HEADER + ADDITIONS > ***************************************************************/ > include 'classes/version.php'; 268,275c327,346 < // ADJUST WIDTH FOR MOBILE DEVICES < $min_width = $sitever == 'mobile' ? '0' : '640px'; < echo " < "; 279,280c349 < // ADJUST LISTING TO BOTTOM OF HEADER MENUS < $headclass = $options['fix_header'] == YES && $sitever != 'mobile' ? 'mmhead-fixed' : 'mmhead-scroll'; --- > // explicitly close head section 282c351,358 < --- > > "; > echo " > 284,287c360,385 < <
    < $headline <
    "; --- > "; > > /*************************************************************** > OUTPUT TNG ADMIN TOP BANNER AND LEFT SIDE MENUS > ***************************************************************/ > /* Argument sets Listener for key click to scroll mod beginning > ** with entered Letter into view */ > echo tng_adminlayout('onkeydown="scrollto(event);"'); > > /*************************************************************** > OUTPUT MOD MANAGER PAGE TITLE, TABS AND HORZ MENU > ***************************************************************/ > $modtabs = set_horizontal_tabs( $options['show_analyzer'], $options['show_developer'], > $options['show_updates']); > > $innermenu = set_innermenu_links( $tng_version ); > $menu = doMenu($modtabs,"modlist",$innermenu); > > echo displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); > > /************************************************************************* > DISPLAY LIST OF MODS > *************************************************************************/ > echo " >
    > "; 289c387,388 < // IMPLEMENT THE 'SELECT MODS TO DISPLAY' FILTER --- > /* Handle the "Select" filter. > ** case 1: VIEW SELECT (NO SELECTIONS YET) */ 291,298c390 < $_SESSION['modlist'] = $modlist; < } < elseif( $filter == F_SELECT && isset( $_SESSION['modlist']) ) { < $modlist = $_SESSION['modlist']; < } < else { < unset( $_SESSION['modlist'] ); < $modlist = array(); --- > $_SESSION['modlist'] = $modlist; 300,301c392,405 < include 'classes/modlister.class.php'; < $oModlist = new modlister( $objinits ); --- > /* case 2: VIEW SELECT (SELECTED SUBSET)*/ > elseif( $filter == F_SELECT && isset( $_SESSION['modlist']) ) > { > $modlist = $_SESSION['modlist']; > } > else > { > unset( $_SESSION['modlist'] ); > $modlist = array(); > } > > require_once 'classes/modlister.class.php'; > /* Get initialized modlister object */ > $oModlist = new_modlister(); 304d407 < $oModlist->templatenum = $templatenum; 307a411,415 > echo " >

    >
    > "; > 311,312c419,425 < function set_horizontal_tabs( $show_analyzer = NO, $show_developer = NO, $show_updates = NO ) { < global $admtext; --- > function set_innermenu_links( $tng_version ) > { > global $text, $admtext; > > /* Break out major release component of TNG version */ > $parts = explode( ".", $tng_version ); > $tngmodver = "{$admtext['tngmods']} v{$parts[0]}"; 314,349c427,452 < $modtabs = array(); < $modtabs[0] = array(1, "admin_modhandler.php", $admtext['modlist'],"modlist"); < $modtabs[1] = array(1,"admin_showmodslog.php",$admtext['viewlog'],"viewlog"); < $modtabs[2] = array(1,"admin_modoptions.php",$admtext['options'],"options"); < if ( $show_analyzer == YES) < $modtabs[3] = array(1,"admin_analyzemods.php",$admtext['analyzefiles'],'files'); < if ( $show_developer == YES) < $modtabs[4] = array(1,"admin_modtables.php",$admtext['parsetable'],'parser'); < if ( $show_updates == YES) < $modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates'); < return $modtabs; < } < function set_innermenu_links( $tng_version ) { < global $text, $admtext; < < $parts = explode( ".", $tng_version ); // added to determine TNG vNN for < $tngmodver = "{$admtext['tngmods']} v{$parts[0]}"; // Mods for TNG vNN text display < $tngmodurl = "Mods_for_TNG_v{$parts[0]}"; // Mods for TNG vNN URL < $helplang = findhelp("modhandler_help.php"); < < // inner menu help < $innermenu = "{$admtext['help']}"; < < // expand & collapse all < $innermenu .= "  |  {$text['expandall']}"; < $innermenu .= "  |  {$text['collapseall']}"; < < // MM syntax < $innermenu .= "  |  {$admtext['modsyntax']}"; < < // mod guidelines < $innermenu .= "  |  {$admtext['modguidelines']}"; < < // mods for TNGv10 < $innermenu .= "  |  $tngmodver"; < return $innermenu; --- > $tngmodurl = "Mods_for_TNG_v{$parts[0]}"; > > $helplang = findhelp("modhandler_help.php"); > > // inner menu help > $innermenu = "{$admtext['help']} > "; > > // expand & collapse all > $innermenu .= "  |  {$text['expandall']} > "; > $innermenu .= "  |  {$text['collapseall']} > "; > > // MM syntax > $innermenu .= "  |  {$admtext['modsyntax']} > "; > > // mod guidelines > $innermenu .= "  |  {$admtext['modguidelines']} > "; > > // mods for this TNG Version > $innermenu .= "  |  $tngmodver > "; > return $innermenu; 357,358c460,461 < $admtext['confdelmod1'] : < $admtext['confdelmod']; --- > $admtext['confdelmod1'] : > $admtext['confdelmod']; 364,458c467,541 < //$sitever = 'mobile'; //turns off jQuery positioning for testing < if( $sitever != 'mobile' && $options['adjust_headers'] ) { < echo " < window.scroll(0,0); < < // set position of status bar relative to #mmhead (jQuery UI) < jQuery('#fbar').position({ < my: 'left top', < at: 'left bottom', < of: jQuery('#mmhead'), < collision: 'none' < }); < < // set position of listing table relative to filter bar (jQuery UI) < jQuery('#mmgrid').position({ < my: 'left top', < at: 'left bottom', < of: jQuery('#fbar'), < collision: 'none' < }); < "; < } < echo" < // toggle mod status from other fields < jQuery('.flink').click(function() { < var flinkID = jQuery(this).attr('id'); < var linknum = flinkID.match(/\d+/); < var linkID = 'link'+linknum; < toggleStatus(linkID); < }); < < // toggle mod status from status field header < jQuery('.modlink').click(function() { < var linkID = jQuery(this).attr('id'); < toggleStatus(linkID); < }); < < function toggleStatus( linkID ) { < var divID = linkID + 'div'; < if( jQuery('#' + linkID).hasClass('closed') ) { < jQuery('#' + linkID).addClass('opened').removeClass('closed'); < jQuery('#' + divID).show(); < } < else { < jQuery('#' + linkID).addClass('closed').removeClass('opened'); < jQuery('#' + divID).hide(); < } < } < < // close all < jQuery('#collapseall').click(function() { < jQuery('.modlink').addClass('closed').removeClass('opened'); < jQuery('.moddiv').hide(); < }); < < // open all < jQuery('#expandall').click(function() { < jQuery('.modlink').addClass('opened').removeClass('closed'); < jQuery('.moddiv').show(); < }); < < jQuery('#selectAll').click(function(){ < jQuery('input.sbox').prop('checked',true); < }); < < jQuery('#clearAll').click(function(){ < jQuery('input.sbox').prop('checked',false); < }); < < jQuery('#btnDelete').click(function(){ < if(jQuery('input.sbox:checkbox:checked').length>0 ) { < return confirm(\"{$confirm}\"); < } < else { < alert(\"{$admtext['noselected']}\" ); < return false; < } < }); < jQuery('#btnInstall, #btnRemove, #btnClean, #btnChoose').click(function(){ < if( jQuery('input.sbox:checkbox:checked').length>0 ) { < return true; < } < else { < alert(\"{$admtext['noselected']}\" ); < return false; < } < }); < jQuery('#stayon').change(function() { < if(this.checked) { < jQuery.post('classes/ajax_filter.php', {filter:\"$oModlist->filter\"}); < } < else { < jQuery.post('classes/ajax_filter.php', {filter:\"0\"}); < } < }); --- > echo" > // toggle mod status from other fields > jQuery('.flink').click(function() { > var flinkID = jQuery(this).attr('id'); > var linknum = flinkID.match(/\d+/); > var linkID = 'link'+linknum; > toggleStatus(linkID); > }); > > // toggle mod status from status field header > jQuery('.modlink').click(function() { > var linkID = jQuery(this).attr('id'); > toggleStatus(linkID); > }); > > function toggleStatus( linkID ) { > var divID = linkID + 'div'; > if( jQuery('#' + linkID).hasClass('closed') ) { > jQuery('#' + linkID).addClass('opened').removeClass('closed'); > jQuery('#' + divID).show(); > } > else { > jQuery('#' + linkID).addClass('closed').removeClass('opened'); > jQuery('#' + divID).hide(); > } > } > > // close all > jQuery('#collapseall').click(function() > { > jQuery('.modlink').addClass('closed').removeClass('opened'); > jQuery('.moddiv').hide(); > }); > > // open all > jQuery('#expandall').click(function() { > jQuery('.modlink').addClass('opened').removeClass('closed'); > jQuery('.moddiv').show(); > }); > > jQuery('#selectAll').click(function(){ > jQuery('input.sbox').prop('checked',true); > }); > > jQuery('#clearAll').click(function(){ > jQuery('input.sbox').prop('checked',false); > }); > > jQuery('#btnDelete').click(function(){ > if(jQuery('input.sbox:checkbox:checked').length>0 ) { > return confirm(\"{$confirm}\"); > } > else { > alert(\"{$admtext['noselected']}\" ); > return false; > } > }); > jQuery('#btnInstall, #btnRemove, #btnClean, #btnChoose').click(function(){ > if( jQuery('input.sbox:checkbox:checked').length>0 ) { > return true; > } > else { > alert(\"{$admtext['noselected']}\" ); > return false; > } > }); > jQuery('#stayon').change(function() { > if(this.checked) { > jQuery.post('classes/ajax_filter.php', {filter:\"$oModlist->filter\"}); > } > else { > jQuery.post('classes/ajax_filter.php', {filter:\"0\"}); > } > }); > 462,470d544 < < echo " <
    < < $tng_title, v.$tng_version < <
    < < "; 471a546,548 > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_modoptions.php TNG1403/admin_modoptions.php 2,5c2,9 < < // Mod Manager Options written by Ken Roy to incorporate current mods to Mod Manager into the TNG code < // and support additional processing options < // Based on the TNG v10.0.3 admin_modmgroptions.php module --- > /* > Mod Manager v13 User options handler > Written by Ken Roy, TNG Test Manager > Updated for TNGv13 by Rick Bisbee > > * Updates code/styling for new TNGv13 Admin pages no longer using iframes. > * No changes to core (OOP classes) functionality from TNGv12. > */ 10,11d13 < include("getlang.php"); < 12a15 > $helplang = findhelp("modhandler_help.php"); 14d16 < //tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit; 18c20 < $admvers="TNG12 V4.0 "; --- > require 'classes/mmtabs.inc'; 20,23c22,27 < //$optionsfile = 'classes/mod.class.config.php'; < $optionsfile = $subroot.'mmconfig.php'; < include $optionsfile; < //echo __FILE__,' ',__LINE__;print_r( $options );exit; --- > // prevent direct URL access to Mod Manager if not the TNG Administrator > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } 25,26c29,31 < define( "YES", 1 ); < define( "NO", 0 ); --- > > define( "YES", "1" ); > define( "NO", "0" ); 39,41c44,59 < if (!isset($options['modlogfile'])) $options['modlogfile'] = "modmgrlog.txt"; // Default Mod Log file name < if (!isset($options['maxloglines'])) $options['maxloglines'] = "200"; // Default Log max transactions < if (!isset($options['compress_log'])) $options['compress_log'] = "1"; // Default to compress log --- > $optionsfile = $subroot.'mmconfig.php'; > include $optionsfile; > > /* > * SET USER OPTION DEFAULTS IF VALUES ARE NOT IN THE OPTIONS FILE > */ > // Mod log file name > if (!isset($options['modlogfile'])) $options['modlogfile'] = "modmgrlog.txt"; > > // Log max transactions > if (!isset($options['maxloglines'])) $options['maxloglines'] = "200"; > > // Compress log option > if (!isset($options['compress_log'])) $options['compress_log'] = YES; > > // Redirect to view log upon Mod processing error 43,55c61,93 < if (!isset($options['sortby'])) $options['sortby'] = "1"; // Default Sort by Mod Name column < if (!isset($options['delete_partial'])) $options['delete_partial'] = "0"; // do not allow Delete Selected of Partially Installed mods < if (!isset($options['delete_installed'])) $options['delete_installed'] = "0"; // do not allow deletes of individual Installed mod < if (!isset($options['log_full_path'])) $options['log_full_path'] = "1"; // Log full path for file actions < if (!isset($options['compress_names'])) $options['compress_names'] = "0"; // Compress Mod Names < if (!isset($options['fix_header'])) $options['fix_header'] = "1"; // Use Fixed Headers < if (!isset($options['show_analyzer'])) $options['show_analyzer'] = "0"; // Default to not show the Analyze TNG Files tab < if (!isset($options['show_developer'])) $options['show_developer'] = "0"; // Default to not show the Analyze Parser Table tab - added 171209 Ken < if (!isset($options['show_updates'])) $options['show_updates'] = "1"; // Default to not show the Recommended Updates tab - added 171209 Ken < if (!isset($options['use_striping'])) $options['use_striping'] = "1"; //Default to striping < if (!isset($options['stripe_after'])) $options['stripe_after'] = THREE; //Default to ledger striping < if (!isset($options['adjust_headers'])) $options['adjust_headers'] = "0"; // Default to not adjust fixed < if (!isset($options['delete_support'])) $options['delete_support'] = "0"; --- > > // Sort by Mod Name column in Mod listing > if (!isset($options['sortby'])) $options['sortby'] = MODNAME; > > // Allow Mod deletion in partially installed > if (!isset($options['delete_partial'])) $options['delete_partial'] = NO; > > // Allow Mod deletion if status = installed > if (!isset($options['delete_installed'])) $options['delete_installed'] = NO; > > // Log full TNG-relative path for file actions > if (!isset($options['log_full_path'])) $options['log_full_path'] = YES; > > // Compress Mod names in listing (?) > if (!isset($options['compress_names'])) $options['compress_names'] = NO; > > // Show the Mod Analyzer tab on MM pages > if (empty($options['show_analyzer'])) $options['show_analyzer'] = YES; > > /*Analyze only installed mods Mod - #1 - MichelK */ > // Show actions (install, delete,...) in the Mod Analyzer > if (!isset($options['show_analyzeractions'])) $options['show_analyzeractions'] = NO; > /*Analyze only installed mods Mod - MichelK */ > > // Show the View Parser Tab on MM pages > if (!isset($options['show_developer'])) $options['show_developer'] = NO; > > // Show the MM Recommended Updates tab > if (!isset($options['show_updates'])) $options['show_updates'] = YES; > > // When deleting a Mod also delete its support folder > if (!isset($options['delete_support'])) $options['delete_support'] = NO; > 58c96,98 < $flags['tabs'] = $tngconfig['tabs']; --- > /*************************************************************** > 1. OUTPUT STD ADMIN PAGE HTML HEADER + ADDITIONS > ***************************************************************/ 62,71c102 < echo " < "; < --- > // Place some styling in the HTML head section 73,78c104,113 < echo " < "; 82c116,128 < $helplang = findhelp("modhandler_help.php"); --- > /* Height of the table display must be set for > ** each page to account for differences in > ** heading heights. > ** > ** The tag must be explicitly closed. */ > echo " > > > "; 83a130,137 > /*************************************************************** > 2. OUTPUT TNG ADMIN TOP BANNER AND LEFT SIDE MENUS > ***************************************************************/ > echo tng_adminlayout(); > > /*************************************************************** > 3. OUTPUT MOD MANAGER PAGE TITLE, TABS AND HORZ MENU > ***************************************************************/ 87,89c141 < $menu = "
    "; < $menu .= doMenu($modtabs,"options",$innermenu); < $menu .= "
    "; --- > $menu = doMenu($modtabs,"options",$innermenu); 92,93d143 < $headline = displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); < $first_menu=TRUE; 95,106c145 < if( $options['fix_header'] == YES && $sitever != 'mobile' ) { < $headclass = 'mmhead-fixed'; < $tableclass = 'm2table-fixed'; < } < else { < $headclass = 'mmhead-scroll'; < $tableclass = 'm2table-scroll'; < } < //$bkgclass = 'tmpbkg'.$templatenum; < // only adjust css positioning for template 7 -- all others are standard < //if( $templatenum == 7 ) < // $tableclass = $tableclass.$templatenum; --- > echo displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); 108,114c147 < echo " < < < <
    < $headline <
    "; --- > $first_menu=TRUE; 115a149,151 > /*************************************************************** > 4. MOD OPTIONS PAGE CONTENT > ***************************************************************/ 116a153 >
    118d154 < 120,124c156,170 < < <
    "; < //echo __FILE__,' ',__LINE__;print_r( $options ); < --- >
    > > > > > > > > 173,174c220,221 <
    > Mod Manager User Preferences >
    "; > > /*************************************************************** > MOD MANAGER LOGS > ***************************************************************/ 171a218 >
     
    <
    --- >
    >
    177,178c224,228 <
    "; --- >
    "; > /*************************************************************** > DISPLAY SETTINGS > ***************************************************************/ 192,230c242 <
    {$admtext['fixedheader']}: < <
    {$admtext['adjusthdrs']}: < <
    {$admtext['usestriping']}: < <
    {$admtext['stripeafter']}: < <
    {$admtext['showanalyzeractions']}: > >
     
    "; --- >
    "; > /*************************************************************** > OTHER > ***************************************************************/ 312a339 >
     
    --- >
    322c349,352 < "; --- > > > > "; 326,341c356 < function set_horizontal_tabs( $show_analyzer = NO, $show_developer = NO, $show_updates = NO ) { < global $admtext; < $modtabs = array(); < $modtabs[0] = array(1, "admin_modhandler.php", $admtext['modlist'],"modlist"); < $modtabs[1] = array(1,"admin_showmodslog.php",$admtext['viewlog'],"viewlog"); < $modtabs[2] = array(1,"admin_modoptions.php",$admtext['options'],"options"); < if ( $show_analyzer == YES) < $modtabs[3] = array(1,"admin_analyzemods.php",$admtext['analyzefiles'],'files'); < if ( $show_developer == YES) < $modtabs[4] = array(1,"admin_modtables.php",$admtext['parsetable'],'parser'); < < if ( $show_updates == YES) < $modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates'); < return $modtabs; < } < function set_innermenu_links( $tng_version ) { --- > function set_innermenu_links( $tng_version, $pageID='options' ) { 350c365,366 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']} > "; 356c372,373 < $innermenu .= "  |  {$admtext['modsyntax']}"; --- > $innermenu .= "  |  {$admtext['modsyntax']} > "; 359c376,377 < $innermenu .= "  |  {$admtext['modguidelines']}"; --- > $innermenu .= "  |  {$admtext['modguidelines']} > "; 362c380,381 < $innermenu .= "  |  $tngmodver"; --- > $innermenu .= "  |  $tngmodver > "; 366d384 < 370,372c388 < //$sitever = 'mobile'; //turns off jQuery positioning for testing < if( $sitever != 'mobile' && $options['adjust_headers'] ) { < echo " --- > echo " 374,383c390,394 < jQuery(document).ready(function() { < // set position of m2table relative to mmhead < jQuery('#m2table').position({ < my: 'left top', < at: 'left bottom', < of: jQuery('#mmhead'), < collision: 'none' < }); < }) < "; --- > function toggleAll(display) { > toggleSection('log','plus0',display); > toggleSection('display','plus1',display); > toggleSection('other','plus2',display); > return false; 384a396 > "; 386,392c398,399 < echo " <
    < $tng_title, v.$tng_version <
    < < "; < ?> \ No newline at end of file --- > echo tng_adminfooter(); > ?> diff -r TNG/admin_modtables.php TNG1403/admin_modtables.php 3a4,9 > /************************************************************************* > TNGv13 admin_modtables.php by William (Rick) Bisbee. > > Displays the parser table for a selected Mod for debugging > > Does not implement fixed page header by design 5,6c11,12 < Standalone class to show parse table for selected mods < */ --- > v13 updated by Rick Bisbee to integrate with new TNG Admin pages > without iframes 7a14,15 > *************************************************************************/ > ob_start(); 11d18 < include 'getlang.php'; 17a25,28 > > > // User preferences > include $subroot.'mmconfig.php'; 18a30,43 > require 'classes/mmtabs.inc'; > > // prevent direct URL access to Mod Manager if not the TNG Administrator > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > if( isset( $_GET['modfile'] ) ) > { > $modfile = $_GET['modfile']; > } > else $modfile = ''; 22a48 > define( 'NO', "0" ); 24,26c50,53 < // USER PREFERENCES < include $subroot.'mmconfig.php'; < --- > // Adjustments > if( isset( $_GET['sort'] ) ) $_SESSION['sortby'] = $_GET['sort']; > if( isset( $_SESSION['sortby'] ) ) $options['sortby'] = $_SESSION['sortby']; > if (!isset($options['compress_log'])) $options['compress_log'] = "0"; 31c58,91 < // SETUP THE PAGE HEADER AND MENUS --- > /*************************************************************** > 1. OUTPUT STD ADMIN PAGE HTML HEADER + ADDITIONS > ***************************************************************/ > $flags['modmgr'] = true; > tng_adminheader( $admtext['modmgr'], $flags ); > > // Adjust width for mobile devices > $min_width = $sitever == 'mobile' ? '0' : '640px'; > > /* Height of the table display must be set for > ** each page to account for differences in > ** heading heights. > ** > ** The tag must be explicitly closed. */ > echo " > > > > "; > > /*************************************************************** > 2. OUTPUT TNG ADMIN TOP BANNER AND LEFT SIDE MENUS > ***************************************************************/ > /* Scroll to first file name beginning with keyclick event > ** letter into view in the left file listing panel. */ > echo tng_adminlayout('onkeydown="scrollto(event);"'); > > /*************************************************************** > 3. PREPARE MOD MANAGER PAGE TITLE, TABS AND HORZ MENU > ***************************************************************/ 34,36c94,95 < $menu = "
    "; < $menu .= doMenu($modtabs,"parser",$innermenu); < $menu .= "
    "; --- > $menu = doMenu($modtabs,"parser",$innermenu); > 38c97 < $headline = displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); --- > echo displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); 44,50c103,110 < // ADJUSTMENTS TO USER PREFERENCES (OPTIONS) < if( isset( $_GET['sort'] ) ) $_SESSION['sortby'] = $_GET['sort']; < if( isset( $_SESSION['sortby'] ) ) $options['sortby'] = $_SESSION['sortby']; < if (!isset($options['show_analyzer'])) $options['show_analyzer'] = "0"; < if (!isset($options['compress_log'])) $options['compress_log'] = "0"; < < require 'classes/modobjinits.php'; --- > /*************************************************************** > 4. MOD MANAGER PAGE CONTENT > ***************************************************************/ > > // Create a mod parser object > //require_once 'classes/modobjinits.php'; > include_once 'classes/modvalidator.class.php'; > $oVal = new_modvalidator(); 52,71d111 < /* < // INITIALIZATIONS FOR MOD OBJECTS < $fpaths = array ( < 'rootpath' => $rootpath, < 'subroot' => $subroot, < 'modspath' => $modspath, < 'extspath' => $extspath < ); < < $objinits = array ( < 'fpaths' => $fpaths, < 'options' => $options, < 'time_offset' => $time_offset, < 'sitever' => $sitever, < 'currentuserdesc' => $mhuser, < 'admtext' => $admtext, < 'templatenum' => $templatenum, < 'tng_version' => $tng_version < ); < */ 73c113 < DISPLAY THE TNG PAGE HEADER --- > DISPLAY MOD LISTING 75,77c115,155 < $flags['tabs'] = $tngconfig['tabs']; < $flags['modmgr'] = true; < tng_adminheader( $admtext['modmgr'], $flags ); --- > if( empty( $modfile ) ) > { > echo " >
    "; > $modlist = $oVal->get_modfile_names(); > if( is_numeric( $modlist ) ) > { > header("location:admin_modhandler.php"); > exit; > } > natcasesort($modlist);// sort MM lists mod > $modnum = 1; > > echo " >
    > > > > > > > "; > > foreach( $modlist as $modfile ) > { > $fl = strtoupper(substr($modfile,0,1)); > echo " > > > "; > } > > echo " >
    > {$admtext['selectmod']} >
    >
    >
    > "; 79,86c157,158 < // ADJUST WIDTH FOR MOBILE DEVICES < $min_width = $sitever == 'mobile' ? '0' : '640px'; < echo " < "; < < // ADJUST LISTING TO BOTTOM OF HEADER MENUS < $headclass = $options['fix_header'] == YES && $sitever != 'mobile' ? 'mmhead-fixed' : 'mmhead-scroll'; < echo " < < < <
    < $headline <
    "; 101c162 < CREATE A MOD OBJECT --- > DISPLAY TABLE 103,104c164,165 < include_once 'classes/modparser.class.php'; < $oParse = new modparser($objinits); --- > echo " >
    "; 106,109c167 < if( $options['fix_header'] ) { < $style = "position:absolute;min-width:98%;top:119;left:05;padding:5px;"; < } < else $style = "min-width:98%;"; --- > $table = $oVal->validate( $modfile ); 111,126c169,196 < if( $options['fix_header'] ) { < $pclass = "parse-table"; < } < else { < $pclass = ''; < } < /************************************************************************* < DISPLAY THE MOD FILE SELECTION LIST < *************************************************************************/ < if( empty( $modfile ) ) { < $modlist = $oParse->get_modfile_names(); < $modnum = 1; < echo " <
    <

    {$admtext['selectmod']}

    "; < foreach( $modlist as $modfile ){ --- > if( !empty( $oVal->parse_error) ) > { > $idx = $oVal->parse_error['text']; > echo "$modfile {$admtext['parsererror']} Line: ", $oVal->parse_error['line']," ", $oVal->parse_error['tag'], " ", $admtext[$idx]; > exit; > } > > $hdrs = array > ( > 'line' => '4%', > 'name' => '10%', > 'arg1' => '24%', > 'arg2' => '22%', > 'arg3' => '22%', > 'flag' => '4%', > 'statkey' => '8%', > 'eline'=> '4%' > ); > > $mod_stat_header = $oVal->get_modstatus_header(); > $mod_name = $oVal->get_modname(); > $mod_ver = $oVal->get_modversion(); > > echo " >

    $mod_name $mod_ver $admtext[$mod_stat_header]

    "; > > if( !empty( $table ) ) > { 128,137c198,202 <

    ".$modnum++.". $modfile

    "; < } < echo " <
    "; < fix_header($options); < echo " < < "; < exit; < } --- >
    > > > > "; 139,145c204,213 < /************************************************************************* < DISPLAY THE PARSE TABLE < *************************************************************************/ < $tags = $oParse->parse( $modspath.'/'.$modfile ); < echo " <
    "; < $oParse->show_parse_table( $tags ); --- > foreach( $hdrs as $hdr => $width ) > { > echo " >
    > "; > } 147,156c215,249 < echo " < < "; < fix_header($options); < echo " < < "; < exit; --- > echo " > > > "; > } > > foreach( $table as $row ) > { > foreach( $row as $key => $val ) > { > if( is_string($val) ) > { > $row[$key] = html_entity_decode( foldable_string( $val ) ); > } > } > // STYLE STYLES FOR VARIOUS TAG TYPES > switch( $row['name'] ) > { > case 'target': > $row_style = "style='background-color:#C0EEC0;'"; > break; > case 'name': > $row_style = "style='font-weight:bold;font-size:1.2em;'"; > break; > case 'textexists': > case 'fileexists': > case 'tngversion': > case 'goto': > case 'label': > $row_style = "style='color:#0000f7;'"; > break; > default: > $row_style = NULL; > break; > } 158,164d250 < /************************************************************************* < FUNCTIONS < *************************************************************************/ < function fix_header($options) { < global $sitever; < //$sitever = 'mobile'; //turns off jQuery positioning for testing < if( $sitever != 'mobile' && $options['adjust_headers'] ) { 166,177c252 < "; < } --- > "; 178a254,256 > foreach( $hdrs as $hdr => $width ) > { > $value = isset($row[$hdr]) ? $row[$hdr] : ''; 179a258,277 > echo " > "; > } 181c279,282 < } --- > /* Close the row */ > echo " > "; > } // foreach row 183,184c284,287 < function set_horizontal_tabs( $show_analyzer = NO, $show_developer = NO, $show_updates = NO ) { < global $admtext; --- > /* Close the table */ > echo " >
    >
    > $hdr >
    >
    > "; > switch( $hdr ) > { > case 'line': > echo " >
    "; > break; > default: > echo " >
    "; > break; > } > > echo nl2br(htmlentities( $value )); > echo " >
    >
    >
    "; 186,198c289,301 < $modtabs = array(); < $modtabs[0] = array(1, "admin_modhandler.php", $admtext['modlist'],"modlist"); < $modtabs[1] = array(1,"admin_showmodslog.php",$admtext['viewlog'],"viewlog"); < $modtabs[2] = array(1,"admin_modoptions.php",$admtext['options'],"options"); < if ( $show_analyzer == YES) < $modtabs[3] = array(1,"admin_analyzemods.php",$admtext['analyzefiles'],'files'); < if ( $show_developer == YES) < $modtabs[4] = array(1,"admin_modtables.php",$admtext['parsetable'],'parser'); < if ( $show_updates == YES) < $modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates'); < return $modtabs; < } < function set_innermenu_links( $tng_version ) { --- > echo " > >
    "; > > echo tng_adminfooter(); > exit; > > /************************************************************************* > FUNCTIONS > *************************************************************************/ > function set_innermenu_links( $tng_version, $pageID='parser' ) { 207c310 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 219a323,327 > > function foldable_string( $string ) { > return preg_replace('@([\./_])@', '​$1', $string ); > } > 228,251c336 < //$sitever = 'mobile'; //turns off jQuery positioning for testing < if( $sitever != 'mobile' && $options['adjust_headers'] ) { < echo " < window.scroll(0,0); < < // set position of status bar relative to #mmhead (jQuery UI) < jQuery('#fbar').position({ < my: 'left top', < at: 'left bottom', < of: jQuery('#mmhead'), < collision: 'none' < }); < < // set position of listing table relative to filter bar (jQuery UI) < jQuery('#mmgrid').position({ < my: 'left top', < at: 'left bottom', < of: jQuery('#fbar'), < collision: 'none' < }); < "; < } < < echo" --- > echo " 331a417 > ob_end_fllush(); diff -r TNG/admin_modupdates.php TNG1403/admin_modupdates.php 4a5,10 > /* > Mod Manager v13 > * Updates code/styling for new TNGv13 Admin pages no longer using iframes. > * Removes JavaScript positioning of heading and body elements. > * No changes to core (OOP classes) functionality from TNGv12. > */ 16c22,35 < $admvers="TNG12 V4.0 "; --- > $admvers="TNG13 V4.0 "; > > require 'classes/mmtabs.inc'; > > // prevent direct URL access to Mod Manager if not the TNG Administrator > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > //suppress PHP notices > if( !isset( $modspath) ) $modspath = ''; > if( !isset( $extspath) ) $extspath = ''; 18c37,38 < include $subroot.'mmconfig.php'; --- > // USER PREFERENCES > require_once $subroot.'mmconfig.php'; 23c43,46 < $flags['tabs'] = $tngconfig['tabs']; --- > /*************************************************************** > 1. OUTPUT STD ADMIN PAGE HTML HEADER + ADDITIONS > ***************************************************************/ > 29,36c52,64 < echo " < "; --- > > // explicitly close head section > echo " > "; > > /*************************************************************** > 2. OUTPUT TNG ADMIN TOP BANNER AND LEFT SIDE MENUS > ***************************************************************/ > echo tng_adminlayout(); > > /*************************************************************** > 3. OUTPUT MOD MANAGER PAGE TITLE, TABS AND HORZ MENU > ***************************************************************/ 47,49c75 < $menu = "
    "; < $menu .= doMenu($modtabs,"updates",$innermenu); < $menu .= "
    "; --- > $menu = doMenu($modtabs,"updates",$innermenu); 52,53c78 < $headline = displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); < $first_menu=TRUE; --- > echo displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); 55,57c80,89 < if( $options['fix_header'] == YES && $sitever != 'mobile' ) { < $headclass = 'mmhead-fixed'; < $tableclass = 'm2table-fixed'; --- > /*************************************************************** > 4. PAGE CONTENT AND FUNCTIONALITY > ***************************************************************/ > $message = ''; > if( !is_writable( $rootpath ) ) > $message .= "{$admtext['checkwrite']} {$admtext['cantwrite']} $rootpath "; > > //echo $message;exit; > if( !empty( $message ) ) { > $message = "$message"; 59,70d90 < else { < $headclass = 'mmhead-scroll'; < $tableclass = 'm2table-scroll'; < } < < echo " < < < <
    < $headline <
    "; 72,75d91 < /* < echo " <
    "; < */ 77,79c93,128 < < <
    "; --- >
    >
    > > > > > > > > > > > > > > 81,98c130,131 < echo " <

    {$admtext['recommendedfixes']}

    <

    {$admtext['updcusttext']}

    "; < < echo " <
    >

    {$admtext['recommendedfixes']}

    >
    "; > /*************************************************************** > TEXT FOR RECOMMENDED UPDATES STARTS HERE > ***************************************************************/ > echo " >

    {$admtext['updcusttext']}

    >

    The updated Mod Guidelines recommend that custom text be inserted before the comments at the beginning of the cust_text.php file so that mods do not impact user manual changes made after the comment lines.

    > >

    If you have not run the cust_text_update.php script as part of the TNG v12 upgrade, you need to update your cust_text.php files to add a new line to the files andalso update out-of-date line in your existing cust_text.php files which are not replaced during TNG upgrades.

    > >

    The new comment line should not be translated in the language files so that it can be used as an anchor to insert custom text before this new comment line by the mod developers

    . > >

    If you translate the new comment line, mod installs will fail.

    >

    If you click on the button below your updates will be done for you automatically."; > /*************************************************************** > END OF RECOMMENDED UPDATE TEXT > ***************************************************************/ > echo " >

     
    < < < < < >
    <

    {$admtext['custtextfixes']}

    <

    {$admtext['reasontoupdate']}

    <

    {$admtext['newanchor']}

    <

    {$admtext['translateissue']}

    <
    "; < < echo " --- >
    100c133 < --- > 104,125c137,142 <
    "; < /* < echo " < < < < < < < <
    < {$admtext['custtextfixes']} <
    < <
    <
    <
    "; < */ < echo " <
    < $tng_title, v.$tng_version <
    "; --- >
    > > "; > > echo tng_adminfooter(); > exit; 130,145c147 < function set_horizontal_tabs( $show_analyzer = NO, $show_developer = NO, $show_updates = NO ) { < global $admtext; < < $modtabs = array(); < $modtabs[0] = array(1, "admin_modhandler.php", $admtext['modlist'],"modlist"); < $modtabs[1] = array(1,"admin_showmodslog.php",$admtext['viewlog'],"viewlog"); < $modtabs[2] = array(1,"admin_modoptions.php",$admtext['options'],"options"); < if ( $show_analyzer == YES) < $modtabs[3] = array(1,"admin_analyzemods.php",$admtext['analyzefiles'],'files'); < if ( $show_developer == YES) < $modtabs[4] = array(1,"admin_modtables.php",$admtext['parsetable'],'parser'); < if ( $show_updates == YES) < $modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates'); < return $modtabs; < } < function set_innermenu_links( $tng_version ) { --- > function set_innermenu_links( $tng_version, $pageID='recommended' ) { 154c156 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 170,192d171 < /************************************************************************* < JAVASCRIPT SUPPORT < *************************************************************************/ < //$sitever = 'mobile'; //turns off jQuery positioning for testing < if( $sitever != 'mobile' && $options['adjust_headers'] ) { < echo " < "; < } < echo " < < "; < < ?> \ No newline at end of file Only in TNG1403: admin_modvalidate.php diff -r TNG/admin_mostwanted.php TNG1403/admin_mostwanted.php 53c53 < echo "
    "; --- > echo ""; 56c56 < echo "\"{$lrow['mtitle']}\""; --- > echo "\"{$lrow['mtitle']}\""; 86d85 < $flags['tabs'] = $tngconfig['tabs']; 107,108d105 < < 109a107,108 > echo tng_adminlayout(" onLoad=\"startMostWanted()\""); > 120,122c119,122 < < <
    --- >
    > > >
    140,142c140,143 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_newalbum.php TNG1403/admin_newalbum.php 20d19 < $flags['tabs'] = $tngconfig['tabs']; 36,37d34 < < 38a36,37 > echo tng_adminlayout(); > 46a46 >
    48,51c48,51 < < <
    < --- > > > < >
    > 70,71c70,71 <
    --- >
    73a74 > 78,81c79,82 < < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_newbranch.php TNG1403/admin_newbranch.php 31d30 < $flags['tabs'] = $tngconfig['tabs']; 54,55d52 < < 56a54,55 > echo tng_adminlayout(); > 64,66c63,66 < < <
    --- >
    > > >
    75a76 > if( empty($firsttree) ) $firsttree = $treerow['gedcom']; 119,120c120,122 < < --- > > > 126,128c128,131 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_newcemetery.php TNG1403/admin_newcemetery.php 4c4,5 < $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] : "";include("adminlib.php"); --- > $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] . "&callback=initMap" : ""; > include("adminlib.php"); 27d27 < $flags['tabs'] = $tngconfig['tabs']; 75,76d74 < background="img/background.gif"> < 77a76,78 > $onload = $map['key'] && !$map['startoff'] ? " onload=\"divbox('mapcontainer');\"" : ""; > echo tng_adminlayout($onload); > 84a86 >
    86,88c88,90 < < < --- > diff -r TNG/admin_neweventtype.php TNG1403/admin_neweventtype.php 20d19 < $flags['tabs'] = $tngconfig['tabs']; 74,75d72 < < 76a74,75 > echo tng_adminlayout(); > 84,86c83,84 <
    --- > > > --- > diff -r TNG/admin_new_dna_group.php TNG1403/admin_new_dna_group.php 1,106c1,108 < < < < < < < < {$admtext['help']} "; < $menu = doMenu($dnatabs,"addgroup",$innermenu); < echo displayHeadline($admtext['dna_groups'] . " >> " . $admtext['addgroup'],"img/dna_icon.gif",$menu,$message); < ?> < <
    101c103 < --- > 115c117 < --- > 156c158,160 < --- > > > 163,166c167,170 < < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_newcollection.php TNG1403/admin_newcollection.php 35c35 <
    :
    :
    < < < < <
    <
    < < < < < < < < < < < < <
    : < <
    : < <
    :
    :
    <
    < <
    <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > include("getlang.php"); > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( !$allow_add ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > if( $assignedtree ) { > $wherestr = "WHERE gedcom = \"$assignedtree\""; > $tree = $assignedtree; > } > else > $wherestr = ""; > $orgtree = isset($tree) ? $tree : ""; > $treequery = "SELECT gedcom, treename FROM $trees_table $wherestr ORDER BY treename"; > > $helplang = findhelp("dna_help.php"); > > tng_adminheader( $admtext['addgroup'], $flags ); > ?> > > > > > echo tng_adminlayout(); > > $dnatabs[0] = array(1,"admin_dna_groups.php",$admtext['search'],"findtest"); > $dnatabs[1] = array($allow_add,"admin_new_dna_group.php",$admtext['addgroup'],"addgroup"); > $dnatabs[2] = array(1,"admin_dna_tests.php",$admtext['dna_tests'],"findtest"); > $innermenu = "{$admtext['help']} "; > $menu = doMenu($dnatabs,"addgroup",$innermenu); > echo displayHeadline($admtext['dna_groups'] . " >> " . $admtext['addgroup'],"img/dna_icon.gif",$menu,$message); > ?> > >
    >
    >
    > > > > > > > > > > > > >
    : > >
    :
    : > >
    :
    >
    > >
    >
    >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_new_dna_test.php TNG1403/admin_new_dna_test.php 1,184c1,188 < < < < < < {$admtext['help']} "; < $innermenu .= " | {$text['expandall']}  |  {$text['collapseall']}"; < $menu = doMenu($dnatabs,"addtest",$innermenu); < echo displayHeadline($admtext['dna_tests'] . " >> " . $admtext['addnewdna'], "img/dna_icon.gif",$menu,""); < ?> < <
    < < < < < < < < < <
    < < <
    <
    < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <
    : < <
    :
    :
    :

    : < <
    : < <    < < <?php echo $admtext['find']; ?> < < <
    <
     : 
     
    :  < < <
     
    <
    <
    <

    < " name="cw"> < <
    <
    < $tng_title, v.$tng_version"; ?> < < < < < < < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "dna"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( !$allow_add ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > if( $assignedtree ) { > $wherestr = "WHERE gedcom = \"$assignedtree\""; > $tree = $assignedtree; > } > else > $wherestr = ""; > > $helplang = findhelp("dna_help.php"); > > tng_adminheader( $admtext['addnewdna'], $flags ); > ?> > > > echo tng_adminlayout(); > > $dnatabs[0] = array(1,"admin_dna_tests.php",$admtext['search'],"findtest"); > $dnatabs[1] = array($allow_add,"admin_new_dna_test.php",$admtext['addnew'],"addtest"); > $innermenu = "{$admtext['help']} "; > $innermenu .= " | {$text['expandall']}  |  {$text['collapseall']}"; > $menu = doMenu($dnatabs,"addtest",$innermenu); > echo displayHeadline($admtext['dna_tests'] . " >> " . $admtext['addnewdna'], "img/dna_icon.gif",$menu,""); > ?> > >
    >
    > > > > > > > > > >
    > > >
    >
    > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
    : >   style="display:none;" id="treespinner2" alt="" class="spinner">    >
    :
    :
    :
    :
    :
    :  > >

    : > >
    : > >    > > <?php echo $admtext['find']; ?> > > >
    >
     : 
     
    >
    >
    >

    > " name="cw"> > > >
    >
    >
    > $tng_title, v.$tng_version"; ?> > > > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_newevent.php TNG1403/admin_newevent.php 20c20 < if( $message ) { --- > if(!empty($message)) { 35c35 < $query = "SELECT * FROM $eventtypes_table WHERE type = \"$prefix\" ORDER BY tag"; --- > $query = "SELECT * FROM $eventtypes_table WHERE keep = \"1\" AND type = \"$prefix\" ORDER BY tag"; 59c59 <
    :    --- >
    :    61c61 <
    :
    :
    < < < < <
    --- >
    >
    112c110 < () --- > () 139,140c137,140 < < --- > > > > 142,146c142,143 <

    *

    <
    --- > >
    148,149c145 < $tng_title, v.$tng_version"; ?> < --- > 75,76d83 < < 77a85,86 > echo tng_adminlayout(" onload=\"generateID('person',document.form1.personID,document.form1.tree1);\""); > 84a94 > if(!isset($message)) $message = ''; 87a98 >
    89,91c100,102 < < <
    --- > > > 119a130 > $select = ""; 130c141 < if( $row['branch'] == "" ) $select .= " selected"; --- > if( $assignedbranch == "" ) $select .= " selected"; 134c145 < echo "  (" . $admtext['edit'] . " )
    "; --- > echo "  (" . $admtext['edit'] . " )
    "; 136c147 < < > 192,198d201 < 211a215,229 > > > > > > > > 217c235 <    --- > >    225,226c243,244 < < > < >
    93d103 <
    --- >
    184d194 < < <
    > >
    --- >
    236c254 < echo showEventRow('altbirthdate','altbirthplace','CHR',''); --- > echo showEventRow('altbirthdate','altbirthplace','ALTBE',''); 251,252c269,270 <
    --- >
    259a278 > 265,266c284,285 < < > 41a43,47 > // bkLib.onDomLoaded(function() { > new nicEditor({fullPanel: true, maxHeight: 300}).panelInstance('mynotes'); > }); > 49a56 > //]]> 57,58d63 < background="img/background.gif"> < 59a65,67 > $onload = $map['key'] && !$map['startoff'] ? " onload=\"divbox('mapcontainer');\"" : ""; > echo tng_adminlayout($onload); > 69,71c77,78 < < < --- > 120,122d126 < 133a138 > 142,145c147 < < --- > 147,154c149,156 < < < < <
    --- >
    >
    96c103 <
    :
    :
    :
    :
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > > > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_newrepo.php TNG1403/admin_newrepo.php 29d28 < $flags['tabs'] = $tngconfig['tabs']; 33c32 < < < < > > > > > > > $showmenu = false; > echo tng_adminlayout("", $showmenu); > ?> >
    > if($sitever != "mobile") { > $num_banners = 5; > $next_banner = rand(1,$num_banners); > ?> >
    > for($i = $num_banners; $i > 0; $i--) { > echo "\n"; > $next_banner = $next_banner == 5 ? 1 : $next_banner + 1; > } > echo "

    {$admtext['administration']} \"toggle

    \n"; > } > $messages = ""; > if( $allow_edit || $allow_add || $allow_delete ) { > $total_users = getTotal($users_table); > $total_people = getTotal($people_table, 1); > $total_families = getTotal($families_table, 1); > > if( $allow_edit && $allow_add && $allow_delete && !$assignedtree ) { > if(!$total_users) > $messages .= "
  • {$admtext['task_user']}
  • \n"; > > //no tree? > $total_trees = getTotal($trees_table); > if(!$total_trees) > $messages .= "
  • {$admtext['task_tree']}
  • \n"; > > //no people? import > if(!$total_people) > $messages .= "
  • {$admtext['importgedcom2']} | {$admtext['task_people']}
  • \n"; > else if(!$total_families) > $messages .= "
  • {$admtext['task_families']}
  • \n"; > > //new users to review? > $review_users = getTotal($users_table, "allow_living = \"-1\""); > if($review_users) > $messages .= "
  • {$admtext['task_revusers']} ($review_users)
  • \n"; > > //people or families to review? > $review_people = getTotal("$people_table, $temp_events_table", "$people_table.personID = $temp_events_table.personID AND $people_table.gedcom = $temp_events_table.gedcom AND (type = \"I\" OR type = \"C\")"); > if($review_people) > $messages .= "
  • {$admtext['task_revind']} ($review_people)
  • \n"; > $review_families = getTotal("$families_table, $temp_events_table", "$families_table.familyID = $temp_events_table.familyID AND $families_table.gedcom = $temp_events_table.gedcom AND type = \"F\""); > if($review_families) > $messages .= "
  • {$admtext['task_revfam']} ($review_families)
  • \n"; > > //last backup more than x days ago? > $backupmsg = ""; > $fullbackuppath = !empty($tngconfig['saveconfig']) ? $subroot . $backuppath : $rootpath . $backuppath; > $files = array_merge(glob("$fullbackuppath/*.sql"), glob("$fullbackuppath/*.bak")); > $daysSince = $tngconfig['backupdays']; > if(count($files)) { > //check dates > usort($files, function($a,$b) { > if(filemtime($a) == filemtime($b)) > return 0; > else if(filemtime($a) < filemtime($b)) > return 1; > else > return -1; > }); > $lastBackupTime = filemtime($files[0]); > if($daysSince != "0") { > if(!$daysSince) $daysSince = 30; > if(time() - $lastBackupTime >= 60 * 60 * 24 * $daysSince) > $backupmsg = preg_replace( "/xxx/", $daysSince, $admtext['lastbackup'] ); > } > } > else if($total_people && $daysSince != "0") { > //no backup ever done > $backupmsg = $admtext['nobackups']; > } > if($backupmsg) > $messages .= "
  • {$admtext['task_backup']} ($backupmsg)
  • \n"; > > //need map key? > if(!$map['key'] || $map['key'] == "1") > $messages .= "
  • {$admtext['task_mapkey']}
  • \n"; > } > } > > $switcher = ""; > if($allow_admin) { > $trees = explode(',',$_SESSION['availabletrees']); > if(count($trees) > 1) { > $query = ""; > foreach($trees as $t) { > if($query) $query .= " UNION "; > $query .= "SELECT gedcom, treename FROM $trees_table WHERE gedcom = \"$t\""; > } > $query .= " ORDER BY treename"; > $result = tng_query($query); > $switcher .= "
    \n"; > $switcher .= "\n"; > $switcher .= "\n
    \n"; > tng_free_result($result); > } > } > if($chooselang) { > $query = "SELECT languageID, display, folder FROM $languages_table ORDER BY display"; > $result = @tng_query($query); > > if( $result && tng_num_rows( $result ) ) { > $switcher .= "
    \n"; > $switcher .= "  \n
    \n"; > tng_free_result($result); > } > } > > if($switcher || (!$tngconfig['hidetasks'] && $messages)) { > $messages = "
      \n$messages
    \n"; > $msgarea_class = $sitever != "mobile" ? " tngmsgarea-std" : ""; > $msgarea_style = !$tngconfig['hidetasks'] ? " style=\"min-width:400px\"" : ""; > ?> >
    > > if(!$tngconfig['hidetasks'] && $messages) { > ?> > > toggle display > > > if($switcher) > echo "
    \n$switcher\n
    \n"; > ?> > > } > else > echo "
    \n$switcher\n
    \n"; > ?> >
    > } > > $menu = ""; > if( $allow_edit || $allow_add || $allow_delete ) { > $menu .= adminMenuItem("admin_people.php", $admtext['people'], $total_people, "people"); > $menu .= adminMenuItem("admin_families.php", $admtext['families'], $total_families, "families"); > $menu .= adminMenuItem("admin_sources.php", $admtext['sources'], getTotal($sources_table, 2), "sources"); > $menu .= adminMenuItem("admin_repositories.php", $admtext['repositories'], getTotal($repositories_table, 2), "repos"); > } > if( $allow_edit || $allow_add || $allow_delete || $allow_media_add || $allow_media_edit || $allow_media_delete ) { > $menu .= adminMenuItem("admin_media.php", $admtext['media'], getTotal($media_table, 2), "photos"); > $menu .= adminMenuItem("admin_albums.php", $admtext['albums'], getTotal($albums_table), "albums"); > } > if( $allow_edit || $allow_add || $allow_delete ) { > $menu .= adminMenuItem("admin_cemeteries.php", $admtext['cemeteries'], getTotal($cemeteries_table), "cemeteries"); > $menu .= adminMenuItem("admin_places.php", $admtext['places'], getTotal($places_table, (!$assignedtree || $tngconfig['places1tree'] ? "" : 2)), "places"); > } > if( $allow_edit && $allow_add && $allow_delete && !$assignedbranch ) { > $menu .= adminMenuItem("admin_dataimport.php", $admtext['datamaint'], "", "data"); > } > if( $allow_edit && $allow_add && $allow_delete && !$assignedtree ) { > $menu .= adminMenuItem("admin_trees.php", $admtext['trees'], $total_trees, "trees"); > if( !$assignedbranch ) { > $menu .= adminMenuItem("admin_branches.php", $admtext['branches'], getTotal($branches_table, 2), "branches"); > } > $menu .= adminMenuItem("admin_eventtypes.php", $admtext['customeventtypes'], getTotal($eventtypes_table), "customeventtypes"); > if(empty($tngconfig['hidedna'])) > $menu .= adminMenuItem("admin_dna_tests.php", $admtext['dna_tests'], getTotal($dna_tests_table), "dna"); > } > if( $allow_edit || $allow_delete ) > $menu .= adminMenuItem("admin_notelist.php", $admtext['notes'], getTotal($notelinks_table,2), "notes"); > if( $allow_edit || $allow_add || $allow_delete ) { > $menu .= adminMenuItem("admin_timelineevents.php", $admtext['tlevents'], getTotal($tlevents_table), "tlevents"); > } > if( $allow_edit && $allow_add && $allow_delete ) { > $menu .= adminMenuItem("admin_misc.php", $admtext['misc'], "", "misc"); > } > if( $allow_edit && $allow_add && $allow_delete && !$assignedtree ) { > $menu .= adminMenuItem("admin_setup.php", $admtext['setup'], "", "setup"); > $menu .= adminMenuItem("admin_utilities.php", $admtext['backuprestore'], "", "backuprestore"); > $menu .= adminMenuItem("admin_users.php", $admtext['users'], $total_users, "users"); > $menu .= adminMenuItem("admin_languages.php", $admtext['languages'], getTotal($languages_table), "languages"); > $menu .= adminMenuItem("admin_reports.php", $admtext['reports'], getTotal($reports_table), "reports"); > if(!$tngconfig['hidetotals']) { > $mods_installed = $all_mods = 0; > if( !empty( $mm_data ) ) { > foreach( $mm_data as $index => $subkey ) { > if( $subkey['status'] == 1 ) $mods_installed++; > $all_mods++; > } > } > $mods_count = $all_mods != $mods_installed ? $mods_installed . '/' . $all_mods : $all_mods; > } > else > $mods_count = ""; > $menu .= adminMenuItem("admin_modhandler.php", $admtext['modmgr'], $mods_count, "modmgr"); > //$menu .= adminMenuItem("admin_modhandler.php", $admtext['modmgr'], count(glob("mods/*.cfg")), "modmgr"); > } > if($menu_count) { > $rows = ceil($menu_count/3); > $menu_grid_str = " style=\"grid-template-rows: repeat($rows, auto)\""; > } > else > $menu_grid_str = ""; > if($sitever != "mobile") > echo "
    \n"; // end of banner div > ?> >
    > > echo $menu; > > $newsitever = getSiteVersion(); > switch($newsitever) { > case "standard": > if($newsitever != $sitever) > echo switcherLink("standard",$text['switchs']); > break; > case "mobile": > if($newsitever != $sitever) > echo switcherLink("mobile",$text['switchm']); > else > echo switcherLink("standard",$text['switchs']); > break; > default: //tablet > $target = $newsitever != $sitever ? "tablet" : "standard"; > echo switcherLink($target,$text['switchs']); > echo switcherLink("mobile",$text['switchm']); > break; > } > ?> >
    >
    > > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_pickcemetery.php TNG1403/admin_pickcemetery.php 7a8 > $admin_login = 1; diff -r TNG/admin_places.php TNG1403/admin_places.php 13d12 < $orgtree = $tree; 15c14,16 < if( $newsearch ) { --- > if(!isset($tree)) > $tree = ""; > if( !empty($newsearch) ) { 16a18,22 > if( !isset($exactmatch) ) $exactmatch = ""; > if( !isset($nocoords) ) $nocoords = ""; > if( !isset($noevents) ) $noevents = ""; > if( !isset($nolevel) ) $nolevel = ""; > if( !isset($temples) ) $temples = ""; 20a27 > setcookie("tng_search_places_post[noevents]", $noevents, $exptime); 27,38c34,47 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_places_post']['search']); < if( !$tree ) < $tree = $_COOKIE['tng_tree']; < if( !$exactmatch ) < $exactmatch = $_COOKIE['tng_search_places_post']['exactmatch']; < if( !$nocoords ) < $nocoords = $_COOKIE['tng_search_places_post']['nocoords']; < if( !$nolevel ) < $nolevel = $_COOKIE['tng_search_places_post']['nolevel']; < if( !$temples ) < $temples = $_COOKIE['tng_search_places_post']['temples']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_places_post']['search']) ? stripslashes($_COOKIE['tng_search_places_post']['search']) : ""; > if( empty($tree) ) > $tree = isset($_COOKIE['tng_tree']) ? $_COOKIE['tng_tree'] : ""; > if( empty($exactmatch) ) > $exactmatch = isset($_COOKIE['tng_search_places_post']['exactmatch']) ? $_COOKIE['tng_search_places_post']['exactmatch'] : ""; > if( empty($nocoords) ) > $nocoords = isset($_COOKIE['tng_search_places_post']['nocoords']) ? $_COOKIE['tng_search_places_post']['nocoords'] : ""; > if( empty($noevents) ) > $noevents = isset($_COOKIE['tng_search_places_post']['noevents']) ? $_COOKIE['tng_search_places_post']['noevents'] : ""; > if( empty($nolevel) ) > $nolevel = isset($_COOKIE['tng_search_places_post']['nolevel']) ? $_COOKIE['tng_search_places_post']['nolevel'] : ""; > if( empty($temples) ) > $temples = isset($_COOKIE['tng_search_places_post']['temples']) ? $_COOKIE['tng_search_places_post']['temples'] : ""; 40,41c49,50 < $tngpage = $_COOKIE['tng_search_places_post']['tngpage']; < $offset = $_COOKIE['tng_search_places_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_places_post']['tngpage']) ? $_COOKIE['tng_search_places_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_places_post']['offset']) ? $_COOKIE['tng_search_places_post']['offset'] : 0; 43a53 > if( !isset($tngpage) ) $tngpage = 1; 48,51c58,62 < if (get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } --- > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); > > if(!empty($order)) > setcookie("tng_search_places_post[order]", $order, $exptime); 53c64 < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > $order = isset($_COOKIE['tng_search_places_post']['order']) ? $_COOKIE['tng_search_places_post']['order'] : "name"; 54a66 > if(!isset($offset)) $offset = 0; 84c96 < if( $tree ) --- > if( !empty($tree) ) 88a101 > if( !isset($noevents) ) $noevents = ""; 156c169,197 < $query = "SELECT ID, place, placelevel, longitude, latitude, zoom, $places_table.gedcom as gedcom $treename --- > $placesort = "nameup"; > $changesort = "change"; > $descicon = "\"\""; > $ascicon = "\"\""; > > if($order == "name") { > $orderstr = "place, $places_table.gedcom"; > $placesort = "{$admtext['place']} $descicon"; > } > else { > $placesort = "{$admtext['place']} $ascicon"; > if($order == "nameup") > $orderstr = "place DESC, $places_table.gedcom DESC"; > } > > if($order == "change") { > $orderstr = "changedate, place, $places_table.gedcom"; > $changesort = "{$admtext['lastmodified']} $descicon"; > } > else { > $changesort = "{$admtext['lastmodified']} $ascicon"; > if($order == "changeup") > $orderstr = "changedate DESC, place, $places_table.gedcom"; > } > > $query = "SET SQL_BIG_SELECTS=1"; > $result = tng_query($query); > > $query = "SELECT ID, place, placelevel, longitude, latitude, zoom, $places_table.gedcom as gedcom, changedby, DATE_FORMAT(changedate,\"%d %b %Y\") as changedatef $treename 160c201 < $query .= " WHERE $allwhere ORDER BY place, $places_table.gedcom, ID LIMIT $newoffset" . $maxsearchresults; --- > $query .= " WHERE $allwhere ORDER BY $orderstr LIMIT $newoffset" . $maxsearchresults; 175d215 < $flags['tabs'] = $tngconfig['tabs']; 208,209d247 < < 210a249,252 > echo tng_adminlayout(); > > if( !isset($place2) ) $place2 = ""; > 220,223c262,263 < < <
    <
    --- >
    >
    277c317 < --- > 283c323 < --- >
    293c333 < --- > 314a355 > 348a390 > echo "\n"; 364,369c406,409 < < <
          {$row['changedatef']}
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_renumbermenu.php TNG1403/admin_renumbermenu.php 23d22 < $flags['tabs'] = $tngconfig['tabs']; 28,29d26 < < 30a28,29 > echo tng_adminlayout(); > 40,42c39,40 < < <
    --- >
    >
    47c45 < --- >
    96,101c94,97 < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_renumber.php TNG1403/admin_renumber.php 22d21 < $flags['tabs'] = $tngconfig['tabs']; 27,28d25 < < 29a27,28 > echo tng_adminlayout(); > 49,50c48,49 < eval( "\$prefix = \$tngconfig['{$type}prefix'];" ); < eval( "\$suffix = \$tngconfig['{$type}suffix'];" ); --- > $prefix = $tngconfig[$type.'prefix']; > $suffix = $tngconfig[$type.'suffix']; 199a199,201 > $query = "UPDATE $image_tags_table SET persfamID=\"$newID\" WHERE gedcom=\"$tree\" AND persfamID=\"" . $row[$id] . "\""; > $result2 = tng_query($query); > 239c241,242 < echo "
    $tng_title, v.$tng_version
    "; --- > > echo tng_adminfooter(); 241,242d243 < < diff -r TNG/admin_reports.php TNG1403/admin_reports.php 19a20,22 > if( !isset($offset) ) $offset = 0; > if( !isset($activeonly) ) $activeonly = ""; > 21c24 < if( $newsearch ) { --- > if( !empty($newsearch) ) { 30,33c33,36 < if( !$searchstring ) < $searchstring = $_COOKIE['tng_search_reports_post']['search']; < if( !$activeonly ) < $activeonly = $_COOKIE['tng_search_reports_post']['activeonly']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_reports_post']['search']) ? stripslashes($_COOKIE['tng_search_reports_post']['search']) : ""; > if( empty($activeonly) ) > $activeonly = isset($_COOKIE['tng_search_reports_post']['activeonly']) ? $_COOKIE['tng_search_reports_post']['activeonly'] : ""; 35,36c38,39 < $tngpage = $_COOKIE['tng_search_reports_post']['tngpage']; < $offset = $_COOKIE['tng_search_reports_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_reports_post']['tngpage']) ? $_COOKIE['tng_search_reports_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_reports_post']['offset']) ? $_COOKIE['tng_search_reports_post']['offset'] : 0; 39a43 > if( !isset($tngpage) ) $tngpage = 1; 64c68 < $query = "SELECT reportID, reportname, reportdesc, rank, active FROM $reports_table $wherestr ORDER BY rank, reportname, reportID LIMIT $newoffset" . $maxsearchresults; --- > $query = "SELECT reportID, reportname, reportdesc, ranking, active FROM $reports_table $wherestr ORDER BY ranking, reportname, reportID LIMIT $newoffset" . $maxsearchresults; 80d83 < $flags['tabs'] = $tngconfig['tabs']; 93,94d95 < < 95a97,98 > echo tng_adminlayout(); > 103,106c106,107 < < <
    <
    --- >
    >
    139c140 < --- >
    165c166 < echo "\n"; --- > echo "\n"; 182,185d182 < < < <
     {$row['rank']} {$row['ranking']}
    187,189c184,186 < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_repositories.php TNG1403/admin_repositories.php 12,13c12,13 < if( $newsearch ) { < $exptime = 0; --- > $exptime = 0; > if( !empty($newsearch) ) { 21,26c21,26 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_repos_post']['search']); < if( !$tree ) < $tree = $_COOKIE['tng_tree']; < if( !$exactmatch ) < $exactmatch = $_COOKIE['tng_search_repos_post']['exactmatch']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_repos_post']['search']) ? stripslashes($_COOKIE['tng_search_repos_post']['search']) : ""; > if( empty($tree) ) > $tree = isset($_COOKIE['tng_tree']) ? $_COOKIE['tng_tree'] : ""; > if( empty($exactmatch) ) > $exactmatch = isset($_COOKIE['tng_search_repos_post']['exactmatch']) ? $_COOKIE['tng_search_repos_post']['exactmatch'] : ""; 28,29c28,29 < $tngpage = $_COOKIE['tng_search_repos_post']['tngpage']; < $offset = $_COOKIE['tng_search_repos_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_repos_post']['tngpage']) ? $_COOKIE['tng_search_repos_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_repos_post']['offset']) ? $_COOKIE['tng_search_repos_post']['offset'] : 0; 32c32 < $exptime = 0; --- > if( !isset($tngpage) ) $tngpage = 1; 37,40c37,41 < if (get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } --- > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); > > if(!empty($order)) > setcookie("tng_search_repos_post[order]", $order, $exptime); 42c43 < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > $order = isset($_COOKIE['tng_search_repos_post']['order']) ? $_COOKIE['tng_search_repos_post']['order'] : "title"; 43a45 > if(!isset($offset)) $offset = 0; 61a64,69 > $uquery = "SELECT count(userID) as ucount FROM $users_table WHERE allow_living != \"-1\""; > $uresult = tng_query($uquery) or die ($admtext['cannotexecutequery'] . ": $uquery"); > $urow = tng_fetch_assoc( $uresult ); > $numusers = $urow['ucount']; > tng_free_result($uresult); > 101c109,156 < $query = "SELECT ID, repoID, reponame, $repositories_table.gedcom as gedcom, treename FROM ($repositories_table, $trees_table) WHERE $allwhere ORDER BY reponame, repoID LIMIT $newoffset" . $maxsearchresults; --- > $idsort = "id"; > $titlesort = "titleup"; > $changesort = "change"; > $descicon = "\"\""; > $ascicon = "\"\""; > > if($order == "id") { > $orderstr = "repoIDnum, reponame"; > $idsort = "{$admtext['repoid']} $descicon"; > } > else { > $idsort = "{$admtext['repoid']} $ascicon"; > if($order == "idup") > $orderstr = "repoIDnum DESC, reponame"; > } > if($tngconfig['reposuffix']) { > $len = strlen($tngconfig['reposuffix']); > $idselect = ", CAST(LEFT(repoID, LENGTH(repoID)-$len) AS UNSIGNED) AS repoIDnum"; > } > elseif($tngconfig['repoprefix']) { > $len = strlen($tngconfig['repoprefix']); > $idselect = ", CAST(RIGHT(repoID, LENGTH(repoID)-$len) AS UNSIGNED) AS repoIDnum"; > } > else > $idselect = ", CAST(repoID AS UNSIGNED) AS repoIDnum"; > > if($order == "title") { > $orderstr = "reponame"; > $titlesort = "{$admtext['title2']} $descicon"; > } > else { > $titlesort = "{$admtext['title2']} $ascicon"; > if($order == "titleup") > $orderstr = "reponame DESC"; > } > > if($order == "change") { > $orderstr = "changedate, reponame"; > $changesort = "{$admtext['lastmodified']} $descicon"; > } > else { > $changesort = "{$admtext['lastmodified']} $ascicon"; > if($order == "changeup") > $orderstr = "changedate DESC, reponame"; > } > > $query = "SELECT ID, repoID{$idselect}, reponame, $repositories_table.gedcom as gedcom, treename, changedby, DATE_FORMAT(changedate,\"%d %b %Y\") as changedatef > FROM ($repositories_table, $trees_table) WHERE $allwhere ORDER BY $orderstr LIMIT $newoffset" . $maxsearchresults; 117d171 < $flags['tabs'] = $tngconfig['tabs']; 130,131d183 < < 132a185,186 > echo tng_adminlayout(); > 141,144c195,196 < < <
    <
    --- >
    >
    188c240 < --- > 194c246 < --- >
    204,205c256,257 < < --- > > 212a265 > 237a291,292 > $changedby = $numusers > 1 ? "{$row['changedby']}: " : ""; > echo "\n"; 253,256d307 < < < <
              {$changedby}{$row['changedatef']}
    258,260c309,311 < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_restore.php TNG1403/admin_restore.php 19a20,21 > $fullbackuppath = !empty($tngconfig['saveconfig']) ? $subroot . $backuppath : $rootpath . $backuppath; > 21c23 < global $rootpath, $backuppath, $largechunk, $admtext; --- > global $rootpath, $fullbackuppath, $largechunk, $admtext, $dodel; 23,24c25,31 < $filename = "$rootpath$backuppath/$table.bak"; < if( !file_exists( $filename ) ) return $admtext['cannotopen'] . " $table.bak"; --- > $dodel = $dodel == "true" || $dodel == "1" || $dodel == 1 ? true : false; > $filename = "$fullbackuppath/$table.sql"; > if( !file_exists( $filename ) ) { > $filename = "$fullbackuppath/$table.bak"; > if( !file_exists( $filename ) ) > return $admtext['cannotopen'] . " $table.sql / $table.bak"; > } 26,27d32 < $query = "DELETE FROM $table"; < $result = tng_query($query); 29,40c34,37 < $fields = array_shift($lines); < if (substr($fields,0,1) == '"') { // does this line hold the field list? < array_unshift($lines,$fields); // no - so put the line back on the lines array and build field list from table < $query = "SELECT * FROM $table"; // no need for limit as table is empty < $result = tng_query($query); < $fields = ""; < $nflds = tng_num_fields($result); < for ($i=0; $i < $nflds; $i++) { < $fields .= tng_field_info($result,$i,'name') . ','; < } < $fields = trim($fields,','); < } --- > if($dodel) { > $query = "DELETE FROM $table"; > $result = tng_query($query); > } 42,62c39,109 < $counter = 0; < $values = ""; < $saveline = ""; < $startquote = 0; < $prevendquote = 0; < < foreach ( $lines as $line ) { < $startquote = substr( $line, 0, 1 ) == "\"" ? 1: 0; < if( $startquote && $prevendquote ) { < $values .= sprintf("(%s),",rtrim($saveline)); < $counter++; < if( $counter == $largechunk ) { < writechunk($table, $fields, $values); < $counter = 0; < $values = ""; < } < $saveline = ""; < } < $prevendquote = substr( rtrim( $line ), -1 ) == "\"" && (substr( rtrim( $line ), -3 ) == "\\\\\"" || substr( rtrim( $line ), -2 ) != "\\\"") ? 1: 0; < $saveline .= $line; < } --- > $firstword = substr($lines[0],0,4); > $dosql = ($firstword == "DROP" || $firstword == "CREA" || $firstword == "INSE") ? true : false; > > if($dosql) { > $query = $insertline = ""; > $counter = 0; > > foreach ( $lines as $line ) { > if(substr($line,0,6) == "INSERT") > $insertline = $line; > else { > $query .= $line; > $counter++; > } > if(substr(trim($line),-1) == ";" || $counter == $largechunk) { > if($dodel || substr($line,0,4) != "DROP") { > if($insertline) { > $query = $insertline . $query; > if(substr(trim($line),-1) == ";") > $insertline = ""; > else > $query = substr(trim($query), 0, -1) . ";"; > } > $result = tng_query($query); > } > $counter = 0; > $query = ""; > } > } > } > else { > $fields = array_shift($lines); > if (substr($fields,0,1) == '"') { // does this line hold the field list? > array_unshift($lines,$fields); // no - so put the line back on the lines array and build field list from table > $query = "SELECT * FROM $table"; // no need for limit as table is empty > $result = tng_query($query); > $fields = ""; > $nflds = tng_num_fields($result); > for ($i=0; $i < $nflds; $i++) { > $fields .= tng_field_info($result,$i,'name') . ','; > } > $fields = trim($fields,','); > } > > $counter = 0; > $values = ""; > $saveline = ""; > $startquote = 0; > $prevendquote = 0; > > foreach ( $lines as $line ) { > $startquote = substr( $line, 0, 1 ) == "\"" ? 1: 0; > if( $startquote && $prevendquote ) { > $values .= sprintf("(%s),",rtrim($saveline)); > $counter++; > if( $counter == $largechunk ) { > writechunk($table, $fields, $values); > $counter = 0; > $values = ""; > } > $saveline = ""; > } > $prevendquote = substr( rtrim( $line ), -1 ) == "\"" && (substr( rtrim( $line ), -3 ) == "\\\\\"" || substr( rtrim( $line ), -2 ) != "\\\"") ? 1: 0; > $saveline .= $line; > } > > if( $saveline ) { > $values .= sprintf("(%s),",rtrim($saveline)); > writechunk($table, $fields, $values); > } > } 64,67d110 < if( $saveline ) { < $values .= sprintf("(%s),",rtrim($saveline)); < writechunk($table, $fields, $values); < } 75,76c118,121 < $query = "INSERT INTO $table ($fields) VALUES $values"; < return tng_query($query); --- > if($values != "()") { > $query = "INSERT INTO $table ($fields) VALUES $values"; > return tng_query($query); > } 79c124 < $largechunk = 100; --- > $largechunk = 1000; 83c128 < $filename = "$rootpath$backuppath/tng_tablestructure.bak"; --- > $filename = "$fullbackuppath/tng_tablestructure.bak"; 100c145 < $languages_table, $places_table, $states_table, $countries_table, $sources_table, $repositories_table, $citations_table, $reports_table, $dna_groups_table, $dna_links_table, $dna_tests_table, --- > $image_tags_table, $languages_table, $places_table, $states_table, $countries_table, $sources_table, $repositories_table, $citations_table, $reports_table, $dna_groups_table, $dna_links_table, $dna_tests_table, 103a149,150 > > foreach($tablelist as $tablecheck) if(!isset(${$tablecheck})) ${$tablecheck} = false; 105c152 < eval( "\$dothistable = \"\$$table\";" ); --- > $dothistable = $$table; diff -r TNG/admin_review.php TNG1403/admin_review.php 241d240 < $flags['tabs'] = $tngconfig['tabs']; 251,252d249 < < 253a251,252 > echo tng_adminlayout(); > 274,276c273,275 < < < < < <
    --- >
    >
    > 333,336c332,333 <
    --- >
    >
    338,340c335,337 < $tng_title, v.$tng_version"; ?> < < --- > echo tng_adminfooter(); > ?> diff -r TNG/admin_reviewusers.php TNG1403/admin_reviewusers.php 25d24 < $flags['tabs'] = $tngconfig['tabs']; 38,39d36 < < 40a38,39 > echo tng_adminlayout(); > 43c42 < $usertabs[2] = array($allow_edit,"admin_reviewusers.php",$admtext['review'] . $revstar,"review"); --- > $usertabs[2] = array($allow_edit,"admin_reviewusers.php",$admtext['review'],"review"); 50,52c49,52 < < <
    --- >
    > > >
    65c65 < --- > 71c71 < --- >
    123,125c123,126 < $tng_title, v.$tng_version"; ?> < < --- > > echo tng_adminfooter(); > ?> \ No newline at end of file Only in TNG: admin_rightbanner.php diff -r TNG/admin_savelanguage.php TNG1403/admin_savelanguage.php 5,7c5,6 < < session_start(); < eval( "\$newlanguage = preg_replace(\"/[^0-9]/\", '', \$newlanguage$instance);" ); --- > if(session_status() !== PHP_SESSION_ACTIVE) session_start(); > $newlanguage = preg_replace("/[^0-9]/", "", $newlanguage); diff -r TNG/admin_savereview.php TNG1403/admin_savereview.php 20,29c20,22 < if (get_magic_quotes_gpc() == 0) { < $eventdate = addslashes($newdate); < $eventplace = addslashes($newplace); < $info = addslashes($newinfo); < } < else { < $eventdate = $newdate; < $eventplace = $newplace; < $info = $newinfo; < } --- > $eventdate = addslashes($newdate); > $eventplace = addslashes($newplace); > $info = addslashes($newinfo); 166c159 < adminwritelog( "$choice ({$admtext['family']}): $tree/{$row['familyID']}" ); --- > adminwritelog( "$choice ({$admtext['family']}): $tree/{$row['familyID']}" ); 168c161 < adminwritelog( "$choice ({$admtext['person']}): $tree/{$row['personID']}" ); --- > adminwritelog( "$choice ({$admtext['person']}): $tree/{$row['personID']}" ); diff -r TNG/admin_savewhatsnewmsg.php TNG1403/admin_savewhatsnewmsg.php 33c33,38 < header( "Location: admin_whatsnewmsg.php?color=$color&message=" . urlencode($message) ); --- > if( !empty($submitx) ) { > header( "Location: admin_misc.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_whatsnewmsg.php?color=$color&message=" . urlencode($message) ); > } diff -r TNG/admin_secondary.php TNG1403/admin_secondary.php 18,19c18,20 < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['secondarymaint'], $flags ); --- > setcookie("tng_sec_post[tree]", $tree, 0); > > tng_adminheader( $admtext['secondary'], $flags ); 23,24d23 < < 25a25,26 > echo tng_adminlayout(); > 28c29 < $datatabs[2] = array(1,"admin_secondmenu.php",$admtext['secondarymaint'],"second"); --- > $datatabs[2] = array(1,"admin_secondmenu.php",$admtext['secondary'],"second"); 31c32 < echo displayHeadline($admtext['datamaint'] . " >> " . $admtext['secondarymaint'] . " >> " . $secaction,"img/data_icon.gif",$menu,$message); --- > echo displayHeadline($admtext['datamaint'] . " >> " . $admtext['secondary'] . " >> " . $secaction, "img/data_icon.gif", $menu, (isset($message) ? $message : "")); 33,35c34,35 < <
    <
    --- >
    >
    39c39 < $wherestr = ""; --- > $wherestr = $wherestr2 = ""; 41c41 < echo "

    " . $admtext['sortingchildren'] . "

    "; --- > echo "

    " . $admtext['sortingchildren'] . "

    "; 68c68 < echo "

    {$admtext['finishedsort']}
    "; --- > echo "

    {$admtext['finished']}
    "; 72c72 < echo "

    " . $admtext['sortingspouses'] . "

    "; --- > echo "

    " . $admtext['sortingspouses'] . "

    "; 121c121 < echo "

    {$admtext['finishedsort']}
    "; --- > echo "

    {$admtext['finished']}
    "; 140c140 < echo "

    " . $admtext['creatinggendex'] . "

    "; --- > echo "

    " . $admtext['creatinggendex'] . "

    "; 165c165 < $line = $person['personID'] . "&tree={$person['gedcom']}|$uclast|" . initials( $person['firstname'] ) . " /$uclast/|$info\n"; --- > $line = $person['personID'] . "&tree={$person['gedcom']}|$uclast|" . initials( $person['firstname'] ) . " /$uclast/|$info\n"; 167,168c167,168 < $line = $person['personID'] . "&tree={$person['gedcom']}|$uclast|{$person['firstname']} /$uclast/|$info\n"; < if($session_charset == "UTF-8") $line = utf8_decode($line); --- > $line = $person['personID'] . "&tree={$person['gedcom']}|$uclast|{$person['firstname']} /$uclast/|$info\n"; > if($session_charset == "UTF-8") $line = mb_convert_encoding( $line, 'ISO-8859-1', 'UTF-8' ); 188,189c188,189 < » GenDexNetwork
    < » FamilyTreeSeeker.com --- > > » FamilyTreeSeeker.com 194c194 < echo "

    " . $admtext['trackinglines'] . "

    "; --- > echo "

    " . $admtext['trackinglines'] . "

    "; 225c225,226 < echo "

    " . $admtext['relabeling'] . "

    "; --- > $fcount = 0; > echo "

    " . $admtext['relabeling'] . "

    "; 282c283 < echo "

    " . $admtext['evaluating'] . "...

    "; --- > echo "

    " . $admtext['evaluating'] . "...

    "; 308a310 > echo "

    " . $admtext['refreshliving'] . "...

    "; 369c371 < echo "+{$row['personID']} "; --- > echo "+{$row['personID']} "; 376c378 < echo "-{$row['personID']} "; --- > echo "-{$row['personID']} "; 380c382,384 < echo "I$counted "; --- > echo "."; > if($counted % 1000 == 0) > echo "I$counted"; 384c388 < echo "

    {$admtext['finished']}
    $changedToDeceased {$admtext['chtodeceased']}, $changedToLiving {$admtext['chtoliving']}."; --- > echo "

    {$admtext['finished']}
    $changedToDeceased {$admtext['chtodeceased']} (-), $changedToLiving {$admtext['chtoliving']} (+)."; 386a391,393 > echo "

    " . $admtext['makeprivate'] . "...

    "; > > $peopleMadePrivate = 0; 388c395 < $peopleMadePrivate = $familiesMadePrivate = $counted = 0; --- > $familiesMadePrivate = $counted = 0; 420d426 < if(!$peopleMadePrivate) $peopleMadePrivate = "0"; 431,433c437,439 < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_secondmenu.php TNG1403/admin_secondmenu.php 12c12 < if( $assignedtree ) --- > if( $assignedtree ) { 14c14,16 < else --- > $tree = $assignedtree; > } > else { 15a18,21 > if( empty($tree) && isset( $_COOKIE['tng_sec_post']['tree']) ) > $tree = $_COOKIE['tng_sec_post']['tree']; > } > 21d26 < $flags['tabs'] = $tngconfig['tabs']; 23a29,40 > > 26,27d42 < < 28a44,45 > echo tng_adminlayout(); > 41c58 < $datatabs[2] = array(1,"admin_secondmenu.php",$admtext['secondarymaint'],"second"); --- > $datatabs[2] = array(1,"admin_secondmenu.php",$admtext['secondary'],"second"); 44c61,63 < echo displayHeadline($admtext['datamaint'] . " >> " . $admtext['secondary'],"img/data_icon.gif",$menu,$message); --- > echo displayHeadline($admtext['datamaint'] . " >> " . $admtext['secondary'], "img/data_icon.gif", $menu, (isset($message) ? $message : "")); > > $utils = array($admtext['tracklines'],$admtext['sortchildren'],$admtext['sortspouses'],$admtext['relabelbranches'],$admtext['creategendex'],$admtext['evalmedia'],$admtext['refreshliving'],$admtext['makeprivate']); 47,49c66,67 <
    < < < <
    --- >
    >
    51c69 < : 56c74,76 < echo " \n"; --- > echo " \n"; 60,68d79 < < < < < < < < < 69a81,100 > > > > > > > $i = 1; > foreach($utils as $util) { > ?> > > > > > $i++; > } > ?> >
     #   
      
    > 71,72c102,103 < » GenDex Network
    < » FamilyTreeSeeker.com --- > > » FamilyTreeSeeker.com 74,79c105,109 <
    < $tng_title, v.$tng_version"; ?> < < --- > > > echo tng_adminfooter(); > ?> diff -r TNG/admin_sendmailusers.php TNG1403/admin_sendmailusers.php 20c20 < $wherestr = " AND gedcom=\"$gedcom\""; --- > $recipstr = "gedcom=\"$gedcom\""; 22c22,23 < $wherestr .= " AND branch=\"$branch\""; --- > $recipstr = "($recipstr AND branch=\"$branch\")"; > $wherestr = !empty($sendtoadmins) ? " AND ($recipstr OR gedcom=\"\")" : " AND $recipstr"; diff -r TNG/admin_setup.php TNG1403/admin_setup.php 8a9,15 > if( !$rootpath ) { > $rootpath = dirname(__FILE__) . "/"; > if (preg_match("/WIN/i",PHP_OS)) { > $rootpath = str_replace("\\","/",$rootpath); > } > } > 13c20 < if($subroot != $_GET['sr']) --- > if(isset($_GET['sr']) && $subroot != $_GET['sr']) 23c30 < if(!$sitever) --- > if(empty($sitever)) 26,28c33,35 < session_start(); < $session_language = $_SESSION['session_language']; < $session_charset = $_SESSION['session_charset']; --- > if(session_status() !== PHP_SESSION_ACTIVE) session_start(); > $session_language = isset($_SESSION['session_language']) ? $_SESSION['session_language'] : ""; > $session_charset = isset($_SESSION['session_charset']) ? $_SESSION['session_charset'] : ""; 45c52 < $result = tng_query_noerror($query); --- > $result = tng_query($query); 63,64c70 < if( !$sub ) $sub = "configuration"; < $flags['tabs'] = $tngconfig['tabs']; --- > if(empty($sub)) $sub = "configuration"; 69,70d74 < < 71a76,77 > echo tng_adminlayout(); > 81,83c87,88 < < < < <
    --- >
    >
    123,128c128,132 <
    < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_showbranch.php TNG1403/admin_showbranch.php 28c28 < $query = "SELECT personID, firstname, lastname, lnprefix, prefix, suffix, branch, gedcom, nameorder, living, private FROM $people_table WHERE gedcom = \"$tree\" and branch LIKE \"%$branch%\" ORDER BY lastname, firstname"; --- > $query = "SELECT personID, firstname, lastname, lnprefix, prefix, suffix, title, branch, gedcom, nameorder, living, private, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr FROM $people_table WHERE gedcom = \"$tree\" and branch LIKE \"%$branch%\" ORDER BY lastname, firstname"; 33d32 < $flags['tabs'] = $tngconfig['tabs']; 38,39d36 < < 40a38,39 > echo tng_adminlayout(); > 42c41 < $branchtabs[1] = array($allow_add,"admin_newbranch.php",$admtext[addnew],"addbranch"); --- > $branchtabs[1] = array($allow_add,"admin_newbranch.php",$admtext['addnew'],"addbranch"); 83,85c82,84 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/adminshowlog.php TNG1403/adminshowlog.php 19a20,23 > if(!isset($selected_user)) $selected_user = ""; > > $query = "SELECT username, realname FROM $users_table ORDER BY username"; > $result = tng_query($query); 23,25c27,31 < <
    <
    --- > echo tng_adminlayout(); > ?> >
    >
    27,28c33,50 < < --- > > : > > > >
    >
    > 30c52,54 < $lines = file( $adminlogfile ); --- > if(isset($logsaveconfig) && $logsaveconfig == 1) > $adminlogfile = $subroot . $adminlogfile; > $lines = file( $adminlogfile ); 33c57,62 < echo "\n"; --- > if(!$selected_user || strpos($line,$selected_user . " |") !== false) { > if(strpos($line,"") !== 0) > echo "\n"; > else > echo "$line\n"; > } 40,42c69,71 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_showmodslog.php TNG1403/admin_showmodslog.php 2,39c2,8 < // admin_showmodmgrlog.php created from the adminshowlog.php < // by Ken Roy to split the Mod Manager action log from the Admin Change log < // %version:10.0.3.0% < // Updated May 3, 2014 by Ken Roy < // - to incorporate Rick's Batch processing module < // Updated May 17, 2014 by Jeff Robison < // - to add a Clear Log option to the innermenu < // Updated May 20, 2014 by Ken Roy < // - to add Mod Guidelines, Mod Syntax, and Mods for TNG vnn to the innermenu < // Updated 21 May 2014 by Jeff Robison < // - to fix the header section < // Updated 22 May 2014 by Ken Roy < // - to externalize the fixed header style definitions < // Updated 13 Oct 2014 by Robin Richmond < // - to collapse the details of each mod and open them when the user clicks on an arrow image < // Updated 14 Oct 2014 19:21 by Robin Richmond < // - to incorporate mod handler help file, mod analyzer, and collapse all and expand all button in the menu & inner menu < // Updated 17 Oct 2014 11:32 by Robin Richmond < // - to simplify parsing of the first line of the log entry. < // Updated 20 Oct 2014 by Ken Roy < // - to add options for Analyzer tab and Compress Log < // Updated 21 Oct 2014 21:58 by Robin Richmond < // - to pay attention to the new compress_log option < // Updated 22 Oct 2014 by Ken Roy < // - to display Expand All / Collapse All if $sitever == standard or $options['compress_log'] == YES < // Updated 22 Oct 2014 18:18 by Robin Richmond < // - to use the latest code for identifying legitimate log entries. < < < // Note: this code deals with three types of log entries: < // 1. The newest, GENIII log entries that consist of on physical line that contains multiple HTML lines. < // The first line is pipe-delimited and contains the log entry heading. < // 2. Older (probably generated by test versions of GenIII, but I'm sure) log entries that also < // consist of one physical line that contains multiple HTML lines. The first line is not pipe- < // delimited, but it does contains a log entry heading. < // 3. Even older log entries that consist of multiple physical lines, in reverse chronological < // order. Thus, the first line we encounter is the last line of the log entry. But we use that < // last line as the entry header. --- > /* > Mod Manager v13 Mod log display handler > Written by Ken Roy, TNG Test Manager > v12 Updated by Ken Roy and Robin Richmond > v13 Updated by Rick Bisbee > * Updates code/styling for new TNGv13 Admin pages no longer using iframes. > * No changes to core (OOP classes) functionality from TNGv12. 41,42c10,22 < include("begin.php"); < include("adminlib.php"); --- > Note: this code deals with three types of log entries: > > 1. The newest, GENIII log entries that consist of one physical line that contains multiple HTML lines. The first line is pipe-delimited and contains the log entry heading. > > 2. Older (probably generated by test versions of GenIII -- not sure) log entries that also consist of one physical line that contains multiple HTML lines. The first line is not pipe-delimited, but it does contains a log entry heading. > > 3. Even older log entries that consist of multiple physical lines, in reverse chronological order. Thus, the first line we encounter is the last line of the log entry. But we use that last line as the entry header. > > --Robin Richmond > > */ > require 'begin.php'; > require 'adminlib.php'; 44d23 < include("getlang.php"); 46,47c25 < include("$mylanguage/admintext.php"); < //include("$mylanguage/admintext.php"); --- > require_once $mylanguage.'/admintext.php'; 49d26 < //tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit; 51,52c28,31 < include("checklogin.php"); < include("version.php"); --- > require 'checklogin.php'; > require 'version.php'; > > include 'classes/mmtabs.inc'; 54,56c33,38 < // temporary: these can be set from an options file < //include 'classes/mod.class.config.php'; < include $subroot.'mmconfig.php'; --- > // prevent direct URL access to Mod Manager if not the TNG Administrator > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } 62c44,47 < $flags['tabs'] = $tngconfig['tabs']; --- > > /*************************************************************** > 1. OUTPUT STD ADMIN PAGE HTML HEADER + ADDITIONS > ***************************************************************/ 66,76c51 < $min_width = $sitever == 'mobile' ? '0' : '640px'; < echo " < "; < < $helplang = findhelp("modmanager_help.php"); --- > require $subroot.'mmconfig.php'; 82,96c57 < $parts = explode( ".", $tng_version ); < $tngmodver = "Mods for TNG v{$parts[0]}"; < $modtabs = set_horizontal_tabs( $options['show_analyzer'], $options['show_developer'], $options['show_updates']); < $innermenu = set_innermenu_links( $tng_version ); < < $menu = "
    "; < $menu .= doMenu($modtabs,"viewlog",$innermenu); < $menu .= "
    "; < if(!isset($message)) $message = ""; < $headline = displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); < //$logheader = $options['maxloglines'] . " " . $admtext['recentactions']; < $logheader = $admtext['recentactions']; < $first_menu=TRUE; < < $clearmmlog = empty( $_GET['clearmmlog'] ) ? false : true; --- > $min_width = $sitever == 'mobile' ? '0' : '640px'; 98,106c59,67 < if( $options['fix_header'] == YES && $sitever != 'mobile' ) { < $headclass = 'mmhead-fixed'; < $ibarclass = 'ibar-fixed'; < $mmlogclass = 'mmlog-fixed'; < } < else { < $headclass = 'mmhead-scroll'; < $ibarclass = 'ibar-scroll'; < $mmlogclass = 'mmlog-scroll'; --- > /* Adjust positioning for problem templates */ > switch($templatenum) > { > case 7: > $margin_top = "0px"; > break; > default: > $margin_top = "162px"; > break; 109,117d69 < echo " < < < <
    < $headline <
    "; < < //if ( $sitever == "standard" && $options['compress_log'] == YES) { 121,123c73,78 < .action {padding-left:15px; cursor: pointer; background: url(img/tng_expand.gif) no-repeat left center;} < .collapse {background: url(img/tng_collapse.gif) no-repeat left center; < .collapse a { text-decoration: none;} --- > .collapse { > background: url(img/tng_collapse.gif) no-repeat left center; > } > .collapse a { > text-decoration: none; > } 125c80,81 < "; --- > > "; 131c87,126 < //if (isset( $logfilename) ) $options['modlogfile']=$logfilename; //TEMPORARY CODE - get logfilename from querystring parameter --- > /* Height of the table display must be set for > ** each page to account for differences in > ** heading heights. > ** > ** The tag must be explicitly closed. */ > echo " > > > "; > > /*************************************************************** > 2. OUTPUT TNG ADMIN TOP BANNER AND LEFT SIDE MENUS > ***************************************************************/ > echo tng_adminlayout(); > > /*************************************************************** > 3. PREPARE MOD MANAGER PAGE TITLE, TABS AND HORZ MENU > ***************************************************************/ > $parts = explode( ".", $tng_version ); > //$tngmodver = "Mods for TNG v{$parts[0]}"; > $modtabs = set_horizontal_tabs( $options['show_analyzer'], $options['show_developer'], $options['show_updates']); > > $innermenu = set_innermenu_links( $tng_version ); > $menu = doMenu($modtabs,"viewlog",$innermenu); > > if(!isset($message)) $message = ""; > echo displayHeadline($admtext['modmgr'],"img/modmgr_icon.gif",$menu,$message); > > $logheader = $admtext['recentactions']; > $first_menu=TRUE; > > $clearmmlog = empty( $_GET['clearmmlog'] ) ? false : true; > > /*************************************************************** > 4. MOD MANAGER LOG DISPLAY PAGE CONTENT > ***************************************************************/ 133c128 < if (!isset( $options['modlogfile'])) $options['modlogfile'] = $logfilename; //TEMPORARY CODE - get logfilename from querystring parameter --- > if (!isset( $options['modlogfile'])) $options['modlogfile'] = $logfilename; 140,150d134 < //echo "
    $line
    $line
    \n"; < //Add the heading with the Mod Manager Recent Actions message < //echo ""; < //echo "
    $logheader
    "; < < echo " < < < < <
    $logheader
    "; 153c137,147 < "; --- >
    >
    >
    > > > > > > "; 181c175 < echo "\n"; --- > echo "\n"; 194a189,191 > elseif( false !== stripos( $heading, "Clean Up" ) ) { > $dynoclass = "partinst"; > } 210,211c207,208 < echo ""; < echo "\n"; --- > echo ""; > echo "\n"; 221c218 < echo "\n"; --- > echo "\n"; 227c224 < echo ""; --- > echo ""; 240c237 < echo "\n"; --- > echo "\n"; 248c245 < echo "\n"; --- > echo "\n"; 252c249,252 <
    > Mod Manager Most Recent Actions >
    $logEntryDetails
    $logEntryDetails
    $actionCount. $heading
    $actionCount. $heading
    $logEntryDetails
    $logEntryDetails
    ?? $line
    ?? $line
    $logEntryDetails
    $logEntryDetails
    "; --- >
    >
    >
    > "; 256,271c256 < function set_horizontal_tabs( $show_analyzer = NO, $show_developer = NO, $show_updates = NO ) { < global $admtext; < < $modtabs = array(); < $modtabs[0] = array(1, "admin_modhandler.php", $admtext['modlist'],"modlist"); < $modtabs[1] = array(1,"admin_showmodslog.php",$admtext['viewlog'],"viewlog"); < $modtabs[2] = array(1,"admin_modoptions.php",$admtext['options'],"options"); < if ( $show_analyzer == YES) < $modtabs[3] = array(1,"admin_analyzemods.php",$admtext['analyzefiles'],'files'); < if ( $show_developer == YES) < $modtabs[4] = array(1,"admin_modtables.php",$admtext['parsetable'],'parser'); < if ( $show_updates == YES) < $modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates'); < return $modtabs; < } < function set_innermenu_links( $tng_version ) { --- > function set_innermenu_links( $tng_version, $pageID='viewlog' ) { 279c264,265 < $innermenu = "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']} > "; 282,283c268,271 < $innermenu .= "  |  {$text['expandall']}"; < $innermenu .= "  |  {$text['collapseall']}"; --- > $innermenu .= "  |  {$text['expandall']} > "; > $innermenu .= "  |  {$text['collapseall']} > "; 286,288c274,275 < //if ($options['compress_log'] == YES) { < $innermenu .= "  |  {$admtext['clearlog']}"; < //} --- > $innermenu .= "  |  {$admtext['clearlog']} > "; 291c278,279 < $innermenu .= "  |  {$admtext['modsyntax']}"; --- > $innermenu .= "  |  {$admtext['modsyntax']} > "; 294c282,283 < $innermenu .= "  |  {$admtext['modguidelines']}"; --- > $innermenu .= "  |  {$admtext['modguidelines']} > "; 297c286,287 < $innermenu .= "  |  $tngmodver"; --- > $innermenu .= "  |  $tngmodver > "; 303,328d292 < //$sitever = 'mobile'; //bypass jQuery positioning for testing < if( $sitever != 'mobile' && $options['adjust_headers'] ) { < echo " < "; < } < echo " <
    $tng_title, v.$tng_version
    < < "; 363a328,329 > echo tng_adminfooter(); diff -r TNG/admin_sources.php TNG1403/admin_sources.php 12c12,14 < if( $newsearch ) { --- > if(empty($exactmatch)) $exactmatch = ""; > > if( !empty($newsearch) ) { 21,26c23,28 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_sources_post']['search']); < if( !$tree ) < $tree = $_COOKIE['tng_tree']; < if( !$exactmatch ) < $exactmatch = $_COOKIE['tng_search_sources_post']['exactmatch']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_sources_post']['search']) ? stripslashes($_COOKIE['tng_search_sources_post']['search']) : ""; > if( empty($tree) ) > $tree = isset($_COOKIE['tng_tree']) ? $_COOKIE['tng_tree'] : ""; > if( empty($exactmatch) ) > $exactmatch = isset($_COOKIE['tng_search_sources_post']['exactmatch']) ? $_COOKIE['tng_search_sources_post']['exactmatch'] : ""; 28,29c30,31 < $tngpage = $_COOKIE['tng_search_sources_post']['tngpage']; < $offset = $_COOKIE['tng_search_sources_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_sources_post']['tngpage']) ? $_COOKIE['tng_search_sources_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_sources_post']['offset']) ? $_COOKIE['tng_search_sources_post']['offset'] : 0; 32a35 > if( !isset($tngpage) ) $tngpage = 1; 37,40c40,44 < if (get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } --- > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); > > if(!empty($order)) > setcookie("tng_search_sources_post[order]", $order, $exptime); 42c46 < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > $order = isset($_COOKIE['tng_search_sources_post']['order']) ? $_COOKIE['tng_search_sources_post']['order'] : "title"; 43a48 > if(!isset($offset)) $offset = 0; 61a67,72 > $uquery = "SELECT count(userID) as ucount FROM $users_table WHERE allow_living != \"-1\""; > $uresult = tng_query($uquery) or die ($admtext['cannotexecutequery'] . ": $uquery"); > $urow = tng_fetch_assoc( $uresult ); > $numusers = $urow['ucount']; > tng_free_result($uresult); > 106c117,164 < $query = "SELECT sourceID, shorttitle, title, $sources_table.gedcom as gedcom, treename, ID FROM ($sources_table, $trees_table) WHERE $allwhere ORDER BY shorttitle, title LIMIT $newoffset" . $maxsearchresults; --- > $idsort = "id"; > $titlesort = "titleup"; > $changesort = "change"; > $descicon = "\"\""; > $ascicon = "\"\""; > > if($order == "id") { > $orderstr = "sourceIDnum, shorttitle, title"; > $idsort = "{$admtext['sourceid']} $descicon"; > } > else { > $idsort = "{$admtext['sourceid']} $ascicon"; > if($order == "idup") > $orderstr = "sourceIDnum DESC, shorttitle DESC, title DESC"; > } > if($tngconfig['sourcesuffix']) { > $len = strlen($tngconfig['sourcesuffix']); > $idselect = ", CAST(LEFT(sourceID, LENGTH(sourceID)-$len) AS UNSIGNED) AS sourceIDnum"; > } > elseif($tngconfig['sourceprefix']) { > $len = strlen($tngconfig['sourceprefix']); > $idselect = ", CAST(RIGHT(sourceID, LENGTH(sourceID)-$len) AS UNSIGNED) AS sourceIDnum"; > } > else > $idselect = ", CAST(sourceID AS UNSIGNED) AS sourceIDnum"; > > if($order == "title") { > $orderstr = "shorttitle, title"; > $titlesort = "{$admtext['title2']} $descicon"; > } > else { > $titlesort = "{$admtext['title2']} $ascicon"; > if($order == "titleup") > $orderstr = "shorttitle DESC, title DESC"; > } > > if($order == "change") { > $orderstr = "changedate, shorttitle, title"; > $changesort = "{$admtext['lastmodified']} $descicon"; > } > else { > $changesort = "{$admtext['lastmodified']} $ascicon"; > if($order == "changeup") > $orderstr = "changedate DESC, shorttitle DESC, title DESC"; > } > > $query = "SELECT sourceID{$idselect}, shorttitle, title, $sources_table.gedcom as gedcom, treename, ID, changedby, DATE_FORMAT(changedate,\"%d %b %Y\") as changedatef FROM ($sources_table, $trees_table) > WHERE $allwhere ORDER BY $orderstr LIMIT $newoffset" . $maxsearchresults; 122d179 < $flags['tabs'] = $tngconfig['tabs']; 135,136d191 < < 137a193,194 > echo tng_adminlayout(); > 146,149c203,204 < < <
    <
    --- >
    >
    193c248 < --- > 199c254 < --- >
    209,210c264,265 < < --- > > 217a273 > 243a300,301 > $changedby = $numusers > 1 ? "{$row['changedby']}: " : ""; > echo "\n"; 259,261d316 < < <
              {$changedby}{$row['changedatef']}
    263,265c318,320 < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_tablecreate.php TNG1403/admin_tablecreate.php 23a24,25 > if ( !isset($helplang) ) $helplang = "English"; > 29d30 < $flags['tabs'] = $tngconfig['tabs']; 34,35d34 < < 36a36,37 > echo tng_adminlayout(); > 45,47c46,47 < < < < <

    --- >

    >
    57,62c57,61 <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_templateconfig.php TNG1403/admin_templateconfig.php 27,30c27,32 < $key = "t" . $row['template'] . "_" . $row['keyname']; < if($row['language']) < $key .= "_" . $row['language']; < $tmp[$key] = $row['value']; --- > if( is_dir($cms['tngpath'] . "templates/template" . $row['template']) || is_dir($cms['tngpath'] . "templates/" . $row['template'])) { > $key = "t" . $row['template'] . "_" . $row['keyname']; > if($row['language']) > $key .= "_" . $row['language']; > $tmp[$key] = $row['value']; > } 44a47,56 > $treequery = "SELECT gedcom, treename FROM $trees_table ORDER BY treename"; > $treeresult = tng_query($treequery) or die ($admtext['cannotexecutequery'] . ": $treequery"); > $treenum = 0; > while( $treerow = tng_fetch_assoc($treeresult) ) { > $treenum++; > $trees[$treenum] = $treerow['gedcom']; > $treename[$treenum] = $treerow['treename']; > } > tng_free_result($treeresult); > 47d58 < $flags['tabs'] = $tngconfig['tabs']; 51a63 > 53a66,69 > if(newtemp) { > jQuery('#form_templateswitching').val('1'); > jQuery('#topsave').hide(); > } 100a117,123 > function getTopValues(flagfield, numfield) { > topflagfield = document.formtop1.form_templateswitching; > flagfield.value = topflagfield.options[topflagfield.selectedIndex].value; > topnumfield = document.formtop2.form_templatenum; > numfield.value = topnumfield.options[topnumfield.selectedIndex].value; > } > 119,120d141 < < 121a143,144 > echo tng_adminlayout(); > 126c149 < $innermenu .= "{$admtext['help']}"; --- > $innermenu = "{$admtext['help']}"; 131,139c154,166 <
    < < <
    < < --- >
    > > > < >
    > > > > > > 142,144c169,172 <
    < --- >
    >
    > 153,154c181,182 < if( is_dir( $filename ) && $filename != "." && $filename != ".." ) { < $i = substr($filename,0,8) == "template" && is_numeric(substr($filename,8)) ? substr($filename, 8) : $filename; --- > if( is_dir( $filename ) && $filename != "." && $filename != ".." && $filename != '@eaDir' ) { > $i = substr($filename,0,8) == "template" && is_numeric(substr($filename,8)) ? substr($filename, 8) : $filename; 156c184 < $sections['t'.$i] = ""; --- > $sections['t'.$i] = ""; 178,179c206 < <
    --- >
    181c208 <

    \n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "
    \n"; 274d348 <
    280,282c354,357 < $tng_title, v.$tng_version"; ?> < < \ No newline at end of file --- > > echo tng_adminfooter(); > ?> \ No newline at end of file Only in TNG1403: admin_templatemsgs.php diff -r TNG/admin_thumbnails.php TNG1403/admin_thumbnails.php 20d19 < $flags['tabs'] = $tngconfig['tabs']; 34,35d32 < < 36a34,35 > echo tng_adminlayout(); > 49c48,50 < --- >
    > >
    52c53 < if( function_exists( imageJpeg ) ) { --- > if( function_exists( 'imageJpeg' ) ) { 54,55c55,56 < < > < >
    --- >
    77,78c78,79 <
    --- >
    108,110c109,112 < $tng_title, v.$tng_version"; ?> < < --- > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_timelineevents.php TNG1403/admin_timelineevents.php 11a12,13 > if( !isset($offset) ) $offset = 0; > 13c15 < if( $newsearch ) { --- > if( !empty($newsearch) ) { 21,22c23,24 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_tlevents_post']['search']); --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_tlevents_post']['search']) ? stripslashes($_COOKIE['tng_search_tlevents_post']['search']) : ""; 24,25c26,27 < $tngpage = $_COOKIE['tng_search_tlevents_post']['tngpage']; < $offset = $_COOKIE['tng_search_tlevents_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_tlevents_post']['tngpage']) ? $_COOKIE['tng_search_tlevents_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_tlevents_post']['offset']) ? $_COOKIE['tng_search_tlevents_post']['offset'] : 0; 28a31 > if( !isset($tngpage) ) $tngpage = 1; 33,38c36,37 < if (get_magic_quotes_gpc() == 0) { < $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); < $searchstring = addslashes($searchstring); < } < else < $searchstring_noquotes = preg_replace("/\"/", """,stripslashes($searchstring)); --- > $searchstring_noquotes = preg_replace("/\"/", """,$searchstring); > $searchstring = addslashes($searchstring); 50,51c49,50 < $wherestr = $searchstring ? "WHERE evyear LIKE \"%$searchstring%\" OR evdetail LIKE \"%$searchstring%\"" : ""; < $query = "SELECT tleventID, evyear, endyear, evtitle, evdetail FROM $tlevents_table $wherestr ORDER BY ABS(evyear), tleventID LIMIT $newoffset" . $maxsearchresults; --- > $wherestr = $searchstring ? "WHERE evyear LIKE \"%$searchstring%\" OR evtitle LIKE \"%$searchstring%\" OR evdetail LIKE \"%$searchstring%\"" : ""; > $query = "SELECT tleventID, evyear, endyear, evtitle, evdetail FROM $tlevents_table $wherestr ORDER BY ABS(evyear), evmonth, evday LIMIT $newoffset" . $maxsearchresults; 67d65 < $flags['tabs'] = $tngconfig['tabs']; 73,74d70 < < 75a72,73 > echo tng_adminlayout(); > 83,86c81,82 < < <
    <
    --- >
    >
    107c103 < --- > 112c108 < --- >
    135c131 < while( $rowcount < $numrows && $row = tng_fetch_assoc($result)) --- > while( $row = tng_fetch_assoc($result)) 159,164c155,158 < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_trees.php TNG1403/admin_trees.php 13c13 < if( $newsearch ) { --- > if( !empty($newsearch) ) { 20,21c20,21 < if( !$searchstring ) < $searchstring = $_COOKIE['tng_search_trees_post']['search']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_trees_post']['search']) ? $_COOKIE['tng_search_trees_post']['search'] : ""; 23,24c23,24 < $tngpage = $_COOKIE['tng_search_trees_post']['tngpage']; < $offset = $_COOKIE['tng_search_trees_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_trees_post']['tngpage']) ? $_COOKIE['tng_search_trees_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_trees_post']['offset']) ? $_COOKIE['tng_search_trees_post']['offset'] : 0; 64d63 < $flags['tabs'] = $tngconfig['tabs']; 70,71d68 < < 72a70,71 > echo tng_adminlayout(); > 81,84c80,81 < < < \n"; > echo ""; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > echo "\n"; > } > > $helplang = findhelp("backuprestore_help.php"); > > if( empty($sub) ) $sub = "tables"; > if( !isset($message) ) $message = ""; > tng_adminheader( $admtext['backuprestore'], $flags ); > ?> > > > > echo tng_adminlayout(); > > $utiltabs['0'] = array(1,"admin_utilities.php?sub=tables",$admtext['tables'],"tables"); > $utiltabs['1'] = array(1,"admin_utilities.php?sub=structure",$admtext['tablestruct'],"structure"); > $utiltabs['2'] = array(1,"admin_renumbermenu.php",$admtext['renumber'],"renumber"); > $innermenu = "{$admtext['help']}"; > $menu = doMenu($utiltabs,$sub,$innermenu); > $headline = $sub == "tables" ? $admtext['backuprestore'] . " >> " . $admtext['backuprestoretables'] : $admtext['backuprestore'] . " >> " . $admtext['backupstruct']; > echo displayHeadline($headline, "img/backuprestore_icon.gif",$menu,$message); > ?> > >
    >
    > if( $sub == "tables" ) { > ?> >

    > >

    >

    >
    >
    >

    > echo "{$admtext['onbackup']}: "; > echo " {$admtext['dosql']}  "; > echo " {$admtext['docreate']}  "; > echo " {$admtext['dodrop']}"; > echo "   << {$admtext['help']}"; > ?> >

    >

    > echo "{$admtext['onrestore']}: "; > echo " {$admtext['dodel']}  "; > ?> >

    >

    > > >    > > > >

    > >
    <
    --- >
    >
    99c96,108 < --- > > if( $allow_delete ) { > ?> >

    > > > >

    > } > ?> >
    101a111,117 > if($allow_delete) { > ?> > > } > ?> 133a150,151 > if($allow_delete) > echo ""; 153a172 > 155,161c174,177 < < < <
      
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_updatealbum.php TNG1403/admin_updatealbum.php 19,24c19,23 < if (get_magic_quotes_gpc() == 0) { < $albumname = addslashes($albumname); < $description = addslashes($description); < $keywords = addslashes($keywords); < } < if( !$alwayson ) $alwayson = 0; --- > $albumname = addslashes($albumname); > $description = addslashes($description); > $keywords = addslashes($keywords); > > if( empty($alwayson) ) $alwayson = 0; 33,35c32,34 < if( $newscreen == "return" ) < header( "Location: admin_editalbum.php?albumID=$albumID" ); < else if( $newscreen == "close" ) { --- > if( isset($_POST['savestay']) ) > header( "Location: admin_editalbum.php?albumID=$albumID&ref=1" ); > else if( isset($_POST['saveclose']) ) { 41c40,41 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close()(); diff -r TNG/admin_updateassoc.php TNG1403/admin_updateassoc.php 7a8 > $admin_login = 1; 25,27c26,27 < if (get_magic_quotes_gpc() == 0) { < $relationship = addslashes($relationship); < } --- > $relationship = addslashes($relationship); > $passocID = strtoupper($passocID); 31a32,33 > if(!isset($personID)) $personID = ""; > 36,37c38,39 < $query = "SELECT firstname, lastname, lnprefix, nameorder, prefix, suffix FROM $people_table < WHERE personID=\"$passocID\" AND gedcom=\"$tree\""; --- > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, title, sex, nameorder, living, private, branch, birthdate, birthdatetr, altbirthdatetr, deathdate > FROM $people_table WHERE personID=\"$passocID\" AND gedcom=\"$tree\""; diff -r TNG/admin_updatebranch.php TNG1403/admin_updatebranch.php 19,22c19,21 < if (get_magic_quotes_gpc() == 0) { < $description = addslashes($description); < } < if(!$dospouses) --- > $description = addslashes($description); > > if( empty($dospouses) ) 29c28 < if($submitx) { --- > if( !empty($submitx) ) { diff -r TNG/admin_updatecemetery.php TNG1403/admin_updatecemetery.php 34,45c34,44 < if (get_magic_quotes_gpc() == 0) { < $cemname = addslashes($cemname); < $city = addslashes($city); < $county = addslashes($county); < $state = addslashes($state); < $country = addslashes($country); < $latitude = addslashes($latitude); < $longitude = addslashes($longitude); < $zoom = addslashes($zoom); < $notes = addslashes($notes); < $place = addslashes($place); < } --- > $cemname = addslashes($cemname); > $city = addslashes($city); > $county = addslashes($county); > $state = addslashes($state); > $country = addslashes($country); > $latitude = addslashes($latitude); > $longitude = addslashes($longitude); > $zoom = addslashes($zoom); > $notes = addslashes($notes); > $place = addslashes($place); > 89,91c88,90 < if( $newscreen == "return" ) < header( "Location: admin_editcemetery.php?cemeteryID=$cemeteryID" ); < else if( $newscreen == "close" ) { --- > if( isset($_POST['savestay']) ) > header( "Location: admin_editcemetery.php?cemeteryID=$cemeteryID&ref=1" ); > else if( isset($_POST['saveclose']) ) { 97c96,97 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close()(); diff -r TNG/admin_updatecitation.php TNG1403/admin_updatecitation.php 7a8 > $admin_login = 1; 26,32c27,31 < if (get_magic_quotes_gpc() == 0) { < $description = addslashes($description); < $citedate = addslashes($citedate); < $citepage = addslashes($citepage); < $citetext = addslashes($citetext); < $citenote = addslashes($citenote); < } --- > $description = addslashes($description); > $citedate = addslashes($citedate); > $citepage = addslashes($citepage); > $citetext = addslashes($citetext); > $citenote = addslashes($citenote); diff -r TNG/admin_updatecollection.php TNG1403/admin_updatecollection.php 23,24c23,24 < if (get_magic_quotes_gpc() == 0) < $display = addslashes( $display ); --- > $display = addslashes($display); > $localpath = preg_replace('/\\\\/','\\\\\\\\',$localpath); diff -r TNG/admin_updateconfig.php TNG1403/admin_updateconfig.php 1,313c1,330 < \n" ); < < flock( $fp, LOCK_UN ); < fclose( $fp ); < < $fp = @fopen( "subroot.php", "w",1 ); < if( $fp ) { < flock( $fp, LOCK_EX ); < fwrite( $fp, "\n" ); < flock( $fp, LOCK_UN ); < fclose( $fp ); < } < adminwritelog( $admtext['modifysettings'] ); < < $oldsubroot = $newsubroot != $subroot ? "?sr=$subroot" : ""; < header( "Location: admin_setup.php$oldsubroot" ); --- > include("begin.php"); > include("processvars.php"); > include("adminlib.php"); > $textpart = "setup"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > if(!count($_POST)) { > header("Location: admin.php"); > exit; > } > > if(!$safety) { > header( "Location: admin_login.php" ); > exit; > } > > if( $link ) { > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( $assignedtree || !$allow_edit ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > } > > $sitename = stripslashes($sitename); > $site_desc = stripslashes($site_desc); > $dbowner = stripslashes($dbowner); > $tng_footermsg = stripslashes($tng_footermsg); > > $sitename = preg_replace("/\"/","\\\"",$sitename); > $site_desc = preg_replace("/\"/","\\\"",$site_desc); > $dbowner = htmlspecialchars(preg_replace("/\"/","\\\"",$dbowner),ENT_NOQUOTES); > $tng_footermsg = preg_replace("/\"/","\\\"",$tng_footermsg); > if(empty($altbirth)) $altbirth = "CHR,BAPM"; > > $doctype = addslashes($doctype); > > if( !isset($autoapp) ) $autoapp = 0; > if( !isset($autotree) ) $autotree = 0; > if( !isset($ackemail) ) $ackemail = 0; > if( !isset($omitpwd) ) $omitpwd = 1; > if( !isset($maint) ) $maint = ""; > if( !isset($saveconfig) ) $saveconfig = ""; > > require("adminlog.php"); > > $fp = @fopen( $subroot . "config.php", "w",1 ); > if( !$fp ) { die ( $admtext['cannotopen'] . " config.php" ); } > > flock( $fp, LOCK_EX ); > > if($new_database_username) > $tng_notinstalled = ""; > > fwrite( $fp, " fwrite( $fp, "\$database_host = \"$new_database_host\";\n" ); > fwrite( $fp, "\$database_name = \"$new_database_name\";\n" ); > fwrite( $fp, "\$database_username = \"$new_database_username\";\n" ); > fwrite( $fp, "\$database_password = '$new_database_password';\n" ); > fwrite( $fp, "\$database_port = \"$new_database_port\";\n" ); > fwrite( $fp, "\$database_socket = \"$new_database_socket\";\n" ); > fwrite( $fp, "\$tngconfig['maint'] = \"$maint\";\n" ); > fwrite( $fp, "\n" ); > fwrite( $fp, "\$people_table = \"$people_table\";\n" ); > fwrite( $fp, "\$families_table = \"$families_table\";\n" ); > fwrite( $fp, "\$children_table = \"$children_table\";\n" ); > fwrite( $fp, "\$albums_table = \"$albums_table\";\n" ); > fwrite( $fp, "\$album2entities_table = \"$album2entities_table\";\n" ); > fwrite( $fp, "\$albumlinks_table = \"$albumlinks_table\";\n" ); > fwrite( $fp, "\$media_table = \"$media_table\";\n" ); > fwrite( $fp, "\$medialinks_table = \"$medialinks_table\";\n" ); > fwrite( $fp, "\$mediatypes_table = \"$mediatypes_table\";\n" ); > fwrite( $fp, "\$address_table = \"$address_table\";\n" ); > fwrite( $fp, "\$languages_table = \"$languages_table\";\n" ); > fwrite( $fp, "\$cemeteries_table = \"$cemeteries_table\";\n" ); > > //These next 6 tables are obsolete in v6, but are kept here in case anyone is still using them > fwrite( $fp, "\$headstones_table = \"$headstones_table\";\n" ); > fwrite( $fp, "\$hslinks_table = \"$hslinks_table\";\n" ); > fwrite( $fp, "\$photos_table = \"$photos_table\";\n" ); > fwrite( $fp, "\$photolinks_table = \"$photolinks_table\";\n" ); > fwrite( $fp, "\$histories_table = \"$histories_table\";\n" ); > fwrite( $fp, "\$doclinks_table = \"$doclinks_table\";\n" ); > > fwrite( $fp, "\$states_table = \"$states_table\";\n" ); > fwrite( $fp, "\$countries_table = \"$countries_table\";\n" ); > fwrite( $fp, "\$places_table = \"$places_table\";\n" ); > fwrite( $fp, "\$sources_table = \"$sources_table\";\n" ); > fwrite( $fp, "\$image_tags_table = \"$image_tags_table\";\n" ); > fwrite( $fp, "\$repositories_table = \"$repositories_table\";\n" ); > fwrite( $fp, "\$citations_table = \"$citations_table\";\n" ); > fwrite( $fp, "\$events_table = \"$events_table\";\n" ); > fwrite( $fp, "\$eventtypes_table = \"$eventtypes_table\";\n" ); > fwrite( $fp, "\$reports_table = \"$reports_table\";\n" ); > fwrite( $fp, "\$trees_table = \"$trees_table\";\n" ); > fwrite( $fp, "\$notelinks_table = \"$notelinks_table\";\n" ); > fwrite( $fp, "\$xnotes_table = \"$xnotes_table\";\n" ); > fwrite( $fp, "\$saveimport_table = \"$saveimport_table\";\n" ); > fwrite( $fp, "\$users_table = \"$users_table\";\n" ); > fwrite( $fp, "\$temp_events_table = \"$temp_events_table\";\n" ); > fwrite( $fp, "\$tlevents_table = \"$tlevents_table\";\n" ); > fwrite( $fp, "\$branches_table = \"$branches_table\";\n" ); > fwrite( $fp, "\$branchlinks_table = \"$branchlinks_table\";\n" ); > fwrite( $fp, "\$assoc_table = \"$assoc_table\";\n" ); > fwrite( $fp, "\$mostwanted_table = \"$mostwanted_table\";\n" ); > //fwrite( $fp, "\$mhrequests_table = \"$mhrequests_table\";\n" ); > fwrite( $fp, "\$dna_tests_table = \"$dna_tests_table\";\n" ); > fwrite( $fp, "\$dna_links_table = \"$dna_links_table\";\n" ); > fwrite( $fp, "\$dna_groups_table = \"$dna_groups_table\";\n" ); > fwrite( $fp, "\$templates_table = \"$templates_table\";\n" ); > fwrite( $fp, "\n" ); > if($saved_rootpath != $newrootpath) > $_SESSION['session_rp'] = $newrootpath; > fwrite( $fp, "\$rootpath = \"$newrootpath\";\n" ); > fwrite( $fp, "\$templatenum = \"$templatenum\";\n" ); > fwrite( $fp, "\$templateswitching = \"$templateswitching\";\n" ); > fwrite( $fp, "\$homepage = \"$homepage\";\n" ); > fwrite( $fp, "\$tngdomain = \"$tngdomain\";\n" ); > fwrite( $fp, "\$sitename = \"$sitename\";\n" ); > fwrite( $fp, "\$site_desc = \"$site_desc\";\n" ); > fwrite( $fp, "\$tngconfig['doctype'] = \"$doctype\";\n" ); > fwrite( $fp, "\$language = \"$language\";\n" ); > fwrite( $fp, "\$charset = \"$charset\";\n" ); > fwrite( $fp, "\$norels = \"$norels\";\n" ); > fwrite( $fp, "\$maxsearchresults = \"$maxsearchresults\";\n" ); > $lineending = addslashes($lineending); > fwrite( $fp, "\$lineendingdisplay = \"$lineending\";\n" ); > fwrite( $fp, "\$lineending = \"" . stripslashes($lineending) . "\";\n" ); > fwrite( $fp, "\$mediapath = \"$mediapath\";\n" ); > fwrite( $fp, "\$headstonepath = \"$headstonepath\";\n" ); > fwrite( $fp, "\$historypath = \"$historypath\";\n" ); > fwrite( $fp, "\$documentpath = \"$documentpath\";\n" ); > fwrite( $fp, "\$photopath = \"$photopath\";\n" ); > fwrite( $fp, "\$photosext = \"$photosext\";\n" ); > fwrite( $fp, "\$modspath = \"$modspath\";\n" ); > fwrite( $fp, "\$extspath = \"$extspath\";\n" ); > fwrite( $fp, "\$gendexfile = \"$gendexfile\";\n" ); > fwrite( $fp, "\$backuppath = \"$backuppath\";\n" ); > fwrite( $fp, "\$tngconfig['saveconfig'] = \"$saveconfig\";\n" ); > fwrite( $fp, "\$showextended = \"$showextended\";\n" ); > fwrite( $fp, "\$tngconfig['imgmaxh'] = \"$imgmaxh\";\n" ); > fwrite( $fp, "\$tngconfig['imgmaxw'] = \"$imgmaxw\";\n" ); > fwrite( $fp, "\$thumbprefix = \"$thumbprefix\";\n" ); > fwrite( $fp, "\$thumbsuffix = \"$thumbsuffix\";\n" ); > fwrite( $fp, "\$thumbmaxh = \"$thumbmaxh\";\n" ); > fwrite( $fp, "\$thumbmaxw = \"$thumbmaxw\";\n" ); > fwrite( $fp, "\$tngconfig['usedefthumbs'] = \"$tng_usedefthumbs\";\n" ); > fwrite( $fp, "\$tngconfig['maxnoteprev'] = \"$tng_maxnoteprev\";\n" ); > fwrite( $fp, "\$tngconfig['ssdisabled'] = \"$tng_ssdisabled\";\n" ); > fwrite( $fp, "\$tngconfig['ssrepeat'] = \"$tng_ssrepeat\";\n" ); > fwrite( $fp, "\$tngconfig['imgviewer'] = \"$tng_imgviewer\";\n" ); > fwrite( $fp, "\$tngconfig['imgvheight'] = \"$tng_imgvheight\";\n" ); > fwrite( $fp, "\$tngconfig['hidemedia'] = \"$hidemedia\";\n" ); > fwrite( $fp, "\$tngconfig['favicon'] = \"$favicon\";\n" ); > fwrite( $fp, "\$customheader = \"$customheader\";\n" ); > fwrite( $fp, "\$customfooter = \"$customfooter\";\n" ); > fwrite( $fp, "\$custommeta = \"$custommeta\";\n" ); > fwrite( $fp, "\$tngconfig['menu'] = \"$tng_menu\";\n" ); > fwrite( $fp, "\$tngconfig['istart'] = \"$tng_istart\";\n" ); > fwrite( $fp, "\$tngconfig['showhome'] = \"$showhome\";\n" ); > fwrite( $fp, "\$tngconfig['showsearch'] = \"$showsearch\";\n" ); > fwrite( $fp, "\$tngconfig['searchchoice'] = \"$searchchoice\";\n" ); > fwrite( $fp, "\$tngconfig['showlogin'] = \"$showlogin\";\n" ); > fwrite( $fp, "\$tngconfig['showshare'] = \"$showshare\";\n" ); > fwrite( $fp, "\$tngconfig['showprint'] = \"$showprint\";\n" ); > fwrite( $fp, "\$tngconfig['showbmarks'] = \"$showbmarks\";\n" ); > fwrite( $fp, "\$tngconfig['hidechr'] = \"$hidechr\";\n" ); > fwrite( $fp, "\$tngconfig['altbirth'] = \"$altbirth\";\n" ); > fwrite( $fp, "\$tngconfig['hidedna'] = \"$hidedna\";\n" ); > fwrite( $fp, "\$tngconfig['password_type'] = \"$password_type\";\n" ); > fwrite( $fp, "\$tngconfig['places1tree'] = \"$places1tree\";\n" ); > fwrite( $fp, "\$tngconfig['autogeo'] = \"$autogeo\";\n" ); > > fwrite( $fp, "\$dbowner = \"$dbowner\";\n" ); > fwrite( $fp, "\$time_offset = \"$time_offset\";\n" ); > fwrite( $fp, "\$tngconfig['edit_timeout'] = \"$edit_timeout\";\n" ); > fwrite( $fp, "\$requirelogin = \"$requirelogin\";\n" ); > fwrite( $fp, "\$treerestrict = \"$treerestrict\";\n" ); > fwrite( $fp, "\$livedefault = \"$livedefault\";\n" ); > fwrite( $fp, "\$ldsdefault = \"$ldsdefault\";\n" ); > fwrite( $fp, "\$chooselang = \"$chooselang\";\n" ); > if(!$chooselang) { > $session_language = $_SESSION['session_language'] = $language; > $session_charset = $_SESSION['session_charset'] = $charset; > setcookie("tnglangfolder", $language, time()+31536000, "/"); > setcookie("tngcharset", $charset, time()+31536000, "/"); > } > fwrite( $fp, "\$nonames = \"$nonames\";\n" ); > fwrite( $fp, "\$tngconfig['nnpriv'] = \"$nnpriv\";\n" ); > fwrite( $fp, "\$notestogether = \"$notestogether\";\n" ); > fwrite( $fp, "\$tngconfig['scrollcite'] = \"$scrollcite\";\n" ); > fwrite( $fp, "\$tngconfig['scrollnotes'] = \"$scrollnotes\";\n" ); > fwrite( $fp, "\$nameorder = \"$nameorder\";\n" ); > fwrite( $fp, "\$tngconfig['ucsurnames'] = \"$ucsurnames\";\n" ); > fwrite( $fp, "\$lnprefixes = \"$lnprefixes\";\n" ); > fwrite( $fp, "\$lnpfxnum = \"$lnpfxnum\";\n" ); > fwrite( $fp, "\$specpfx = \"" . stripslashes( $specpfx ) . "\";\n" ); > > fwrite( $fp, "\$tngconfig['cemrows'] = \"$cemrows\";\n" ); > fwrite( $fp, "\$tngconfig['cemblanks'] = \"$cemblanks\";\n" ); > > fwrite( $fp, "\$emailaddr = \"$emailaddr\";\n" ); > fwrite( $fp, "\$tngconfig['fromadmin'] = \"$fromadmin\";\n" ); > fwrite( $fp, "\$tngconfig['disallowreg'] = \"$disallowreg\";\n" ); > fwrite( $fp, "\$tngconfig['revmail'] = \"$revmail\";\n" ); > fwrite( $fp, "\$tngconfig['autoapp'] = \"$autoapp\";\n" ); > fwrite( $fp, "\$tngconfig['autotree'] = \"$autotree\";\n" ); > fwrite( $fp, "\$tngconfig['ackemail'] = \"$ackemail\";\n" ); > fwrite( $fp, "\$tngconfig['omitpwd'] = \"$omitpwd\";\n" ); > fwrite( $fp, "\$tngconfig['usesmtp'] = \"$usesmtp\";\n" ); > fwrite( $fp, "\$tngconfig['mailhost'] = \"$mailhost\";\n" ); > fwrite( $fp, "\$tngconfig['mailuser'] = \"$mailuser\";\n" ); > fwrite( $fp, "\$tngconfig['mailpass'] = \"$mailpass\";\n" ); > fwrite( $fp, "\$tngconfig['mailport'] = \"$mailport\";\n" ); > fwrite( $fp, "\$tngconfig['mailenc'] = \"$mailenc\";\n" ); > > fwrite( $fp, "\$maxgedcom = \"$maxgedcom\";\n" ); > fwrite( $fp, "\$change_cutoff = \"$change_cutoff\";\n" ); > fwrite( $fp, "\$change_limit = \"$change_limit\";\n" ); > fwrite( $fp, "\$tngconfig['preferEuro'] = \"$prefereuro\";\n" ); > fwrite( $fp, "\$tngconfig['calstart'] = \"$calstart\";\n" ); > fwrite( $fp, "\$tngconfig['pardata'] = \"$pardata\";\n" ); > fwrite( $fp, "\$tngconfig['oldids'] = \"$oldids\";\n" ); > fwrite( $fp, "\$tngconfig['lastimport'] = \"$lastimport\";\n" ); > fwrite( $fp, "\$defaulttree = \"$defaulttree\";\n" ); > fwrite( $fp, "\$tngconfig['sortbydate'] = \"$sortbydate\";\n" ); > fwrite( $fp, "\$tngconfig['personprefix'] = \"$pprefix\";\n" ); > fwrite( $fp, "\$tngconfig['personsuffix'] = \"$psuffix\";\n" ); > fwrite( $fp, "\$tngconfig['familyprefix'] = \"$fprefix\";\n" ); > fwrite( $fp, "\$tngconfig['familysuffix'] = \"$fsuffix\";\n" ); > fwrite( $fp, "\$tngconfig['sourceprefix'] = \"$sprefix\";\n" ); > fwrite( $fp, "\$tngconfig['sourcesuffix'] = \"$ssuffix\";\n" ); > fwrite( $fp, "\$tngconfig['repoprefix'] = \"$rprefix\";\n" ); > fwrite( $fp, "\$tngconfig['reposuffix'] = \"$rsuffix\";\n" ); > fwrite( $fp, "\$tngconfig['noteprefix'] = \"$nprefix\";\n" ); > fwrite( $fp, "\$tngconfig['notesuffix'] = \"$nsuffix\";\n" ); > fwrite( $fp, "\$responsivetables = \"$responsivetables\";\n" ); > fwrite( $fp, "\$tabletype = \"$tabletype\";\n" ); > fwrite( $fp, "\$enablemodeswitch = \"$enablemodeswitch\";\n" ); > fwrite( $fp, "\$enableminimap = \"$enableminimap\";\n" ); > fwrite( $fp, "\$tngconfig['hidetasks'] = \"$hidetasks\";\n" ); > fwrite( $fp, "\$tngconfig['hidetotals'] = \"$hidetotals\";\n" ); > fwrite( $fp, "\$tngconfig['backupdays'] = \"$backupdays\";\n" ); > fwrite( $fp, "\$tngconfig['offline'] = \"$tng_offline\";\n" ); > //fwrite( $fp, "\$tngconfig['webmatches'] = \"$webmatches\";\n" ); > //fwrite( $fp, "\$tngconfig['mhmatchtype'] = \"$mhmatchtype\";\n" ); > //fwrite( $fp, "\$tngconfig['mhmatchconf'] = \"$mhmatchconf\";\n" ); > fwrite( $fp, "\$tngconfig['cookieapproval'] = \"$tng_cookieapproval\";\n" ); > fwrite( $fp, "\$tngconfig['dataprotect'] = \"$tng_dataprotect\";\n" ); > fwrite( $fp, "\$tngconfig['askconsent'] = \"$tng_askconsent\";\n" ); > fwrite( $fp, "\$tngconfig['livingunchecked'] = \"$tng_livingunchecked\";\n" ); > fwrite( $fp, "\$tngconfig['nosuggest'] = \"$tng_nosuggest\";\n" ); > fwrite( $fp, "\$tngconfig['allowcsv'] = \"$tng_allowcsv\";\n" ); > fwrite( $fp, "\$tngconfig['sitekey'] = \"$rcsitekey\";\n" ); > fwrite( $fp, "\$tngconfig['secret'] = \"$rcsecret\";\n" ); > fwrite( $fp, "\$tngconfig['mediadel'] = \"$tng_mediadel\";\n" ); > fwrite( $fp, "\$tngconfig['mediathumbs'] = \"$tng_mediathumbs\";\n" ); > fwrite( $fp, "\$tngconfig['mediatrees'] = \"$tng_mediatrees\";\n" ); > fwrite( $fp, "\$tngconfig['footermsg'] = \"$tng_footermsg\";\n" ); > > fwrite( $fp, "\$maxdnasearchresults = \"$maxdnasearchresults\";\n" ); > fwrite( $fp, "\$showtestnumbers = \"$showtestnumbers\";\n" ); > fwrite( $fp, "\$autofillancsurnames = \"$autofillancsurnames\";\n" ); > fwrite( $fp, "\$numgens = \"$numgens\";\n" ); > fwrite( $fp, "\$ancsurnameupper = \"$ancsurnameupper\";\n" ); > fwrite( $fp, "\$surnameexcl = \"" . stripslashes( $surnameexcl ) . "\";\n" ); > fwrite( $fp, "\$bgmain = \"" . stripslashes( $bgmain ) . "\";\n" ); > fwrite( $fp, "\$txtmain = \"" . stripslashes( $txtmain ) . "\";\n" ); > fwrite( $fp, "\$bgmode = \"" . stripslashes( $bgmode ) . "\";\n" ); > fwrite( $fp, "\$txtmode = \"" . stripslashes( $txtmode ) . "\";\n" ); > fwrite( $fp, "\$bgfastmut = \"" . stripslashes( $bgfastmut ) . "\";\n" ); > fwrite( $fp, "\$txtfastmut = \"" . stripslashes( $txtfastmut ) . "\";\n" ); > fwrite( $fp, "\$bg1_12 = \"" . stripslashes( $bg1_12 ) . "\";\n" ); > fwrite( $fp, "\$txt1_12 = \"" . stripslashes( $txt1_12 ) . "\";\n" ); > fwrite( $fp, "\$bg13_25 = \"" . stripslashes( $bg13_25 ) . "\";\n" ); > fwrite( $fp, "\$txt13_25 = \"" . stripslashes( $txt13_25 ) . "\";\n" ); > fwrite( $fp, "\$bg26_37 = \"" . stripslashes( $bg26_37 ) . "\";\n" ); > fwrite( $fp, "\$txt26_37 = \"" . stripslashes( $txt26_37 ) . "\";\n" ); > fwrite( $fp, "\$bg38_67 = \"" . stripslashes( $bg38_67 ) . "\";\n" ); > fwrite( $fp, "\$txt38_67 = \"" . stripslashes( $txt38_67 ) . "\";\n" ); > fwrite( $fp, "\$bg111 = \"" . stripslashes( $bg111 ) . "\";\n" ); > fwrite( $fp, "\$txt111 = \"" . stripslashes( $txt111 ) . "\";\n" ); > > fwrite( $fp, "\$tng_notinstalled = \"$tng_notinstalled\";\n" ); > fwrite( $fp, "\n" ); > fwrite( $fp, "if(!isset(\$cms['auto'])) {\n" ); > fwrite( $fp, " \$cms['support'] = \"$cmssupport\";\n" ); > fwrite( $fp, " \$cms['url'] = \"$cmsurl\";\n" ); > fwrite( $fp, " if(!isset(\$cms['tngpath']))\n" ); > fwrite( $fp, " \$cms['tngpath'] = \"$cmstngpath\";\n" ); > fwrite( $fp, " \$cms['module'] = \"$cmsmodule\";\n" ); > fwrite( $fp, " \$cms['cloaklogin'] = \"$cmscloaklogin\";\n" ); > fwrite( $fp, " \$cms['credits'] = \"$cmscredits\";\n" ); > if(empty($adminurl)) $adminurl = ""; > fwrite( $fp, " \$cms['adminurl'] = \"$adminurl\";\n" ); > fwrite( $fp, "}\n" ); > fwrite( $fp, "\n" ); > fwrite( $fp, "@include(\$subroot . \"customconfig.php\");\n" ); > fwrite( $fp, "?>" ); > > flock( $fp, LOCK_UN ); > fclose( $fp ); > > $fp = @fopen( "subroot.php", "w",1 ); > if( $fp ) { > flock( $fp, LOCK_EX ); > fwrite( $fp, " fwrite( $fp, "error_reporting(E_ERROR);\n" ); > fwrite( $fp, "\$tngconfig = array();\n" ); > fwrite( $fp, "\$tngconfig['subroot'] = \"$newsubroot\";\n" ); > fwrite( $fp, "\$subroot = \$tngconfig['subroot'] ? \$tngconfig['subroot'] : \"\";\n" ); > fwrite( $fp, "?>" ); > flock( $fp, LOCK_UN ); > fclose( $fp ); > } > adminwritelog( $admtext['modifysettings'] ); > > $oldsubroot = $newsubroot != $subroot ? "?sr=$subroot" : ""; > if( !empty($submitx) ) { > header( "Location: admin_genconfig.php" ); > } > else { > header( "Location: admin_setup.php$oldsubroot" ); > } diff -r TNG/admin_update_dna_groups.php TNG1403/admin_update_dna_groups.php 4c4 < //$textpart = "dna"; --- > $textpart = "dna"; 18,20c18,19 < if (get_magic_quotes_gpc() == 0) { < $dna_group = addslashes($dna_group); < } --- > $dna_group = addslashes($dna_group); > $description = addslashes($description); 22c21 < $query = "UPDATE $dna_groups_table SET description = \"$description\" WHERE dna_group=\"$dna_group\""; --- > $query = "UPDATE $dna_groups_table SET description = \"$description\", test_type = \"$test_type\" WHERE dna_group=\"$dna_group\""; 28c27 < adminwritelog( "{$admtext['modifydna']}: $testID" ); --- > adminwritelog( "{$admtext['modifydnagroup']}: $dna_group" ); 30,47c29,30 < if( $newtest == "return" ) < header( "Location: admin_edit_dna_group.php?testID=$testID&cw=$cw" ); < else if( $newtest == "close" ) { < ?> < < < < < < < $message = $admtext['changestogroup'] . " $dna_group {$admtext['succsaved']}."; > header( "Location: admin_dna_groups.php?message=" . urlencode($message) ); diff -r TNG/admin_update_dna_test.php TNG1403/admin_update_dna_test.php 19,44c19,43 < if (get_magic_quotes_gpc() == 0) { < $test_number = addslashes($test_number); < $notes = addslashes($notes); < $vendor = addslashes($vendor); < $y_results = addslashes($y_results); < $hvr1_results = addslashes($hvr1_results); < $hvr2_results = addslashes($hvr2_results); < $person_name = addslashes($person_name); < $dna_group = addslashes($dna_group); < //$dna_group_desc = addslashes($group); < $surnames = addslashes($surnames); < $MD_ancestorID = addslashes($MD_ancestorID); < $MRC_ancestorID = addslashes($MRC_ancestorID); < $ref_seq = addslashes($ref_seq); < $xtra_mut = addslashes($xtra_mut); < $coding_reg = str_replace(', ',',',$coding_reg); < $coding_reg = str_replace(',',', ',$coding_reg); < $coding_reg = addslashes($coding_reg); < $admin_notes = addslashes($admin_notes); < $personID = addslashes($personID); < $urls = addslashes($urls); < $markers = addslashes($markers); < $haplogroup = addslashes($haplogroup); < $signsnp = addslashes($signsnp); < $termsnp = addslashes($termsnp); < } --- > $test_number = addslashes($test_number); > $notes = addslashes($notes); > $vendor = addslashes($vendor); > $y_results = isset($y_results) ? addslashes($y_results) : ""; > $hvr1_results = isset($hvr1_results) ? addslashes($hvr1_results) : ""; > $hvr2_results = isset($hvr2_results) ? addslashes($hvr2_results) : ""; > $person_name = addslashes($person_name); > $dna_group = addslashes($dna_group); > //$dna_group_desc = addslashes($group); > $surnames = addslashes($surnames); > $MD_ancestorID = addslashes($MD_ancestorID); > $MRC_ancestorID = addslashes($MRC_ancestorID); > $ref_seq = isset($ref_seq) ? addslashes($ref_seq) : ""; > $xtra_mut = isset($xtra_mut) ? addslashes($xtra_mut) : ""; > $coding_reg = isset($coding_reg) ? str_replace(', ',',',$coding_reg) : ""; > $coding_reg = str_replace(',',', ',$coding_reg); > $coding_reg = addslashes($coding_reg); > $admin_notes = addslashes($admin_notes); > $personID = addslashes($personID); > $urls = addslashes($urls); > $markers = isset($markers) ? addslashes($markers) : ""; > $haplogroup = isset($haplogroup) ? addslashes($haplogroup) : ""; > $signsnp = isset($signsnp) ? addslashes($signsnp) : ""; > $termsnp = isset($termsnp) ? addslashes($termsnp) : ""; > $medialinks = isset($medialinks) ? addslashes($medialinks) : ""; 50,51c49,71 < $dna_group_desc = $dna_group ? $descrow['description'] : ""; < --- > $dna_group_desc = $dna_group ? addslashes($descrow['description']) : ""; > $mtdna_confirmed = !empty($mtdna_confirmed) ? $mtdna_confirmed : ""; > $ydna_confirmed = !empty($ydna_confirmed) ? $ydna_confirmed : ""; > $markeropt = !empty($markeropt) ? $markeropt : ""; > $notesopt = !empty($notesopt) ? $notesopt : ""; > $linksopt = !empty($linksopt) ? $linksopt : ""; > $surnamesopt = !empty($surnamesopt) ? $surnamesopt : ""; > $private_dna = !empty($private_dna) ? $private_dna : ""; > $mtdna_haplogroup = !empty($mtdna_haplogroup) ? addslashes($mtdna_haplogroup) : ""; > $ydna_haplogroup = !empty($ydna_haplogroup) ? addslashes($ydna_haplogroup) : ""; > $shared_cMs = !empty($shared_cMs) ? addslashes($shared_cMs) : ""; > $shared_segments = !empty($shared_segments) ? addslashes($shared_segments) : ""; > $chromosome = !empty($chromosome) ? addslashes($chromosome) : ""; > $segment_start = !empty($segment_start) ? addslashes($segment_start) : ""; > $segment_end = !empty($segment_end) ? addslashes($segment_end) : ""; > $centiMorgans = !empty($centiMorgans) ? addslashes($centiMorgans) : ""; > $matching_SNPs = !empty($matching_SNPs) ? addslashes($matching_SNPs) : ""; > $x_match = !empty($x_match) ? $x_match : ""; > $relationship_range = !empty($relationship_range) ? addslashes($relationship_range) : ""; > $suggested_relationship = !empty($suggested_relationship) ? addslashes($suggested_relationship) : ""; > $actual_relationship = !empty($actual_relationship) ? addslashes($actual_relationship) : ""; > $related_side = !empty($related_side) ? addslashes($related_side) : ""; > $GEDmatchID = !empty($GEDmatchID) ? addslashes($GEDmatchID) : ""; 53a74 > $match_date = convertDate( $match_date ); 57,62c78,83 < $query = "UPDATE $dna_tests_table SET test_type=\"$test_type\", test_number=\"$test_number\", notes=\"$notes\", vendor=\"$vendor\", test_date=\"$test_date\", personID=\"$personID\", < gedcom=\"$mynewgedcom\", urls=\"$urls\", markers=\"$markers\", y_results=\"$y_results\", hvr1_results=\"$hvr1_results\", hvr2_results=\"$hvr2_results\", person_name = \"$person_name\", < confirmed = \"$confirmed\", markeropt = \"$markeropt\", notesopt = \"$notesopt\", linksopt = \"$linksopt\", surnamesopt = \"$surnamesopt\", private_dna = \"$private_dna\", < dna_group = \"$dna_group\", dna_group_desc = \"$dna_group_desc\", surnames = \"$surnames\", MD_ancestorID = \"$MD_ancestorID\", MRC_ancestorID = \"$MRC_ancestorID\", < admin_notes = \"$admin_notes\", medialinks = \"$medialinks\", ref_seq = \"$ref_seq\", xtra_mut = \"$xtra_mut\", coding_reg = \"$coding_reg\", haplogroup=\"$haplogroup\", < significant_snp=\"$signsnp\", terminal_snp=\"$termsnp\" --- > $query = "UPDATE $dna_tests_table SET test_type=\"$test_type\", test_number=\"$test_number\", notes=\"$notes\", vendor=\"$vendor\", test_date=\"$test_date\", match_date=\"$match_date\",personID=\"$personID\", > gedcom=\"$mynewgedcom\", urls=\"$urls\", markers=\"$markers\", y_results=\"$y_results\", hvr1_results=\"$hvr1_results\", hvr2_results=\"$hvr2_results\", person_name = \"$person_name\", > mtdna_confirmed = \"$mtdna_confirmed\", ydna_confirmed = \"$ydna_confirmed\", markeropt = \"$markeropt\", notesopt = \"$notesopt\", linksopt = \"$linksopt\", surnamesopt = \"$surnamesopt\", private_dna = \"$private_dna\", private_test = \"$private_test\", > dna_group = \"$dna_group\", dna_group_desc = \"$dna_group_desc\", surnames = \"$surnames\", MD_ancestorID = \"$MD_ancestorID\", MRC_ancestorID = \"$MRC_ancestorID\", > admin_notes = \"$admin_notes\", medialinks = \"$medialinks\", ref_seq = \"$ref_seq\", xtra_mut = \"$xtra_mut\", coding_reg = \"$coding_reg\", mtdna_haplogroup=\"$mtdna_haplogroup\", ydna_haplogroup=\"$ydna_haplogroup\", significant_snp=\"$signsnp\", terminal_snp=\"$termsnp\", shared_cMs = \"$shared_cMs\", shared_segments = \"$shared_segments\", chromosome = \"$chromosome\", segment_start = \"$segment_start\", segment_end = \"$segment_end\", centiMorgans = \"$centiMorgans\", matching_SNPs = \"$matching_SNPs\", x_match = \"$x_match\", relationship_range = \"$relationship_range\", suggested_relationship = \"$suggested_relationship\", actual_relationship = \"$actual_relationship\", related_side = \"$related_side\", GEDmatchID = \"$GEDmatchID\" > 76c97 < if( $newtest == "return" ) --- > if( isset($_POST['savestay']) ) 78c99 < else if( $newtest == "close" ) { --- > else if( isset($_POST['saveclose']) ) { diff -r TNG/admin_updateevent.php TNG1403/admin_updateevent.php 7a8 > $admin_login = 1; 33,49c34,48 < if (get_magic_quotes_gpc() == 0) { < $eventdate = addslashes($eventdate); < $eventplace = addslashes($eventplace); < $info = addslashes($info); < $age = addslashes($age); < $agency = addslashes($agency); < $cause = addslashes($cause); < $address1 = addslashes($address1); < $address2 = addslashes($address2); < $city = addslashes($city); < $state = addslashes($state); < $zip = addslashes($zip); < $country = addslashes($country); < $phone = addslashes($phone); < $email = addslashes($email); < $www = addslashes($www); < } --- > $eventdate = addslashes($eventdate); > $eventplace = addslashes($eventplace); > $info = addslashes($info); > $age = addslashes($age); > $agency = addslashes($agency); > $cause = addslashes($cause); > $address1 = addslashes($address1); > $address2 = addslashes($address2); > $city = addslashes($city); > $state = addslashes($state); > $zip = addslashes($zip); > $country = addslashes($country); > $phone = addslashes($phone); > $email = addslashes($email); > $www = addslashes($www); 81c80,88 < $query = "INSERT INTO $events_table (eventtypeID, persfamID, eventdate, eventdatetr, eventplace, age, agency, cause, addressID, info, gedcom, parenttag) VALUES(\"{$row['eventtypeID']}\", \"$id\", \"$eventdate\", \"$eventdatetr\", \"$eventplace\", \"$age\", \"$agency\", \"$cause\", \"{$row['addressID']}\", \"$info\", \"$tree\", \"\")"; --- > $query = "INSERT INTO $events_table (eventtypeID, persfamID, eventdate, eventdatetr, eventplace, age, agency, cause, addressID, info, gedcom, parenttag) > SELECT \"{$row['eventtypeID']}\", \"$id\", \"$eventdate\", \"$eventdatetr\", \"$eventplace\", \"$age\", \"$agency\", \"$cause\", \"{$row['addressID']}\", \"$info\", \"$tree\", \"\" > FROM DUAL > WHERE exists (select 'x' from $people_table where personid = \"$id\") > OR > exists (select 'x' from $families_table where familyid = \"$id\") > OR > exists (select 'x' from $sources_table where sourceid = \"$id\") > "; 84,101c91,92 < < //do citations < $query = "SELECT * FROM $citations_table WHERE eventID = \"$eventID\""; < $result = tng_query($query); < while($crow = tng_fetch_assoc($result)) { < $iquery = "INSERT INTO $citations_table (gedcom, persfamID, eventID, sourceID, ordernum, description, citedate, citedatetr, citetext, page, quay, note) VALUES(\"{$crow['gedcom']}\",\"$id\",\"$newEventID\",\"{$crow['sourceID']}\",\"{$crow['ordernum']}\",\"{$crow['description']}\",\"{$crow['citedate']}\",\"{$crow['citedatetr']}\",\"{$crow['citetext']}\",\"{$crow['page']}\",\"{$crow['quay']}\",\"{$crow['note']}\")"; < $iresult = tng_query($iquery); < } < tng_free_result($result); < < //do notes < $query = "SELECT * FROM $notelinks_table WHERE eventID = \"$eventID\""; < $result = tng_query($query); < while($nrow = tng_fetch_assoc($result)) { < $iquery = "INSERT INTO $notelinks_table (persfamID, gedcom, xnoteID, eventID, ordernum, secret) VALUES(\"$id\",\"{$nrow['gedcom']}\",\"{$nrow['xnoteID']}\",\"$newEventID\",\"{$nrow['ordernum']}\",\"{$nrow['secret']}\")"; < $iresult = tng_query($iquery); < } < tng_free_result($result); --- > > if ($newEventID ){ 103,117c94,142 < //do media < $query = "SELECT * FROM $medialinks_table WHERE eventID = \"$eventID\""; < $result = tng_query($query); < while($mrow = tng_fetch_assoc($result)) { < $iquery = "INSERT INTO $medialinks_table (gedcom, linktype, personID, eventID, mediaID, altdescription, altnotes, ordernum, dontshow, defphoto) VALUES(\"{$mrow['gedcom']}\",\"{$mrow['linktype']}\",\"$id\",\"$newEventID\",\"{$mrow['mediaID']}\",\"{$mrow['altdescription']}\",\"{$mrow['altnotes']}\",\"{$mrow['ordernum']}\",\"{$mrow['dontshow']}\",\"{$mrow['defphoto']}\")"; < $iresult = tng_query($iquery); < } < tng_free_result($result); < < //do albums < $query = "SELECT * FROM $album2entities_table WHERE eventID = \"$eventID\""; < $result = tng_query($query); < while($arow = tng_fetch_assoc($result)) { < $iquery = "INSERT INTO $album2entities_table (gedcom, linktype, entityID, eventID, albumID, ordernum) VALUES(\"{$arow['gedcom']}\",\"{$arow['linktype']}\",\"$id\",\"$newEventID\",\"{$arow['albumID']}\",\"{$arow['ordernum']}\")"; < $iresult = tng_query($iquery); --- > //do citations > $query = "SELECT * FROM $citations_table WHERE eventID = \"$eventID\""; > $result = tng_query($query); > while($crow = tng_fetch_assoc($result)) { > $iquery = "INSERT INTO $citations_table (gedcom, persfamID, eventID, sourceID, ordernum, description, citedate, citedatetr, citetext, page, quay, note) VALUES(\"{$crow['gedcom']}\",\"$id\",\"$newEventID\",\"{$crow['sourceID']}\",\"{$crow['ordernum']}\",\"{$crow['description']}\",\"{$crow['citedate']}\",\"{$crow['citedatetr']}\",\"{$crow['citetext']}\",\"{$crow['page']}\",\"{$crow['quay']}\",\"{$crow['note']}\")"; > $iresult = tng_query($iquery); > } > tng_free_result($result); > > //do notes > $query = "SELECT * FROM $notelinks_table WHERE eventID = \"$eventID\""; > $result = tng_query($query); > while($nrow = tng_fetch_assoc($result)) { > $xquery = "INSERT INTO $xnotes_table (gedcom, note, noteID) SELECT gedcom, note, noteID from $xnotes_table where id = \"{$nrow['xnoteID']}\" "; > $xresult = tng_query($xquery); > $newNoteID = tng_insert_id(); > > $iquery = "INSERT INTO $notelinks_table (persfamID, gedcom, xnoteID, eventID, ordernum, secret) VALUES(\"$id\",\"{$nrow['gedcom']}\",\"$newNoteID\",\"$newEventID\",\"{$nrow['ordernum']}\",\"{$nrow['secret']}\")"; > $iresult = tng_query($iquery); > $newNoteID = tng_insert_id(); > > //do citations attached to this note > $icquery = "SELECT * FROM $citations_table WHERE gedcom = \"{$nrow['gedcom']}\" AND eventID = \"N{$nrow['ID']}\""; > $icresult = tng_query($icquery); > while($crow = tng_fetch_assoc($icresult)) { > $cquery = "INSERT INTO $citations_table (gedcom, persfamID, eventID, sourceID, ordernum, description, citedate, citedatetr, citetext, page, quay, note) VALUES(\"{$crow['gedcom']}\",\"$id\",\"N$newNoteID\",\"{$crow['sourceID']}\",\"{$crow['ordernum']}\",\"{$crow['description']}\",\"{$crow['citedate']}\",\"{$crow['citedatetr']}\",\"{$crow['citetext']}\",\"{$crow['page']}\",\"{$crow['quay']}\",\"{$crow['note']}\")"; > $cresult = tng_query($cquery); > } > tng_free_result($icresult); > } > tng_free_result($result); > > //do media > $query = "SELECT * FROM $medialinks_table WHERE eventID = \"$eventID\""; > $result = tng_query($query); > while($mrow = tng_fetch_assoc($result)) { > $iquery = "INSERT INTO $medialinks_table (gedcom, linktype, personID, eventID, mediaID, altdescription, altnotes, ordernum, dontshow, defphoto) VALUES(\"{$mrow['gedcom']}\",\"{$mrow['linktype']}\",\"$id\",\"$newEventID\",\"{$mrow['mediaID']}\",\"{$mrow['altdescription']}\",\"{$mrow['altnotes']}\",\"{$mrow['ordernum']}\",\"{$mrow['dontshow']}\",\"{$mrow['defphoto']}\")"; > $iresult = tng_query($iquery); > } > tng_free_result($result); > > //do albums > $query = "SELECT * FROM $album2entities_table WHERE eventID = \"$eventID\""; > $result = tng_query($query); > while($arow = tng_fetch_assoc($result)) { > $iquery = "INSERT INTO $album2entities_table (gedcom, linktype, entityID, eventID, albumID, ordernum) VALUES(\"{$arow['gedcom']}\",\"{$arow['linktype']}\",\"$id\",\"$newEventID\",\"{$arow['albumID']}\",\"{$arow['ordernum']}\")"; > $iresult = tng_query($iquery); > } > tng_free_result($result); 119d143 < tng_free_result($result); diff -r TNG/admin_updateeventtype.php TNG1403/admin_updateeventtype.php 19,23c19,22 < if (get_magic_quotes_gpc() == 0) { < $type = addslashes($type); < $tag2 = addslashes($tag2); < $defdisplay = addslashes($defdisplay); < } --- > $type = addslashes($type); > $tag2 = addslashes($tag2); > $defdisplay = addslashes($defdisplay); > 34,35c33,39 < $message = $admtext['changestoevtype'] . " $eventtypeID {$admtext['succsaved']}."; < header( "Location: admin_eventtypes.php?message=" . urlencode($message) ); --- > if( !empty($submitx) ) { > $message = $admtext['changestoevtype'] . " $eventtypeID {$admtext['succsaved']}."; > header( "Location: admin_eventtypes.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_editeventtype.php?eventtypeID=$eventtypeID" ); > } diff -r TNG/admin_updatefamily.php TNG1403/admin_updatefamily.php 7a8 > $admin_login = 1; 24a26 > if( !isset($newfamily) ) $newfamily = ""; 35,40c37,41 < if (get_magic_quotes_gpc() == 0) { < $marrplace = addslashes($marrplace); < $divplace = addslashes($divplace); < $sealplace = addslashes($sealplace); < $marrtype = addslashes($marrtype); < } --- > > $marrplace = addslashes($marrplace); > $divplace = addslashes($divplace); > $sealplace = addslashes($sealplace); > $marrtype = addslashes($marrtype); 66,67c67,68 < $familyliving = $living ? $living : 0; < if( !$private ) $private = 0; --- > $familyliving = isset($living) ? $living : 0; > if( empty($private) ) $private = 0; 70a72,73 > if( !isset($branch) ) > $branch = ""; 72a76 > if( !isset($allbranches) ) $allbranches = ""; 116c120,121 < adminwritelog( "{$admtext['modifyfamily']}: $tree/$familyID" ); --- > adminwritelog( "{$admtext['modifyfamily']}: $tree/$familyID" ); > $message = $admtext['changestofamily'] . " $familyID {$admtext['succsaved']}."; 122,127c127,132 < header( "Location: admin_newmedia.php?personID=$familyID&tree=$tree&linktype=F&cw=$cw" ); < elseif( $newfamily == "return" ) < header( "Location: admin_editfamily.php?familyID=$familyID&tree=$tree&cw=$cw" ); < //else if( $newfamily == "repeat" ) < // header( "Location: admin_findfamily.php?time=" . microtime() ); < else if( $newfamily == "close" ) { --- > header( "Location: admin_newmedia.php?personID=$familyID&tree=$tree&linktype=F&cw=$cw&ref=1" ); > elseif( isset($_POST['saveret']) ) > header( "Location: admin_families.php?message=" . urlencode($message) ); > elseif( isset($_POST['savestay']) ) > header( "Location: admin_editfamily.php?familyID=$familyID&tree=$tree&cw=$cw&ref=1" ); > elseif( isset($_POST['saveclose']) ) { 131c136 < --- > 133c138,140 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close(); > window.location.href = "admin_families.php?message="; 134a142,147 > > >

    A change in your browser's default behavior is preventing this window from closing.

    >

    To change this behavior in Firefox, type about:config in the browser address bar and press enter.

    >

    Then search for dom.allow_scripts_to_close_windows and change the value of that setting from False to True.

    >

    For all other browsers, please close this window or tab.

    141,144d153 < else { < $message = $admtext['changestofamily'] . " $familyID {$admtext['succsaved']}."; < header( "Location: admin_families.php?message=" . urlencode($message) ); < } diff -r TNG/admin_updateimportconfig.php TNG1403/admin_updateimportconfig.php 9c9 < header("Location: admin_main.php"); --- > header("Location: admin.php"); 13a14 > $admin_login = 1; 28,34c29,33 < if (get_magic_quotes_gpc() == 0) { < $localphotopathdisplay = addslashes( $localphotopathdisplay ); < $localhistorypathdisplay = addslashes( $localhistorypathdisplay ); < $localdocumentpathdisplay = addslashes( $localdocumentpathdisplay ); < $localotherpathdisplay = addslashes( $localotherpathdisplay ); < $localhspathdisplay = addslashes( $localhspathdisplay ); < } --- > $localphotopathdisplay = addslashes( $localphotopathdisplay ); > $localhistorypathdisplay = addslashes( $localhistorypathdisplay ); > $localdocumentpathdisplay = addslashes( $localdocumentpathdisplay ); > $localotherpathdisplay = addslashes( $localotherpathdisplay ); > $localhspathdisplay = addslashes( $localhspathdisplay ); 38a38,40 > if(!isset($saveimport)) $saveimport = ""; > if(!isset($assignnames)) $assignnames = ""; > if(!isset($saveconfig) ) $saveconfig = ""; 44c46,47 < fwrite( $fp, "\$saveimport = \"$saveimport\";\n" ); --- > fwrite( $fp, "\$tngimpcfg['saveconfig'] = \"$saveconfig\";\n" ); > fwrite( $fp, "\$saveimport = \"1\";\n" ); 54a58 > fwrite( $fp, "\$tngimpcfg['maxmarriedage'] = \"$maxmarriedage\";\n" ); 62c66,67 < fwrite( $fp, "?>\n" ); --- > fwrite( $fp, "\$tngimpcfg['coerce'] = \"$coerce\";\n" ); > fwrite( $fp, "?>" ); 69c74,79 < header( "Location: admin_setup.php" ); --- > if( !empty($submitx) ) { > header( "Location: admin_importconfig.php" ); > } > else { > header( "Location: admin_setup.php" ); > } diff -r TNG/admin_updatelanguage.php TNG1403/admin_updatelanguage.php 19,22c19,21 < if (get_magic_quotes_gpc() == 0) { < $display = addslashes($display); < $folder = addslashes($folder); < } --- > $display = addslashes($display); > $folder = addslashes($folder); > 26c25 < adminwritelog( "{$admtext['modifylanguage']}: $languageID" ); --- > adminwritelog( "{$admtext['modifylanguage']}: $languageID" ); 28,29c27,33 < $message = $admtext['changestolanguage'] . " $languageID {$admtext['succsaved']}."; < header( "Location: admin_languages.php?message=" . urlencode($message) ); --- > if( !empty($submitx) || !empty($message) ) { > $message = $admtext['changestolanguage'] . " $display {$admtext['succsaved']}."; > header( "Location: admin_languages.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_editlanguage.php?languageID=$languageID" ); > } diff -r TNG/admin_updatelogconfig.php TNG1403/admin_updatelogconfig.php 9c9 < header("Location: admin_main.php"); --- > header("Location: admin.php"); 29a30,32 > if( !isset($logsaveconfig) ) $logsaveconfig = ""; > $logfile = $logsaveconfig ? "\$subroot . \$logname" : "\$rootpath . \$logname"; > 34c37,38 < fwrite( $fp, "\$logfile = \$rootpath . \$logname;\n" ); --- > fwrite( $fp, "\$logfile = $logfile;\n" ); > fwrite( $fp, "\$logsaveconfig = \"$logsaveconfig\";\n" ); 42c46 < fwrite( $fp, "?>\n" ); --- > fwrite( $fp, "?>" ); 46a51,60 > $logfile = $logsaveconfig ? $subroot . $logname : $rootpath . $logname; > $fp = fopen( $logfile, "c" ); > if( !$fp ) { die ( "{$admtext['cannotopen']} $logname" ); } > fclose( $fp ); > > $adminlogfile = $logsaveconfig ? $subroot . $adminlogfile : $rootpath . $adminlogfile; > $fp = fopen( $adminlogfile, "c" ); > if( !$fp ) { die ( "{$admtext['cannotopen']} $adminlogfile" ); } > fclose( $fp ); > 49c63,68 < header( "Location: admin_setup.php" ); --- > if( !empty($submitx) ) { > header( "Location: admin_logconfig.php" ); > } > else { > header( "Location: admin_setup.php" ); > } diff -r TNG/admin_updatemapconfig.php TNG1403/admin_updatemapconfig.php 9c9 < header("Location: admin_main.php"); --- > header("Location: admin.php"); 55c55 < fwrite( $fp, "?>\n" ); --- > fwrite( $fp, "?>" ); 62c62,67 < header( "Location: admin_setup.php" ); --- > if( !empty($submitx) ) { > header( "Location: admin_mapconfig.php" ); > } > else { > header( "Location: admin_setup.php" ); > } diff -r TNG/admin_updatemedia.php TNG1403/admin_updatemedia.php 9a10 > include("geocodelib.php"); 46c47 < $treestr = $tngconfig['mediatrees'] ? $tree . "/" : ""; --- > $treestr = $tngconfig['mediatrees'] && $tree ? $tree . "/" : ""; 52,66c53,66 < if (get_magic_quotes_gpc() == 0) { < $description = addslashes($description); < $notes = addslashes($notes); < $datetaken = addslashes($datetaken); < $place = addslashes($place); < $owner = addslashes($owner); < $imagemap = addslashes($imagemap); < $bodytext = addslashes($bodytext); < $latitude = addslashes($latitude); < $longitude = addslashes($longitude); < $zoom = addslashes($zoom); < $width = addslashes($width); < $height = addslashes($height); < $plot = addslashes($plot); < } --- > $description = addslashes($description); > $notes = addslashes($notes); > $datetaken = addslashes($datetaken); > $place = addslashes($place); > $owner = addslashes($owner); > $imagemap = isset($imagemap) ? addslashes($imagemap) : ""; > $bodytext = addslashes($bodytext); > $latitude = addslashes($latitude); > $longitude = addslashes($longitude); > $zoom = isset($zoom) ? addslashes($zoom) : ""; > $width = addslashes($width); > $height = addslashes($height); > $plot = addslashes($plot); > 73c73 < $form = strtoupper( $fileparts['extension'] ); --- > $form = isset($fileparts['extension']) ? strtoupper( $fileparts['extension'] ) : ""; 76c76 < if( $abspath ) --- > if( !empty($abspath) ) 80c80 < if( !$showmap ) $showmap = "0"; --- > if( empty($showmap) ) $showmap = "0"; 82,83c82,84 < if( !$alwayson ) $alwayson = 0; < if( !$newwindow ) $newwindow = 0; --- > if( empty($alwayson) ) $alwayson = 0; > if( empty($newwindow) ) $newwindow = 0; > if( empty($private) ) $private = 0; 88c89 < if( !$linktocem ) $linktocem = 0; --- > if( empty($linktocem) ) $linktocem = 0; 91,107c92,101 < if( $usecollfolder && $mediatypeID != $mediatypeID_org ) { < $oldmediapath = $mediatypes_assoc[$mediatypeID_org] . $treestr; < $newmediapath = $mediatypes_assoc[$mediatypeID] . $treestr; < if( $path_org ) { < $oldpath = "$rootpath$oldmediapath/$path_org"; < $newpath = "$rootpath$newmediapath/$path"; < if( file_exists( $oldpath ) ) < @rename($oldpath, $newpath); < } < < if( $thumbpath_org ) { < $oldthumbpath = "$rootpath$oldmediapath/$thumbpath_org"; < $newthumbpath = "$rootpath$newmediapath/$thumbpath"; < if( file_exists( $oldthumbpath ) ) < @rename($oldthumbpath, $newthumbpath); < } < } --- > try { > if( $usecollfolder && $mediatypeID != $mediatypeID_org ) { > $oldmediapath = $mediatypes_assoc[$mediatypeID_org] . $treestr; > $newmediapath = $mediatypes_assoc[$mediatypeID] . $treestr; > if( $path_org ) { > $oldpath = "$rootpath$oldmediapath/$path_org"; > $newpath = "$rootpath$newmediapath/$path"; > if( file_exists( $oldpath ) ) > @rename($oldpath, $newpath); > } 109,123c103,108 < $mediakey = $path && $path != $path_org ? "$usefolder/$path" : $mediakey_org; < if(!$mediakey) $mediakey = time(); < < if( substr( $path, 0, 1 ) == "/" ) < $path = substr( $path, 1 ); < $newpath = "$rootpath$usefolder/$treestr$path"; < < if( $newfile && $newfile != "none" ) { < if( @move_uploaded_file($newfile, $newpath) ) < @chmod( $newpath, 0644 ); < else { < //improper permissions or folder doesn't exist (root path may be wrong) < $message = $admtext['notcopied'] . " $newpath {$admtext['improperpermissions']}."; < header( "Location: admin_media.php?message=" . urlencode($message) ); < exit; --- > if( $thumbpath_org && $thumbpath ) { > $oldthumbpath = "$rootpath$oldmediapath/$thumbpath_org"; > $newthumbpath = "$rootpath$newmediapath/$thumbpath"; > if( file_exists( $oldthumbpath ) ) > @rename($oldthumbpath, $newthumbpath); > } 125d109 < } 127,148c111,120 < if( function_exists( 'imageJpeg' ) && $thumbcreate == "auto" ) { < //$cleanpath = $session_charset == "UTF-8" ? utf8_decode($newpath) : $newpath; < //$cleannewthumbpath = $session_charset == "UTF-8" ? utf8_decode($newthumbpath) : $newthumbpath; < if( image_createThumb( $newpath, $newthumbpath, $thumbmaxw, $thumbmaxh, $thumbquality ) ) { < $destInfo = pathInfo( $newthumbpath ); < if( strtoupper( $destInfo['extension'] ) == "GIF") { < $thumbpath = substr_replace( $thumbpath, 'jpg', -3 ); < $newthumbpath = substr_replace( $newthumbpath, 'jpg', -3 ); < } < @chmod( $newthumbpath, 0644 ); < } < else { < //could not create thumbnail (size or type problem) or permissions (root path may be wrong) < $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improper2']}."; < header( "Location: admin_media.php?message=" . urlencode($message) ); < exit; < } < } < else { < if( $newthumb && $newthumb != "none" ) { < if( @move_uploaded_file($newthumb, $newthumbpath) ) < @chmod( $newthumbpath, 0644 ); --- > $mediakey = $path && $path != $path_org ? "$usefolder/$path" : $mediakey_org; > if(!$mediakey) $mediakey = time(); > > if( substr( $path, 0, 1 ) == "/" ) > $path = substr( $path, 1 ); > $newpath = "$rootpath$usefolder/$treestr$path"; > > if( $newfile && $newfile != "none" ) { > if( @move_uploaded_file($newfile, $newpath) ) > @chmod( $newpath, 0644 ); 151c123 < $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improperpermissions']}."; --- > $message = $admtext['notcopied'] . " $newpath {$admtext['improperpermissions']}."; 155a128,171 > > if($thumbpath) { > if( function_exists( 'imageJpeg' ) && $thumbcreate == "auto" ) { > //$cleanpath = $session_charset == "UTF-8" ? utf8_decode($newpath) : $newpath; > //$cleannewthumbpath = $session_charset == "UTF-8" ? utf8_decode($newthumbpath) : $newthumbpath; > if( image_createThumb( $newpath, $newthumbpath, $thumbmaxw, $thumbmaxh, $thumbquality ) ) { > $destInfo = pathInfo( $newthumbpath ); > if( strtoupper( $destInfo['extension'] ) == "GIF" || strtoupper( $destInfo['extension'] ) == "PDF") { > $thumbpath = substr_replace( $thumbpath, 'jpg', -3 ); > $newthumbpath = substr_replace( $newthumbpath, 'jpg', -3 ); > } > @chmod( $newthumbpath, 0644 ); > } > else { > //could not create thumbnail (size or type problem) or permissions (root path may be wrong) > $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improper2']}."; > $thumbpath = ""; > } > } > else { > if( $newthumb && $newthumb != "none" ) { > if( @move_uploaded_file($newthumb, $newthumbpath) ) > @chmod( $newthumbpath, 0644 ); > else { > //improper permissions or folder doesn't exist (root path may be wrong) > $message = $admtext['thumbnailnotcopied'] . " $newthumbpath {$admtext['improperpermissions']}."; > $thumbpath = ""; > } > } > } > } > } catch (mysqli_sql_exception $e) { > $message = $admtext['photonotuploaded'] . "."; > header( "Location: admin_media.php?message=" . urlencode($message) ); > } > > if(!empty($place)) { > $placetree = $tngconfig['places1tree'] ? "" : $tree; > $query = "INSERT IGNORE INTO $places_table (gedcom,place,placelevel,latitude,longitude,zoom,geoignore,temple,changedate,changedby) VALUES (\"$placetree\",\"$place\",\"0\",\"$latitude\",\"$longitude\",\"$zoom\",\"0\",\"\",\"$newdate\",\"$currentuser\")"; > $result = @tng_query( $query ) or die ($admtext['cannotexecutequery'] . ": $query"); > if($tngconfig['autogeo'] && tng_affected_rows() && (!$latitude || !$longitude)) { > $ID = tng_insert_id(); > $message = geocode($place, 0, $ID); > } 158c174 < $query = "UPDATE $media_table SET path=\"$path\",thumbpath=\"$thumbpath\",description=\"$description\",notes=\"$notes\",width=\"$width\",height=\"$height\",datetaken=\"$datetaken\",placetaken=\"$place\",owner=\"$owner\",changedate=\"$newdate\",changedby=\"$currentuser\",form=\"$form\",alwayson=\"$alwayson\",mediatypeID=\"$mediatypeID\",map=\"$imagemap\",abspath=\"$abspath\",gedcom=\"$tree\",status=\"$status\",cemeteryID=\"$cemeteryID\",plot=\"$plot\",showmap=\"$showmap\",linktocem=\"$linktocem\",latitude=\"$latitude\",longitude=\"$longitude\",zoom=\"$zoom\",bodytext=\"$bodytext\",usenl=\"$usenl\",newwindow=\"$newwindow\",usecollfolder=\"$usecollfolder\",mediakey=\"$mediakey\" WHERE mediaID=\"$mediaID\""; --- > $query = "UPDATE $media_table SET path=\"$path\",thumbpath=\"$thumbpath\",description=\"$description\",notes=\"$notes\",width=\"$width\",height=\"$height\",datetaken=\"$datetaken\",placetaken=\"$place\",owner=\"$owner\",changedate=\"$newdate\",changedby=\"$currentuser\",form=\"$form\",alwayson=\"$alwayson\",mediatypeID=\"$mediatypeID\",map=\"$imagemap\",abspath=\"$abspath\",gedcom=\"$tree\",status=\"$status\",cemeteryID=\"$cemeteryID\",plot=\"$plot\",showmap=\"$showmap\",linktocem=\"$linktocem\",latitude=\"$latitude\",longitude=\"$longitude\",zoom=\"$zoom\",bodytext=\"$bodytext\",usenl=\"$usenl\",newwindow=\"$newwindow\",private=\"$private\",usecollfolder=\"$usecollfolder\",mediakey=\"$mediakey\" WHERE mediaID=\"$mediaID\""; 186a203 > $message = $admtext['changestoitem'] . " $mediaID {$admtext['succsaved']}."; 188,190c205,207 < if( $newmedia == "return" ) < header( "Location: admin_editmedia.php?mediaID=$mediaID&cw=$cw" ); < else if( $newmedia == "close" ) { --- > if( isset($_POST['savestay']) ) > header( "Location: admin_editmedia.php?mediaID=$mediaID&cw=$cw&ref=1" ); > else if( isset($_POST['saveclose']) ) { 194c211 < --- > 196c213,215 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close(); > window.location.href = "admin_media.php?message="; 197a217,222 > > >

    A change in your browser's default behavior is preventing this window from closing.

    >

    To change this behavior in Firefox, type about:config in the browser address bar and press enter.

    >

    Then search for dom.allow_scripts_to_close_windows and change the value of that setting from False to True.

    >

    For all other browsers, please close this window or tab.

    202,203c227 < else { < $message = $admtext['changestoitem'] . " $mediaID {$admtext['succsaved']}."; --- > else 205d228 < } diff -r TNG/admin_updatemodoptions.php TNG1403/admin_updatemodoptions.php 17d16 < //echo __FILE__,' ',__LINE__;print_r($_POST);exit; 19,20c18,19 < if( !count($_POST['options'] ) ) { < header("Location: admin_main.php"); --- > if( empty($_POST['options'] ) ) { > header("Location: admin.php"); 38a38 > 40,52d39 < if( !is_writeable($optionsfile) ) { < $_SESSION['err_msg'] = "{$admtext['checkwrite']} {$admtext['cantwrite']} $optionsfile !"; < header( "Location: admin_modhandler.php" ); // restored to new Mod Manager screen KCR 140504 < } < else{ < //$optionsfile = "classes/mod.class.config.php"; < < $optionstring = " $value ) { < $optionstring .= "\n\$options['$key'] = \"$value\";"; < } < $optionstring .= "\n?>"; < file_put_contents( $optionsfile, $optionstring ); 54c41 < adminwritelog( $admtext['modifyoptions'] ); --- > $optionstring = " foreach( $options as $key => $value ) { > $optionstring .= "\n\$options['$key'] = \"$value\";"; > } > $optionstring .= "\n?>"; > > if( false === file_put_contents( $optionsfile, $optionstring ) ) > { > $_SESSION['err_msg'] = "{$admtext['checkwrite']} {$admtext['cantwrite']} $optionsfile"; > } > > adminwritelog( $admtext['modifyoptions'] ); > > header( "Location: admin_modhandler.php" ); diff -r TNG/admin_updatemore.php TNG1403/admin_updatemore.php 7a8 > $admin_login = 1; 16a18 > if( !isset($info) ) $info = ""; 35,49c37,49 < if (get_magic_quotes_gpc() == 0) { < $info = addslashes($info); < $age = addslashes($age); < $agency = addslashes($agency); < $cause = addslashes($cause); < $address1 = addslashes($address1); < $address2 = addslashes($address2); < $city = addslashes($city); < $state = addslashes($state); < $zip = addslashes($zip); < $country = addslashes($country); < $phone = addslashes($phone); < $email = addslashes($email); < $www = addslashes($www); < } --- > $info = addslashes($info); > $age = addslashes($age); > $agency = addslashes($agency); > $cause = addslashes($cause); > $address1 = addslashes($address1); > $address2 = addslashes($address2); > $city = addslashes($city); > $state = addslashes($state); > $zip = addslashes($zip); > $country = addslashes($country); > $phone = addslashes($phone); > $email = addslashes($email); > $www = addslashes($www); 83c83 < adminwritelog( "$admtext[addnewevent]: $eventtypeID/$tree/$persfamID" ); --- > adminwritelog( $admtext['addnewevent'] . ": $eventtypeID/$tree/$persfamID" ); diff -r TNG/admin_updatemostwanted.php TNG1403/admin_updatemostwanted.php 20a21,22 > > $title = addslashes($title); 23,27c25 < //if(get_magic_quotes_gpc() == 0) { < // $title = addslashes($title); < // $description = addslashes($description); < //} < $cleaned = cleanIt($description); --- > $cleaned = stripslashes($description); 29,30c27,29 < $truncated = strlen($cleaned) > 90 ? substr($truncated,0,strrpos($truncated,' ')) . '…' : $cleaned; < $cleantitle = cleanIt($title); --- > $truncated = strlen($cleaned) > 90 ? substr($truncated,0,strrpos($truncated,' ')) : $cleaned; > $truncated = cleanIt($truncated) . (strlen($cleaned) > 90 ? '…' : ""); > $cleantitle = cleanIt(stripslashes($title)); 46d44 < echo $query; diff -r TNG/admin_updatenote2.php TNG1403/admin_updatenote2.php 19,21c19 < if(get_magic_quotes_gpc() == 0) { < $note = addslashes($note); < } --- > $note = addslashes($note); 26c24 < if( !$private ) $private = "0"; --- > if( empty($private) ) $private = "0"; 30c28,30 < adminwritelog( $admtext['modifynote'] . ": $ID" ); --- > adminwritelog( $admtext['modifynote'] . ": $xID" ); > > $message = $admtext['notechanges'] . " $xID {$admtext['succsaved']}."; 32,33c32,37 < $message = $admtext['notechanges'] . " $ID {$admtext['succsaved']}."; < header( "Location: admin_notelist.php?message=" . urlencode($message) ); --- > if( !empty($submitx) ) { > header( "Location: admin_notelist.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_editnote2.php?ID=$xID&message=" . urlencode($message) ); > } diff -r TNG/admin_updatenote.php TNG1403/admin_updatenote.php 7a8 > $admin_login = 1; 19,21c20 < if (get_magic_quotes_gpc() == 0) { < $note = addslashes($note); < } --- > $note = addslashes($note); 22a22 > if( !isset($private) ) $private = "0"; 30d29 < if( !$private ) $private = "0"; diff -r TNG/admin_updatepedconfig.php TNG1403/admin_updatepedconfig.php 29a30,33 > if(!$dvwidth) $dvwidth = 96; > if(!$dvheight) $dvheight = 180; > if(!$dvfontsize) $dvfontsize = 9; > 63d66 < fwrite( $fp, "\$pedigree['event'] = \"$pedevent\";\n" ); 74a78,85 > fwrite( $fp, "\$pedigree['maxropt'] = \"$maxropt\";\n" ); > fwrite( $fp, "\$pedigree['maxlopt'] = \"$maxlopt\";\n" ); > fwrite( $fp, "\$pedigree['showtxtopt'] = \"$showtxtopt\";\n" ); > fwrite( $fp, "\$pedigree['compactboxopt'] = \"$compactboxopt\";\n" ); > fwrite( $fp, "\$pedigree['sortbyopt'] = \"$sortbyopt\";\n" ); > fwrite( $fp, "\$pedigree['anchoridopt'] = \"$anchoridopt\";\n" ); > fwrite( $fp, "\$pedigree['maxmopt'] = \"$maxmopt\";\n" ); > 80a92,94 > fwrite( $fp, "\$pedigree['dvwidth'] = \"$dvwidth\";\n" ); > fwrite( $fp, "\$pedigree['dvheight'] = \"$dvheight\";\n" ); > fwrite( $fp, "\$pedigree['dvfontsize'] = \"$dvfontsize\";\n" ); 84,88c98,102 < if(!$mpct) $mpct = 0; < if(!$ypct) $ypct = 100-$mpct; < if(!$ypixels) $ypixels = 10; < if(!$ymult) $ymult = 10; < if(!$mpixels) $mpixels = 50; --- > if(empty($mpct)) $mpct = 0; > if(empty($ypct)) $ypct = 100-$mpct; > if(empty($ypixels)) $ypixels = 10; > if(empty($ymult)) $ymult = 10; > if(empty($mpixels)) $mpixels = 50; 96c110 < fwrite( $fp, "?>\n" ); --- > fwrite( $fp, "?>" ); 103c117,122 < header( "Location: admin_setup.php" ); --- > if( !empty($submitx) ) { > header( "Location: admin_pedconfig.php" ); > } > else { > header( "Location: admin_setup.php" ); > } diff -r TNG/admin_updateperson.php TNG1403/admin_updateperson.php 7a8 > $admin_login = 1; 29c30,34 < if($newfamily == "ajax" && $session_charset != "UTF-8") { --- > if(empty($altbirthdate)) $altbirthdate = ""; > if(empty($altbirthplace)) $altbirthplace = ""; > if(empty($altbirthtype)) $altbirthtype = ""; > > if(!empty($newfamily) && $newfamily == "ajax" && $session_charset != "UTF-8") { 46,62c51,66 < if (get_magic_quotes_gpc() == 0) { < $firstname = addslashes($firstname); < $lastname = addslashes($lastname); < $lnprefix = addslashes($lnprefix); < $nickname = addslashes($nickname); < $prefix = addslashes($prefix); < $suffix = addslashes($suffix); < $title = addslashes($title); < $birthplace = addslashes($birthplace); < $altbirthplace = addslashes($altbirthplace); < $deathplace = addslashes($deathplace); < $burialplace = addslashes($burialplace); < $baptplace = addslashes($baptplace); < $confplace = addslashes($confplace); < $initplace = addslashes($initplace); < $endlplace = addslashes($endlplace); < } --- > > $firstname = addslashes($firstname); > $lastname = addslashes($lastname); > $lnprefix = addslashes($lnprefix); > $nickname = addslashes($nickname); > $prefix = addslashes($prefix); > $suffix = addslashes($suffix); > $title = addslashes($title); > $birthplace = addslashes($birthplace); > $altbirthplace = addslashes($altbirthplace); > $deathplace = addslashes($deathplace); > $burialplace = addslashes($burialplace); > $baptplace = addslashes($baptplace); > $confplace = addslashes($confplace); > $initplace = addslashes($initplace); > $endlplace = addslashes($endlplace); 74a79,81 > if(!isset($branch)) > $branch = ""; > if(!isset($allbranches)) $allbranches = ""; 126,131c133,138 < eval( "\$sealpdate = \$sealpdate{$parent['familyID']};" ); < eval( "\$sealpplace = \$sealpplace{$parent['familyID']};" ); < $sealplace = addslashes( $sealplace ); < eval( "\$sealpdatetr = convertdate( \$sealpdate{$parent['familyID']} );" ); < eval( "\$frel = \$frel{$parent['familyID']};" ); < eval( "\$mrel = \$mrel{$parent['familyID']};" ); --- > $sealpdate = ${"sealpdate".$parent['familyID']}; > $sealpplace = ${"sealpplace".$parent['familyID']}; > $sealplace = isset($sealplace) ? addslashes( $sealplace ) : ""; > $sealpdatetr = convertdate( ${"sealpdate".$parent['familyID']} ); > $frel = !empty(${"frel".$parent['familyID']}) ? ${"frel".$parent['familyID']} : ""; > $mrel = !empty(${"mrel".$parent['familyID']}) ? ${"mrel".$parent['familyID']} : ""; 141,143c148,150 < if( !$living ) $living = 0; < if( !$private ) $private = 0; < if( !$burialtype ) $burialtype = 0; --- > if( empty($living) ) $living = 0; > if( empty($private) ) $private = 0; > if( empty($burialtype) ) $burialtype = 0; 144a152 > if(!$sex && isset($other_gender)) $sex = $other_gender; 146c154 < birthdate=\"$birthdate\", birthdatetr=\"$birthdatetr\", birthplace=\"$birthplace\", sex=\"$sex\", altbirthdate=\"$altbirthdate\", altbirthdatetr=\"$altbirthdatetr\", altbirthplace=\"$altbirthplace\", --- > birthdate=\"$birthdate\", birthdatetr=\"$birthdatetr\", birthplace=\"$birthplace\", sex=\"$sex\", altbirthtype=\"$altbirthtype\", altbirthdate=\"$altbirthdate\", altbirthdatetr=\"$altbirthdatetr\", altbirthplace=\"$altbirthplace\", 194c202,203 < adminwritelog( "{$admtext['modifyperson']}: $tree/$personID" ); --- > adminwritelog( "{$admtext['modifyperson']}: $tree/$personID" ); > $message = $admtext['changestoperson'] . " $personID {$admtext['succsaved']}."; 199,202c208,210 < if( $media == "1" ) < header( "Location: admin_newmedia.php?personID=$personID&tree=$tree&linktype=I&cw=$cw" ); < elseif( $newfamily == "none" ) { < $message = $admtext['changestoperson'] . " $personID {$admtext['succsaved']}."; --- > if( isset($media) && $media == "1" ) > header( "Location: admin_newmedia.php?personID=$personID&tree=$tree&linktype=I&cw=$cw&ref=1" ); > elseif( isset($_POST['saveret']) ) 204,209c212,216 < } < elseif( $newfamily == "return" ) < header( "Location: admin_editperson.php?personID=$personID&tree=$tree&cw=$cw" ); < elseif( $newfamily == "child" ) < header( "Location: admin_newfamily.php?child=$personID&tree=$tree&cw=$cw" ); < elseif( $newfamily == "close" ) { --- > elseif( isset($_POST['savestay']) ) > header( "Location: admin_editperson.php?personID=$personID&tree=$tree&cw=$cw&ref=1" ); > elseif( isset($_POST['savepar']) ) > header( "Location: admin_newfamily.php?child=$personID&tree=$tree&cw=$cw&ref=1" ); > elseif( isset($_POST['saveclose']) ) { 213c220 < --- > 215c222,225 < top.close(); --- > if(!window.opener.location.href.includes("admin_editfamily") && !window.opener.location.href.includes("admin_newfamily")) > window.opener.location.reload(false); > window.open('','_self').close(); > window.location.href = "admin_people.php?message="; 216a227,232 > > >

    A change in your browser's default behavior is preventing this window from closing.

    >

    To change this behavior in Firefox, type about:config in the browser address bar and press enter.

    >

    Then search for dom.allow_scripts_to_close_windows and change the value of that setting from False to True.

    >

    For all other browsers, please close this window or tab.

    221c237 < elseif( $newfamily == "ajax" ) { --- > elseif( isset($newfamily) && $newfamily == "ajax" ) { 236c252 < $name = $session_charset == "UTF-8" ? getName($row) : utf8_encode(getName($row)); --- > $name = $session_charset == "UTF-8" ? getName($row) : mb_convert_encoding(getName($row), 'UTF-8', 'ISO-8859-1'); diff -r TNG/admin_updateplace.php TNG1403/admin_updateplace.php 19,27c19,26 < if (get_magic_quotes_gpc() == 0) { < $place = addslashes($place); < $placelevel = addslashes($placelevel); < $latitude = addslashes($latitude); < $longitude = addslashes($longitude); < $zoom = addslashes($zoom); < $notes = addslashes($notes); < $orgplace = addslashes($orgplace); < } --- > $place = addslashes($place); > $placelevel = !empty($placelevel) ? addslashes($placelevel) : 0; > $latitude = addslashes($latitude); > $longitude = addslashes($longitude); > $zoom = !empty($zoom) ? addslashes($zoom) : 0; > $notes = addslashes($notes); > $orgplace = addslashes($orgplace); > 34,35c33,34 < if( !$temple ) $temple = 0; < if( !$tngconfig['places1tree'] && $newtree) { --- > if( empty($temple) ) $temple = 0; > if( !$tngconfig['places1tree'] && !empty($newtree) ) { 42c41,43 < $query = "UPDATE $places_table SET place=\"$place\",placelevel=\"$placelevel\",temple=\"$temple\",latitude=\"$latitude\",longitude=\"$longitude\",zoom=\"$zoom\",notes=\"$notes\",geoignore=\"0\"$newtreestr WHERE ID=\"$ID\""; --- > $newdate = date ("Y-m-d H:i:s", time() + ( 3600 * $time_offset ) ); > > $query = "UPDATE $places_table SET place=\"$place\",placelevel=\"$placelevel\",temple=\"$temple\",latitude=\"$latitude\",longitude=\"$longitude\",zoom=\"$zoom\",notes=\"$notes\",geoignore=\"0\",changedate=\"$newdate\",changedby=\"$currentuser\"$newtreestr WHERE ID=\"$ID\""; 59,103c60,111 < if( $propagate && trim($orgplace) ) { < //people < $query = "UPDATE $people_table SET birthplace=\"$place\" WHERE birthplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET altbirthplace=\"$place\" WHERE altbirthplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET deathplace=\"$place\" WHERE deathplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET burialplace=\"$place\" WHERE burialplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET baptplace=\"$place\" WHERE baptplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET confplace=\"$place\" WHERE confplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET initplace=\"$place\" WHERE initplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $people_table SET endlplace=\"$place\" WHERE endlplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < < //families < $query = "UPDATE $families_table SET marrplace=\"$place\" WHERE marrplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $families_table SET divplace=\"$place\" WHERE divplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < $query = "UPDATE $families_table SET sealplace=\"$place\" WHERE sealplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < < //events < $query = "UPDATE $events_table SET eventplace=\"$place\" WHERE eventplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < < //children < $query = "UPDATE $children_table SET sealplace=\"$place\" WHERE sealplace=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < < //media < $query = "UPDATE $medialinks_table SET personID=\"$place\" WHERE personID=\"$orgplace\"$updatetreestr"; < $result = tng_query($query); < } < < adminwritelog( "{$admtext['modifyplace']}: $place" ); < < if( $newscreen == "return" ) < header( "Location: admin_editplace.php?ID=$ID$treeurl" ); < elseif( $newscreen == "close" ) { --- > if( !empty($propagate) ) { > $trimmed_orgplace = trim($orgplace); > if( $trimmed_orgplace && (trim($place) != $trimmed_orgplace) ) { > //people > $query = "UPDATE $people_table SET birthplace=\"$place\" WHERE birthplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET altbirthplace=\"$place\" WHERE altbirthplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET deathplace=\"$place\" WHERE deathplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET burialplace=\"$place\" WHERE burialplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET baptplace=\"$place\" WHERE baptplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET confplace=\"$place\" WHERE confplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET initplace=\"$place\" WHERE initplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $people_table SET endlplace=\"$place\" WHERE endlplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > > //families > $query = "UPDATE $families_table SET marrplace=\"$place\" WHERE marrplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $families_table SET divplace=\"$place\" WHERE divplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > $query = "UPDATE $families_table SET sealplace=\"$place\" WHERE sealplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > > //events > $query = "UPDATE $events_table SET eventplace=\"$place\" WHERE eventplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > > //children > $query = "UPDATE $children_table SET sealplace=\"$place\" WHERE sealplace=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > > //media > $query = "UPDATE $medialinks_table SET personID=\"$place\" WHERE personID=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > > $query = "UPDATE $media_table SET placetaken=\"$place\" WHERE placetaken=\"$orgplace\"$updatetreestr"; > $result = tng_query($query); > } > } > > $message = $admtext['changestoplace'] . " $place {$admtext['succsaved']}."; > adminwritelog( "{$admtext['modifyplace']}: $place" ); > > if( isset($_POST['savestay']) ) > header( "Location: admin_editplace.php?ID=$ID$treeurl&ref=1" ); > else if( isset($_POST['saveclose']) ) { 109c117,119 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close(); > window.location.href = "admin_places.php?message="; 110a121,126 > > >

    A change in your browser's default behavior is preventing this window from closing.

    >

    To change this behavior in Firefox, type about:config in the browser address bar and press enter.

    >

    Then search for dom.allow_scripts_to_close_windows and change the value of that setting from False to True.

    >

    For all other browsers, please close this window or tab.

    116d131 < $message = $admtext['changestoplace'] . " $place {$admtext['succsaved']}."; diff -r TNG/admin_updaterepo.php TNG1403/admin_updaterepo.php 19,30c19,28 < if (get_magic_quotes_gpc() == 0) { < $reponame = addslashes($reponame); < $address1 = addslashes($address1); < $address2 = addslashes($address2); < $city = addslashes($city); < $state = addslashes($state); < $zip = addslashes($zip); < $country = addslashes($country); < $phone = addslashes($phone); < $email = addslashes($email); < $www = addslashes($www); < } --- > $reponame = addslashes($reponame); > $address1 = addslashes($address1); > $address2 = addslashes($address2); > $city = addslashes($city); > $state = addslashes($state); > $zip = addslashes($zip); > $country = addslashes($country); > $phone = addslashes($phone); > $email = addslashes($email); > $www = addslashes($www); 47c45,46 < adminwritelog( "{$admtext['modifyrepo']}: $tree/$repoID" ); --- > adminwritelog( "{$admtext['modifyrepo']}: $tree/$repoID" ); > $message = $admtext['changestorepo'] . " $repoID {$admtext['succsaved']}."; 49,51c48,50 < if( $newscreen == "return" ) < header( "Location: admin_editrepo.php?repoID=$repoID&tree=$tree" ); < else if( $newscreen == "close" ) { --- > if( isset($_POST['savestay']) ) > header( "Location: admin_editrepo.php?repoID=$repoID&tree=$tree&ref=1" ); > else if( isset($_POST['saveclose']) ) { 55c54 < --- > 57c56,58 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close(); > window.location.href = "admin_repositories.php?message="; 58a60,65 > > >

    A change in your browser's default behavior is preventing this window from closing.

    >

    To change this behavior in Firefox, type about:config in the browser address bar and press enter.

    >

    Then search for dom.allow_scripts_to_close_windows and change the value of that setting from False to True.

    >

    For all other browsers, please close this window or tab.

    63,64c70 < else { < $message = $admtext['changestorepo'] . " $repoID {$admtext['succsaved']}."; --- > else 66d71 < } diff -r TNG/admin_updatereport.php TNG1403/admin_updatereport.php 19,25c19,23 < if (get_magic_quotes_gpc() == 0) { < $reportname = addslashes($reportname); < $reportnameorg = addslashes($reportnameorg); < $reportdesc = addslashes($reportdesc); < $criteria = addslashes($criteria); < $sqlselect = addslashes($sqlselect); < } --- > $reportname = addslashes($reportname); > $reportnameorg = addslashes($reportnameorg); > $reportdesc = addslashes($reportdesc); > $criteria = addslashes($criteria); > $sqlselect = addslashes($sqlselect); 27c25 < if($savecopy) { --- > if( !empty($savecopy) ) { 39c37 < $query = "INSERT INTO $reports_table (reportname, reportdesc, rank, active, display, criteria, orderby, sqlselect) VALUES (\"$reportname\",\"$reportdesc\",\"$rank\",\"$active\",\"$display\",\"$criteria\",\"$orderby\",\"$sqlselect\")"; --- > $query = "INSERT INTO $reports_table (reportname, reportdesc, ranking, active, display, criteria, orderby, sqlselect) VALUES (\"$reportname\",\"$reportdesc\",\"$ranking\",\"$active\",\"$display\",\"$criteria\",\"$orderby\",\"$sqlselect\")"; 44c42 < $query = "UPDATE $reports_table SET reportname=\"$reportname\",reportdesc=\"$reportdesc\",rank=\"$rank\",active=\"$active\",display=\"$display\",criteria=\"$criteria\",orderby=\"$orderby\",sqlselect=\"$sqlselect\" WHERE reportID=\"$reportID\""; --- > $query = "UPDATE $reports_table SET reportname=\"$reportname\",reportdesc=\"$reportdesc\",ranking=\"$ranking\",active=\"$active\",display=\"$display\",criteria=\"$criteria\",orderby=\"$orderby\",sqlselect=\"$sqlselect\" WHERE reportID=\"$reportID\""; 48c46 < adminwritelog( "{$admtext['modifyreport']}: $reportID" ); --- > adminwritelog( "{$admtext['modifyreport']}: $reportID $reportname" ); 50c48 < if($submitx) { --- > if( isset($_POST['submitx'] ) ) { diff -r TNG/admin_updateselectedmedia.php TNG1403/admin_updateselectedmedia.php 108c108 < $query = "UPDATE $mediatypes_table SET disabled=\"0\" where mediatypeID=\"$newmediatypeID\""; --- > $query = "UPDATE $mediatypes_table SET disabled=\"0\" where mediatypeID=\"$newmediatype\""; diff -r TNG/admin_updatesource.php TNG1403/admin_updatesource.php 19,26c19,25 < if (get_magic_quotes_gpc() == 0) { < $shorttitle = addslashes($shorttitle); < $title = addslashes($title); < $author = addslashes($author); < $callnum = addslashes($callnum); < $publisher = addslashes($publisher); < $actualtext = addslashes($actualtext); < } --- > $shorttitle = addslashes($shorttitle); > $title = addslashes($title); > $author = addslashes($author); > $callnum = addslashes($callnum); > $publisher = addslashes($publisher); > $actualtext = addslashes($actualtext); > 32a32 > $message = $admtext['changestosource'] . " $sourceID {$admtext['succsaved']}."; 34,36c34,36 < if( $newscreen == "return" ) < header( "Location: admin_editsource.php?sourceID=$sourceID&tree=$tree" ); < else if( $newscreen == "close" ) { --- > if( isset($_POST['savestay']) ) > header( "Location: admin_editsource.php?sourceID=$sourceID&tree=$tree&ref=1" ); > else if( isset($_POST['saveclose']) ) { 40c40 < --- > 42c42,44 < top.close(); --- > window.opener.location.reload(false); > window.open('','_self').close(); > window.location.href = "admin_sources.php?message="; 43a46,51 > > >

    A change in your browser's default behavior is preventing this window from closing.

    >

    To change this behavior in Firefox, type about:config in the browser address bar and press enter.

    >

    Then search for dom.allow_scripts_to_close_windows and change the value of that setting from False to True.

    >

    For all other browsers, please close this window or tab.

    48,49c56 < else { < $message = $admtext['changestosource'] . " $sourceID {$admtext['succsaved']}."; --- > else 51d57 < } diff -r TNG/admin_updatetemplateconfig.php TNG1403/admin_updatetemplateconfig.php 4c4 < $textpart = "setup"; --- > $textpart = "templates"; 9c9 < header("Location: admin_main.php"); --- > header("Location: admin.php"); 49c49 < $mq = get_magic_quotes_gpc(); --- > //$mq = get_magic_quotes_gpc(); 58c58 < if ($mq == 0) $newvalue = addslashes($newvalue); --- > $newvalue = addslashes($newvalue); 64a65 > $num_keyparts = count($keyparts); 71,73c72,74 < $keyname = $keyparts[1]; < $num_keyparts = count($keyparts); < $language = $num_keyparts > 2 ? $keyparts[$num_keyparts-1] : ""; --- > if($num_keyparts > 1) { > $keyname = $keyparts[1]; > $language = $num_keyparts > 2 ? $keyparts[$num_keyparts-1] : ""; 75,81c76,77 < //try insert < $query = $insert . "(\"$template\", \"{$orders[$template]}\", \"$keyname\", \"$language\", \"$newvalue\")"; < $result = tng_query($query); < $success = tng_affected_rows(); < //else try update < if(!$success) { < $query = $update . "value = \"$newvalue\", ordernum = \"{$orders[$template]}\" WHERE template = \"$template\" AND keyname = \"$keyname\" AND language = \"$language\""; --- > //try insert > $query = $insert . "(\"$template\", \"{$orders[$template]}\", \"$keyname\", \"$language\", \"$newvalue\")"; 82a79,85 > $success = tng_affected_rows(); > //else try update > if(!$success) { > $query = $update . "value = \"$newvalue\", ordernum = \"{$orders[$template]}\" WHERE template = \"$template\" AND keyname = \"$keyname\" AND language = \"$language\""; > $result = tng_query($query); > } > //fwrite($fp, "\$tmp['" . $key . "'] = \"$newvalue\";\n"); 84d86 < //fwrite($fp, "\$tmp['" . $key . "'] = \"$newvalue\";\n"); 89c91,97 < header( "Location: admin_setup.php" ); --- > $staying = !empty(${"submitx".$form_templatenum}); > if( !empty($submitx) || $staying ) { > header( "Location: admin_templateconfig.php" ); > } > else { > header( "Location: admin_setup.php" ); > } Only in TNG1403: admin_updatetemplatemsg.php diff -r TNG/admin_updatetlevent.php TNG1403/admin_updatetlevent.php 19,22c19,21 < if (get_magic_quotes_gpc() == 0) { < $evdetail = addslashes($evdetail); < $evtitle = addslashes($evtitle); < } --- > $evdetail = addslashes($evdetail); > $evtitle = addslashes($evtitle); > 32c31 < if( $newscreen == "return" ) --- > if( isset($_POST['savestay']) ) diff -r TNG/admin_updatetree.php TNG1403/admin_updatetree.php 20,34c20,34 < if (get_magic_quotes_gpc() == 0) { < $treename = addslashes($treename); < $description = addslashes($description); < $owner = addslashes($owner); < $email = addslashes($email); < $address = addslashes($address); < $city = addslashes($city); < $state = addslashes($state); < $country = addslashes($country); < $zip = addslashes($zip); < $phone = addslashes($phone); < } < if( !$disallowgedcreate ) $disallowgedcreate = 0; < if( !$disallowpdf ) $disallowpdf = 0; < if( !$private ) $private = 0; --- > > $treename = addslashes($treename); > $description = addslashes($description); > $owner = addslashes($owner); > $email = addslashes($email); > $address = addslashes($address); > $city = addslashes($city); > $state = addslashes($state); > $country = addslashes($country); > $zip = addslashes($zip); > $phone = addslashes($phone); > > if( empty($disallowgedcreate) ) $disallowgedcreate = 0; > if( empty($disallowpdf) ) $disallowpdf = 0; > if( empty($private) ) $private = 0; 40,41c40,46 < $message = $admtext['changestotree'] . " $treenamedisp {$admtext['succsaved']}."; < header( "Location: admin_trees.php?message=" . urlencode($message) ); --- > if( !empty($submitx) || !empty($message) ) { > $message = $admtext['tree'] . " $treenamedisp {$admtext['succadded']}."; > header( "Location: admin_trees.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_edittree.php?tree=$tree" ); > } diff -r TNG/admin_updateuser.php TNG1403/admin_updateuser.php 20c20 < if(is_array($gedcom_mult)) --- > if(!empty($gedcom_mult) && is_array($gedcom_mult) && !$gedcom) 22,40c22,42 < < if (get_magic_quotes_gpc() == 0) { < $description = addslashes($description); < $username = addslashes($username); < $orguser = addslashes($orguser); < $orgemail = addslashes($orgemail); < $gedcom = addslashes($gedcom); < $branches = addslashes($branch); < $realname = addslashes($realname); < $phone = addslashes($phone); < $email = addslashes($email); < $address = addslashes($address); < $notes = addslashes($notes); < $website = addslashes($website); < $city = addslashes($city); < $state = addslashes($state); < $zip = addslashes($zip); < $country = addslashes($country); < } --- > if( !isset($description) ) $description = ""; > if( !isset($gedcom) ) $gedcom = ""; > if( !isset($branch) ) $branch = ""; > if( !isset($notes) ) $notes = ""; > > $description = addslashes($description); > $username = addslashes($username); > $orguser = addslashes($orguser); > $orgemail = addslashes($orgemail); > $gedcom = addslashes($gedcom); > $branches = addslashes($branch); > $realname = addslashes($realname); > $phone = addslashes($phone); > $email = addslashes($email); > $address = addslashes($address); > $notes = addslashes($notes); > $website = addslashes($website); > $city = addslashes($city); > $state = addslashes($state); > $zip = addslashes($zip); > $country = addslashes($country); 59,67c61,70 < if( !$form_allow_ged ) $form_allow_ged = 0; < if( !$form_allow_pdf ) $form_allow_pdf = 0; < if( !$form_allow_living ) $form_allow_living = 0; < if( !$form_allow_private ) $form_allow_private = 0; < if( !$form_allow_lds ) $form_allow_lds = 0; < if( !$form_allow_profile ) $form_allow_profile = 0; < if( !$no_email ) $no_email = 0; < if( !$disabled ) $disabled = 0; < if( !$preflang ) $preflang = 0; --- > if( empty($form_allow_ged) ) $form_allow_ged = 0; > if( empty($form_allow_pdf) ) $form_allow_pdf = 0; > if( empty($form_allow_living) ) $form_allow_living = 0; > if( empty($form_allow_private) ) $form_allow_private = 0; > if( empty($form_allow_private_notes) ) $form_allow_private_notes = 0; > if( empty($form_allow_lds) ) $form_allow_lds = 0; > if( empty($form_allow_profile) ) $form_allow_profile = 0; > if( empty($no_email) ) $no_email = 0; > if( empty($disabled) ) $disabled = 0; > if( empty($preflang) ) $preflang = 0; 92c95 < $query = "UPDATE $users_table SET description=\"$description\",username=\"$username\",{$pwd_str}realname=\"$realname\",phone=\"$phone\",email=\"$email\",website=\"$website\",address=\"$address\",city=\"$city\",state=\"$state\",zip=\"$zip\",country=\"$country\",languageID=\"$preflang\",notes=\"$notes\",gedcom=\"$gedcom\",mygedcom=\"$mynewgedcom\",personID=\"$personID\",role=\"$role\",allow_edit=\"$form_allow_edit\",allow_add=\"$form_allow_add\",tentative_edit=\"$form_tentative_edit\",allow_delete=\"$form_allow_delete\",allow_lds=\"$form_allow_lds\",allow_living=\"$form_allow_living\",allow_private=\"$form_allow_private\",allow_ged=\"$form_allow_ged\",allow_pdf=\"$form_allow_pdf\",allow_profile=\"$form_allow_profile\",branch=\"$branch\"{$activatedstr}{$consentedstr},no_email=\"$no_email\",disabled=\"$disabled\" --- > $query = "UPDATE $users_table SET description=\"$description\",username=\"$username\",{$pwd_str}realname=\"$realname\",phone=\"$phone\",email=\"$email\",website=\"$website\",address=\"$address\",city=\"$city\",state=\"$state\",zip=\"$zip\",country=\"$country\",languageID=\"$preflang\",notes=\"$notes\",gedcom=\"$gedcom\",mygedcom=\"$mynewgedcom\",personID=\"$personID\",role=\"$role\",allow_edit=\"$form_allow_edit\",allow_add=\"$form_allow_add\",tentative_edit=\"$form_tentative_edit\",allow_delete=\"$form_allow_delete\",allow_lds=\"$form_allow_lds\",allow_living=\"$form_allow_living\",allow_private=\"$form_allow_private\",allow_private_notes=\"$form_allow_private_notes\",allow_ged=\"$form_allow_ged\",allow_pdf=\"$form_allow_pdf\",allow_profile=\"$form_allow_profile\",branch=\"$branch\"{$activatedstr}{$consentedstr},no_email=\"$no_email\",disabled=\"$disabled\" 97c100 < if( $notify && $email ) { --- > if( !empty($notify) && $email ) { 131,132c134,141 < else < header( "Location: admin_users.php?message=" . urlencode($message) ); --- > else { > if( !empty($submitx) ) { > header( "Location: admin_users.php?message=" . urlencode($message) ); > } > else { > header( "Location: admin_edituser.php?userID=$userID" ); > } > } Only in TNG1403: admin_upgrade.php diff -r TNG/admin_users.php TNG1403/admin_users.php 19,20c19,24 < if( $newsearch ) { < $exptime = 0; --- > $exptime = 0; > > if(!isset($adminonly)) $adminonly = ""; > if(!isset($disabledonly)) $disabledonly = ""; > > if( !empty($newsearch) ) { 23a28 > setcookie("tng_search_users_post[disabledonly]", $disabledonly, $exptime); 28,31c33,38 < if( !$searchstring ) < $searchstring = stripslashes($_COOKIE['tng_search_users_post']['search']); < if( !$adminonly ) < $adminonly = $_COOKIE['tng_search_users_post']['adminonly']; --- > if( empty($searchstring) ) > $searchstring = isset($_COOKIE['tng_search_users_post']['search']) ? stripslashes($_COOKIE['tng_search_users_post']['search']) : ""; > if( empty($adminonly) ) > $adminonly = isset($_COOKIE['tng_search_users_post']['adminonly']) ? $_COOKIE['tng_search_users_post']['adminonly'] : ""; > if( empty($disabledonly) ) > $disabledonly = isset($_COOKIE['tng_search_users_post']['disabledonly']) ? $_COOKIE['tng_search_users_post']['disabledonly'] : ""; 33,34c40,41 < $tngpage = $_COOKIE['tng_search_users_post']['tngpage']; < $offset = $_COOKIE['tng_search_users_post']['offset']; --- > $tngpage = isset($_COOKIE['tng_search_users_post']['tngpage']) ? $_COOKIE['tng_search_users_post']['tngpage'] : 1; > $offset = isset($_COOKIE['tng_search_users_post']['offset']) ? $_COOKIE['tng_search_users_post']['offset'] : 0; 37d43 < $exptime = 0; 42a49,54 > if(!empty($order)) > setcookie("tng_search_users_post[order]", $order, $exptime); > else > $order = isset($_COOKIE['tng_search_users_post']['order']) ? $_COOKIE['tng_search_users_post']['order'] : "desc"; > > if(!isset($offset)) $offset = 0; 52a65,112 > $unsort = "un"; > $descsort = "descup"; > $namesort = "name"; > $loginsort = "login"; > $descicon = "\"\""; > $ascicon = "\"\""; > > if($order == "un") { > $orderstr = "username, description"; > $unsort = "{$admtext['username']} $descicon"; > } > else { > $unsort = "{$admtext['username']} $ascicon"; > if($order == "unup") > $orderstr = "username DESC, description"; > } > > if($order == "desc") { > $orderstr = "description"; > $descsort = "{$admtext['description']} $descicon"; > } > else { > $descsort = "{$admtext['description']} $ascicon"; > if($order == "descup") > $orderstr = "description DESC"; > } > > if($order == "name") { > $orderstr = "realname, description"; > $namesort = "{$admtext['realname']} / {$admtext['email']} $descicon"; > } > else { > $namesort = "{$admtext['realname']} / {$admtext['email']} $ascicon"; > if($order == "nameup") > $orderstr = "realname DESC, description DESC"; > } > > if($order == "login") { > $orderstr = "lastlogin, description"; > $loginsort = "{$admtext['lastlogin']} $descicon"; > } > else { > $loginsort = "{$admtext['lastlogin']} $ascicon"; > if($order == "loginup") > $orderstr = "lastlogin DESC, description"; > } > > 55c115,117 < $query = "SELECT *, DATE_FORMAT(lastlogin,\"%d %b %Y %H:%i:%s\") as lastlogin FROM $users_table WHERE allow_living != \"-1\" $wherestr ORDER BY description LIMIT $newoffset" . $maxsearchresults; --- > $wherestr .= $disabledonly ? " AND disabled = \"1\"" : ""; > $query = "SELECT *, DATE_FORMAT(lastlogin,\"%d %b %Y %H:%i:%s\") as lastloginf FROM $users_table WHERE allow_living != \"-1\" $wherestr > ORDER BY $orderstr LIMIT $newoffset" . $maxsearchresults; 77d138 < $flags['tabs'] = $tngconfig['tabs']; 90,91d150 < < 92a152,153 > echo tng_adminlayout(); > 102,105c163,164 < < < "; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < } < < $helplang = findhelp("backuprestore_help.php"); < < if( !$sub ) $sub = "tables"; < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['backuprestore'], $flags ); < ?> < < < < < < {$admtext['help']}"; < $menu = doMenu($utiltabs,$sub,$innermenu); < $headline = $sub == "tables" ? $admtext['backuprestore'] . " >> " . $admtext['backuprestoretables'] : $admtext['backuprestore'] . " >> " . $admtext['backupstruct']; < echo displayHeadline($headline, "img/backuprestore_icon.gif",$menu,$message); < ?> < <
    <
    --- >
    >
    114c173 < --- > 120c179,180 < > --- > >    > > 142c202 < --- > 148c208 < --- >
    150c210 < --- > 154c214 < --- > 158,160c218,220 < < < --- > > > 162,171c222,231 < < < < < < < < < < --- > > > > > > > > > > 209,210c269,270 < echo "\n"; < echo "\n"; --- > //echo "\n"; > //echo "\n"; 212c272 < echo "\n"; --- > echo "\n"; 229,235c289,292 < < < <
                                   GED  PDF                        $form_allow_ged  $form_allow_pdf  $form_allow_ged  $form_allow_pdf  {$row['lastlogin']}  {$row['lastloginf']} 
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_utilities.php TNG1403/admin_utilities.php 1,322c1,380 < \n"; < echo "
    "; < echo ""; < $fileflag = $table_name && file_exists("$rootpath$backuppath/$table_name.bak"); < echo ""; < echo "
    $display_name  " . getfiletime( "$rootpath$backuppath/$table_name.bak" ) . " " . getfilesize("$rootpath$backuppath/$table_name.bak") . "  
    < < < <
    < <

    < <

    <

    <
    <
    <

    < < <    < < < <

    < < < < < < < < < < < <
                
    <
    < <
    < < <

    < <

    <
    < < < < < < < < <  " . getfiletime( "$rootpath$backuppath/tng_tablestructure.bak" ) . " \n"; < echo "\n"; < } < else { < echo "\n"; < echo "\n"; < } < ?> < <
          
    < < < <
    <
     " . getfilesize("$rootpath$backuppath/tng_tablestructure.bak") . "   
    < <
    < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- > include("begin.php"); > include("adminlib.php"); > $textpart = "setup"; > //include("getlang.php"); > include("$mylanguage/admintext.php"); > > $admin_login = 1; > include("checklogin.php"); > include("version.php"); > > if( $assignedtree ) { > $message = $admtext['norights']; > header( "Location: admin_login.php?message=" . urlencode($message) ); > exit; > } > > $fullbackuppath = !empty($tngconfig['saveconfig']) ? $subroot . $backuppath : $rootpath . $backuppath; > > function getfiletime( $filename ) { > global $fileflag, $time_offset; > > $filemodtime = ""; > if( $fileflag ) { > $filemod = filemtime( $filename ) + (3600 * $time_offset); > $filemodtime = date("F j, Y h:i:s A", $filemod); > } > return $filemodtime; > } > > function getfilesize( $filename ) { > global $fileflag; > > $filesize = ""; > if( $fileflag ) { > $filesize = ceil( filesize( $filename )/1000 ) . " Kb"; > } > return $filesize; > } > > function doRow( $table_name, $display_name ) { > global $admtext, $rootpath, $fullbackuppath, $backuppath, $tngconfig, $fileflag, $tngdomain; > > $ext = file_exists("$fullbackuppath/$table_name.sql") ? ".sql" : ".bak"; > $filename = "$fullbackuppath/$table_name$ext"; > $download = empty($tngconfig['saveconfig']) ? "$tngdomain/$backuppath/$table_name$ext" : ""; > echo "
    $display_name  " . getfiletime( $filename ) . " " . getfilesize( $filename ) . "  
    > > > > > > > > > doRow( $address_table, $admtext['addresstable'] ); > doRow( $albums_table, $admtext['albums'] ); > doRow( $album2entities_table, $admtext['album2entitiestable'] ); > doRow( $albumlinks_table, $admtext['albumlinkstable'] ); > doRow( $assoc_table, $admtext['associations'] ); > doRow( $branches_table, $admtext['branches'] ); > doRow( $branchlinks_table, $admtext['brlinkstable'] ); > doRow( $cemeteries_table, $admtext['cemeteries'] ); > doRow( $children_table, $admtext['children'] ); > doRow( $countries_table, $admtext['countriestable'] ); > doRow( $dna_groups_table, $admtext['dna_groups'] ); > doRow( $dna_links_table, $admtext['dna_links'] ); > doRow( $dna_tests_table, $admtext['dna_tests'] ); > doRow( $events_table, $admtext['events'] ); > doRow( $eventtypes_table, $admtext['eventtypes'] ); > doRow( $families_table, $admtext['families'] ); > doRow( $image_tags_table, $admtext['imgtags'] ); > doRow( $languages_table, $admtext['languages'] ); > doRow( $media_table, $admtext['mediatable'] ); > doRow( $medialinks_table, $admtext['medialinkstable'] ); > doRow( $mediatypes_table, $admtext['mediatypes'] ); > doRow( $mostwanted_table, $admtext['mostwanted'] ); > doRow( $notelinks_table, $admtext['notelinkstable'] ); > doRow( $xnotes_table, $admtext['notes'] ); > doRow( $people_table, $admtext['people'] ); > doRow( $places_table, $admtext['places'] ); > doRow( $reports_table, $admtext['reports'] ); > doRow( $sources_table, $admtext['sources'] ); > doRow( $repositories_table, $admtext['repositories'] ); > doRow( $citations_table, $admtext['citations'] ); > doRow( $states_table, $admtext['statestable'] ); > doRow( $temp_events_table, $admtext['temptable'] ); > doRow( $templates_table, $admtext['templatestable'] ); > doRow( $tlevents_table, $admtext['tleventstable'] ); > doRow( $trees_table, $admtext['trees'] ); > doRow( $users_table, $admtext['users'] ); > ?> >
                
    > > >
    > > } > elseif( $sub == "structure" ) { > ?> >

    > >

    >
    > > > > > > > > > if( $fileflag ) { > echo "\n"; > echo "\n"; > } > else { > echo "\n"; > echo "\n"; > } > ?> > >
          
    > $ext = file_exists("$fullbackuppath/tng_tablestructure.sql") ? ".sql" : ".bak"; > $filename = "$fullbackuppath/tng_tablestructure{$ext}"; > if( $ext == ".sql" || file_exists($filename) ) { > $fileflag = 1; > ?> > > if(empty($tngconfig['saveconfig'])) { > ?> > " title="" class="smallicon admin-down-icon"> > } > } > else > $fileflag = 0; > ?> >
    >
     " . getfiletime( "$fullbackuppath/tng_tablestructure{$ext}" ) . "  " . getfilesize("$fullbackuppath/tng_tablestructure{$ext}") . "   
    > >
    > } > ?> > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_valreport.php TNG1403/admin_valreport.php 21,22c21,23 < $flags['tabs'] = $tngconfig['tabs']; < tng_adminheader( $admtext['validation'], $flags ); --- > setcookie("tng_val_post[tree]", $tree, 0); > > tng_adminheader( $admtext['dataval'], $flags ); 27,28d27 < < 29a29,30 > echo tng_adminlayout(); > 36d36 < $innermenu .= "  |  {$admtext['test']}"; 41,43c41 < $nameFields = "$people_table.personID, $people_table.lastname, $people_table.firstname, $people_table.lnprefix, $people_table.prefix, $people_table.suffix, $people_table.nameorder, $people_table.living, $people_table.private, $people_table.branch, $people_table.gedcom"; < $hNameFields = "h.personID as hpersonID, h.lastname as hlastname, h.firstname as hfirstname, h.lnprefix as hlnprefix, h.prefix as hprefix, h.suffix as hsuffix, h.nameorder as hnameorder, h.living as hliving, h.private as hprivate, h.branch as hbranch, h.gedcom as hgedcom"; < $wNameFields = "w.personID as wpersonID, w.lastname as wlastname, w.firstname as wfirstname, w.lnprefix as wlnprefix, w.prefix as wprefix, w.suffix as wsuffix, w.nameorder as wnameorder, w.living as wliving, w.private as wprivate, w.branch as wbranch, w.gedcom as wgedcom"; --- > $nameFields = "$people_table.personID, $people_table.lastname, $people_table.firstname, $people_table.lnprefix, $people_table.prefix, $people_table.suffix, $people_table.nameorder, $people_table.title, $people_table.birthdate, $people_table.birthdatetr, $people_table.altbirthdate, $people_table.altbirthdatetr, $people_table.deathdate, $people_table.deathdatetr, $people_table.living, $people_table.private, $people_table.branch, $people_table.gedcom"; 44a43 > if( !isset($offset) ) $offset = 0; 138a138 > $select2a = $select2b = $query2 = ""; 216,218c216,217 < < <
    --- >
    >
    225c224 < --- >
    229c228,229 < for($i = 0; $i < count($display); $i++) { --- > $num_display_headers = count($display); > for($i = 0; $i < $num_display_headers; $i++) { 240c240,241 < for($i = 0; $i < count($values); $i++) { --- > $num_values = count($values); > for($i = 0; $i < $num_values; $i++) { 245c246 < $value = "" . getName($row) . ""; --- > $value = "" . getName($row) . ""; 248c249 < $value = "{$row['familyID']}"; --- > $value = "{$row['familyID']}"; 250c251 < $value = "{$row['personID']}"; --- > $value = "{$row['personID']}"; 266,276c267,271 < < < < < <
    < $tng_title, v.$tng_version
    "; ?> < < \ No newline at end of file --- >
    > > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/admin_whatsnewmsg.php TNG1403/admin_whatsnewmsg.php 25d24 < $flags['tabs'] = $tngconfig['tabs']; 37,38d35 < < 39a37,38 > echo tng_adminlayout(); > 50,52c49,52 < < < 450d480 < 453d482 <

    459c488 < » --- > »
    465a495 > diff -r TNG/famsearch.php TNG1403/famsearch.php 17c17,27 < $maxsearchresults = $nr ? $nr : ($_SESSION['tng_nr'] ? $_SESSION['tng_nr'] : $maxsearchresults); --- > $maxsearchresults = !empty($nr) ? $nr : (!empty($_SESSION['tng_nr']) ? $_SESSION['tng_nr'] : $maxsearchresults); > if(!isset($mybool) || ($mybool != "AND" && $mybool != "OR")) > $mybool = "AND"; > > $varlist= array('branch','dvpqualify','dvyqualify','ecount','ffnqualify','fidqualify','flnqualify','mfnqualify','mlnqualify','mpqualify','mtqualify','mydivplace','mydivyear','myfamilyid','myffirstname','myflastname','mymarrplace','mymarrtype','mymarryear','mymfirstname','mymlastname','myqualify','showdeath','showspouse','urlstring'); > foreach($varlist as $var) > if( !isset(${$var}) ) ${$var} = ""; > > if( !isset($offset) ) $offset = 0; > > $saved_cust_events = isset($_COOKIE['tng_search_families_post']['cust_events']) ? explode(",",stripslashes($_COOKIE['tng_search_families_post']['cust_events'])) : []; 62c72 < $_SESSION['tng_nr'] = $nr; --- > $_SESSION['tng_nr'] = isset($nr) ? $nr : $maxsearchresults; 73c83 < $orderloc = strpos($_SERVER['QUERY_STRING'],"&order="); --- > $orderloc = strpos($_SERVER['QUERY_STRING'],"&order="); 79c89 < $marrsort = "{$text['married']} "; --- > $marrsort = "{$text['married']} "; 82c92 < $marrsort = "{$text['married']} "; --- > $marrsort = "{$text['married']} "; 89c99 < $divsort = "{$text['divorced']} "; --- > $divsort = "{$text['divorced']} "; 92c102 < $divsort = "{$text['divorced']} "; --- > $divsort = "{$text['divorced']} "; 99c109 < $fnamesort = "{$text['fathername']} "; --- > $fnamesort = "{$text['fathername']} "; 102c112 < $fnamesort = "{$text['fathername']} "; --- > $fnamesort = "{$text['fathername']} "; 109c119 < $mnamesort = "{$text['mothername']} "; --- > $mnamesort = "{$text['mothername']} "; 112c122 < $mnamesort = "{$text['mothername']} "; --- > $mnamesort = "{$text['mothername']} "; 129c139 < elseif( $column == "mother.lastname" ) --- > elseif( $column == "mother.lastname" && $lnprefixes ) 189c199 < $dontdo = array("MARR","DIV"); --- > $dontdo = array(); //array("MARR","DIV"); 242c252 < $querystring = "$text[text_for] $querystring"; --- > $querystring = "{$text['text_for']} $querystring"; 260,261c270,271 < father.lastname as flastname, father.lnprefix as flnprefix, father.firstname as ffirstname, father.living as fliving, father.private as fprivate, father.branch as fbranch, < mother.lastname as mlastname, mother.lnprefix as mlnprefix, mother.firstname as mfirstname, mother.living as mliving, mother.private as fprivate, mother.branch as mbranch --- > father.personID as fpersonID, father.lastname as flastname, father.lnprefix as flnprefix, father.firstname as ffirstname, father.title as ftitle, father.prefix as fprefix, father.suffix as fsuffix, father.nameorder as fnameorder, father.birthdate as fbirthdate, father.birthdatetr as fbirthdatetr, father.altbirthdate as faltbirthdate, father.altbirthdatetr as faltbirthdatetr, father.deathdate as fdeathdate, father.living as fliving, father.private as fprivate, father.branch as fbranch, > mother.personID as mpersonID, mother.lastname as mlastname, mother.lnprefix as mlnprefix, mother.firstname as mfirstname, mother.title as mtitle, mother.prefix as mprefix, mother.suffix as msuffix, mother.nameorder as mnameorder, mother.birthdate as mbirthdate, mother.birthdatetr as mbirthdatetr, mother.altbirthdate as maltbirthdate, mother.altbirthdatetr as maltbirthdatetr, mother.deathdate as mdeathdate, mother.living as mliving, mother.private as mprivate, mother.branch as mbranch 336c346 < $header = "
    --- >
    > > > < > < > \n"; --- > echo "\n"; 71c71 < --- > 76c76 < --- > 114c114 <    --- > >    124c124 < $branchlist = explode(",", $row[branch] ); --- > $branchlist = explode(",", $row['branch'] ); 141c141 < echo "  (" . $admtext['edit'] . " )
    "; --- > echo "  (" . $admtext['edit'] . " )
    "; 143c143 < \n"; --- > else { > $header .= "\n"; > } > $header .= "\n"; 176c184 < $tablewidth = " width=\"100%\""; --- > $tablewidth = " style=\"width:100%\""; 184c192 < $header = "
    55,57c55,59 <

    ">

    <
    < --- >

    ">

    >
    > > > 63c65 < $tng_title, v.$tng_version"; ?> --- > 68c70 < new nicEditor({fullPanel : true}).panelInstance('whatsnewmsg'); --- > new nicEditor({fullPanel : true, maxHeight: 300}).panelInstance('whatsnewmsg'); 72,73c74,76 < < \ No newline at end of file --- > echo tng_adminfooter(); > ?> \ No newline at end of file diff -r TNG/ahnentafel.php TNG1403/ahnentafel.php 1,395c1,409 < {$text['lessdetail']}"; < else < $detail_link = "{$text['moredetail']}"; < < $generation = 1; < $personcount = 1; < < $currgen = array(); < $nextgen = array(); < $numbers = array(); < $lastgen = array(); < $lastlastgen = array(); < < $result = getPersonFullPlusDates($tree, $personID); < if( !tng_num_rows($result) ) { < tng_free_result($result); < header( "Location: thispagedoesnotexist.html" ); < exit; < } < < $row = tng_fetch_assoc( $result ); < tng_free_result($result); < $righttree = checktree($tree); < $rightbranch = $righttree ? checkbranch($row['branch']) : false; < $rights = determineLivingPrivateRights($row, $righttree, $rightbranch); < $row['allow_living'] = $rights['living']; < $row['allow_private'] = $rights['private']; < $row['name'] = getName( $row ); < //if( $row['name'] == $text['living'] ) $row['firstname'] = $text['living']; < $firstfirstname = getFirstNameOnly( $row ); < < $logname = $tngconfig['nnpriv'] && $row['private'] ? $admtext['text_private'] : ($nonames && $row['living'] ? $text['living'] : $row['name']); < $row['genlist'] = ""; < $row['number'] = 1; < $row['spouses'] = getSpouses( $personID, $row['sex'] ); < $lastlastgen[$personID] = 1; < < $treeResult = getTreeSimple($tree); < $treerow = tng_fetch_assoc($treeResult); < $disallowgedcreate = $treerow['disallowgedcreate']; < $allowpdf = !$treerow['disallowpdf'] || ($allow_pdf && $rightbranch); < tng_free_result($treeResult); < < writelog( "" . xmlcharacters($text['ahnentafel'] . ": $logname ($personID)") . "" ); < preparebookmark( "" . xmlcharacters($text['ahnentafel'] . ": " . $row['name'] . " ($personID)") . "" ); < < $flags['tabs'] = $tngconfig['tabs']; < $flags['scripting'] = "\n"; < tng_header( $row['name'], $flags ); < < $photostr = showSmallPhoto( $personID, $row['name'], $rights['both'], 0, false, $row['sex'] ); < echo tng_DrawHeading( $photostr, $row['name'], getYears( $row ) ); < < if( !$pedigree['maxgen'] ) $pedigree['maxgen'] = 6; < if( $generations > $pedigree['maxgen'] ) < $generations = intval($pedigree['maxgen']); < elseif( !$generations ) < $generations = $pedigree['initpedgens'] >= 2 ? intval($pedigree['initpedgens']) : 2; < else < $generations = intval( $generations ); < < $innermenu = $text['generations'] . ":  "; < $innermenu .= "
    "; < echo "$personcount.  "; < echo showSmallPhoto( $row['personID'], $row['name'], $rights['both'], 0 ); < echo "{$row['name']}"; < echo getVitalDates( $row, 1 ); < echo getOtherEvents($row); < if( $rights['both'] && $pedigree['regnotes'] ) { < $notes = buildRegNotes(getRegNotes( $row['personID'], "I" )); < if( $notes ) { < echo "

    {$text['notes']}:
    "; < echo "

    \n$notes
    \n

    \n"; < } < } < else < $notes = ""; < < //do spouse < while( $spouserow = array_shift( $row['spouses'] ) ) { < < if($spouserow['marrdate'] || $spouserow['marrplace']) { < echo "

    $firstfirstname " . strtolower($text['wasmarried']) . " {$spouserow['name']}"; < echo getSpouseDates( $spouserow ); < } < else < echo "

    $firstfirstname " . strtolower($text['wasmarried']) . " {$spouserow['name']}."; < $spouseinfo = getVitalDates( $spouserow ); < if( $spouseinfo ) { < $spfirstfirstname = getFirstNameOnly( $spouserow ); < $spparents = getSpouseParents( $spouserow['personID'], $spouserow['sex'] ); < echo " $spfirstfirstname $spparents $spouseinfo"; < } < echo " [{$text['groupsheet']}]"; < echo "

    \n"; < < if($pedigree['regnotes']) { < $famrights = determineLivingPrivateRights($spouserow, $righttree); < if($famrights['both']) { < $notes = buildRegNotes(getRegNotes( $spouserow['familyID'], "F" )); < if( $notes ) { < echo "

    {$text['notes']}:
    "; < echo "

    \n$notes
    \n

    \n"; < } < } < } < < $result2 = getChildrenData($tree, $spouserow['familyID']); < if( $result2 && tng_num_rows( $result2 ) ) { < echo "{$text['children']}:\n
      \n"; < while( $childrow = tng_fetch_assoc( $result2 ) ) { < $childrow['genlist'] = $newlist; < $crights = determineLivingPrivateRights($childrow, $righttree); < $childrow['allow_living'] = $crights['living']; < $childrow['allow_private'] = $crights['private']; < $childrow['name'] = getName( $childrow ); < if( $childrow['name'] == $text['living'] ) $childrow['firstname'] = $text['living']; < < echo "
    1. {$childrow['name']}"; < echo getVitalDates( $childrow ); < echo "
    2. \n"; < } < echo "
    \n"; < tng_free_result( $result2 ); < } < } < //if(!$is_mozilla) < echo "
    "; < echo "
    \n\n"; < < < //push famc (family of parents) to nextgen < $parentfamID = ""; < $locparentset = $parentset; < $parentscount = 0; < $parentfamIDs = array(); < $parents = getChildFamily($tree, $personID, "parentorder"); < if ( $parents ) { < $parentscount = tng_num_rows( $parents ); < if ( $parentscount > 0 ) { < if ( $locparentset > $parentscount ) < $locparentset = $parentscount; < $i = 0; < while ( $parentrow = tng_fetch_assoc( $parents ) ) { < $i++; < if( $i == $locparentset ) < $parentfamID = $parentrow['familyID']; < $parentfamIDs[$i] = $parentrow['familyID']; < } < if(!$parentfamID) $parentfamID = $row['famc']; < } < tng_free_result($parents); < } < < array_push( $currgen, $parentfamID ); < $generation++; < $personcount = 1; < $numbers[$parentfamID] = 1; < < //loop through nextgen < //while there's one to pop and we're less than maxgen < while( count( $currgen ) && $generation <= $generations ) { < //echo "{$text['generation']}: $generation
    \n"; < echo "{$text['generation']}: $generation

    \n"; < //echo "
      \n"; < echo "
        "; < while( $nextfamily = array_shift( $currgen ) ) { < $parents = getFamilyData($tree, $nextfamily); < if( $parents ) { < $parentrow = tng_fetch_assoc( $parents ); < < $famrights = determineLivingPrivateRights($parentrow, $righttree); < $parentrow['allow_living'] = $famrights['living']; < $parentrow['allow_private'] = $famrights['private']; < < if( $parentrow['husband'] ) { < $gotfather = getPersonData($tree, $parentrow['husband']); < < if( $gotfather ) { < $fathrow = tng_fetch_assoc( $gotfather ); < if( $fathrow['firstname'] || $fathrow['lastname'] ) { < $personcount = $numbers[$nextfamily] * 2; < $lastgen[$fathrow['personID']] = $personcount; < $frights = determineLivingPrivateRights($fathrow, $righttree); < $fathrow['allow_living'] = $frights['living']; < $fathrow['allow_private'] = $frights['private']; < $fathrow['name'] = getName( $fathrow ); < if( $fathrow['name'] == $text['living'] ) $fathrow['firstname'] = $text['living']; < < //echo "
      1. "; < echo "
      2. "; < // if(!$is_mozilla) < //echo "
        "; < echo "
        "; < echo "$personcount.  "; < echo showSmallPhoto( $fathrow['personID'], $fathrow['name'], $frights['both'], 0 ); < echo "{$fathrow['name']}"; < echo getVitalDates( $fathrow, 1 ); < echo getOtherEvents($fathrow); < if( $frights['both'] && $pedigree['regnotes'] ) { < $notes = buildRegNotes(getRegNotes( $fathrow['personID'], "I" )); < if( $notes ) { < echo "

        {$text['notes']}:
        "; < echo "

        \n$notes
        \n

        \n"; < } < } < else $notes = ""; < if( $fathrow['famc'] ) { < if( !in_array( $fathrow['famc'], $nextgen ) ) < array_push( $nextgen, $fathrow['famc'] ); < if(!$numbers[$fathrow['famc']]) < $numbers[$fathrow['famc']] = $personcount; < } < } < tng_free_result( $gotfather ); < } < } < < if( $parentrow['wife'] ) { < $gotmother = getPersonData($tree, $parentrow['wife']); < < if( $gotmother ) { < $mothrow = tng_fetch_assoc( $gotmother ); < if( $mothrow['firstname'] || $mothrow['lastname'] ) { < $personcount = $numbers[$nextfamily] * 2 + 1; < $lastgen[$mothrow['personID']] = $personcount; < $mrights = determineLivingPrivateRights($mothrow, $righttree); < $mothrow['allow_living'] = $mrights['living']; < $mothrow['allow_private'] = $mrights['private']; < $mothrow['name'] = getName( $mothrow ); < if( $mothrow['name'] == $text['living'] ) $mothrow['firstname'] = $text['living']; < < if( $parentrow['husband'] ) { < $firstfirstname = getFirstNameOnly( $fathrow ); < $parentrow['both'] = $mothrow['both']; < if($parentrow['marrdate'] || $parentrow['marrplace']) { < echo "

        $firstfirstname " . strtolower($text['wasmarried']) . " {$mothrow['name']}"; < echo getSpouseDates( $parentrow ); < } < else < echo "

        $firstfirstname " . strtolower($text['wasmarried']) . " {$mothrow['name']}."; < $spouseinfo = getVitalDates( $mothrow ); < if( $spouseinfo ) { < $spfirstfirstname = getFirstNameOnly( $mothrow ); < $spparents = getSpouseParents( $mothrow['personID'], $mothrow['sex'] ); < echo " $spfirstfirstname $spparents $spouseinfo"; < } < echo " [{$text['groupsheet']}]

        \n"; < // if(!$is_mozilla) < echo "
        "; < echo "
        \n"; < } < < //echo "
      3. "; < echo "
      4. "; < // if(!$is_mozilla) < //echo " < > < > < > < > 278,281c277,281 < < --- >

        > 285d285 <
        "; < echo "
        "; < echo "$personcount.  "; < echo showSmallPhoto( $mothrow['personID'], $mothrow['name'], $mrights['both'], 0 ); < echo "{$mothrow['name']}"; < echo getVitalDates( $mothrow, 1 ); < echo getOtherEvents($mothrow); < if( $mrights['both'] && $pedigree['regnotes'] ) { < $notes = buildRegNotes(getRegNotes( $mothrow['personID'], "I" )); < if( $notes ) { < echo "

        {$text['notes']}:
        "; < echo "

        \n$notes
        \n

        \n"; < } < } < else $notes = ""; < //echo "\n"; < if( $mothrow['famc'] ) { < if( !in_array( $mothrow['famc'], $nextgen ) ) < array_push( $nextgen, $mothrow['famc'] ); < if(!$numbers[$mothrow['famc']]) < $numbers[$mothrow['famc']] = $personcount; < } < } < tng_free_result( $gotmother ); < } < if($pedigree['regnotes']) { < $prights = determineLivingPrivateRights($parentrow, $righttree); < if($prights['both']) { < $notes = buildRegNotes(getRegNotes( $nextfamily, "F" )); < if( $notes ) { < echo "

        {$text['notes']}:
        "; < echo "

        \n$notes
        \n

        \n"; < } < } < } < } < < //get children < $result2 = getChildrenData($tree, $nextfamily); < if( $result2 && tng_num_rows( $result2 ) ) { < echo "
        {$text['children']}:
        \n
          \n"; < while( $childrow = tng_fetch_assoc( $result2 ) ) { < $crights = determineLivingPrivateRights($childrow, $righttree); < $childrow['allow_living'] = $crights['living']; < $childrow['allow_private'] = $crights['private']; < $childrow['name'] = getName( $childrow ); < //if( $childrow['name'] == $text['living'] ) $childrow['firstname'] = $text['living']; < < echo "
        1. "; < if( $lastlastgen[$childrow['personID']] ) { < echo $lastlastgen[$childrow['personID']] . ". "; < echo "{$childrow['name']}"; < } < else < echo "{$childrow['name']}"; < echo getVitalDates( $childrow ); < echo "
        2. \n"; < } < echo "
        \n
        \n"; < tng_free_result( $result2 ); < } < // if(!$is_mozilla) < echo "
        "; < echo "
        \n"; < } < } < < $currgen = $nextgen; < $lastlastgen = $lastgen; < unset( $nextgen ); < unset( $lastgen ); < $nextgen = array(); < $lastgen = array(); < $generation++; < echo "\n
        \n"; < } < ?> < < < < $textpart = "pedigree"; > include("tng_begin.php"); > > if(!$personID) die("no args"); > include($subroot . "pedconfig.php"); > include($cms['tngpath'] . "personlib.php" ); > include($cms['tngpath'] . "reglib.php" ); > > $getperson_url = getURL( "getperson", 1 ); > $descend_url = getURL( "descend", 1 ); > $familygroup_url = getURL( "familygroup", 1 ); > $familychart_url = getURL( "familychart", 1 ); > $ahnentafel_url = getURL( "ahnentafel", 1 ); > $pedigree_url = getURL( "pedigree", 1 ); > $pedigreetext_url = getURL( "pedigreetext", 1 ); > $extrastree_url = getURL( "extrastree", 1 ); > $pdfform_url = getURL( "rpt_pdfform", 1 ); > $vertical_url = getURL( "verticalchart", 1 ); > $fan_url = getURL( "fan", 1 ); > > if(!empty($tngmore)) > $pedigree['regnotes'] = 1; > elseif(!empty($tngless)) > $pedigree['regnotes'] = 0; > > $parentset = isset($parentset) ? intval($parentset) : 0; > > $detail_link = "{$ahnentafel_url}personID=$personID&tree=$tree&parentset=$parentset&generations=$generations"; > if($pedigree['regnotes']) > $detail_link = "{$text['lessdetail']}"; > else > $detail_link = "{$text['moredetail']}"; > > $generation = 1; > $personcount = 1; > > $currgen = array(); > $nextgen = array(); > $numbers = array(); > $lastgen = array(); > $lastlastgen = array(); > > $result = getPersonFullPlusDates($tree, $personID); > if( !tng_num_rows($result) ) { > tng_free_result($result); > header( "Location: thispagedoesnotexist.html" ); > exit; > } > > $row = tng_fetch_assoc( $result ); > tng_free_result($result); > $righttree = checktree($tree); > $rightbranch = $righttree ? checkbranch($row['branch']) : false; > $rights = determineLivingPrivateRights($row, $righttree, $rightbranch); > $row['allow_living'] = $rights['living']; > $row['allow_private'] = $rights['private']; > $row['name'] = getName( $row ); > //if( $row['name'] == $text['living'] ) $row['firstname'] = $text['living']; > $firstfirstname = getFirstNameOnly( $row ); > $personsex = $row['sex']; > > $logname = $tngconfig['nnpriv'] && $row['private'] ? $admtext['text_private'] : ($nonames && $row['living'] ? $text['living'] : $row['name']); > $row['genlist'] = ""; > $row['number'] = 1; > $row['spouses'] = getSpouses( $personID, $row['sex'] ); > $lastlastgen[$personID] = 1; > > $treeResult = getTreeSimple($tree); > $treerow = tng_fetch_assoc($treeResult); > $disallowgedcreate = $treerow['disallowgedcreate']; > $allowpdf = !$treerow['disallowpdf'] || ($allow_pdf && $rightbranch); > tng_free_result($treeResult); > > writelog( "" . xmlcharacters($text['ahnentafel'] . ": $logname ($personID)") . "" ); > preparebookmark( "" . xmlcharacters($text['ahnentafel'] . ": " . $row['name'] . " ($personID)") . "" ); > > $flags['scripting'] = "\n"; > tng_header( $row['name'], $flags ); > > $photostr = showSmallPhoto( $personID, $row['name'], $rights['both'], 0, false, $row['sex'] ); > echo tng_DrawHeading( $photostr, $row['name'], getYears( $row ) ); > > if( !$pedigree['maxgen'] ) $pedigree['maxgen'] = 6; > if( $generations > $pedigree['maxgen'] ) > $generations = intval($pedigree['maxgen']); > elseif( !$generations ) > $generations = $pedigree['initpedgens'] >= 2 ? intval($pedigree['initpedgens']) : 2; > else > $generations = intval( $generations ); > > $innermenu = $text['generations'] . ":  "; > $innermenu .= "   \n"; > $innermenu .= "{$text['pedstandard']}    |    \n"; > $innermenu .= "{$text['pedvertical']}    |    \n"; > $innermenu .= "{$text['pedcompact']}    |    \n"; > $innermenu .= "{$text['pedbox']}    |    \n"; > $innermenu .= "{$text['pedtextonly']}    |    \n"; > $innermenu .= "{$text['ahnentafel']}    |    \n"; > $innermenu .= "{$text['fanchart']}    |    \n"; > $innermenu .= "{$text['media']}\n"; > if($generations <= 6 && $allowpdf) > $innermenu .= "    |    PDF\n"; > > echo getFORM( "pedigree", "", "form1", "form1" ); > echo tng_menu( "I", "pedigree", $personID, $innermenu ); > echo "\n"; > ?> > >
        >
        > //do self > echo "{$text['generation']}: 1

        \n"; > echo "
          "; > echo "
        1. "; > echo "
          "; > echo "$personcount.  "; > echo showSmallPhoto( $row['personID'], $row['name'], $rights['both'], 0 ); > echo "{$row['name']}"; > echo getVitalDates( $row, 1 ); > echo getOtherEvents($row); > if( $rights['both'] && $pedigree['regnotes'] ) { > $notes = buildRegNotes(getRegNotes( $row['personID'], "I" )); > if( $notes ) { > echo "

          {$text['notes']}:
          "; > echo "

          \n$notes
          \n

          \n"; > } > } > else > $notes = ""; > > //do spouse > while( $spouserow = array_shift( $row['spouses'] ) ) { > > $marriagemsg = ($personsex == "F") ? $text['wasmarried_female'] : $text['wasmarried_male']; > if($spouserow['marrdate'] || $spouserow['marrplace']) { > echo "

          $firstfirstname " . $marriagemsg . " {$spouserow['name']}"; > echo getSpouseDates( $spouserow, $personsex ); > } > else { > $spousename = $spouserow['name'] ? $spouserow['name'] : $text['unknown']; > if(!empty($spouserow['personID'])) > echo "

          {$text['family']}/{$text['spouse']}: $spousename."; > else > echo "

          {$text['family']}/{$text['spouse']}: $spousename."; > } > $spouseinfo = getVitalDates( $spouserow ); > if( $spouseinfo ) { > $spfirstfirstname = getFirstNameOnly( $spouserow ); > $spparents = getSpouseParents( $spouserow['personID'], $spouserow['sex'] ); > echo " $spfirstfirstname $spparents $spouseinfo"; > } > if(!$tngprint) { > echo " [{$text['groupsheet']}]"; > echo " [{$text['familychart']}]"; > } > echo "

          \n"; > > if($pedigree['regnotes']) { > $famrights = determineLivingPrivateRights($spouserow, $righttree); > if($famrights['both']) { > $notes = buildRegNotes(getRegNotes( $spouserow['familyID'], "F" )); > if( $notes ) { > echo "

          {$text['notes']}:
          "; > echo "

          \n$notes
          \n

          \n"; > } > } > } > > $result2 = getChildrenData($tree, $spouserow['familyID']); > if( $result2 && tng_num_rows( $result2 ) ) { > echo "{$text['children']}:\n
            \n"; > while( $childrow = tng_fetch_assoc( $result2 ) ) { > //$childrow['genlist'] = $newlist; > $crights = determineLivingPrivateRights($childrow, $righttree); > $childrow['allow_living'] = $crights['living']; > $childrow['allow_private'] = $crights['private']; > $childrow['name'] = getName( $childrow ); > if( $childrow['name'] == $text['living'] ) $childrow['firstname'] = $text['living']; > > echo "
          1. {$childrow['name']}"; > echo getVitalDates( $childrow ); > echo "
          2. \n"; > } > echo "
          \n"; > tng_free_result( $result2 ); > } > } > //if(!$is_mozilla) > echo "
          "; > echo "
        2. \n
        \n"; > > > //push famc (family of parents) to nextgen > $parentfamID = ""; > $locparentset = $parentset; > $parentscount = 0; > $parentfamIDs = array(); > $parents = getChildFamily($tree, $personID, "parentorder"); > if ( $parents ) { > $parentscount = tng_num_rows( $parents ); > if ( $parentscount > 0 ) { > if ( $locparentset > $parentscount ) > $locparentset = $parentscount; > $i = 0; > while ( $parentrow = tng_fetch_assoc( $parents ) ) { > $i++; > if( $i == $locparentset ) > $parentfamID = $parentrow['familyID']; > $parentfamIDs[$i] = $parentrow['familyID']; > } > if(!$parentfamID) $parentfamID = $row['famc']; > } > tng_free_result($parents); > } > > array_push( $currgen, $parentfamID ); > $generation++; > $personcount = 1; > $numbers[$parentfamID] = 1; > > //loop through nextgen > //while there's one to pop and we're less than maxgen > while( count( $currgen ) && $generation <= $generations ) { > //echo "{$text['generation']}: $generation
        \n"; > echo "{$text['generation']}: $generation

        \n"; > //echo "
          \n"; > echo "
            "; > while( $nextfamily = array_shift( $currgen ) ) { > $parents = getFamilyData($tree, $nextfamily); > if( $parents ) { > $parentrow = tng_fetch_assoc( $parents ); > > $famrights = determineLivingPrivateRights($parentrow, $righttree); > $parentrow['allow_living'] = $famrights['living']; > $parentrow['allow_private'] = $famrights['private']; > $parentrow['both'] = $famrights['both']; > > if( $parentrow['husband'] ) { > $gotfather = getPersonData($tree, $parentrow['husband']); > > $fathrow = tng_fetch_assoc( $gotfather ); > if( $fathrow ) { > if( $fathrow['firstname'] || $fathrow['lastname'] ) { > $personcount = $numbers[$nextfamily] * 2; > $lastgen[$fathrow['personID']] = $personcount; > $frights = determineLivingPrivateRights($fathrow, $righttree); > $fathrow['allow_living'] = $frights['living']; > $fathrow['allow_private'] = $frights['private']; > $fathrow['name'] = getName( $fathrow ); > if( $fathrow['name'] == $text['living'] ) $fathrow['firstname'] = $text['living']; > > //echo "
          1. "; > echo "
          2. "; > // if(!$is_mozilla) > //echo "
            "; > echo "
            "; > echo "$personcount.  "; > echo showSmallPhoto( $fathrow['personID'], $fathrow['name'], $frights['both'], 0 ); > echo "{$fathrow['name']}"; > echo getVitalDates( $fathrow, 1 ); > echo getOtherEvents($fathrow); > if( $frights['both'] && $pedigree['regnotes'] ) { > $notes = buildRegNotes(getRegNotes( $fathrow['personID'], "I" )); > if( $notes ) { > echo "

            {$text['notes']}:
            "; > echo "

            \n$notes
            \n

            \n"; > } > } > else $notes = ""; > if( $fathrow['famc'] ) { > if( !in_array( $fathrow['famc'], $nextgen ) ) > array_push( $nextgen, $fathrow['famc'] ); > if(empty($numbers[$fathrow['famc']])) > $numbers[$fathrow['famc']] = $personcount; > } > } > } > tng_free_result( $gotfather ); > } > > if( $parentrow['wife'] ) { > $gotmother = getPersonData($tree, $parentrow['wife']); > > $mothrow = tng_fetch_assoc( $gotmother ); > if( $gotmother ) { > if( $mothrow['firstname'] || $mothrow['lastname'] ) { > $personcount = $numbers[$nextfamily] * 2 + 1; > $lastgen[$mothrow['personID']] = $personcount; > $mrights = determineLivingPrivateRights($mothrow, $righttree); > $mothrow['allow_living'] = $mrights['living']; > $mothrow['allow_private'] = $mrights['private']; > $mothrow['name'] = getName( $mothrow ); > if( $mothrow['name'] == $text['living'] ) $mothrow['firstname'] = $text['living']; > > if( $parentrow['husband'] ) { > $firstfirstname = getFirstNameOnly( $fathrow ); > $marriagemsg = ($personsex == "F") ? $text['wasmarried_female'] : $text['wasmarried_male']; > if($parentrow['marrdate'] || $parentrow['marrplace']) { > echo "

            $firstfirstname " . $marriagemsg . " {$mothrow['name']}"; > echo getSpouseDates( $parentrow, $personsex ); > } > else > echo "

            $firstfirstname " . $marriagemsg . " {$mothrow['name']}."; > $spouseinfo = getVitalDates( $mothrow ); > if( $spouseinfo ) { > $spfirstfirstname = getFirstNameOnly( $mothrow ); > $spparents = getSpouseParents( $mothrow['personID'], $mothrow['sex'] ); > echo " $spfirstfirstname $spparents $spouseinfo"; > } > if(!$tngprint) > echo " [{$text['groupsheet']}] [{$text['familychart']}]

            \n"; > // if(!$is_mozilla) > echo "
            "; > echo "
            \n"; > } > > //echo "
          3. "; > echo "
          4. "; > // if(!$is_mozilla) > //echo " < > < > < > 269,272c268,272 < < --- >

            > 276d276 <
            "; > echo "
            "; > echo "$personcount.  "; > echo showSmallPhoto( $mothrow['personID'], $mothrow['name'], $mrights['both'], 0 ); > echo "{$mothrow['name']}"; > echo getVitalDates( $mothrow, 1 ); > echo getOtherEvents($mothrow); > if( $mrights['both'] && $pedigree['regnotes'] ) { > $notes = buildRegNotes(getRegNotes( $mothrow['personID'], "I" )); > if( $notes ) { > echo "

            {$text['notes']}:
            "; > echo "

            \n$notes
            \n

            \n"; > } > } > else $notes = ""; > //echo "\n"; > if( $mothrow['famc'] ) { > if( !in_array( $mothrow['famc'], $nextgen ) ) > array_push( $nextgen, $mothrow['famc'] ); > if(empty($numbers[$mothrow['famc']])) > $numbers[$mothrow['famc']] = $personcount; > } > } > } > tng_free_result( $gotmother ); > > if($pedigree['regnotes']) { > $prights = determineLivingPrivateRights($parentrow, $righttree); > if($prights['both']) { > $notes = buildRegNotes(getRegNotes( $nextfamily, "F" )); > if( $notes ) { > echo "

            {$text['notes']}:
            "; > echo "

            \n$notes
            \n

            \n"; > } > } > } > } > > //get children > $result2 = getChildrenData($tree, $nextfamily); > if( $result2 && tng_num_rows( $result2 ) ) { > echo "
            {$text['children']}:
            \n
              \n"; > while( $childrow = tng_fetch_assoc( $result2 ) ) { > $crights = determineLivingPrivateRights($childrow, $righttree); > $childrow['allow_living'] = $crights['living']; > $childrow['allow_private'] = $crights['private']; > $childrow['name'] = getName( $childrow ); > //if( $childrow['name'] == $text['living'] ) $childrow['firstname'] = $text['living']; > > echo "
            1. "; > if(!empty($lastlastgen[$childrow['personID']])) { > echo $lastlastgen[$childrow['personID']] . ". "; > echo "{$childrow['name']}"; > } > else > echo "{$childrow['name']}"; > echo getVitalDates( $childrow ); > echo "
            2. \n"; > } > echo "
            \n
            \n"; > tng_free_result( $result2 ); > } > // if(!$is_mozilla) > echo "
            "; > echo "
            \n"; > } > } > > $currgen = $nextgen; > $lastlastgen = $lastgen; > unset( $nextgen ); > unset( $lastgen ); > $nextgen = array(); > $lastgen = array(); > $generation++; > echo "\n
            \n"; > } > ?> > > > tng_footer( "" ); diff -r TNG/ajx_addbookmark.php TNG1403/ajx_addbookmark.php 20c20 < $bookmarks = explode("|", $_COOKIE[$ref]); --- > $bookmarks = isset($_COOKIE[$ref]) ? explode("|", $_COOKIE[$ref]) : []; diff -r TNG/ajx_caption.php TNG1403/ajx_caption.php 7c7 < tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit; --- > tng_db_connect($database_host,$database_name,$database_username,$database_password,$database_port,$database_socket) or exit; diff -r TNG/ajx_delete.php TNG1403/ajx_delete.php 24c24 < $tree = $desc; --- > $tree = isset($desc) ? $desc : ""; 55c55 < if($confirm || $tngconfig['mediadel'] == 1) --- > if(!empty($confirm) || $tngconfig['mediadel'] == 1) 81c81 < $logmsg = $admtext['tlevent'] . " $id {$admtext['succdeleted']}"; --- > $logmsg = $admtext['tlevents'] . ": ID $id {$admtext['succdeleted']}"; 90c90 < $logmsg = $admtext['note'] . " $id {$admtext['succdeleted']}"; --- > $logmsg = $admtext['notes'] . ": ID $id {$admtext['succdeleted']}"; 230a231,233 > $query = "DELETE FROM $events_table WHERE eventtypeID=\"$id\""; > $result = @tng_query($query); > 250,312c253,257 < $query = "DELETE from $people_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $families_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $children_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $sources_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $repositories_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $events_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $notelinks_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $xnotes_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $citations_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $places_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $assoc_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $address_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < if( $id ) { < $query = "SELECT mediaID from $media_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < while($row = tng_fetch_assoc($result)) { < $delquery = "DELETE FROM $albumlinks_table WHERE mediaID=\"{$row['mediaID']}\""; < $delresult = @tng_query($delquery); < } < tng_free_result($result); < < $query = "DELETE from $media_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $medialinks_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < } < < $query = "DELETE FROM $trees_table WHERE gedcom=\"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $branches_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "DELETE from $branchlinks_table WHERE gedcom = \"$id\""; < $result = @tng_query($query); < < $query = "UPDATE $users_table SET allow_living=\"-1\" WHERE gedcom = \"$id\""; < $result = @tng_query($query); --- > $thisid = $id; > include("micro_deletetrees.php"); > > $tquery = "DELETE FROM $trees_table WHERE gedcom=\"$thisid\""; > $result = @tng_query($tquery); 363a309,312 > case "msg": > $query = "DELETE FROM $templates_table WHERE id=\"$id\""; > $result = @tng_query($query); > break; diff -r TNG/ajx_editfamily.php TNG1403/ajx_editfamily.php 107,108c107,108 <
            --- >
            140,141c140,141 <
            --- >
            196c196 < > --- > > 230c230 < echo "  (" . $admtext['edit'] . " )
            "; --- > echo "  (" . $admtext['edit'] . " )
            "; 232c232 <
            --- >
            267d266 <
             
            : <  \n"; --- > >
            >

            > echo $admtext['otherevents'] . ":  \n"; 274c274,275 <

            279a280 >
          5. 283,284c284,285 <
        --- >
        348d348 < diff -r TNG/ajx_editperson.php TNG1403/ajx_editperson.php 101c101 <
        --- > 103,105c103,105 <
        <
        --- >
        >
        116,117c116,117 < $notesicon = $gotnotes['general'] ? "admin-note-on-icon" : "admin-note-off-icon"; < $citesicon = $gotcites['general'] ? "admin-cite-on-icon" : "admin-cite-off-icon"; --- > $notesicon = !empty($gotnotes['general']) ? "admin-note-on-icon" : "admin-note-off-icon"; > $citesicon = !empty($gotcites['general']) ? "admin-cite-on-icon" : "admin-cite-off-icon"; 119c119 < echo "{$admtext['save']}\n"; --- > echo "{$admtext['save']}\n"; 136,137c136,137 <
        --- >
        160,161c160,161 < $notesicon = $cms['tngpath'] . "img/" . ($gotnotes['NAME'] ? "tng_anote_on.gif" : "tng_anote.gif"); < $citesicon = $cms['tngpath'] . "img/" . ($gotcites['NAME'] ? "tng_cite_on.gif" : "tng_cite.gif"); --- > $notesicon = $cms['tngpath'] . "img/" . (!empty($gotnotes['NAME']) ? "tng_anote_on.gif" : "tng_anote.gif"); > $citesicon = $cms['tngpath'] . "img/" . (!empty($gotcites['NAME']) ? "tng_cite_on.gif" : "tng_cite.gif"); 237c237 < echo "  (" . $admtext['edit'] . " )
        "; --- > echo "  (" . $admtext['edit'] . " )
        "; 239c239 <
        --- >
        276d275 <
         
        : <  \n"; --- > >
        >

        > echo $admtext['otherevents'] . ":  \n"; 283c283,284 <

        304a305 >
      5. 315,316c316,317 <
    --- >
    461,462c462,463 <
    --- >
    533c534 < $ifkids = $child['haskids'] ? ">" : " "; --- > $ifkids = $child['haskids'] ? ">" : " "; diff -r TNG/ajx_fampreview.php TNG1403/ajx_fampreview.php 173c173 < $query .= "LEFT JOIN $people_table on ($families_table.husband = $people_table.personID OR $families_table.wife = $people_table.personID) AND $families_table.gedcom = $people_table.gedcom WHERE (wife = \"$ind[personID]\" && husband = \"{$ind['personID']}\") AND $people_table.gedcom = \"$tree\""; --- > $query .= "LEFT JOIN $people_table on ($families_table.husband = $people_table.personID OR $families_table.wife = $people_table.personID) AND $families_table.gedcom = $people_table.gedcom WHERE (wife = \"{$ind['personID']}\" && husband = \"{$ind['personID']}\") AND $people_table.gedcom = \"$tree\""; 215c215 < $query = "SELECT familyID, personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, $people_table.living, $people_table.private, $people_table.branch, $people_table.gedcom FROM $families_table, $people_table WHERE $families_table.familyID = \"$ind[famc]\" AND $families_table.gedcom = \"$tree\" AND $people_table.personID = $families_table.wife AND $people_table.gedcom = \"$tree\""; --- > $query = "SELECT familyID, personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, $people_table.living, $people_table.private, $people_table.branch, $people_table.gedcom FROM $families_table, $people_table WHERE $families_table.familyID = \"{$ind['famc']}\" AND $families_table.gedcom = \"$tree\" AND $people_table.personID = $families_table.wife AND $people_table.gedcom = \"$tree\""; diff -r TNG/ajx_famtimelinexml.php TNG1403/ajx_famtimelinexml.php 1,221c1,316 < \n"; < echo "\n"; < < $righttree = checktree($timetree); < < foreach( $timeline as $timeentry ) { < parse_str( $timeentry ); < $query = "SELECT firstname, lnprefix, lastname, prefix, suffix, nameorder, living, private, branch, sex, gedcom, < birthdate, birthdatetr, birthplace, deathdate, deathdatetr, deathplace, altbirthdate, altbirthdatetr, altbirthplace, burialdate, burialdatetr, burialplace, < IF(birthdatetr !='0000-00-00',birthdatetr,altbirthdatetr) as birth, < IF(deathdatetr !='0000-00-00',deathdatetr,burialdatetr) as death < FROM $people_table WHERE personID = \"$timeperson\" AND gedcom = \"$timetree\""; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < < $beg_date = getTimelineDate($row['birth']); < $beg_year = $beg_date['year']; < $beg_date_gmt = $beg_date['date_gmt']; < if($row['death'] != "0000-00-00") { < $end_date = getTimelineDate($row['death']); < $end_year = $end_date['year']; < $end_date_gmt = $end_date['date_gmt']; < } < else { < $end_date_gmt = date("M d Y") . " GMT"; < $end_year = ""; < } < $rights = determineLivingPrivateRights($row, $righttree); < $row['allow_living'] = $rights['living']; < $row['allow_private'] = $rights['private']; < $name = xmlcharacters(getName($row)); < echo "{$text['birthabbr']} " . displayDate($row['birthdate']) . " - {$text['deathabbr']} " . displayDate($row['deathdate']) . "\n"; < < if($timeperson == $primary) { < if($row['birthdatetr'] != "0000-00-00") { < $evdate = getTimelineDate($row['birthdatetr']); < $evdate_gmt = $evdate['date_gmt']; < $evdateinfo = displayDate($row['birthdate']); < if($row['birthplace']) < $evdateinfo .= ", " . $row['birthplace']; < echo "$evdateinfo\n"; < } < if($row['altbirthdatetr'] != "0000-00-00") { < $evdate = getTimelineDate($row['altbirthdatetr']); < $evdate_gmt = $evdate['date_gmt']; < $evdateinfo = displayDate($row['altbirthdate']); < if($row['altbirthplace']) < $evdateinfo .= ", " . $row['altbirthplace']; < echo "$evdateinfo\n"; < } < if($row['deathdatetr'] != "0000-00-00") { < $evdate = getTimelineDate($row['deathdatetr']); < $evdate_gmt = $evdate['date_gmt']; < $evdateinfo = displayDate($row['deathdate']); < if($row['deathplace']) < $evdateinfo .= ", " . $row['deathplace']; < echo "$evdateinfo\n"; < } < if($row['burialdatetr'] != "0000-00-00") { < $evdate = getTimelineDate($row['burialdatetr']); < $evdate_gmt = $evdate['date_gmt']; < $evdateinfo = displayDate($row['burialdate']); < if($row['burialplace']) < $evdateinfo .= ", " . $row['burialplace']; < echo "$evdateinfo\n"; < } < } < tng_free_result($result); < < if($rights['both']) { < $query = "SELECT display, eventdate, eventdatetr, eventplace, info FROM ($events_table, $eventtypes_table) < WHERE persfamID = \"$timeperson\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID AND gedcom = \"$timetree\" AND keep = \"1\" AND parenttag = \"\" < ORDER BY ordernum, tag, description, eventdatetr, info, eventID"; < $custevents = tng_query($query); < while ( $custevent = tng_fetch_assoc( $custevents ) ) { < if($custevent['eventdatetr'] != "0000-00-00") { < $displayval = getEventDisplay( $custevent['display'] ); < $eventDate = displayDate($custevent['eventdate']); < < $beg_date = getTimelineDate($custevent['eventdatetr']); < $beg_year = $beg_date['year']; < $beg_date_gmt = $beg_date['date_gmt']; < < $end_date = ""; < $got_to = stripos($custevent['eventdate'], "to "); < if($got_to) { < $end_date = substr($custevent['eventdate'], $got_to + 3); < } < else { < $got_and = stripos($custevent['eventdate'], "and "); < if($got_and) { < $end_date = substr($custevent['eventdate'], $got_and + 4); < } < } < if($end_date) { < $end_date_array = getTimelineDate(convertDate($end_date)); < $end_date_gmt = $end_date_array['date_gmt']; < } < else < $end_date_gmt = $beg_date_gmt; < //if eventdate contains "to" or "and", take the rest of that string and do a similar match for the end date < < $info = $custevent['eventplace']; < $info .= $info && $custevent['info'] ? ": " . xmlcharacters($custevent['info']) : ""; < $title = xmlcharacters("$displayval ($eventDate)"); < echo "$info\n"; < } < } < tng_free_result( $custevents ); < < if( $row['sex'] == "M" ) { < $self = "husband"; $spouse = "wife"; $spouseorder = "husborder"; < } < elseif( $row['sex'] == "F" ) { < $self = "wife"; $spouse = "husband"; $spouseorder = "wifeorder"; < } < else { < $self = ""; $spouse = ""; $spouseorder = ""; < } < //get and loop through all marriages (link to people table on opposite spouse) for this person based on gender < if( $spouseorder ) < $marriages = getSpouseFamilyDataPlusDates($timetree, $self, $timeperson, $spouseorder); < else < $marriages = getSpouseFamilyDataUnionPlusDates($timetree, $timeperson); < if( !tng_num_rows($marriages) && $spouseorder) { < $marriages = getSpouseFamilyDataUnionPlusDates($timetree, $timeperson); < } < < while ( $marriagerow = tng_fetch_assoc( $marriages ) ) { < //do event for marriage date and person (observe living rights) < if(substr($marriagerow['marrdatetr'],0,4) != "0000") { < if( !$spouseorder ) < $spouse = $marriagerow['husband'] == $timeperson ? wife : husband; < unset($spouserow); < if( $marriagerow[$spouse] ) { < $spouseresult= getPersonSimple($timetree, $marriagerow[$spouse]); < $spouserow = tng_fetch_assoc( $spouseresult ); < $srights = determineLivingPrivateRights($spouserow, $righttree); < $spouserow['allow_living'] = $srights['living']; < $spouserow['allow_private'] = $srights['private']; < if( $spouserow['firstname'] || $spouserow['lastname'] ) { < $spousename = getName( $spouserow ); < } < tng_free_result( $spouseresult ); < } < < $rightfbranch = checkbranch( $marriagerow['branch'] ) ? 1 : 0; < $mrights = determineLivingPrivateRights($marriagerow, $righttree, $rightfbranch); < $marriagerow['allow_living'] = $mrights['living']; < $marriagerow['allow_private'] = $mrights['private']; < if( $mrights['both'] ) { < $beg_date = getTimelineDate($marriagerow['marrdatetr']); < $beg_year = $beg_date['year']; < $beg_date_gmt = $beg_date['date_gmt']; < $displayDate = displayDate($marriagerow['marrdate']); < < echo "" . xmlcharacters("$displayDate, {$marriagerow['marrplace']}") . "\n"; < } < } < //get all children (link to people) born to this marriage < //loop through and make event for each < $children= getChildrenDataPlusDates($timetree, $marriagerow['familyID']); < < while ( $child = tng_fetch_assoc( $children ) ) { < if( $child['birthdate'] ) { < $date = $child['birthdatetr']; < $displayDate = displayDate($child['birthdate']); < $abbr = $text['birthabbr']; < } < elseif( $child['altbirthdate'] ) { < $date = $child['altbirthdatetr']; < $displayDate = displayDate($child['altbirthdate']); < $abbr = $text['chrabbr']; < } < if($date && substr($date,0,4) != "0000") { < $crights = determineLivingPrivateRights($child, $righttree); < $child['allow_living'] = $crights['living']; < $child['allow_private'] = $crights['private']; < if( $crights['both'] ) { < if( $child['firstname'] || $child['lastname'] ) { < $childname = getName( $child ); < } < $beg_date = getTimelineDate($date); < $beg_year = $beg_date['year']; < $beg_date_gmt = $beg_date['date_gmt']; < echo "" . xmlcharacters("$abbr $displayDate") . "\n"; < } < } < } < tng_free_result( $children ); < } < tng_free_result( $marriages ); < } < } < < echo "\n"; --- > $textpart = "timeline"; > include("tng_begin.php"); > > include($cms['tngpath'] . "datelib.php"); > > $timeline = $_SESSION['timeline']; > if( !is_array( $timeline ) ) $timeline = array(); > > function getTimelineDate($date) { > $ret = array(); > > preg_match('/(\d\d\d\d)-(\d\d)-(\d\d).*/', $date, $matches); > if($matches[2] == "00") $matches[2] = "01"; > if($matches[3] == "00") $matches[3] = "01"; > $ret['year'] = $matches[1]; > $ret['date_gmt'] = date("M d Y", gmmktime(12, 0, 0, $matches[2], $matches[3], $ret['year'])) . " GMT"; > > return $ret; > } > > header('Content-Type: application/xml'); > echo " if($session_charset) > echo " encoding=\"$session_charset\""; > echo "?>\n"; > echo "\n"; > > if( !isset($timetree) ) $timetree = ""; > $righttree = checktree($timetree); > > foreach( $timeline as $timeentry ) { > parse_str( $timeentry, $output ); > $query = "SELECT firstname, lnprefix, lastname, prefix, suffix, nameorder, title, living, private, branch, sex, gedcom, > birthdate, birthdatetr, birthplace, deathdate, deathdatetr, deathplace, altbirthdate, altbirthdatetr, altbirthplace, burialdate, burialdatetr, burialplace, > IF(birthdatetr !='0000-00-00',birthdatetr,altbirthdatetr) as birth, > IF(deathdatetr !='0000-00-00',deathdatetr,burialdatetr) as death > FROM $people_table WHERE personID = \"{$output['timeperson']}\" AND gedcom = \"{$output['timetree']}\""; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > > $beg_date = getTimelineDate($row['birth']); > $beg_year = $beg_date['year']; > $beg_date_gmt = $beg_date['date_gmt']; > $primaryperson_beg_year = $beg_year; //added, to be used if spouse with no birth year > if($row['death'] != "0000-00-00") { > $end_date = getTimelineDate($row['death']); > $end_year = $end_date['year']; > $end_date_gmt = $end_date['date_gmt']; > } > else { > //$end_date_gmt = date("M d Y") . " GMT"; > $end_date_gmt = $beg_date_gmt;//added, I prefer this solution to the one in the line above > $end_year = ""; > } > $rights = determineLivingPrivateRights($row, $righttree); > $row['allow_living'] = $rights['living']; > $row['allow_private'] = $rights['private']; > $name = xmlcharacters(getName($row)); > echo "{$text['birthabbr']} " . displayDate($row['birthdate']) . " ". $row['birthplace'] . " - {$text['deathabbr']} " . displayDate($row['deathdate']) . " ". $row['deathplace'] . "\n"; > > if($output['timeperson'] == $primary) { > if($row['birthdatetr'] != "0000-00-00") { > $evdate = getTimelineDate($row['birthdatetr']); > $evdate_gmt = $evdate['date_gmt']; > $evdateinfo = displayDate($row['birthdate']); > if($row['birthplace']) > $evdateinfo .= ", " . $row['birthplace']; > //echo "$evdateinfo\n"; > } > if($row['altbirthdatetr'] != "0000-00-00") { > $evdate = getTimelineDate($row['altbirthdatetr']); > $evdate_gmt = $evdate['date_gmt']; > $evdateinfo = displayDate($row['altbirthdate']); > if($row['altbirthplace']) > $evdateinfo .= ", " . $row['altbirthplace']; > //echo "$evdateinfo\n"; > } > if($row['deathdatetr'] != "0000-00-00") { > $evdate = getTimelineDate($row['deathdatetr']); > $evdate_gmt = $evdate['date_gmt']; > $evdateinfo = displayDate($row['deathdate']); > if($row['deathplace']) > $evdateinfo .= ", " . $row['deathplace']; > echo "$evdateinfo\n"; > } > if($row['burialdatetr'] != "0000-00-00") { > $evdate = getTimelineDate($row['burialdatetr']); > $evdate_gmt = $evdate['date_gmt']; > $evdateinfo = displayDate($row['burialdate']); > if($row['burialplace']) > $evdateinfo .= ", " . $row['burialplace']; > echo "$evdateinfo\n"; > } > } > tng_free_result($result); > > if($rights['both']) { > $query = "SELECT display, eventdate, eventdatetr, eventplace, info FROM ($events_table, $eventtypes_table) > WHERE persfamID = \"{$output['timeperson']}\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID AND gedcom = \"{$output['timetree']}\" AND keep = \"1\" AND parenttag = \"\" > ORDER BY ordernum, tag, description, eventdatetr, info, eventID"; > $custevents = tng_query($query); > while ( $custevent = tng_fetch_assoc( $custevents ) ) { > if($custevent['eventdatetr'] != "0000-00-00") { > $displayval = getEventDisplay( $custevent['display'] ); > $eventDate = displayDate($custevent['eventdate']); > > $beg_date = getTimelineDate($custevent['eventdatetr']); > $beg_year = $beg_date['year']; > $beg_date_gmt = $beg_date['date_gmt']; > > $end_date = ""; > $got_to = stripos($custevent['eventdate'], "to "); > if($got_to) { > $end_date = substr($custevent['eventdate'], $got_to + 3); > } > else { > $got_and = stripos($custevent['eventdate'], "and "); > if($got_and) { > $end_date = substr($custevent['eventdate'], $got_and + 4); > } > } > if($end_date) { > $end_date_array = getTimelineDate(convertDate($end_date)); > $end_date_gmt = $end_date_array['date_gmt']; > } > else > $end_date_gmt = $beg_date_gmt; > //if eventdate contains "to" or "and", take the rest of that string and do a similar match for the end date > > $info = $custevent['eventplace']; > $info .= $info && $custevent['info'] ? ": " . xmlcharacters($custevent['info']) : xmlcharacters($custevent['info']); > $title = xmlcharacters("$displayval ($eventDate)"); > echo "$info\n"; > } > } > tng_free_result( $custevents ); > > if( $row['sex'] == "M" ) { > $self = "husband"; $spouse = "wife"; $spouseorder = "husborder"; > } > elseif( $row['sex'] == "F" ) { > $self = "wife"; $spouse = "husband"; $spouseorder = "wifeorder"; > } > else { > $self = ""; $spouse = ""; $spouseorder = ""; > } > //get and loop through all marriages (link to people table on opposite spouse) for this person based on gender > if( $spouseorder ) > $marriages = getSpouseFamilyDataPlusDates($output['timetree'], $self, $output['timeperson'], $spouseorder); > else > $marriages = getSpouseFamilyDataUnionPlusDates($output['timetree'], $output['timeperson']); > if( !tng_num_rows($marriages) && $spouseorder) { > $marriages = getSpouseFamilyDataUnionPlusDates($output['timetree'], $output['timeperson']); > } > > while ( $marriagerow = tng_fetch_assoc( $marriages ) ) { > //do event for marriage date and person (observe living rights) > //if(substr($marriagerow['marrdatetr'],0,4) != "0000") { Include even if no marriage date > $beg_date_gmt = $end_date_gmt = $spouse_birth_year = $spouse_death_year = ""; //added, to be sure the variables are empty > $spousedisplayDate = $spousedeathdate = ""; //added, to be sure the variables are empty > if( !$spouseorder ) > $spouse = $marriagerow['husband'] == $output['timeperson'] ? 'wife' : 'husband'; > unset($spouserow); > if( $marriagerow[$spouse] ) { > $spouseresult = getPersonFullPlusDates($output['timetree'], $marriagerow[$spouse]); > $spouserow = tng_fetch_assoc( $spouseresult ); > $srights = determineLivingPrivateRights($spouserow, $righttree); > $spouserow['allow_living'] = $srights['living']; > $spouserow['allow_private'] = $srights['private']; > if( $spouserow['firstname'] || $spouserow['lastname'] ) { > $spousename = getName( $spouserow ); > } > // Collect data needed to display spouse. 174-215 are new, collecting data for spouse > if( $spouserow['birthdate'] ) { > $spousedate = $spouserow['birthdatetr']; > $spousebirthplace = $spouserow['birthplace']; > $spousedeathplace = $spouserow['deathplace']; > if($spousedate) { > $get = explode("-",$spousedate); > $spouse_birth_year = $get[0]; > $spousebirthdate = $spouse_birth_year; > } > else { > $spouse_birth_year = $spouserow['birthdate']; > $spousebirthdate = $spouserow['birthdate']; > } > $spousedisplayDate = displayDate($spouserow['birthdate']); > $abbr = $text['birthabbr']; > } > else { > $spouse_birth_year = $primaryperson_beg_year; > $spousebirthdate = "Unknown"; > } > if($spouserow['deathdate']) { > $spousedeathdatetr = $spouserow['deathdatetr']; > if($spousedeathdatetr) { > $get = explode("-",$spousedeathdatetr); > $spouse_death_year = $get[0]; > $spousedeathdate = $spouse_death_year; > } > else { > $spouse_death_year = $spouserow['deathdate']; > $spousedeathdate = $spouse_death_year; > } > $spousedisplayDatedeath = displayDate($spouserow['deathdate']); > $deathabbr = $text['deathabbr']; > } > else { > $spousedeathdate = ""; > $spousedisplayDatedeath = ""; > $year = $spouse_birth_year + 5; > $spouse_death_year = $year; > $deathabbr = ""; > } > } > tng_free_result( $spouseresult ); > > $rightfbranch = checkbranch( $marriagerow['branch'] ) ? 1 : 0; > $mrights = determineLivingPrivateRights($marriagerow, $righttree, $rightfbranch); > $marriagerow['allow_living'] = $mrights['living']; > $marriagerow['allow_private'] = $mrights['private']; > if( $mrights['both'] ) { > if(substr($marriagerow['marrdatetr'],0,4) != "0000") { //added, marriagedate sought if available > $beg_date = getTimelineDate($marriagerow['marrdatetr']); > $beg_year = $beg_date['year']; > $beg_date_gmt = $beg_date['date_gmt']; > $displayDate = displayDate($marriagerow['marrdate']); > > echo "" . xmlcharacters("$displayDate, {$marriagerow['marrplace']}") . "\n"; > } > } > > echo "{$text['birthabbr']} " . $spousedisplayDate. " ". $spouserow['birthplace'] . " - {$text['deathabbr']} " . $spousedisplayDatedeath. " ". $spouserow['deathplace'] . "\n"; > //235-241 are new, to display spouse > if ($spouserow['deathdate']) { > $evdateinfo = displayDate($spouserow['deathdate']); > if($spousedeathplace) {; > $evdateinfo .= ", " . $spousedeathplace; > } > echo "$evdateinfo\n"; > } > //$beg_date_gmt = $beg_date_gmt = $spouse_birth_year = $spouse_death_year = $spousedeathdate = ""; > //get all children (link to people) born to this marriage > //loop through and make event for each > $children= getChildrenDataPlusDates($output['timetree'], $marriagerow['familyID']); > > while ( $child = tng_fetch_assoc( $children ) ) { > if( $child['birthdate'] ) { > $date = $child['birthdatetr']; > $birthplace = $child['birthplace']; //added > $deathplace = $child['deathplace']; //added > $displayDate = displayDate($child['birthdate']); > $abbr = $text['birthabbr']; > } > elseif( $child['altbirthdate'] ) { > $date = $child['altbirthdatetr']; > $displayDate = displayDate($child['altbirthdate']); > $abbr = $text['chrabbr']; > } > //added, 260-280 are new, to collect death date and year for children > if($child['deathdate']) { > $deathdate = $child['deathdatetr']; > $displayDatedeath = displayDate($child['deathdate']); > $deathabbr = $text['deathabbr']; > /*elseif( $child['altdeathdate'] ) { > $deathdate = $child['altdeathdate']; > $displayDate = displayDate($child['altdeathdate']); > $abbr = $text['chrabbr']; > }*/ > $end_date = getTimelineDate($deathdate); > $end_year = $end_date['year']; > $end_date_gmt = $end_date['date_gmt']; > } > /*else { > //$end_date_gmt = date("M d Y") . " GMT"; > $end_date_gmt = $beg_date_gmt; > $end_year = ""; > $displayDatedeath = ""; > $deathabbr = ""; > }*/ > if($date && substr($date,0,4) != "0000") { > $crights = determineLivingPrivateRights($child, $righttree); > $child['allow_living'] = $crights['living']; > $child['allow_private'] = $crights['private']; > if( $crights['both'] ) { > if( $child['firstname'] || $child['lastname'] ) { > $childname = getName( $child ); > } > $beg_date = getTimelineDate($date); > $beg_year = $beg_date['year']; > $beg_date_gmt = $beg_date['date_gmt']; > //added, 292-298 are new, if no child deathdate > if(!$child['deathdate']) { > $end_date_gmt = $beg_date_gmt; > $end_year = ""; > $displayDatedeath = ""; > $deathabbr = ""; > } > //orginal > //echo "" . xmlcharacters("$abbr $displayDate") . "\n"; > //with blue line > //echo "{$text['birthabbr']} " . $displayDate . " ". $child['birthplace'] . " - {$text['deathabbr']} " . $displayDatedeath . " ". $child['deathplace'] . "\n"; > //added, no blue line > echo "{$text['birthabbr']} " . $displayDate . " ". $child['birthplace'] . " - {$text['deathabbr']} " . $displayDatedeath . " ". $child['deathplace'] . "\n"; > > } > } > } > tng_free_result( $children ); > } > tng_free_result( $marriages ); > } > } > > echo "\n"; Only in TNG1403: ajx_getimportdata.php diff -r TNG/ajx_getlastcite.php TNG1403/ajx_getlastcite.php 17c17,26 < $title = json_encode(truncateIt($srow['title'],100)); --- > //$title = json_encode(truncateIt($srow['title'],100)); > $title = truncateIt($srow['title'],100); > if($charset == "UTF-8") { > $title = json_encode($title); > $note = json_encode($row['note']); > } > else { > $title = "\"" . $title . "\""; > $note = "\"" . $row['note'] . "\""; > } 20c29 < echo "{\"sourceID\":\"{$row['sourceID']}\",\"title\":{$title},\"citepage\":" . json_encode($row['page']) . ",\"quay\":\"{$row['quay']}\",\"citedate\":\"{$row['citedate']}\",\"citetext\":" . json_encode($row['citetext']) . ",\"citenote\":" . json_encode($row['note']) . "}"; --- > echo "{\"sourceID\":\"{$row['sourceID']}\",\"title\":{$title},\"citepage\":" . json_encode($row['page']) . ",\"quay\":\"{$row['quay']}\",\"citedate\":\"{$row['citedate']}\",\"citetext\":" . json_encode($row['citetext']) . ",\"citenote\":" . $note . "}"; diff -r TNG/ajx_labels.php TNG1403/ajx_labels.php 144c144 < $query = "SELECT firstname, lastname, lnprefix, nameorder, living, private, suffix, title, sex FROM $people_table WHERE personID=\"$personID\" AND gedcom = \"$tree\""; --- > $query = "SELECT personID, firstname, lastname, lnprefix, prefix, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, living, private, suffix, title, branch, gedcom FROM $people_table WHERE personID = \"$personID\" AND gedcom = \"$tree\""; 173a174 > $newbranch = ""; 199c200 < $names .= "" . getName($row) . " ($personID)
    \n"; --- > $names .= "" . getName($row) . " ($personID)
    \n"; 241c242 < $famnames .= "" . getFamilyName($row) . "
    \n"; --- > $famnames .= "" . getFamilyName($row) . "
    \n"; 270a272 > $newbranch = ""; diff -r TNG/ajx_login.php TNG1403/ajx_login.php 17a18 > $pwdfieldclass = "pwdfield"; diff -r TNG/ajx_logxml.php TNG1403/ajx_logxml.php 9a10,12 > ?> > > \n"; --- > if(strpos($line, " if(empty($tree) || strpos($line,"tree=$tree\"") !== false || strpos($line,"tree=$tree&") !== false || strpos($line,"tree=") === false) { > if(strpos($line,"") !== 0) > echo "\n"; > else > echo "$line\n"; > } > } > else > echo "\n"; 14c26,27 < ?> \ No newline at end of file --- > ?> >
    $line
    " . htmlspecialchars($line) . "Please investigate this access
    \ No newline at end of file diff -r TNG/ajx_newfamily.php TNG1403/ajx_newfamily.php 97c97 <    --- > >    124c124 < echo "  (" . $admtext['edit'] . " )
    "; --- > echo "  (" . $admtext['edit'] . " )
    "; 126c126 <
    $admtext[lnprefix]{$admtext['lnprefix']}
    $ifkids$kidcount. $childname"; --- > $persontext .= "
    $ifkids$kidcount. $childname"; Only in TNG1403: ajx_remove_event_cookie.php Only in TNG1403: ajx_setsessionvar.php diff -r TNG/ajx_showbranch.php TNG1403/ajx_showbranch.php 23c23 < $query = "SELECT personID, firstname, lastname, lnprefix, prefix, suffix, branch, gedcom, nameorder, living, private FROM $people_table WHERE gedcom = \"$tree\" and branch LIKE \"%$branch%\" ORDER BY lastname, firstname"; --- > $query = "SELECT personID, firstname, lastname, lnprefix, prefix, suffix, title, branch, gedcom, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, living, private FROM $people_table WHERE gedcom = \"$tree\" and branch LIKE \"%$branch%\" ORDER BY lastname, firstname"; 34c34 < $names .= "" . getName( $row ) . " ({$row['personID']})
    \n"; --- > $names .= "" . getName( $row ) . " ({$row['personID']})
    \n"; 49c49 < $names .= "" . getFamilyName( $row ) . "
    \n"; --- > $names .= "" . getFamilyName( $row ) . "
    \n"; diff -r TNG/ajx_showmediaxml.php TNG1403/ajx_showmediaxml.php 41c41 < if( $noneliving || $imgrow['alwayson'] ) { --- > if( !$private_media && ($noneliving || $imgrow['alwayson']) ) { 46c46 <
    --- >
    diff -r TNG/ajx_slideshow.php TNG1403/ajx_slideshow.php 31c31 < if( $noneliving || $imgrow['alwayson'] ) { --- > if( !$private_media && ($noneliving || $imgrow['alwayson']) ) { 36c36 <
    --- >
    diff -r TNG/ajx_smallimage.php TNG1403/ajx_smallimage.php 6a7 > include($cms['tngpath'] . "imageutils.php"); 44a46 > $image_resized = tngImageRotate($imagename, $image_resized); diff -r TNG/ajx_timelinexml.php TNG1403/ajx_timelinexml.php 24c24 < $beg_date = strftime("%b %d " . $tlrow['evyear'], gmmktime(12, 0, 0, $tlrow['evmonth'], $tlrow['evday'], 2000)); --- > $beg_date = date("M d Y", gmmktime(12, 0, 0, $tlrow['evmonth'], $tlrow['evday'], $tlrow['evyear'])); 26a27 > $isduration = ""; 30c31 < $end_date = strftime("%b %d " . $tlrow['endyear'], gmmktime(12, 0, 0, $tlrow['endmonth'], $tlrow['endday'], 2000)); --- > $end_date = date("M d Y", gmmktime(12, 0, 0, $tlrow['endmonth'], $tlrow['endday'], $tlrow['endyear'])); 37d37 < $isduration = ""; diff -r TNG/ajx_tnginstall.php TNG1403/ajx_tnginstall.php 1a2,3 > $fromadmin = 0; > $maint = ""; 11,13c13,15 < session_start(); < $session_language = $_SESSION['session_language']; < $session_charset = $_SESSION['session_charset']; --- > if(session_status() !== PHP_SESSION_ACTIVE) session_start(); > $session_language = isset($_SESSION['session_language']) ? $_SESSION['session_language'] : ""; > $session_charset = isset($_SESSION['session_charset']) ? $_SESSION['session_charset'] : ""; 27c29,32 < $link = tng_connect($database_host, $database_username, $database_password, $database_name, $database_port, $database_socket); --- > if($database_username && $database_name) > $link = tng_connect($database_host, $database_username, $database_password, $database_name, $database_port, $database_socket); > else > $link = ""; 36c41 < function createtables($collation) { --- > function createtables($collation, $table_prefix) { 41c46 < global $dna_tests_table, $dna_links_table, $dna_groups_table, $templates_table; --- > global $dna_tests_table, $dna_links_table, $dna_groups_table, $templates_table, $image_tags_table; 101c106 < eval("\$$foldertype = \"$foldername\";"); --- > $$foldertype = $foldername; 108,114c113,119 < if(!$rootpath) { < $rootpath = dirname(__FILE__) . "/"; < if (preg_match("/WIN/i",PHP_OS)) { < $rootpath = str_replace("\\","/",$rootpath); < } < } < if(!$tngdomain || $tngdomain == "http://www.yourdomain.com/genealogy") { --- > //if(!$rootpath) { > // $rootpath = dirname(__FILE__) . "/"; > // if (preg_match("/WIN/i",PHP_OS)) { > // $rootpath = str_replace("\\","/",$rootpath); > // } > //} > if(!$tngdomain) { 117c122,123 < $tngdomain = str_replace("\\","/","http://" . $server . dirname($_SERVER['REQUEST_URI'])); --- > $protocol = 'https://'; > $tngdomain = str_replace("\\","/",$protocol . $server . dirname($_SERVER['REQUEST_URI'])); 150c156 < $msg = $text['noconn'] . " Host Name, Database Name, Database Username, Database Password."; --- > $msg = $text['noconn'] . " Host Name, Database Name, Database Username, Database Password (and possibly the port or socket, if those are required)."; 165c171 < eval("\$$key = \"$value\";"); --- > $$key = $value; 167,168c173,174 < if(!trim($database_port)) $database_port = null; < if(!trim($database_socket)) $database_socket = null; --- > $database_port = !empty($database_port) ? trim($database_port) : null; > $database_socket = !empty($database_socket) ? trim($database_socket) : null; 171c177 < $badtables = createtables($collation); --- > $badtables = createtables($collation,$table_prefix ?? ""); 189,190c195,196 < $query = "INSERT IGNORE INTO $users_table (description,username,password,password_type,realname,phone,email,website,address,city,state,zip,country,notes,gedcom,personID,role,allow_edit,allow_add,tentative_edit,allow_delete,allow_lds,allow_living,allow_private,allow_ged,allow_pdf,allow_profile,branch,dt_activated,no_email) "; < $query .= "VALUES (\"Administrator\",\"$username\",\"$password\",\"$password_type\",\"$realname\",\"\",\"$email\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"admin\",\"1\",\"1\",\"0\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"\",\"$today\",\"0\")"; --- > $query = "INSERT IGNORE INTO $users_table (description,username,password,password_type,realname,phone,email,website,address,city,state,zip,country,notes,gedcom,personID,role,allow_edit,allow_add,tentative_edit,allow_delete,allow_lds,allow_living,allow_private,allow_private_notes,allow_ged,allow_pdf,allow_profile,branch,dt_activated,no_email) "; > $query .= "VALUES (\"Administrator\",\"$username\",\"$password\",\"$password_type\",\"$realname\",\"\",\"$email\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"admin\",\"1\",\"1\",\"0\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"\",\"$today\",\"0\")"; 213a220 > $_SESSION['availabletrees'] = $newtreeid; 223c230 < $rootpath = dirname(__FILE__) . "/"; --- > $calc_rootpath = dirname(__FILE__) . "/"; 225c232 < $rootpath = str_replace("\\","/",$rootpath); --- > $calc_rootpath = str_replace("\\","/",$calc_rootpath); 228c235,237 < $newroot = preg_replace( "/\//", "", $rootpath ); --- > else > $calc_rootpath = $rootpath; > $newroot = preg_replace( "/\//", "", $calc_rootpath ); 282,283c291,292 < fwrite( $fp, "\$database_port = '$database_port';\n" ); < fwrite( $fp, "\$database_socket = '$database_socket';\n" ); --- > fwrite( $fp, "\$database_port = \"$database_port\";\n" ); > fwrite( $fp, "\$database_socket = \"$database_socket\";\n" ); 297a307,315 > > //These next 6 tables are obsolete in v6, but are kept here in in order to not throw errors. > fwrite( $fp, "\$headstones_table = \"\";\n" ); > fwrite( $fp, "\$hslinks_table = \"\";\n" ); > fwrite( $fp, "\$photos_table = \"\";\n" ); > fwrite( $fp, "\$photolinks_table = \"\";\n" ); > fwrite( $fp, "\$histories_table = \"\";\n" ); > fwrite( $fp, "\$doclinks_table = \"\";\n" ); > 301a320 > fwrite( $fp, "\$image_tags_table = \"$image_tags_table\";\n" ); 318c337 < fwrite( $fp, "\$mhrequests_table = \"$mhrequests_table\";\n" ); --- > //fwrite( $fp, "\$mhrequests_table = \"$mhrequests_table\";\n" ); 329,330c348,350 < if( !$target ) $target = "_self"; < fwrite( $fp, "\$target = \"$target\";\n" ); --- > fwrite( $fp, "\$sitename = \"Our Family History\";\n" ); > fwrite( $fp, "\$site_desc = \"\";\n" ); > fwrite( $fp, "\$tngconfig['doctype'] = \"\";\n" ); 332a353 > fwrite( $fp, "\$norels = \"\";\n" ); 337d357 < fwrite( $fp, "\$gendexfile = \"$gendexfile\";\n" ); 340d359 < fwrite( $fp, "\$backuppath = \"$backuppath\";\n" ); 345a365,367 > fwrite( $fp, "\$gendexfile = \"$gendexfile\";\n" ); > fwrite( $fp, "\$backuppath = \"$backuppath\";\n" ); > fwrite( $fp, "\$tngconfig['saveconfig'] = \"\";\n" ); 346a369,370 > fwrite( $fp, "\$tngconfig['imgmaxh'] = \"\";\n" ); > fwrite( $fp, "\$tngconfig['imgmaxw'] = \"\";\n" ); 351c375,381 < fwrite( $fp, "\$tngconfig['thumbcols'] = \"{$tngconfig['thumbcols']}\";\n" ); --- > fwrite( $fp, "\$tngconfig['usedefthumbs'] = \"1\";\n" ); > fwrite( $fp, "\$tngconfig['maxnoteprev'] = \"350\";\n" ); > fwrite( $fp, "\$tngconfig['ssdisabled'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['ssrepeat'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['imgviewer'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['imgvheight'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['hidemedia'] = \"0\";\n" ); 353d382 < fwrite( $fp, "\$newmedialinks = \"$newmedialinks\";\n" ); 357d385 < fwrite( $fp, "\$tngconfig['tabs'] = \"{$tngconfig['tabs']}\";\n" ); 359d386 < fwrite( $fp, "\$tngconfig['icons'] = \"{$tngconfig['icons']}\";\n" ); 361,362c388,400 < < fwrite( $fp, "\$emailaddr = \"$emailaddr\";\n" ); --- > fwrite( $fp, "\$tngconfig['showhome'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['showsearch'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['searchchoice'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['showlogin'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['showshare'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['showprint'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['showbmarks'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['hidechr'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['altbirth'] = \"{$tngconfig['altbirth']}\";\n" ); > fwrite( $fp, "\$tngconfig['hidedna'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['password_type'] = \"sha256\";\n" ); > fwrite( $fp, "\$tngconfig['places1tree'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['autogeo'] = \"0\";\n" ); 364a403 > fwrite( $fp, "\$tngconfig['edit_timeout'] = \"{$tngconfig['edit_timeout']}\";\n" ); 365a405 > fwrite( $fp, "\$treerestrict = \"$treerestrict\";\n" ); 369a410 > fwrite( $fp, "\$tngconfig['nnpriv'] = \"0\";\n" ); 370a412,413 > fwrite( $fp, "\$tngconfig['scrollcite'] = \"1\";\n" ); > fwrite( $fp, "\$tngconfig['scrollnotes'] = \"1\";\n" ); 371a415 > fwrite( $fp, "\$tngconfig['ucsurnames'] = \"0\";\n" ); 375,381c419,435 < fwrite( $fp, "\$photosext = \"$photosext\";\n" ); < < fwrite( $fp, "\$tngconfig['maxdesc'] = \"{$tngconfig['maxdesc']}\";\n" ); < fwrite( $fp, "\$defdesc = \"$defdesc\";\n" ); < fwrite( $fp, "\$tngconfig['stdesc'] = \"{$tngconfig['stdesc']}\";\n" ); < fwrite( $fp, "\$tngconfig['regnotes'] = \"{$tngconfig['regnotes']}\";\n" ); < fwrite( $fp, "\$tngconfig['regnosp'] = \"{$tngconfig['regnosp']}\";\n" ); --- > fwrite( $fp, "\$tngconfig['cemrows'] = \"{$tngconfig['cemrows']}\";\n" ); > fwrite( $fp, "\$tngconfig['cemblanks'] = \"0\";\n" ); > > fwrite( $fp, "\$emailaddr = \"$emailaddr\";\n" ); > fwrite( $fp, "\$tngconfig['fromadmin'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['disallowreg'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['revmail'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['autoapp'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['autotree'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['ackemail'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['omitpwd'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['usesmtp'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['mailhost'] = \"\";\n" ); > fwrite( $fp, "\$tngconfig['mailuser'] = \"\";\n" ); > fwrite( $fp, "\$tngconfig['mailpass'] = \"\";\n" ); > fwrite( $fp, "\$tngconfig['mailport'] = \"\";\n" ); > fwrite( $fp, "\$tngconfig['mailenc'] = \"\";\n" ); 385a440,444 > fwrite( $fp, "\$tngconfig['preferEuro'] = \"false\";\n" ); > fwrite( $fp, "\$tngconfig['calstart'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['pardata'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['oldids'] = \"\";\n" ); > fwrite( $fp, "\$tngconfig['lastimport'] = \"\";\n" ); 386a446 > fwrite( $fp, "\$tngconfig['sortbydate'] = \"{$tngconfig['sortbydate']}\";\n" ); 404c464,465 < fwrite( $fp, "\$tngconfig['webmatches'] = \"{$tngconfig['webmatches']}\";\n" ); --- > fwrite( $fp, "\$tngconfig['offline'] = \"\";\n" ); > //fwrite( $fp, "\$tngconfig['webmatches'] = \"{$tngconfig['webmatches']}\";\n" ); 406a468,473 > fwrite( $fp, "\$tngconfig['cookieapproval'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['dataprotect'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['askconsent'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['livingunchecked'] = \"{$tngconfig['livingunchecked']}\";\n" ); > fwrite( $fp, "\$tngconfig['nosuggest'] = \"{$tngconfig['nosuggest']}\";\n" ); > fwrite( $fp, "\$tngconfig['allowcsv'] = \"{$tngconfig['allowcsv']}\";\n" ); 410a478,502 > fwrite( $fp, "\$tngconfig['mediatrees'] = \"0\";\n" ); > fwrite( $fp, "\$tngconfig['footermsg'] = \"\";\n" ); > > fwrite( $fp, "\$maxdnasearchresults = \"50\";\n" ); > fwrite( $fp, "\$showtestnumbers = \"0\";\n" ); > fwrite( $fp, "\$autofillancsurnames = \"0\";\n" ); > fwrite( $fp, "\$numgens = \"3\";\n" ); > fwrite( $fp, "\$ancsurnameupper = \"0\";\n" ); > fwrite( $fp, "\$surnameexcl = \"\";\n" ); > fwrite( $fp, "\$bgmain = \"\";\n" ); > fwrite( $fp, "\$txtmain = \"#FFFFFF\";\n" ); > fwrite( $fp, "\$bgmode = \"#D1EEEE\";\n" ); > fwrite( $fp, "\$txtmode = \"#000000\";\n" ); > fwrite( $fp, "\$bgfastmut = \"#69001A\";\n" ); > fwrite( $fp, "\$txtfastmut = \"#FFFFFF\";\n" ); > fwrite( $fp, "\$bg1_12 = \"#414E68\";\n" ); > fwrite( $fp, "\$txt1_12 = \"#FFFFFF\";\n" ); > fwrite( $fp, "\$bg13_25 = \"#41678A\";\n" ); > fwrite( $fp, "\$txt13_25 = \"#FFFFFF\";\n" ); > fwrite( $fp, "\$bg26_37 = \"#2E8899\";\n" ); > fwrite( $fp, "\$txt26_37 = \"#FFFFFF\";\n" ); > fwrite( $fp, "\$bg38_67 = \"#44A1B8\";\n" ); > fwrite( $fp, "\$txt38_67 = \"#FFFFFF\";\n" ); > fwrite( $fp, "\$bg111 = \"#05B8CC\";\n" ); > fwrite( $fp, "\$txt111 = \"#FFFFFF\";\n" ); 414,419c506,513 < fwrite( $fp, "\$cms['support'] = \"{$cms['support']}\";\n" ); < fwrite( $fp, "\$cms['url'] = \"{$cms['url']}\";\n" ); < fwrite( $fp, "\$cms['tngpath'] = \"{$cms['tngpath']}\";\n" ); < fwrite( $fp, "\$cms['module'] = \"{$cms['module']}\";\n" ); < fwrite( $fp, "\$cms['cloaklogin'] = \"{$cms['cloaklogin']}\";\n" ); < fwrite( $fp, "\$cms['credits'] = \"{$cms['credits']}\";\n" ); --- > fwrite( $fp, " \$cms['support'] = \"{$cms['support']}\";\n" ); > fwrite( $fp, " \$cms['url'] = \"{$cms['url']}\";\n" ); > fwrite( $fp, " if(!isset(\$cms['tngpath']))\n" ); > fwrite( $fp, " \$cms['tngpath'] = \"{$cms['tngpath']}\";\n" ); > fwrite( $fp, " \$cms['module'] = \"{$cms['module']}\";\n" ); > fwrite( $fp, " \$cms['cloaklogin'] = \"{$cms['cloaklogin']}\";\n" ); > fwrite( $fp, " \$cms['credits'] = \"{$cms['credits']}\";\n" ); > fwrite( $fp, " \$cms['adminurl'] = \"\";\n" ); 423c517 < fwrite( $fp, "?>\n" ); --- > fwrite( $fp, "?>" ); 429a524,528 > if ( !isset($localphotopathdisplay) ) $localphotopathdisplay = ""; > if ( !isset($localhistorypathdisplay) ) $localhistorypathdisplay = ""; > if ( !isset($localdocumentpathdisplay) ) $localdocumentpathdisplay = ""; > if ( !isset($localotherpathdisplay) ) $localotherpathdisplay = ""; > 436a536 > fwrite( $fp, "\$tngimpcfg['saveconfig'] = \"\";\n" ); 437a538,539 > fwrite( $fp, "\$tngimpcfg['rrnum'] = \"{$tngimpcfg['rrnum']}\";\n" ); > fwrite( $fp, "\$tngimpcfg['readmsecs'] = \"{$tngimpcfg['readmsecs']}\";\n" ); 438a541 > fwrite( $fp, "\$tngimpcfg['defimpopt'] = \"{$tngimpcfg['defimpopt']}\";\n" ); 441a545,547 > fwrite( $fp, "\$tngimpcfg['maxprivyrs'] = \"{$tngimpcfg['maxprivyrs']}\";\n" ); > fwrite( $fp, "\$tngimpcfg['maxdecdyrs'] = \"{$tngimpcfg['maxdecdyrs']}\";\n" ); > fwrite( $fp, "\$tngimpcfg['maxmarriedage'] = \"{$tngimpcfg['maxmarriedage']}\";\n" ); 444a551 > fwrite( $fp, "\$locimppath['headstones'] = \"{$locimppath['headstones']}\";\n" ); 447c554,556 < fwrite( $fp, "?>\n" ); --- > fwrite( $fp, "\$tngimpcfg['privnote'] = \"{$tngimpcfg['privnote']}\";\n" ); > fwrite( $fp, "\$tngimpcfg['coerce'] = \"{$tngimpcfg['coerce']}\";\n" ); > fwrite( $fp, "?>" ); diff -r TNG/ajx_updateorder.php TNG1403/ajx_updateorder.php 23c23 < $eventID = $plink['eventID']; --- > $eventID = isset($plink['eventID']) ? $plink['eventID'] : ""; 315c315 < $query = "DELETE FROM $album2entities_table WHERE alinkID=\"$link\""; --- > $query = "DELETE FROM $album2entities_table WHERE alinkID=\"$sortlink\""; 319c319 < $query = "DELETE FROM $medialinks_table WHERE medialinkID=\"$link\""; --- > $query = "DELETE FROM $medialinks_table WHERE medialinkID=\"$sortlink\""; 322c322 < $rval = $link; --- > $rval = $sortlink; 364c364 < $count = $row2['maxordernum'] + 1; --- > $count = !empty($row2['maxordernum']) ? $row2['maxordernum'] + 1 : 1; 417,421c417,421 < if(get_magic_quotes_gpc() == 0) { < $altdescription = addslashes($altdescription); < $altnotes = addslashes($altnotes); < } < $dontshow = $show ? "0" : "1"; --- > $altdescription = addslashes($altdescription); > $altnotes = addslashes($altnotes); > > $dontshow = !empty($show) ? "0" : "1"; > $defphoto = !empty($defphoto) ? $defphoto : ""; 441c441 < $query = "SELECT count(alinkID) as count FROM $album2entities_table WHERE entityID = \"$entityID\"$treestr"; --- > $query = "SELECT count(alinkID) as count FROM $album2entities_table WHERE entityID = \"$entityID\"$treestr"; 445,451c445,447 < if( $result ) { < $row = tng_fetch_assoc($result); < $newrow = $row['count'] + 1; < tng_free_result($result); < } < else < $newrow = 1; --- > $row = tng_fetch_assoc($result); > tng_free_result($result); > $newrow = $row ? $row['count'] + 1 : 1; 456c452 < $query = "SELECT firstname, lnprefix, lastname, prefix, suffix, title, living, private, nameorder, gedcom, branch FROM $people_table WHERE gedcom = \"$tree\" AND personID = \"$entityID\""; --- > $query = "SELECT personID, firstname, lnprefix, lastname, prefix, suffix, title, living, private, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, gedcom, branch FROM $people_table WHERE gedcom = \"$tree\" AND personID = \"$entityID\""; 470,471c466,467 < $query = "SELECT wifepeople.personID as wpersonID, wifepeople.firstname as wfirstname, wifepeople.lnprefix as wlnprefix, wifepeople.lastname as wlastname, wifepeople.prefix as wprefix, wifepeople.suffix as wsuffix, wifepeople.nameorder as wnameorder, wifepeople.branch as wbranch, < husbpeople.personID as hpersonID, husbpeople.firstname as hfirstname, husbpeople.lnprefix as hlnprefix, husbpeople.lastname as hlastname, husbpeople.prefix as hprefix, husbpeople.suffix as hsuffix, husbpeople.nameorder as hnameorder, husbpeople.branch as hbranch --- > $query = "SELECT wifepeople.personID as wpersonID, wifepeople.firstname as wfirstname, wifepeople.lnprefix as wlnprefix, wifepeople.lastname as wlastname, wifepeople.prefix as wprefix, wifepeople.suffix as wsuffix, wifepeople.nameorder as wnameorder, wifepeople.title as wtitle, wifepeople.birthdate as wbirthdate, wifepeople.birthdatetr as wbirthdatetr, wifepeople.altbirthdate as waltbirthdate, wifepeople.altbirthdatetr as waltbirthdatetr, wifepeople.deathdate as wdeathdate, wifepeople.deathdatetr as wdeathdatetr, wifepeople.branch as wbranch, wifepeople.gedcom, wifepeople.living as wliving, wifepeople.private as wprivate, > husbpeople.personID as hpersonID, husbpeople.firstname as hfirstname, husbpeople.lnprefix as hlnprefix, husbpeople.lastname as hlastname, husbpeople.prefix as hprefix, husbpeople.suffix as hsuffix, husbpeople.nameorder as hnameorder, husbpeople.title as htitle, husbpeople.birthdate as hbirthdate, husbpeople.birthdatetr as hbirthdatetr, husbpeople.altbirthdate as haltbirthdate, husbpeople.altbirthdatetr as haltbirthdatetr, husbpeople.deathdate as hdeathdate, husbpeople.deathdatetr as hdeathdatetr, husbpeople.branch as hbranch, husbpeople.living as hliving, husbpeople.private as hprivate 484a481,490 > $person['title'] = $row['htitle']; > $person['birthdate'] = $row['hbirthdate']; > $person['birthdatetr'] = $row['hbirthdatetr']; > $person['altbirthdate'] = $row['haltbirthdate']; > $person['altbirthdatetr'] = $row['haltbirthdatetr']; > $person['deathdate'] = $row['hdeathdate']; > $person['deathdatetr'] = $row['hdeathdatetr']; > $person['gedcom'] = $row['gedcom']; > $person['living'] = $row['hliving']; > $person['private'] = $row['hprivate']; 501a508,517 > $person['title'] = $row['wtitle']; > $person['birthdate'] = $row['wbirthdate']; > $person['birthdatetr'] = $row['wbirthdatetr']; > $person['altbirthdate'] = $row['waltbirthdate']; > $person['altbirthdatetr'] = $row['waltbirthdatetr']; > $person['deathdate'] = $row['wdeathdate']; > $person['deathdatetr'] = $row['wdeathdatetr']; > $person['gedcom'] = $row['gedcom']; > $person['living'] = $row['wliving']; > $person['private'] = $row['wprivate']; 572,580c588,600 < $query = "SELECT thumbpath, mediatypeID, usecollfolder FROM $media_table WHERE mediaID = \"$mediaID\""; < $result = tng_query($query); < $row = tng_fetch_assoc($result); < $mediatypeID = $row['mediatypeID']; < $usefolder = $row['usecollfolder'] ? $mediatypes_assoc[$mediatypeID] : $mediapath; < $rval .= "|"; < $rval .= $row['thumbpath'] && file_exists( "$rootpath$usefolder/" . $row['thumbpath'] ) ? "1" : "0"; < $rval .= "|" . $row['mediatypeID']; < tng_free_result($result); --- > if( $type != "album" ) { > $query = "SELECT thumbpath, mediatypeID, usecollfolder FROM $media_table WHERE mediaID = \"$mediaID\""; > $result = tng_query($query); > $row = tng_fetch_assoc($result); > $mediatypeID = $row['mediatypeID']; > $usefolder = $row['usecollfolder'] ? $mediatypes_assoc[$mediatypeID] : $mediapath; > $rval .= "|"; > $rval .= $row['thumbpath'] && file_exists( "$rootpath$usefolder/" . $row['thumbpath'] ) ? "1" : "0"; > $rval .= "|" . $row['mediatypeID']; > tng_free_result($result); > } > else > $rval .= "|0|"; 598,604c618,620 < if( $result ) { < $row = tng_fetch_assoc($result); < $newrow = $row['count'] + 1; < tng_free_result($result); < } < else < $newrow = 1; --- > $row = tng_fetch_assoc($result); > tng_free_result($result); > $newrow = $row ? $row['count'] + 1 : 1; 616c632,643 < $rval = "Links created: " . $newlinks; --- > $rval = "{$admtext['newlinks']}: " . $newlinks; > break; > case "cemlink": > $newcemlinks = 0; > $mediaIDs = explode(",",$medialist); > foreach($mediaIDs as $mediaID) { > $query = "UPDATE $media_table SET cemeteryID = \"$cemeteryID\" WHERE mediaID = \"$mediaID\""; > $result = @tng_query($query); > $newcemlinks += tng_affected_rows(); > } > > $rval = "{$admtext['newcemlinks']}: " . $newcemlinks; 623,628c650,653 < if (get_magic_quotes_gpc() == 0) { < $title = addslashes($title); < $description = addslashes($description); < $owner = addslashes($owner); < $datetaken = addslashes($datetaken); < } --- > $title = addslashes($title); > $description = addslashes($description); > $owner = addslashes($owner); > $datetaken = addslashes($datetaken); 643,649c668,670 < if( $result ) { < $row = tng_fetch_assoc($result); < $newrow = $row['count'] + 1; < tng_free_result($result); < } < else < $newrow = 1; --- > $row = tng_fetch_assoc($result); > tng_free_result($result); > $newrow = $row ? $row['count'] + 1 : 1; 652c673 < $query = "SELECT firstname, lnprefix, lastname, prefix, suffix, title, living, private, nameorder, gedcom, branch FROM $people_table WHERE gedcom = \"$tree\" AND personID = \"$entityID\""; --- > $query = "SELECT personID, firstname, lnprefix, lastname, prefix, suffix, title, living, private, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, gedcom, branch FROM $people_table WHERE gedcom = \"$tree\" AND personID = \"$entityID\""; 677a699,788 > case "saverect": > if(!$id) { > $nolink = true; > $id = "label-" . time(); > } > else > $nolink = false; > $query = "INSERT INTO $image_tags_table (mediaID,rtop,rleft,rheight,rwidth,gedcom,linktype,persfamID,label) VALUES (\"$mediaID\",\"$top\",\"$left\",\"$height\",\"$width\",\"$tree\",\"$linktype\",\"$id\",\"$label\")"; > $result = @tng_query($query); > $rectID = tng_insert_id(); > > $query = "SELECT count(medialinkID) as count FROM $medialinks_table WHERE personID = \"$id\" AND gedcom = \"$tree\""; > $result = @tng_query($query); > $row = tng_fetch_assoc($result); > tng_free_result($result); > $newrow = $row ? $row['count'] + 1 : 1; > > if(!$nolink) { > $query = "INSERT IGNORE INTO $medialinks_table (personID,mediaID,ordernum,gedcom,linktype,eventID) VALUES (\"$id\",\"$mediaID\",\"$newrow\",\"$tree\",\"$linktype\",\"\")"; > $result = @tng_query($query); > > switch($linktype) { > case "I": > $query = "SELECT lastname, lnprefix, firstname, title, prefix, suffix, nameorder, gedcom, branch, living, private, birthdatetr, altbirthdatetr, deathdatetr, personID FROM $people_table WHERE personID = \"{$id}\" AND gedcom = \"$tree\""; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > > $righttree = checktree($tree); > $rightbranch = $righttree ? checkbranch($row['branch']) : false; > $rights = determineLivingPrivateRights($row, $righttree, $rightbranch); > $row['allow_living'] = $rights['living']; > $row['allow_private'] = $rights['private']; > > $label = getName( $row ); > tng_free_result($result); > break; > case "F": > $query = "SELECT husband, wife, gedcom FROM $families_table WHERE familyID = \"$id\" AND gedcom = \"$tree\""; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > $label = getFamilyName( $row ); > tng_free_result($result); > break; > case "S": > $query = "SELECT title FROM $sources_table WHERE sourceID=\"$id\" AND gedcom=\"$tree\""; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > $label = $row['title'] ? $row['title'] : $id; > tng_free_result($result); > break; > case "R": > $query = "SELECT reponame FROM $repositories_table WHERE repoID=\"$id\" AND gedcom=\"$tree\""; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > $label = $row['reponame'] ? $row['reponame'] : $id; > tng_free_result($result); > break; > case "C": > $query = "SELECT title, persfamID, c.sourceID, page FROM $citations_table as c, $sources_table as s > WHERE citationID = \"$id\" AND c.gedcom = \"$tree\" AND c.gedcom = s.gedcom AND c.sourceID = s.sourceID"; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > $label = $row['title'] . " ({$row['persfamID']})"; > tng_free_result($result); > break; > case "L": > $query = "SELECT place FROM $places_table WHERE ID=\"$id\""; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > $label = $row['place']; > tng_free_result($result); > break; > } > } > > $json = true; > $rval = "{\"name\":\"$label\", \"id\":\"$rectID\"}"; > > //also get name and return that along with rectangle ID > break; > case "updaterect": > $query = "UPDATE $image_tags_table SET rtop=\"$top\",rleft=\"$left\",rheight=\"$height\",rwidth=\"$width\" WHERE ID = \"$id\""; > $result = @tng_query($query); > $rval = 1; > break; > case "delrect": > $query = "DELETE FROM $image_tags_table WHERE ID = \"$id\""; > $result = @tng_query($query); > $rval = 1; > break; diff -r TNG/ajx_updateuser.php TNG1403/ajx_updateuser.php 18,33c18,27 < if (get_magic_quotes_gpc() == 0) { < $description = addslashes($description); < $username = addslashes($username); < $gedcom = addslashes($gedcom); < $branches = addslashes($branch); < $realname = addslashes($realname); < $phone = addslashes($phone); < $email = addslashes($email); < $address = addslashes($address); < $notes = addslashes($notes); < $website = addslashes($website); < $city = addslashes($city); < $state = addslashes($state); < $zip = addslashes($zip); < $country = addslashes($country); < } --- > $username = addslashes($username); > $realname = addslashes($realname); > $phone = addslashes($phone); > $email = addslashes($email); > $address = addslashes($address); > $website = addslashes($website); > $city = addslashes($city); > $state = addslashes($state); > $zip = addslashes($zip); > $country = addslashes($country); diff -r TNG/albumlib.php TNG1403/albumlib.php 4c4 < global $mediatypes_assoc, $mediapath, $showalbum_url, $tngconfig, $sitever; --- > global $mediatypes_assoc, $mediapath, $showalbum_url, $tngconfig, $sitever, $tree, $livedefault, $allow_private; 6c6 < $wherestr2 = $tree ? " AND $medialinks_table.gedcom = \"$tree\"" : ""; --- > $wherestr2 = !empty($tree) ? " AND $medialinks_table.gedcom = \"$tree\"" : ""; 8c8 < $query2 = "SELECT gedcom, path, thumbpath, usecollfolder, mediatypeID, $albumlinks_table.mediaID as mediaID, alwayson, $media_table.gedcom FROM ($media_table, $albumlinks_table) --- > $query2 = "SELECT gedcom, path, thumbpath, usecollfolder, mediatypeID, $albumlinks_table.mediaID as mediaID, alwayson, $media_table.gedcom, private FROM ($media_table, $albumlinks_table) 12,14c12,14 < $mediaID = $trow['mediaID']; < $tmediatypeID = $trow['mediatypeID']; < $tusefolder = $trow['usecollfolder'] ? $mediatypes_assoc[$tmediatypeID] : $mediapath; --- > $mediaID = !empty($trow['mediaID']) ? $trow['mediaID'] : ""; > $tmediatypeID = !empty($trow['mediatypeID']) ? $trow['mediatypeID'] : ""; > $tusefolder = !empty($trow['usecollfolder']) ? $mediatypes_assoc[$tmediatypeID] : $mediapath; 19c19 < if( $trow['thumbpath'] && file_exists( "$rootpath$tusefolder/$treestr" . $trow['thumbpath'] ) ) { --- > if( !empty($trow['thumbpath']) && file_exists( "$rootpath$tusefolder/$treestr" . $trow['thumbpath'] ) ) { 21c21 < $foundprivate = 0; --- > $foundprivate = $trow['private'] && !$allow_private; 37,38c37,38 < $prow['allow_living'] == $rights['living']; < $prow['allow_private'] == $rights['private']; --- > $prow['allow_living'] = $rights['living']; > $prow['allow_private'] = $rights['private']; diff -r TNG/anniversaries2.php TNG1403/anniversaries2.php 13a14,16 > if( !isset($offset) ) $offset = ""; > if( !isset($tngpage) ) $tngpage = ""; > diff -r TNG/anniversaries.php TNG1403/anniversaries.php 7,8c7,8 < $tngyear = preg_replace("/[^0-9]/", "", $tngyear ); < $tngkeywords = preg_replace("/[^A-Za-z0-9]/", "", $tngkeywords ); --- > $tngyear = isset($tngyear) ? preg_replace("/[^0-9]/", "", $tngyear ) : ""; > $tngkeywords = isset($tngkeywords) ? preg_replace("/[^A-Za-z0-9]/", "", $tngkeywords ) : ""; 20c20 < if( !$tngneedresults ) { --- > if( empty($tngneedresults) ) { 25a26,30 > else { > $tngmonth = isset($tngmonth) ? preg_replace("/[^0-9]/", "", $tngmonth ) : ""; > $tngdaymonth = isset($tngdaymonth) ? preg_replace("/[^0-9]/", "", $tngdaymonth ) : ""; > $tngneedresults = isset($tngneedresults) ? preg_replace("/[^0-9]/", '', $tngneedresults) : ""; > } 33a39,41 > if( !isset($tngevent) ) $tngevent = ""; > if( !isset($offset) ) $offset = 0; > if( !isset($tngpage) ) $tngpage = ""; 230a239 > $urlstring = ""; 352,355c361,366 < $query = "SELECT $families_table.ID, husb.personID as hpersonID, husb.lastname as hlastname, husb.lnprefix as hlnprefix, husb.firstname as hfirstname, < husb.living as hliving, husb.private as hprivate, husb.branch as hbranch, husb.prefix as hprefix, husb.suffix as hsuffix, husb.nameorder as hnameorder, < wife.personID as wpersonID, wife.lastname as wlastname, wife.lnprefix as wlnprefix, wife.firstname as wfirstname, < wife.living as wliving, wife.private as wprivate, wife.branch as wbranch, wife.prefix as wprefix, wife.suffix as wsuffix, wife.nameorder as wnameorder, --- > $query = "SELECT $families_table.ID, husb.personID as hpersonID, husb.lastname as hlastname, husb.lnprefix as hlnprefix, husb.firstname as hfirstname, > husb.living as hliving, husb.private as hprivate, husb.branch as hbranch, husb.prefix as hprefix, husb.suffix as hsuffix, husb.nameorder as hnameorder, husb.title as htitle, > husb.birthdate as hbirthdate, husb.birthdatetr as hbirthdatetr, husb.altbirthdate as haltbirthdate, husb.altbirthdatetr as haltbirthdatetr, husb.deathdate as hdeathdate, husb.deathdatetr as hdeathdatetr, > wife.personID as wpersonID, wife.lastname as wlastname, wife.lnprefix as wlnprefix, wife.firstname as wfirstname, > wife.living as wliving, wife.private as wprivate, wife.branch as wbranch, wife.prefix as wprefix, wife.suffix as wsuffix, wife.nameorder as wnameorder, wife.title as wtitle, > wife.birthdate as wbirthdate, wife.birthdatetr as wbirthdatetr, wife.altbirthdate as waltbirthdate, wife.altbirthdatetr as waltbirthdatetr, wife.deathdate as wdeathdate, wife.deathdatetr as wdeathdatetr, 367c378 < $query = "SELECT $people_table.ID, $people_table.personID, lastname, lnprefix, firstname, $people_table.living, $people_table.branch, prefix, suffix, nameorder, $place, $datefield, $people_table.gedcom, treename $familiessortdate $eventsfields --- > $query = "SELECT $people_table.ID, $people_table.personID, lastname, lnprefix, firstname, $people_table.living, $people_table.private, $people_table.branch, prefix, suffix, nameorder, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, $place, $datefield, $people_table.gedcom, treename $familiessortdate $eventsfields 414c425 < $header = "\n"; --- > $header = "
    \n"; 416c427 < $header = "
    "; --- > $header = "
    "; 462a474,481 > $row['title'] = $row['htitle']; > $row['birthdate'] = $row['hbirthdate']; > $row['birthdatetr'] = $row['hbirthdatetr']; > $row['altbirthdate'] = $row['haltbirthdate']; > $row['altbirthdatetr'] = $row['haltbirthdatetr']; > $row['deathdate'] = $row['hdeathdate']; > $row['deathdatetr'] = $row['hdeathdatetr']; > $row['gedcom'] = $row['gedcom']; 486a506,513 > $row['title'] = $row['wtitle']; > $row['birthdate'] = $row['wbirthdate']; > $row['birthdatetr'] = $row['wbirthdatetr']; > $row['altbirthdate'] = $row['waltbirthdate']; > $row['altbirthdatetr'] = $row['waltbirthdatetr']; > $row['deathdate'] = $row['wdeathdate']; > $row['deathdatetr'] = $row['wdeathdatetr']; > $row['gedcom'] = $row['gedcom']; 517c544,545 < $placetxt = $row[$place] ? $row[$place] . " \"{$text['findplaces']}\"" : truncateIt($row['info'], 75); --- > $info = isset($row['info']) ? truncateIt($row['info'], 75) : ""; > $placetxt = $row[$place] ? $row[$place] . " \"{$text['findplaces']}\"" : $info; diff -r TNG/api_checklogin.php TNG1403/api_checklogin.php 8a9 > $allow_private_notes = $_SESSION['allow_private_notes']; 15c16 < $allow_living = $allow_private = $allow_lds = 0; --- > $allow_living = $allow_private = $allow_lds = $allow_private_notes = 0; 18c19 < $allow_living = $allow_private = $allow_lds = 1; --- > $allow_living = $allow_private = $allow_lds = $allow_private_notes = 1; Only in TNG: appendix.html diff -r TNG/begin.php TNG1403/begin.php 4a5 > $map = array(); 12a14,22 > if( !$rootpath ) { > $rootpath = dirname(__FILE__) . "/"; > if (preg_match("/WIN/i",PHP_OS)) { > $rootpath = str_replace("\\","/",$rootpath); > } > $saved_rootpath = ""; > } > else > $saved_rootpath = $rootpath; 26,28c36,39 < session_start(); < $session_language = $_SESSION['session_language']; < $session_charset = $_SESSION['session_charset']; --- > if(session_status() !== PHP_SESSION_ACTIVE) session_start(); > $session_language = isset($_SESSION['session_language']) ? $_SESSION['session_language'] : $language; > $_SESSION['session_language'] = $session_language; > $session_charset = isset($_SESSION['session_charset']) ? $_SESSION['session_charset'] : $charset; 41,48c52,57 < if($result !== FALSE) { < while( $row = tng_fetch_assoc( $result ) ) { < $key = "t" . $row['template'] . "_" . $row['keyname']; < if($row['language']) < $key .= "_" . $row['language']; < $tmp[$key] = $row['value']; < } < tng_free_result($result); --- > $tmp = array(); > while( $row = tng_fetch_assoc( $result ) ) { > $key = "t" . $row['template'] . "_" . $row['keyname']; > if($row['language']) > $key .= "_" . $row['language']; > $tmp[$key] = $row['value']; 49a59 > tng_free_result($result); diff -r TNG/branchlibjs.php TNG1403/branchlibjs.php 5a6 > echo "var nobranchmsg = \"{$admtext['nobranch']}\";\n"; 9a11 > if( !isset($wherestr) ) $wherestr = ""; 37a40,41 > if(tree == "-x--all--x-" || tree == "") > tree = "none"; 46,48c50,70 < newElem.text = branchnames[tree][i]; < newElem.value = branchids[tree][i]; < if( !i ) newElem.selected = true; --- > if(tree == "none") { > newElem.text = ""; > newElem.value = ""; > newElem.selected = true; > formName.branch.options.add(newElem); > var newElem = document.createElement("OPTION"); > newElem.text = nobranchmsg; > newElem.value = ""; > formName.branch.options.add(newElem); > } > else { > newElem.text = branchnames[tree][i]; > newElem.value = branchids[tree][i]; > if( !i ) newElem.selected = true; > formName.branch.options.add(newElem); > } > } > if(len > 1) { > var newElem = document.createElement("OPTION"); > newElem.text = nobranchmsg; > newElem.value = "-1"; diff -r TNG/browsealbums.php TNG1403/browsealbums.php 23,24c23,24 < $str .= "\n"; < $str .= "   "; --- > $str .= "\n"; > $str .= "   "; 31a32 > if( !isset($offset) ) $offset = 0; 48c49 < if( $mediasearch ) --- > if( !isset($mediasearch) ) $mediasearch = ""; 95c96 < $header = "
    \n"; --- > $header = "
    \n"; 97c98 < $header = "
    "; --- > $header = "
    "; 122,123c123,124 < $families_table.living as fliving, $families_table.private as fprivate, familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, nameorder, < $album2entities_table.gedcom, $sources_table.title, $sources_table.sourceID, $repositories_table.repoID, reponame, deathdate, burialdate, linktype --- > $families_table.living as fliving, $families_table.private as fprivate, familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, nameorder, people.title, > $album2entities_table.gedcom, $sources_table.title, $sources_table.sourceID, $repositories_table.repoID, reponame, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, burialdate, linktype 151c152 < if( $prow['living'] == NULL && $prow['private'] == NULL && $prow[linktype] == 'F') { --- > if( $prow['living'] == NULL && $prow['private'] == NULL && $prow['linktype'] == 'F') { 202c203 < $alblink = "{$row['albumname']}"; --- > $alblink = "{$row['albumname']}"; 206c207 < $alblink = $text['living']; --- > $alblink = "{$text['living']}"; 224c225 < $albumtext .= "\n"; --- > $albumtext .= "\n"; 232c233 < $header = str_replace( "", "", $header ); --- > $header = str_replace( "", "", $header ); diff -r TNG/browsebranches.php TNG1403/browsebranches.php 30a31 > if( !isset($offset) ) $offset = 0; 40a42 > $branchsearch = isset($branchsearch) ? cleanIt(trim($branchsearch)) : ""; 46c48 < $wherestr = " AND b.gedcom = \"$tree\""; --- > $wherestr .= " AND b.gedcom = \"$tree\""; 96c98 < $header = "
    $arow[acount] {$arow['acount']}  $text[thumb]  {$text['thumb']} 
    \n"; --- > $header = "
    \n"; 98c100 < $header = "
    "; --- > $header = "
    "; 140,143c142,148 < $prights = determineLivingPrivateRights($prow); < $prow['allow_living'] = $prights['living']; < $prow['allow_private'] = $prights['private']; < $namestr = getName( $prow ); --- > $namestr = ""; > if( !empty($prow) ) { > $prights = determineLivingPrivateRights($prow); > $prow['allow_living'] = $prights['living']; > $prow['allow_private'] = $prights['private']; > $namestr = getName( $prow ); > } 160c165 < if( $pagenav || $treesearch ) --- > if( $pagenav || $branchsearch ) diff -r TNG/browse_dna_tests.php TNG1403/browse_dna_tests.php 1,407c1,552 < {$text['allgroups']}\n"; < $groupresult = tng_query($groupquery); < while( $grouprow = tng_fetch_assoc($groupresult) ) { < $groupsel .= "
    < < < < < <
    < 1 ) { < $ret = ""; < $ret .= "{$text['tree']}: "; < $ret .= " < : <   style="display:none;" id="treespinner2" alt="" class="spinner">    < < : <   style="display:none;" id="treespinner3" alt="" class="spinner">    < <
    <
    < < {$text['matches']} $offsetplus {$text['to']} $numrowsplus {$text['of']} $totrows

    "; < < $pagenav = get_browseitems_nav( $totrows, $browse_dna_tests_url . "testsearch=$testsearch&offset", $maxsearchresults, $max_browse_test_pages ); < if( $pagenav || $testsearch ) { < echo doTestSearch( 1, $pagenav ); < echo "
    \n"; < } < < $header = ""; < $headerr = $enableminimap ? " data-tablesaw-minimap" : ""; < $headerr .= $enablemodeswitch ? " data-tablesaw-mode-switch" : ""; < < if ($sitever != "standard") { < if ($tabletype == "toggle") { < $header = "\n"; < } elseif ($tabletype == "stack") { < $header = "
    \n"; < } elseif ($tabletype == "swipe") { < $header = "
    \n"; < } < } else { < $header = "
    "; < } < echo $header; < ?> < < < <

    < <    <    <

    < < < < < < < < < < < < < < < < < 1 ) { ?> < < < \n"; < if ($test_type == "Y-DNA") < echo ""; < $dash = ($row['test_type'] == "Y-DNA") ? "-" : ""; < echo ""; < if ($allow_edit || $showtestnumbers) < echo ""; < if( $row['haplogroup'] ) { < if( $row['confirmed'] ) < $row['haplogroup'] = "" . $row['haplogroup'] . ""; < else < $row['haplogroup'] = "" . $row['haplogroup'] . ""; < echo ""; < } < else < echo ""; < < $dna_pers_result = getPersonData($row['gedcom'], $row['personID']); < $dprow = tng_fetch_assoc($dna_pers_result); < $dna_righttree = checktree($dprow['gedcom']); < $dna_rightbranch = $dna_righttree ? checkbranch($dprow['branch']) : false; < $dprights = determineLivingPrivateRights($dprow, $dna_righttree, $dna_rightbranch); < $dprow['allow_living'] = $dprights['living']; < $dprow['allow_private'] = $dprights['private']; < $dbname = getName( $dprow ); < $person_name = $row['person_name']; < $dna_namestr = getName($dprow); < if ($row['private_dna'] && $allow_edit) < $privacy = " (" . $admtext['text_private'] . ")"; < else < $privacy = ""; < if ($dbname) { < //$dna_namestr .= " ({$row['personID']})"; < $vitalinfo = $dprights['both'] ? getBirthInfo($dprow) : ""; < $dna_namestr = "$dna_namestr$privacy $vitalinfo"; < } else < $dna_namestr = $person_name . $privacy; < if ($row['private_dna'] && !$allow_edit) $dna_namestr = $admtext['text_private']; < tng_free_result($dna_pers_result); < < //query the links table < $query = "SELECT $dna_links_table.personID, lastname, lnprefix, firstname, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, altbirthplace, < deathdate, deathdatetr, deathplace, burialdate, burialdatetr, burialplace, < IF(birthdatetr !='0000-00-00',birthdatetr,altbirthdatetr) as birth, < IF(deathdatetr !='0000-00-00',deathdatetr,burialdatetr) as death, < prefix, suffix, nameorder, $dna_links_table.gedcom, branch, living, private < FROM $dna_links_table, $people_table < WHERE testID = \"{$row['testID']}\" AND $dna_links_table.personID = $people_table.personID AND $dna_links_table.gedcom = $people_table.gedcom < ORDER BY birth DESC, lastname, firstname LIMIT $maxsearchresults"; < $presult = tng_query($query); < $numrows = tng_num_rows( $presult ); < $dnalinktext = ""; < $counter = 1; < while( $prow = tng_fetch_assoc( $presult ) ) { < if($prow['personID'] != $row['personID'] || $prow['gedcom'] != $row['gedcom']) { < if( $dnalinktext ) $dnalinktext .= "
    \n"; < $righttree = checktree($prow['gedcom']); < $rightbranch = $righttree ? checkbranch($prow['branch']) : false; < $rights = determineLivingPrivateRights($prow, $righttree, $rightbranch); < $name = "$counter. "; < if(!$rights['living']) < $name .= $text['living']; < elseif(!$rights['private']) < $name .= $admtext['text_private']; < else { < $prow['allow_living'] = $rights['living']; < $prow['allow_private'] = $rights['private']; < $vitalinfo = $rights['both'] ? getBirthInfo($prow) : ""; < $name .= "" . getName( $prow ) . "$vitalinfo"; < } < $counter++; < $dnalinktext .= $name; < } < } < tng_free_result($presult); < < if($dnalinktext) { < $more = "\"{$text['more']}\" "; < $morediv = "

    {$text['indlinked']}:
    $dnalinktext
    "; < } < else < $more = $morediv = ""; < < echo ""; < $mdanc_namestr = ""; < if($row['MD_ancestorID']) { < $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MD_ancestorID']); < $ancrow = tng_fetch_assoc($dna_anc_result); < $dna_righttree = checktree($row['gedcom']); < $dna_rightbranch = $dna_righttree ? checkbranch($row['branch']) : false; < $dprights = determineLivingPrivateRights($ancrow, $dna_righttree, $dna_rightbranch); < $ancrow['allow_living'] = $dprights['living']; < $ancrow['allow_private'] = $dprights['private']; < $vitalinfo = getBirthInfo($ancrow); < $mdanc_namestr = getName( $ancrow ) . "
    " . $vitalinfo; < < tng_free_result($dna_anc_result); < } < $mrcanc_namestr = ""; < if($row['MRC_ancestorID']) { < if ($row['MRC_ancestorID'][0] == "I") { < $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MRC_ancestorID']); < $ancrow = tng_fetch_assoc($dna_anc_result); < $dna_righttree = checktree($row['gedcom']); < $dna_rightbranch = $dna_righttree ? checkbranch($row['branch']) : false; < $dprights = determineLivingPrivateRights($ancrow, $dna_righttree, $dna_rightbranch); < $ancrow['allow_living'] = $dprights['living']; < $ancrow['allow_private'] = $dprights['private']; < $vitalinfo = getBirthInfo($ancrow); < $mrcanc_namestr = getName( $ancrow ) . "
    " . $vitalinfo; < tng_free_result($dna_anc_result); < } < else if ($row['MRC_ancestorID'][0] == "F") { < $mrcquery = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$row['MRC_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; < $mrcresult = tng_query($mrcquery); < $famrow = tng_fetch_assoc($mrcresult); < tng_free_result($mrcresult); < < $righttree = checktree($row['gedcom']); < $rightbranch = checkbranch($famrow['branch']); < $rights = determineLivingPrivateRights($famrow, $righttree, $rightbranch); < $famrow['allow_living'] = $rights['living']; < $famrow['allow_private'] = $rights['private']; < < $mrcanc_namestr = getFamilyName( $famrow ); < } < } < echo ""; < echo ""; < echo ""; < if( $numtrees > 1 ) < echo ""; < echo "\n"; < $i++; < } < tng_free_result($result); < ?> < <
     #                   
    $i{$row['test_type']}$dash{$row['markers']} {$row['test_number']}  {$row['haplogroup']} N/A $more$dna_namestr $morediv $mdanc_namestr $mrcanc_namestr$group{$row['treename']} 
    <
    < < \n"; < < tng_footer( "" ); < ?> --- > $textpart = "dna"; > include("tng_begin.php"); > > if($tngconfig['hidedna'] && (!$allow_edit || !$allow_add || $assignedtree)) { > header( "Location: thispagedoesnotexist.html" ); > exit; > } > include($cms['tngpath'] . "functions.php"); > include($cms['tngpath'] . "personlib.php" ); > > $browse_dna_tests_url = getURL( "browse_dna_tests", 1 ); > $show_dna_test_url = getURL( "show_dna_test", 1 ); > $showtree_url = getURL( "showtree", 1 ); > $getperson_url = getURL( "getperson", 1 ); > $placesearch_url = getURL( "placesearch", 1 ); > $familygroup_url = getURL( "familygroup", 1 ); > > if( empty($_SESSION['tnglastpage']) || strpos($_SESSION['tnglastpage'], "browse_dna_tests.php") === false ) { > unset ($_SESSION['browse_dna']); > } else { > if( empty($_SESSION['browse_dna']) || !empty($_POST['reset']) ) $_SESSION['browse_dna'] = array(); > if( isset($_POST['tree']) ) $_SESSION['browse_dna']['tree'] = $_POST['tree'] == "-x--all--x-" ? "" : $_POST['tree']; > if( isset($_POST['test_type']) ) $_SESSION['browse_dna']['test_type'] = $_POST['test_type']; > if( isset($_POST['test_group']) ) $_SESSION['browse_dna']['test_group'] = $_POST['test_group']; > if( empty($tree) && isset($_SESSION['browse_dna']['tree']) ) $tree = $_SESSION['browse_dna']['tree']; > if( !isset($test_type) && isset($_SESSION['browse_dna']['test_type']) ) $test_type = $_SESSION['browse_dna']['test_type']; > if( !isset($test_group) && isset($_SESSION['browse_dna']['test_group']) ) $test_group = $_SESSION['browse_dna']['test_group']; > } > > if( !empty($test_type) && $test_type != "atDNA" && $test_type != "mtDNA" && $test_type != "X-DNA" && $test_type != "Y-DNA" ) $test_type = ""; > if( !empty($test_group) ) $test_group = cleanIt($test_group); > if( !empty($tree) ) $tree = cleanIt($tree); > > $maxsearchresults = $maxdnasearchresults ? $maxdnasearchresults : $maxsearchresults; > > function get_test_groups($test_type, $test_group) { > global $text, $dna_groups_table; > $wherestr2 = $test_type ? " AND test_type = \"$test_type\"" : ""; > $groupquery = "SELECT dna_group, description, test_type, gedcom FROM $dna_groups_table WHERE description IS NOT NULL $wherestr2 ORDER BY description"; > $groupsel = " \n"; > $groupresult = tng_query($groupquery); > while( $grouprow = tng_fetch_assoc($groupresult) ) { > $groupsel .= " \n"; > } > tng_free_result($groupresult); > return $groupsel; > } > > function doTestSearch( $instance, $pagenav ) { > global $text, $testsearch, $tree, $test_type; > > $browse_dna_tests_noargs_url = getURL( "browse_dna_tests", 0 ); > > $str = getFORM( "browse_dna_tests", "get", "TestSearch$instance", "" ); > $str .= "      "; > $str .= $pagenav; > if( $testsearch ) > $str .= "     {$text['browsealltests']}"; > $str .= "\n"; > $str .= "\n"; > > return $str; > } > > $max_browse_test_pages = 5; > if(!empty($offset)) { > $offsetplus = $offset + 1; > $newoffset = "$offset, "; > } > else { > $offsetplus = 1; > $newoffset = ""; > $page = 1; > } > > $testsearch = isset($testsearch) ? trim($testsearch) : ''; > $sqltestsearch = cleanIt($testsearch); > if( $tree ) { > $wherestr = "WHERE $dna_tests_table.gedcom = \"$tree\""; > if( $sqltestsearch ) $wherestr .= " AND (test_type LIKE \"%$sqltestsearch%\" OR test_number LIKE \"%$sqltestsearch%\" OR vendor LIKE \"%$sqltestsearch%\" OR notes LIKE \"%$sqltestsearch%\" OR dna_group LIKE \"%$sqltestsearch%\" OR dna_group_desc LIKE \"%$sqltestsearch%\" OR surnames LIKE \"%$sqltestsearch%\")"; > $join = "INNER JOIN"; > } > else { > if( $sqltestsearch ) > $wherestr = "WHERE test_type LIKE \"%$sqltestsearch%\" OR test_number LIKE \"%$sqltestsearch%\" OR vendor LIKE \"%$sqltestsearch%\" OR notes LIKE \"%$sqltestsearch%\" OR dna_group LIKE \"%$sqltestsearch%\" OR dna_group_desc LIKE \"%$sqltestsearch%\" OR surnames LIKE \"%$sqltestsearch%\""; > else > $wherestr = ""; > $join = "LEFT JOIN"; > } > > // only return tests not marked "keep test private" if user does not have "Allow Private" privilege > if (!$allow_private) { > if ($wherestr) > $wherestr .= " AND $dna_tests_table.private_test != \"1\" "; > else > $wherestr .= " WHERE $dna_tests_table.private_test != \"1\" "; > } > else > $wherestr .= ""; > > $test_hdr = $admtext['dna_tests']; > > if(!isset( $test_type )) $test_type = ''; > if($test_type) { > switch ($test_type) { > case "Y-DNA": > $test_hdr = $text['ydna_test']; > break; > case "mtDNA": > $test_hdr = $text['mtdna_test']; > break; > case "atDNA": > $test_hdr = $text['atdna_test']; > break; > } > if($wherestr) > $wherestr .= " AND $dna_tests_table.test_type = \"$test_type\""; > else > $wherestr = "WHERE $dna_tests_table.test_type = \"$test_type\""; > } > if(!isset($test_group)) $test_group = ''; > if($test_group) { > $admtext['dna_tests'] .= ": " . $test_group; > if($wherestr) > $wherestr .= " AND $dna_tests_table.dna_group = \"$test_group\""; > else > $wherestr = "WHERE $dna_tests_table.dna_group = \"$test_group\""; > } > > $query = "SELECT testID, test_type, test_number, vendor, $dna_tests_table.gedcom, $dna_tests_table.personID, treename, ydna_haplogroup, mtdna_haplogroup, markers, ydna_confirmed, mtdna_confirmed, person_name, private_dna, private_test, dna_group, dna_group_desc, surnames, MD_ancestorID, MRC_ancestorID > FROM $dna_tests_table $join $trees_table on $dna_tests_table.gedcom = $trees_table.gedcom $wherestr > ORDER BY test_type, CAST(chromosome AS UNSIGNED), CAST(segment_start AS UNSIGNED), CAST(segment_end AS UNSIGNED), dna_group_desc, personID, vendor, test_date LIMIT $newoffset" . $maxsearchresults; > $result = tng_query($query); > > $numrows = tng_num_rows( $result ); > > if( $numrows == $maxsearchresults || $offsetplus > 1 ) { > if( $tree ) > $query = "SELECT count(testID) as tcount FROM $dna_tests_table LEFT JOIN $trees_table on $dna_tests_table.gedcom = $trees_table.gedcom $wherestr"; > else > $query = "SELECT count(testID) as tcount FROM $dna_tests_table $wherestr"; > $result2 = tng_query($query); > $row = tng_fetch_assoc( $result2 ); > $totrows = $row['tcount']; > } > else > $totrows = $numrows; > > if(!isset( $offset )) $offset = 0; > $numrowsplus = $numrows + $offset; > > $treestr = $tree ? " ({$text['tree']}: $tree)" : ""; > $logstring = "" . xmlcharacters($admtext['dna_tests'].$treestr) . ""; > writelog($logstring); > preparebookmark($logstring); > $flags['scripting'] = ""; > tng_header( $admtext['dna_tests'], $flags ); > ?> > >


    > echo "
    \n"; > ?> > >
    > > > > > > >
    > $numtrees = 1; > if(!$requirelogin || !$treerestrict || !$assignedtree) { > $wherestr = $allow_admin ? "" : "WHERE secret != 2"; > $query = "SELECT gedcom, treename FROM $trees_table $wherestr ORDER BY treename"; > $treeresult = tng_query($query); > $numtrees = tng_num_rows($treeresult); > if( $numtrees > 1 ) { > $ret = ""; > $ret .= "{$text['tree']}: "; > $ret .= "\n"; > tng_free_result($treeresult); > $ret .= "  \"\"\n"; > echo $ret; > } > } > ?> > > : >   style="display:none;" id="treespinner2" alt="" class="spinner">    > > : >   style="display:none;" id="treespinner3" alt="" class="spinner">    > >
    >
    >
    > $_SESSION["ttree"] = $tree; > $_SESSION["ttype"] = $test_type; > $_SESSION["tgroup"] = $test_group; > $_SESSION["tsearch"] = $testsearch; > > if( $totrows ) > echo "

    {$text['matches']} $offsetplus {$text['to']} $numrowsplus {$text['of']} $totrows

    "; > > $pagenav = get_browseitems_nav( $totrows, $browse_dna_tests_url . "testsearch=$testsearch&offset", $maxsearchresults, $max_browse_test_pages ); > if( $pagenav || $testsearch ) { > echo doTestSearch( 1, $pagenav ); > echo "
    \n"; > } > > $header = ""; > $headerr = $enableminimap ? " data-tablesaw-minimap" : ""; > $headerr .= $enablemodeswitch ? " data-tablesaw-mode-switch" : ""; > > ?> > > if ($test_type == "Y-DNA") $compare_url = "compare_selected_ydna.php"; > if ($test_type == "atDNA") $compare_url = "compare_selected_atdna.php"; > if ($test_type == "mtDNA") $compare_url = "compare_selected_mtdna.php"; > ?> >
    >

    > >    >    >

    > } > > if ($sitever != "standard") { > if ($tabletype == "toggle") { > $header = "\n"; > } elseif ($tabletype == "stack") { > $header = "
    \n"; > } elseif ($tabletype == "swipe") { > $header = "
    \n"; > } > } else { > $header = "
    "; > } > echo $header; > ?> > > > > > > } > ?> > > if( $allow_edit || $showtestnumbers ) { ?> > > } > ?> > > > > > > 1 ) { ?> > > > $i = $offsetplus; > while( $row = tng_fetch_assoc( $result ) ) > { > if ($row['private_test'] && ( $allow_private) || (!$row['private_test'])) { > // $group = $row['dna_group_desc'] ? $row['dna_group_desc'] : $text['none']; > $query = "SELECT description FROM $dna_groups_table WHERE dna_group=\"{$row['dna_group']}\""; > $descresult = tng_query($query); > $descrow = tng_fetch_assoc( $descresult ); > tng_free_result($descresult); > $group = $row['dna_group'] ? $descrow['description'] : $text['none']; > > echo "\n"; > if ($test_type && $test_type != "X-DNA") > echo ""; > $dash = ($row['test_type'] == "Y-DNA") ? "-" : ""; > echo ""; > if ($allow_edit || $showtestnumbers) { > if ($row['private_test'] ) > $privtest = "
     (" . $admtext['text_private'] . ")"; > else > $privtest = ""; > echo ""; > } > $haplogroup = " "; > if( $row['ydna_haplogroup'] && $row['test_type'] == "Y-DNA") { > if( $row['ydna_confirmed'] ) > $haplogroup = "" . htmlspecialchars($row['ydna_haplogroup']) . ""; > else > $haplogroup = "" . htmlspecialchars($row['ydna_haplogroup']) . ""; > } > if( $row['mtdna_haplogroup'] && $row['test_type'] == "mtDNA") { > if( $row['mtdna_confirmed'] ) > $haplogroup = "" . htmlspecialchars($row['mtdna_haplogroup']) . ""; > else > $haplogroup = "" . htmlspecialchars($row['mtdna_haplogroup']) . ""; > } > if ($row['test_type'] == "atDNA") { > if ($row['ydna_haplogroup']) > $haplogroup = "Y = " . htmlspecialchars($row['ydna_haplogroup']) . "
    "; > if ($row['mtdna_haplogroup']) { > $haplogroup .= "mt = " . htmlspecialchars($row['mtdna_haplogroup']); > } > } > echo ""; > > $dna_pers_result = getPersonDataPlusDates($row['gedcom'], $row['personID']); > $dprow = tng_fetch_assoc($dna_pers_result); > if($dprow) { > $dna_righttree = checktree($dprow['gedcom']); > $dna_rightbranch = $dna_righttree ? checkbranch($dprow['branch']) : false; > $dprights = determineLivingPrivateRights($dprow, $dna_righttree, $dna_rightbranch); > $dprow['allow_living'] = $dprights['living']; > $dprow['allow_private'] = $dprights['private']; > $dbname = getName( $dprow ); > $person_name = htmlspecialchars($row['person_name']); > $dna_namestr = getName($dprow); > } else { > $dbname = ""; > $person_name = $row['person_name']; > $dna_namestr = ""; > } > if ($row['private_dna'] && $allow_edit) > $privacy = " (" . $admtext['text_private'] . ")"; > else > $privacy = ""; > if ($dbname) { > //$dna_namestr .= " ({$row['personID']})"; > if( empty($tree) ) $tree = $dprow['gedcom']; > $placesearch_url = getURL( "placesearch", 1 ); > $dprow['birthplace'] = ""; > $dprow['altbirthplace'] = ""; > $dprow['deathplace'] = ""; > $dprow['burialplace'] = ""; > $vitalinfo = $dprights['both'] ? getBirthInfo($dprow) : ""; > $dna_namestr = "$dna_namestr$privacy
    " . str_replace( ', ', ' -', trim(ltrim($vitalinfo,", "))); > } else > $dna_namestr = $person_name . $privacy; > if ($row['private_dna'] && !$allow_edit) $dna_namestr = $admtext['text_private']; > tng_free_result($dna_pers_result); > > //query the links table > $query = "SELECT $dna_links_table.personID, lastname, lnprefix, firstname, birthdate, birthdatetr, altbirthdate, altbirthdatetr, altbirthplace, > deathdate, deathdatetr, burialdate, burialplace, > IF(birthdatetr !='0000-00-00',birthdatetr,altbirthdatetr) as birth, > IF(deathdatetr !='0000-00-00',deathdatetr,burialdatetr) as death, > prefix, suffix, nameorder, title, $dna_links_table.gedcom, branch, living, private > FROM $dna_links_table, $people_table > WHERE testID = \"{$row['testID']}\" AND $dna_links_table.personID = $people_table.personID AND $dna_links_table.gedcom = $people_table.gedcom > ORDER BY birth DESC, lastname, firstname LIMIT $maxsearchresults"; > $presult = tng_query($query); > $numrows = tng_num_rows( $presult ); > $dnalinktext = ""; > $counter = 1; > while( $prow = tng_fetch_assoc( $presult ) ) { > if($prow['personID'] != $row['personID'] || $prow['gedcom'] != $row['gedcom']) { > if( $dnalinktext ) $dnalinktext .= "
    \n"; > $righttree = checktree($prow['gedcom']); > $rightbranch = $righttree ? checkbranch($prow['branch']) : false; > $rights = determineLivingPrivateRights($prow, $righttree, $rightbranch); > $name = "$counter. "; > if(!$rights['living']) > $name .= $text['living']; > elseif(!$rights['private']) > $name .= $admtext['text_private']; > else { > $prow['allow_living'] = $rights['living']; > $prow['allow_private'] = $rights['private']; > if( empty($tree) ) $tree = $prow['gedcom']; > $placesearch_url = getURL( "placesearch", 1 ); > $prow['birthplace'] = ""; > $prow['altbirthplace'] = ""; > $prow['deathplace'] = ""; > $prow['burialplace'] = ""; > $vitalinfo = $rights['both'] ? getBirthInfo($prow) : ""; > $name .= "" . getName( $prow ) . "
    " . str_replace( ', ', ' -', trim(ltrim($vitalinfo,", "))); > } > $counter++; > $dnalinktext .= $name; > } > } > tng_free_result($presult); > > if($dnalinktext) { > $more = "\"{$text['more']}\" "; > $morediv = "

    {$text['indlinked']}:
    $dnalinktext
    "; > } > else > $more = $morediv = ""; > > echo ""; > $mdanc_namestr = ""; > if($row['MD_ancestorID']) { > $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MD_ancestorID']); > $ancrow = tng_fetch_assoc($dna_anc_result); > if( $ancrow ) { > if( empty($tree) ) $tree = $ancrow['gedcom']; > $placesearch_url = getURL( "placesearch", 1 ); > $ancrow['birthplace'] = ""; > $ancrow['altbirthplace'] = ""; > $ancrow['deathplace'] = ""; > $ancrow['burialplace'] = ""; > $dna_righttree = checktree($ancrow['gedcom']); > $dna_rightbranch = $dna_righttree ? checkbranch($ancrow['branch']) : false; > $dprights = determineLivingPrivateRights($ancrow, $dna_righttree, $dna_rightbranch); > $ancrow['allow_living'] = $dprights['living']; > $ancrow['allow_private'] = $dprights['private']; > $vitalinfo = getBirthInfo($ancrow); > $anc_namestr = getName( $ancrow ); > $mdanc_namestr = "$anc_namestr" . "
    " . str_replace( ', ', ' -', trim(ltrim($vitalinfo,", "))); > } > > tng_free_result($dna_anc_result); > } > $mrcanc_namestr = ""; > if($row['MRC_ancestorID']) { > if ($row['MRC_ancestorID'][0] == "I") { > $dna_anc_result = getPersonDataPlusDates($row['gedcom'], $row['MRC_ancestorID']); > $ancrow = tng_fetch_assoc($dna_anc_result); > if( $ancrow ) { > if( empty($tree) ) $tree = $ancrow['gedcom']; > $placesearch_url = getURL( "placesearch", 1 ); > $ancrow['birthplace'] = ""; > $ancrow['altbirthplace'] = ""; > $ancrow['deathplace'] = ""; > $ancrow['burialplace'] = ""; > $dna_righttree = checktree($ancrow['gedcom']); > $dna_rightbranch = $dna_righttree ? checkbranch($ancrow['branch']) : false; > $dprights = determineLivingPrivateRights($ancrow, $dna_righttree, $dna_rightbranch); > $ancrow['allow_living'] = $dprights['living']; > $ancrow['allow_private'] = $dprights['private']; > $vitalinfo = getBirthInfo($ancrow); > $anc_namestr = getName( $ancrow ); > $mrcanc_namestr = "$anc_namestr" . "
    " . str_replace( ', ', ' -', trim(ltrim($vitalinfo,", "))); > } > tng_free_result($dna_anc_result); > } > else if ($row['MRC_ancestorID'][0] == "F") { > $mrcquery = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$row['MRC_ancestorID']}\" AND gedcom = \"{$row['gedcom']}\""; > $mrcresult = tng_query($mrcquery); > $famrow = tng_fetch_assoc($mrcresult); > tng_free_result($mrcresult); > > if( $famrow ) { > $righttree = checktree($famrow['gedcom']); > $rightbranch = checkbranch($famrow['branch']); > $rights = determineLivingPrivateRights($famrow, $righttree, $rightbranch); > $famrow['allow_living'] = $rights['living']; > $famrow['allow_private'] = $rights['private']; > > $famname = getFamilyName( $famrow ); > $fammarried = "
      {$text['marrabbr']} " . $famrow['marrdate']; > $mrcanc_namestr = "$famname" .$fammarried ; > } > } > } > echo ""; > echo ""; > echo ""; > if( $numtrees > 1 ) > echo ""; > echo "\n"; > $i++; > } > } > tng_free_result($result); > ?> >
     #                   
    $i{$row['test_type']}$dash" . htmlspecialchars($row['markers']) . " " . htmlspecialchars($row['test_number']) . " $privtest $haplogroup$more$dna_namestr $morediv $mdanc_namestr $mrcanc_namestr$group{$row['treename']} 
    > if ($test_type && $test_type != "X-DNA") { > ?> >
    > >
    >
    > if( $pagenav || $testsearch ) > echo doTestSearch( 2, $pagenav ) . "
    \n"; > > tng_footer( "" ); > ?> diff -r TNG/browsemedia.php TNG1403/browsemedia.php 21c21,24 < $orgmediatypeID = $mediatypeID; --- > $query = "SET SQL_BIG_SELECTS=1"; > $result = tng_query($query); > > if( !isset($mediatypeID) ) $mediatypeID = ""; 22a26,28 > if(array_search($mediatypeID, array_column($mediatypes, 'mediatypeID')) === false) > $mediatypeID = ''; > $orgmediatypeID = $mediatypeID; 29c35 < $titlestr = $text[$mediatypeID] ? $text[$mediatypeID] : $mediatypes_display[$mediatypeID]; --- > $titlestr = !empty($text[$mediatypeID]) ? $text[$mediatypeID] : $mediatypes_display[$mediatypeID]; 38a45 > $hsfields = $hsjoin = ""; 42c49 < if( $mediasearch ) { --- > if( !empty($mediasearch) ) { 45,51c52,53 < if (get_magic_quotes_gpc() == 0) < $mediasearch2 = addslashes($mediasearch); < else { < $mediasearch2 = $mediasearch; < $mediasearch = stripslashes($mediasearch); < } < $mediasearch = cleanIt($mediasearch); --- > $mediasearch2 = addslashes(cleanIt($mediasearch)); > $mediasearch = cleanIt(stripslashes($mediasearch)); 53c55 < else --- > else { 54a57,58 > $mediasearch = ""; > } 55a60 > if( !isset($tnggallery) ) $tnggallery = 0; 58d62 < if( !$tngconfig['thumbcols'] ) $tngconfig['thumbcols'] = 10; 83a88 > if( !isset($offset) ) $offset = 0; 104c109 < $query = "SELECT $media_table.mediaID, $media_table.description, $media_table.notes, path, thumbpath, alwayson, usecollfolder, form, mediatypeID, status, plot, newwindow, abspath, $media_table.gedcom $hsfields FROM $media_table"; --- > $query = "SELECT $media_table.mediaID, $media_table.description, $media_table.notes, path, thumbpath, alwayson, usecollfolder, form, mediatypeID, status, plot, newwindow, private, abspath, owner, datetaken, placetaken, $media_table.latitude as mlat, $media_table.longitude as mlong, $media_table.gedcom $hsfields FROM $media_table"; 174c179,182 < $header .= "
     {$text['indlinked']}  {$text['info']}  {$text['indlinked']} 
    \n" . $header; --- > $header = "
    \n" . $header; 186c194 < $header = "
    \n" . $header; --- > $header = "
    \n" . $header; 203,204c211,212 < $families_table.living as fliving, $families_table.private as fprivate, familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, nameorder, < $medialinks_table.gedcom, $sources_table.title, $sources_table.sourceID, $repositories_table.repoID, reponame, deathdate, burialdate, linktype --- > $families_table.living as fliving, $families_table.private as fprivate, familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, people.prefix as prefix, people.suffix as suffix, nameorder, people.title as title, > $medialinks_table.gedcom, $sources_table.title as stitle, $sources_table.sourceID, $repositories_table.repoID, reponame, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, burialdate, linktype 215c223 < $foundprivate = 0; --- > $foundprivate = $row['private'] && !$allow_private; //if the image is flagged as private, it starts off that way 217,218c225,226 < while( $prow = tng_fetch_assoc( $presult ) ) < { --- > $citelinks = array(); > while( $prow = tng_fetch_assoc( $presult ) ) { 228,230c236,240 < $prow2 = tng_fetch_assoc( $presult2 ); < if( $prow2['ccount'] ) $prow['living'] = 1; < tng_free_result( $presult2 ); --- > if($presult2) { > $prow2 = tng_fetch_assoc( $presult2 ); > if( $prow2['ccount'] ) $prow['living'] = 1; > tng_free_result( $presult2 ); > } 237,239c247,251 < $prow2 = tng_fetch_assoc( $presult2 ); < if( $prow2['ccount'] ) $prow['living'] = 1; < tng_free_result( $presult2 ); --- > if($presult2) { > $prow2 = tng_fetch_assoc( $presult2 ); > if( $prow2['ccount'] ) $prow['living'] = 1; > tng_free_result( $presult2 ); > } 264c276 < $sourcetext = $prow['title'] ? $text['source'] . ": " . $prow['title'] : $text['source'] . ": " . $prow['sourceID']; --- > $sourcetext = $prow['stitle'] ? $text['source'] . ": " . $prow['stitle'] : $text['source'] . ": " . $prow['sourceID']; 272a285,319 > elseif( !$prow['linktype'] || $prow['linktype'] == "C") { > $query = "SELECT persfamID, sourceID, gedcom from $citations_table WHERE citationID = \"{$prow['personID']}\""; > $cresult = tng_query($query); > if($cresult) { > $crow = tng_fetch_assoc($cresult); > if($crow) { > $persfamID = $crow['persfamID']; > if(!in_array($persfamID, $citelinks)) { > $citelinks[] = $persfamID; > if(substr($persfamID,0,1) == $tngconfig['personprefix'] || substr($persfamID,-1) == $tngconfig['personsuffix']) { > $medialinktext .= "
  • "; > $presult2 = getPersonSimple($prow['gedcom'],$persfamID); > if($presult2) { > $cprow = tng_fetch_assoc($presult2); > $cprights = determineLivingPrivateRights($cprow); > $cprow['allow_living'] = $cprights['living']; > $cprow['allow_private'] = $cprights['private']; > $medialinktext .= getName( $cprow ); > tng_free_result($presult2); > } > } > elseif(substr($persfamID,0,1) == $tngconfig['familyprefix'] || substr($persfamID,-1) == $tngconfig['familysuffix']) { > $presult2 = getFamilyData($prow['gedcom'],$persfamID); > if($presult2) { > $famrow = tng_fetch_assoc($presult2); > $familyname = getFamilyName($famrow); > $medialinktext .= "
  • {$text['family']}: $familyname"; > tng_free_result($presult2); > } > } > } > } > tng_free_result($cresult); > } > } 281c328 < $event = $erow['display'] && is_numeric($prow['eventID']) ? getEventDisplay( $erow['display'] ) : ($admtext[$prow['eventID']] ? $admtext[$prow['eventID']] : $prow['eventID']); --- > $event = !empty($erow['display']) && is_numeric($prow['eventID']) ? getEventDisplay( $erow['display'] ) : (!empty($admtext[$prow['eventID']]) ? $admtext[$prow['eventID']] : $prow['eventID']); 285c332 < $medialinktext .= "$hstext\n
  • \n"; --- > if($medialinktext) $medialinktext .= "$hstext\n\n"; 290c337,339 < $showPhotoInfo = $row['allow_living'] = $row['alwayson'] || (!$foundprivate && !$foundliving); --- > $row['allow_living'] = !$foundliving || $row['alwayson']; > $row['allow_private'] = !$foundprivate || $row['alwayson']; > $showPhotoInfo = $row['allow_living'] && $row['allow_private']; 314,315c363,364 < if( $row['allow_living'] ) { < $description = $showPhotoInfo ? "{$row['description']}" : $row['description']; --- > if( $row['allow_living'] && $row['allow_private'] ) { > $description = $showPhotoInfo ? "{$row['description']}" : "{$row['description']}"; 340c389 < $mediatext .= ""; --- > $mediatext .= ""; 344c393 < if($href && $row['allow_living']) { --- > if($href && $row['allow_living'] && $row['allow_private']) { 353c402 < $mediatext .= ""; --- > $mediatext .= "$description
    $notes\n"; > if( $allow_admin && $allow_media_edit ) > $mediatext .= "
    "; 363c414,416 < $mediatext .= ""; --- > $mediatext .= ""; 365c418,427 < $mediatext .= "\n"; > $mediatext .= "\n\n"; > $vitalinfo .= "\n"; > $marrabbr = " "; > } > if( !empty($row['marrplace']) ) { > $vitalinfo .= "\n\n"; > $vitalinfo .= "\n"; > } 659d718 < $flags['tabs'] = $tngconfig['tabs']; 686,692d744 < if( !$generations ) < $generations = $pedigree['initdescgens'] > 8 ? 8 : $pedigree['initdescgens']; < if(!$generations) $generations = 6; < if( $generations > $pedigree['maxdesc'] ) < $generations = $pedigree['maxdesc']; < else < $generations = intval( $generations ); 694c746 < for( $i = 0; $i < $generations; $i++ ) --- > for( $i = 0; $i < $generations + 1; $i++ ) 706a759 > $innermenu .= "{$text['pedvertical']}    |    \n"; 708c761,762 < $innermenu .= "{$text['regformat']}\n"; --- > $innermenu .= "{$text['regformat']}    |    \n"; > $innermenu .= "{$text['dtformat']}\n"; 714a769 > if( !$tngprint ) { 716,718c771,773 <

    < ( > if(!empty($pedigree['usepopups_real'])) { 721,722c776,777 < ?>) <

    --- > ?> > 723a779 > } 729c785,789 < $maxwidth += $pedigree['boxwidth'] + $pedigree['borderwidth'] + (2 * $pedigee['offpageimgw']) + 6 + $pedigree['leftindent']; --- > $maxwidth += $pedigree['boxwidth'] + $pedigree['borderwidth'] + (2 * $pedigree['offpageimgw']) + 6 + $pedigree['leftindent']; > > if( !$tngprint ) { > echo "
    \"{$text['zoomin']}\"/\"{$text['tng_reset']}\"/\"{$text['zoomout']}\"/
    \n"; > } 731a792,793 >
    >
    734a797,798 >
    >
    759a824,834 > > jQuery(document).ready(function() { > jQuery('#inner').draggable(); > $("#inner").on("mousedown touchstart", function(e) { > $(this).addClass('grabbing') > }) > > $("#inner").on("mouseup touchend", function(e) { > $(this).removeClass('grabbing') > }) > }); 794,795c869,889 < if(hDisplace > 0) < ref.offset({left: box.offset().left - hDisplace}); --- > if(hDisplace > 0) { > if(vDisplace > 0) { > ref.offset({left: box.offset().left - ref.width() - }); > if(box.position().top < vOffset) > vOffset = box.position().top; > } > else > ref.offset({left: box.offset().left - hDisplace}); > } > else { > if(vDisplace > 0) { > hDisplace = box.position().left + box.width() + ref.width() - jQuery('#outer').width(); > if(hDisplace > 0) > ref.offset({left: box.offset().left - ref.width() - }); > else > ref.offset({left: box.offset().left + box.width() + (2 * )}); > if(box.position().top < vOffset) > vOffset = box.position().top; > } > } > 799a894 > var zoomstep = 0.05; 805c900,901 < --- > > Only in TNG1403: descendtables.php diff -r TNG/descendtext.php TNG1403/descendtext.php 12a13 > $descendtables_url = getURL( "descendtables", 1 ); 13a15 > $descendvert_url = getURL( "descendvert", 1 ); 186d187 < $flags['tabs'] = $tngconfig['tabs']; 255a257 > $innermenu .= "{$text['pedvertical']}    |    \n"; 257c259,260 < $innermenu .= "{$text['regformat']}\n"; --- > $innermenu .= "{$text['regformat']}    |   \n"; > $innermenu .= "{$text['dtformat']}\n"; 289d291 < Only in TNG1403: descendvert.php diff -r TNG/desctracker.php TNG1403/desctracker.php 11a12,13 > $descendvert_url = getURL( "descendvert", 1 ); > $descendtables_url = getURL( "descendtables", 1 ); 14d15 < $rightbranch = checkbranch($row['branch']); 63,65c64,68 < $name = getName( $person ); < $nameinfo = "$name"; < if( $person['personID'] && $pedigree['inclphotos'] ) { --- > $name = ""; > if( !empty($person['personID']) ) > $name = getName( $person ); > $nameinfo = $name != "" ? "$name" : ""; > if( !empty($person['personID']) && $pedigree['inclphotos'] ) { 70,71c73,74 < if( $person['allow_living'] && $person['allow_private'] ) { < if( $person['birth'] || $person['death'] ) { --- > if( !empty($person['allow_living']) && !empty($person['allow_private']) ) { > if( !empty($person['birth']) || !empty($person['death']) ) { 73a77,78 > $person['birthdate'] = $person['altbirthdate'] = $person['deathdate'] = $person['burialdate'] = ""; > $person['birthdatetr'] = $person['altbirthdatetr'] = $person['deathdatetr'] = $person['burialdatetr'] = "0000-00-00"; //Don't do age calculation. 141c146 < $nextnextfamily = $items[0]; --- > $nextnextfamily = count($items) ? $items[0] : ""; 148,150c153,167 < if( $result3 ) { < $spouserow = tng_fetch_assoc( $result3 ); < $srights = determineLivingPrivateRights($spouserow, $righttree); --- > else { > $result4 = getSpouseFamilyDataUnion($tree, $nextperson); > $whichparent = tng_fetch_assoc( $result4 ); > tng_free_result( $result4 ); > if( $whichparent['husband'] == $nextperson ) { > $result3 = getParentDataCrossPlusDates($tree, $nextnextfamily, "husband", $row['personID'], "wife"); > } else { > $result3 = getParentDataCrossPlusDates($tree, $nextnextfamily, "wife", $row['personID'], "husband"); > } > } > $spouserow = tng_fetch_assoc( $result3 ); > tng_free_result( $result3 ); > if( $spouserow ) { > $rightbranch = $righttree ? checkbranch($spouserow['branch']) : false; > $srights = determineLivingPrivateRights($spouserow, $righttree, $rightbranch); 153d169 < tng_free_result( $result3 ); 267,268c283,287 < if( $result ) { < $row = tng_fetch_assoc( $result ); --- > $row = tng_fetch_assoc( $result ); > tng_free_result( $result ); > $descname = $logname = ""; > if( $row ) { > $rightbranch = $righttree ? checkbranch($row['branch']) : false; 284a304,309 > } else { > $descname = ""; > $rights['both'] = 0; > $row['allow_living'] = 0; > $row['allow_private'] = 0; > $row['sex'] = ""; 287d311 < $flags['tabs'] = $tngconfig['tabs']; 296c320 < if( !$generations ) --- > if( empty($generations) ) 304a329 > $innermenu .= "{$text['pedvertical']}    |    \n"; 306c331,332 < $innermenu .= "{$text['regformat']}\n"; --- > $innermenu .= "{$text['regformat']}    |    \n"; > $innermenu .= "{$text['dtformat']}\n"; 352a379,383 > $linestart = 0; > $lineend = 0; > $firsthalf = 0; > $secondhalf = 0; > $middle = 0; 362a394 > $secondhalf = $childcount > ( $totkids / 2 ) ? 1 : 0; 363a396,398 > $linestart = 1; > $lineend = $firsthalf ? 0 : 1; > $middle = $childcount == ( $totkids / 2 + 0.5) ? 1 : 0; 365c400 < else --- > else { 366a402,410 > $middle = $childcount == ( $totkids / 2 + 0.5) ? 1 : 0; > $middle = $middle || !($childcount < ( $totkids / 2 ) || $childcount > ( $totkids / 2 )) ? 1 : 0; > if ($secondhalf || $middle) > $secondhalf = 1; > if ($firsthalf && ($middle || $childcount > ( $totkids / 2 ))) > $lineend = 1; > if (!$linestart && !$lineend && $middle) > $linestart = 1; > } 372c416,420 < //echo "tl=$box[topleft], tr=$box[topright], ml=$box[middleleft], mr=$box[middleright], bl=$box[bottomleft], br=$box[bottomright], cc=$childcount, tk=$totkids, gn=$gotnext"; --- > > $box['bottomright'] = $more && ((!$lineend && ($firsthalf || $secondhalf) && !$middle) || ($thisisit && !$firsthalf && !$secondhalf) || (!$thisisit && $secondhalf && !$lineend && ($middle && ($totkids % 2 == 1))) || ($firsthalf && $middle && $lineend && ($totkids % 2 == 0))) ? 1 : 0; > $box['bottomleft'] = $more && (($linestart && !$lineend && !$thisisit && $firsthalf) || ($firsthalf && $middle) || ($thisisit && $middle && ($totkids % 2 != 1)) || ($secondhalf && $linestart && !$lineend && !$middle) || ($thisisit && $secondhalf && !$middle)) ? 1 : 0; > //if ($middle) echo "Center: "; > //echo "tl={$box['topleft']}, tr={$box['topright']}, ml={$box['middleleft']}, mr={$box['middleright']}, bl={$box['bottomleft']}, br={$box['bottomright']}, cc=$childcount, tk=$totkids, gn=$gotnext, tii=$thisisit, m=$more, fn={$row['firstname']}, ln={$row['lastname']}, fh=$firsthalf, sh=$secondhalf, ls=$linestart, le=$lineend
    \n"; diff -r TNG/dna_test_results_lib.php TNG1403/dna_test_results_lib.php 1,176c1,291 < "; < $displaystyle = "display:none"; < $displayclass = "dnatest"; < < $uquery = "SELECT $dna_tests_table.testID, $dna_tests_table.personID, $dna_tests_table.gedcom FROM $dna_tests_table, $dna_links_table < WHERE $dna_links_table.personID = \"$personID\" AND $dna_links_table.gedcom = \"$tree\" AND $dna_links_table.testID = $dna_tests_table.testID AND $dna_tests_table.personID != \"$personID\""; < $dna_uresults = tng_query($uquery); < $num_utests = tng_num_rows($dna_uresults); < tng_free_result($dna_uresults); < < $num_links = $num_tests; < $num_tests = $num_tests + 2; < if ($num_utests) { < $linkedstr = ($num_links > 1 && $num_utests) ? $text['people_have'] : $text['person_has']; < $linkedstr .= " " . $dnanamestr; < } < else < $linkedstr = $num_links > 1 ? $admtext['dna_tests'] : $text['dna_test']; < $persontext .= "
    $i
    $i"; --- > $mediatext .= ""; 356,357c405,406 < else < $mediatext .= " "; --- > else > $mediatext .= " "; 359c408,410 < $mediatext .= "$description
    $notes 
    {$row['cemname']}$plotstr {$row['cemname']}$plotstr 
    \n"; > if(!empty($row['mlat']) || !empty($row['mlong'])) $mediatext .= "{$row['mlat']}, {$row['mlong']}
    \n"; > $mediatext .= "
    \n"; --- > $mediatext .= "\n"; > } > else { > $mediatext .= "\n"; > if(!empty($row['owner'])) $mediatext .= "{$text['photoowner']}: {$row['owner']}
    \n"; > if(!empty($row['datetaken'])) $mediatext .= "{$text['date']}: {$row['datetaken']}
    \n"; > if(!empty($row['placetaken'])) $mediatext .= "{$text['place']}: {$row['placetaken']}
    \n"; > if(!empty($row['mlat']) || !empty($row['mlong'])) $mediatext .= "{$row['mlat']}, {$row['mlong']}
    \n"; > $mediatext .= "
    \n"; 367,368d428 < else < $mediatext .= "\n"; 399a460,471 > ?> > > if( !isset($offset) ) $offset = 0; 34a36 > $offset = 0; 44c46,47 < if(!$allow_private) $wherestr .= " AND $notelinks_table.secret != \"1\""; --- > if(!$allow_private_notes) $wherestr .= " AND $notelinks_table.secret != \"1\""; > if( !isset($notesearch) ) $notesearch = ""; 46,52c49,54 < if (get_magic_quotes_gpc() == 0) < $notesearch2 = addslashes($notesearch); < else { < $notesearch2 = $notesearch; < $notesearch = stripslashes($notesearch); < } < $notesearch = cleanIt($notesearch); --- > $notesearch = cleanIt(stripslashes($notesearch)); > $notesearch2 = ""; > $new_str = explode(" ", $notesearch); > foreach($new_str as $value) { > $notesearch2 .= '+' . $value . ' '; > } 54,55c56 < $wherestr .= $wherestr ? " AND" : "WHERE"; < $wherestr .= " match($xnotes_table.note) against( \"{$notesearch2}*\" in boolean mode)"; --- > $wherestr .= " AND match($xnotes_table.note) against( \"{$notesearch2}*\" in boolean mode)"; 58c59 < $query = "SELECT $xnotes_table.ID as ID, $xnotes_table.note as note, $notelinks_table.persfamID as personID, $xnotes_table.gedcom as gedcom --- > $query = "SELECT $xnotes_table.ID as ID, $xnotes_table.note as note, $notelinks_table.persfamID as personID, $xnotes_table.gedcom as gedcom, secret 83c84 < $treestr = $tree ? " ($text[tree]: $tree)" : ""; --- > $treestr = $tree ? " ({$text['tree']}: $tree)" : ""; 108c109 < $header = "\n"; --- > $header = "
    \n"; 110c111 < $header = "
    "; --- > $header = "
    "; 126,128c127,128 < $noneliving = 1; < $noneprivate = 1; < $query2=$query; --- > $noneliving = $noneprivate = $noneprivatenotes = 1; > $query2 = $query; 130,131d129 < if($nrow['secret']) < $nrow['private'] = 1; 153a152 > $row2['allow_private_notes'] = $nrights['private_notes']; 155d153 < if(!$row2['allow_private']) $noneprivate = 0; 156a155,156 > if(!$row2['allow_private']) $noneprivate = 0; > if(!$row2['allow_private_notes'] && $nrow['secret'] == 1) $noneprivatenotes = 0; 158c158 < $notelinktext .= "" . getNameRev($row2) . " ({$row2['personID']})\n
    \n"; --- > $notelinktext .= "" . getNameRev($row2) . " ({$row2['personID']})\n
    \n"; 170a171 > $row2['allow_private_notes'] = $nrights['private_notes']; 172d172 < if(!$row2['allow_private']) $noneprivate = 0; 173a174,175 > if(!$row2['allow_private']) $noneprivate = 0; > if(!$row2['allow_private_notes'] && $nrow['secret'] == 1) $noneprivatenotes = 0; 175c177 < $notelinktext .= "{$text['family']} {$row2['familyID']}\n
    \n"; --- > $notelinktext .= "{$text['family']}: " . getFamilyName( $row2 ) . " ({$row2['familyID']})\n
    \n"; 185c187 < $notelinktext .= "{$text['source']} $sourcetext ({$row2['sourceID']})\n
    \n"; --- > $notelinktext .= "{$text['source']} ({$row2['sourceID']})\n
    \n"; 195c197 < $notelinktext .= "{$text['repository']} $sourcetext ({$row2['repoID']})\n
    \n"; --- > $notelinktext .= "{$text['repository']} ({$row2['repoID']})\n
    \n"; 202c204 < if( $noneliving && $noneprivate ) --- > if( $noneliving && $noneprivate && $noneprivatenotes ) diff -r TNG/browserepos.php TNG1403/browserepos.php 27a28 > if( !isset($offset) ) $offset = 0; 38c39 < $reposearch = trim($reposearch); --- > $reposearch = isset($reposearch) ? cleanIt(trim($reposearch)) : ""; 100c101 < $header = "
    \n"; --- > $header = "
    \n"; 102c103 < $header = "
    \n"; --- > $header = "
    \n"; 104c105 < $header = "
    \n"; --- > $header = "
    \n"; 107c108 < $header = "
    "; --- > $header = "
    "; 116c117 < 1 ) { ?> --- > 1 ) { ?> diff -r TNG/browsesources.php TNG1403/browsesources.php 29a30 > if( !isset($offset) ) $offset = 0; 40c41 < $sourcesearch = trim($sourcesearch); --- > $sourcesearch = isset($sourcesearch) ? cleanIt(trim($sourcesearch)) : ""; 102c103 < $header = "
        
    $header = "
    $header = "
    $header = "
    \n" . $header; --- > $header = "
    \n" . $header; 116c117 < --- > diff -r TNG/browsetrees-old.php TNG1403/browsetrees-old.php 18c18 < $str .= "     "; --- > $str .= "     "; 84c84 < echo ""; --- > echo ""; diff -r TNG/browsetrees.php TNG1403/browsetrees.php 30a31 > if( !isset($offset) ) $offset = 0; 40a42,43 > if( !isset($treesearch) ) $treesearch = ""; > 89c92 < $header = "
         {$row['treename']} {$row['treename']} 
    \n"; --- > $header = "
    \n"; 91c94 < $header = "
    "; --- > $header = "
    "; 107c110 < $trees = explode(',',$_SESSION['availabletrees']); --- > $trees = isset($_SESSION['availabletrees']) ? explode(',',$_SESSION['availabletrees']) : []; 145c148 < echo "{$text['switch']}"; --- > echo "{$text['switch']}"; Only in TNG1403: cache-begin.php Only in TNG1403: cache-delete.php Only in TNG1403: cache-end.php diff -r TNG/calendar.php TNG1403/calendar.php 4c4 < * http://www.tngforum.us/index.php?showtopic=779 --- > * https://tng.community/index.php?showtopic=779 19a20,27 > if( !isset($living) ) $living = ""; > if( !isset($hide) ) $hide = ""; > if( !isset($tree) ) $tree = ""; > if( !isset($m) ) $m = ""; > if( !isset($year) ) $year = ""; > if( !isset($_GET['m']) ) $_GET['m'] = ""; > if( !isset($_GET['y']) ) $_GET['y'] = ""; > 30,32c38,41 < $flags['scripting'] = "\n"; < $flags['scripting'] .= " < \ No newline at end of file diff -r TNG/css/calendar.css TNG1403/css/calendar.css 9,10d8 < background-color:#D6E7FF; < border: 1px solid #5576BE; 52a51 > font-size: 8pt; 74c73 < border: 1px solid #6687CD; --- > border: 1px solid #999; 80,83c79 < border-top: 1px solid #5576BE; < border-left: 1px solid #5576BE; < border-bottom: 2px solid #5576BE; < border-right: 2px solid #5576BE; --- > border: 1px solid #999; 108,111c104,107 < border-top: 1px solid #5576BE; < border-left: 1px solid #5576BE; < border-bottom: 2px solid #5576BE; < border-right: 2px solid #5576BE; --- > border-top: 1px solid #999; > border-left: 1px solid #999; > border-bottom: 2px solid #999; > border-right: 2px solid #999; diff -r TNG/css/cemeteries.css TNG1403/css/cemeteries.css 18d17 < height:100%; Only in TNG1403/css: connections.css diff -r TNG/css/genstyle.css TNG1403/css/genstyle.css 2c2 < .normal { --- > .normal, .indleftcol { 4c4 < font-size: 12px; --- > font-size: 10pt; 15a16,19 > img { > border: 0px; > } > 87a92 > padding: 7px; 95a101 > padding: 7px; 100c106 < background-color: #CACAF1; --- > background-color: #CACAF1; 133a140,144 > .popvdescinner { > padding: 3px; > width: 220px; > } > 135d145 < -moz-box-shadow: 1px 1px 3px 0px #666; 141d150 < -moz-border-radius: 10px; 160c169,180 < float:left --- > float:left; > } > > .vdescboxtable { > height:100%; > float:left; > padding: 5px; > } > > .vpedlink { > padding: 5px 12px 5px 12px; > position: absolute; 162a183,185 > .rounded20 { > border-radius: 20px; > } 165,166d187 < -moz-border-radius: 10px; < -webkit-border-radius: 10px; 171,172d191 < -moz-border-radius: 4px; < -webkit-border-radius: 4px; 175a195,198 > .botbrdr { > border-bottom: 1px solid #fff; > } > 177d199 < -moz-box-shadow: 1px 1px 2px 0px #333; 199d220 < 227a249,331 > padding: 7px; > } > > .adminbody { > margin: 0px; > } > > .admincorner { > padding: 2px 2px 2px 5px; > background-color: white; > width: 154px; > height: 50px; > text-align: center; > } > > .fl-left { > float: left; > } > > .fl-right { > float: right; > } > > .admincorner img { > height: 50px; > border: 0px; > } > > .centerbox { > filter: drop-shadow(3px 3px 4px #444); > border-radius: 20px; > margin: auto; > } > > #dirarrow { > float:right; > margin-top:160px; > } > > .admindivider { > width: 80%; > float: left; > } > > .admintitle { > padding: 0px; > margin: 7px 0px 0px 0px; > } > > .admintop { > padding-left: 10px; > overflow: hidden; > text-align: center; > } > > .topbanner { > position: fixed; > top: 0px; > height: 54px; > margin: 0px; > width: 100%; > line-height: 1.4; > z-index: 10; > filter: drop-shadow(0px 1px 3px #444); > } > > .leftmenu { > width: 150px; > height: 100%; > padding:60px 6px 0px 6px; > position: fixed; > line-height: 1.25; > overflow: auto; > } > > #adminslidebar { > position:absolute; > right:6px; > height:600px; > width:15px; > cursor:pointer; > margin:auto; > z-index: 1; 233d336 < margin:6px; 238c341,345 < margin:4px; --- > padding:60px 0px 0px 166px; > } > > .homeback { > padding: 60px 0px 0px 0px; 242,244c349,489 < border: 1px solid silver; < background-color: #ffffff; < padding: 1px; --- > width: 100%; > max-width: 1200px; > margin: auto; > position: relative; > height: 100%; > } > > .mainbox h1 { > float: left; > margin: 10px 0px 0px 20px; > font-size: 36px; > color: #FFF; > text-shadow: 2px 2px 4px black; > position: absolute; > } > > .admin-banner { > height: 200px; > margin: 10px 10px 0px 10px; > border-radius: 25px; > filter: drop-shadow(3px 3px 4px #444); > overflow: hidden; > position: relative; > } > > .admin-banner-img { > position:absolute; > border-radius: 25px; > -webkit-animation-name: fade; > -webkit-animation-iteration-count: infinite; > -webkit-animation-duration: 150s; > animation-name: fade; > animation-iteration-count: infinite; > animation-duration: 150s; > animation-timing-function: ease-in-out; > filter: linear-gradient(rgba(0,0,0,0.25)); > } > > /* For 3 images > @-webkit-keyframes fade { > 0% {opacity: 1;} > 26.67% {opacity: 1;} > 33.33% {opacity: 0;} > 93.33% {opacity: 0;} > 100% {opacity: 1;} > } > @keyframes fade { > 0% {opacity: 1;} > 26.67% {opacity: 1;} > 33.33% {opacity: 0;} > 93.33% {opacity: 0;} > 100% {opacity: 1;} > } > > #admin-banner1 { > -webkit-animation-delay: 0; > animation-delay: 0; > } > #admin-banner2 { > -webkit-animation-delay: 25s; > animation-delay: 25s; > } > #admin-banner3 { > -webkit-animation-delay: 50s; > animation-delay: 50s; > } > */ > > @-webkit-keyframes fade { > 0% {opacity: 1;} > 16.67% {opacity: 1;} > 20% {opacity: 0;} > 96.67% {opacity: 0;} > 100% {opacity: 1;} > } > @keyframes fade { > 0% {opacity: 1;} > 16.67% {opacity: 1;} > 20% {opacity: 0;} > 96.67% {opacity: 0;} > 100% {opacity: 1;} > } > > #admin-banner1 { > -webkit-animation-delay: 0; > animation-delay: 0; > } > #admin-banner2 { > -webkit-animation-delay: 30s; > animation-delay: 30s; > } > #admin-banner3 { > -webkit-animation-delay: 60s; > animation-delay: 60s; > } > #admin-banner4 { > -webkit-animation-delay: 90s; > animation-delay: 90s; > } > #admin-banner5 { > -webkit-animation-delay: 120s; > animation-delay: 120s; > } > > .adm-rounded-table { > border-radius: 0px 0px 20px 20px; > background-color: white; > } > > .adm-rounded-table > tbody > tr, .adm-rounded-table > tbody > tr > td, .tblback > tbody > tr, .tblback > tbody > tr > td { > border-radius: 20px; > padding: 10px; > } > > .admin-header { > padding: 10px 10px 1px 10px; > border-radius: 20px 20px 0px 0px; > margin-right: 3px; > background-color: #FFFFFF; > } > > .admin-main { > background-color: white; > margin-right: 3px; > padding: 6px 10px 10px 10px; > border-radius: 0px 0px 20px 20px; > } > > .admin-block { > border-radius: 15px; > padding: 12px; > overflow: auto; > } > > .top-rounded-headline { > border-radius: 20px 20px 0px 0px; > padding: 5px 15px 5px 20px; > } > > .bottom-rounded { > border-radius: 0px 0px 20px 20px; 251a497,508 > .adminsubhead { > margin-right: 40px; > position: absolute; > top: 50%; > transform: translateY(-50%); > left: 75px; > } > > .adminsubhead-mobile { > left: 20px; > } > 254c511 < font-size: 16px; --- > font-size: 18px; 266a524,528 > .admintasks { > font-size: 16px; > margin-bottom: 2px; > } > 268a531,535 > position: absolute; > right: 18px; > top: 50%; > transform: translateY(-50%); > font-size: 18px; 332a600,601 > #dna-smicon {background-position: 0px -256px;} > #next-smicon {background-position: 0px -241px;} 388a658,661 > .media-title { > font-size: 13pt; > } > 403a677,691 > .media-edit { > position:absolute; > bottom:0px; > right:0px; > padding-right:5px; > padding-bottom:5px; > display:none; > } > > .vertphoto { > max-width:100%; > max-height:70px; > margin: 0px auto 10px; > } > 524d811 < position: relative; 552,559d838 < textarea { < margin-left: 0px; < } < < select { < padding: 1px 4px; < } < 564c843 < input[type="button"], input[type="submit"], input[type="reset"], input[type="password"], button, input[type="text"], textarea, select { --- > input[type="button"], input[type="submit"], input[type="reset"], input[type="password"], input[type="number"], button, input[type="text"], textarea, select { 566,568c845,846 < -moz-border-radius: 5px; < -webkit-border-radius: 5px; < border-radius: 5px; --- > -webkit-border-radius: 7px; > border-radius: 7px; 571a850,853 > input[type="password"], button, input[type="text"], input[type="number"], textarea, select { > font-size: 14px; > } > 579a862,866 > textarea { > margin-left: 0px; > border-radius: 10px; > } > 610a898,901 > input.medpwdfield { > width: 240px; > } > 619,620c910,911 < select.mediumfield { < width:170px; --- > .mediumfield { > width:160px; 650a942,950 > padding: 9px; > } > > .movefields { > border-radius: 8px; > padding: 4px; > width: 30px; > text-align: center; > border: 1px solid gray; 693a994,998 > .admin-down-icon {background-position: 0px -383px;} > > .action-btn { > padding-top: 2px; > } 708,714c1013,1020 < .thumb, .smallimg, .media-preview { < -moz-box-shadow: 1px 1px 1px 0px #777; < -webkit-box-shadow: 1px 1px 1px 0px #777; < box-shadow: 1px 1px 1px 0px #777; < -moz-border-radius: 4px; < -webkit-border-radius: 4px; < border-radius: 4px; --- > .thumb, .smallimg, .adminthumb { > border: 0; > box-shadow: 1px 1px 1px 0px #777; > border-radius: 5px; > } > > #thumbholder a, .thumbholder a { > border-radius: 5px; 746d1051 < -moz-border-radius: 4px; 781c1086 < filter:alpha(opacity=70); --- > filter:opacity(70%); 794d1098 < -moz-border-radius: 8px; 817d1120 < -moz-border-radius: 5px 5px 0px 0px; 826d1128 < -moz-border-radius: 5px 5px 0px 0px; 832c1134 < margin: 0px 0px 0px 5px; --- > margin: 3px 0px 0px 5px; 857c1159 < background-image: url(../img/background.gif); --- > margin: 0px; 861a1164,1165 > padding: 7px; > font-size: 11pt; 864c1168 < .tngmsgarea .adminsubhead, --- > .tngmsgarea .admintasks, 884a1189 > font-size: 9px; 907d1211 < line-height: 2em; 936a1241 > border-radius: 5px; 943d1247 < border:1px solid black; 950a1255 > border-radius: 5px; 960c1265 < padding: -3px; --- > padding: 3px; 993c1298,1299 < margin:2px 0 0 -15px --- > margin:2px 0 0 -15px; > list-style: none; 1020d1325 < -moz-border-radius: 8px; 1036d1340 < -moz-border-radius: 0px 4px 4px 0px; 1053,1057c1357,1362 < float:right; < padding:10px; < font-size:14pt; < border:1px solid black; < margin-right:15% --- > float:right; > padding:10px; > font-size:14pt; > border:1px solid black; > margin-right:15%; > border-radius: 10px; 1070d1374 < -moz-border-radius: 10px; 1117a1422,1429 > .reportbox { > border: 1px solid gray; > border-radius: 10px; > background-color: white; > padding: 5px; > margin: 0px 10px 0px 0px; > } > 1119c1431,1466 < width:220px; --- > width: 300px; > font-size: 11.5pt; > list-style: none; > line-height: 1.5em; > overflow: auto; > margin: 0; > padding: 2px 8px 2px 2px; > background: #fff url(../img/reportback1.jpg) no-repeat; > background-position: center; > } > > .reportcol li { > padding: 2px 4px 2px 8px; > border-radius: 10px; > cursor: grab; > background-color: white; > } > > .reportcol li:hover { > background-color: #e0e0f7; > } > > > .reportcol option { > padding: 3px; > } > > .report-icon { > margin-bottom: 10px; > width: 17px; > height: 15px; > border: 0; > } > > .hidden { > visibility: hidden; 1137a1485,1488 > .indent-tiny { > padding-left: 2px; > } > 1151,1154c1502,1503 < margin:1px 9px 0px 3px; < -moz-border-radius: 4px; < -webkit-border-radius: 4px; < border-radius: 4px; --- > margin:1px 9px 0px 12px; > border-radius: 6px; 1157a1507,1515 > display: grid; > grid-auto-flow: column; > /* top: 210px; */ > /* position: absolute; */ > width: 100%; > padding-top: 10px; > } > > .admincol-mobile { 1159,1160c1517,1518 < width:50%; < min-width:440px; --- > width:100%; > min-width:354px; 1166,1167c1524,1525 < padding:8px; < margin:2px 3px 4px 3px; --- > padding: 10px; > margin: 7px; 1169,1171c1527,1528 < -moz-border-radius: 4px; < -webkit-border-radius: 4px; < border-radius: 4px; --- > border-radius: 25px; > position: relative; 1184a1542,1549 > min-height: 20px; > font-size: 14px; > box-shadow: 2px 2px 5px 0px #444; > } > > .tngmsgarea-std { > float: right; > background-color: rgb(150,150,150,0.5); 1197c1562 < padding:4px 4px 4px 6px; --- > padding:4px 8px 4px 10px; 1199,1201c1564,1565 < -moz-border-radius: 6px; < -webkit-border-radius: 6px; < border-radius: 6px; --- > -webkit-border-radius: 15px; > border-radius: 15px; 1207c1571,1576 < filter: dropshadow(color=#000000, offx=1, offy=1); --- > } > > a.admincell { > filter: drop-shadow(3px 3px 4px #444); > border: 0; > min-height: 20px; 1217c1586 < padding: .2em 0px .3em .7em; --- > padding: 4px 4px 4px 12px; 1219a1589 > border-radius: 10px; 1226,1227c1596,1598 < border-right: 1px solid #777; < border-bottom: 1px solid #777; --- > border-right: 1px solid #ddd; > border-bottom: 1px solid #ddd; > filter: drop-shadow(2px 2px 2px #777); 1234c1605 < .fakelink { --- > .fakelink, .pubbox { 1237a1609,1612 > .fakelink { > font-size: 9px; > } > 1321c1696 < .tfixed { --- > .tfixed, .dna-tfixed { 1326a1702,1716 > .tfixed, .thfixed, .dna-tfixed { > border-radius: 8px; > box-shadow: 2px 2px 5px -1px #666; > } > > .tfixed tr:last-child td:first-child, .thfixed tr:last-child td:first-child, .rc-ll { border-bottom-left-radius: 8px; } > .tfixed tr:last-child td:last-child, .thfixed tr:last-child td:last-child, .dna-tfixed tr:last-child td:last-child, .rc-lr { border-bottom-right-radius: 8px; } > .tfixed tr:first-child td:first-child, .thfixed tr:first-child th:first-child, .rc-ul { border-top-left-radius: 8px; } > .tfixed tr:first-child td:last-child, .thfixed tr:first-child th:last-child, .dna-tfixed tr:first-child td:last-child { border-top-right-radius: 8px; } > > .rounded-table tr:last-child td:first-child, .rounded-table tr:last-child td:first-child { border-bottom-left-radius: 8px; } > .rounded-table tr:last-child td:last-child, .rounded-table tr:last-child td:last-child { border-bottom-right-radius: 8px; } > .rounded-table tr:first-child td:first-child, .rounded-table tr:first-child th:first-child { border-top-left-radius: 8px; } > .rounded-table tr:first-child td:last-child, .rounded-table tr:first-child th:last-child { border-top-right-radius: 8px; } > 1328c1718 < width:130px; --- > width:150px; 1344a1735 > padding: 0px 15px 0px 5px; 1365,1366c1756,1757 < position: relative; < font-size: 11px; --- > /*position: relative;*/ > font-size: 12px; 1367a1759 > padding: 0.6em 1em 0.3em 11px; 1372,1373c1764,1765 < position:relative; < z-index:10; --- > /*position: relative;*/ > z-index: 1; 1405d1796 < -moz-border-radius: 6px; 1418a1810 > display: flex; 1421c1813 < margin:1px 0 0 2px; --- > margin:0 0 0 2px; 1425a1818,1821 > div.icons-rt a { > margin: auto 10px auto 0px; > } > 1460d1855 < -moz-border-radius: 6px; 1469d1863 < -moz-border-radius: 6px; 1481d1874 < -moz-box-shadow: 1px 1px 3px 0px #666; 1485d1877 < -moz-border-radius: 6px; 1500d1891 < -moz-border-radius: 0px; 1511d1901 < -moz-border-radius: 0px; 1517d1906 < -moz-border-radius: 6px 6px 0px 0px; 1523d1911 < -moz-border-radius: 0px 0px 6px 6px; 1566d1953 < -moz-border-radius: 0px 6px 6px 0px; 1575d1961 < -moz-border-radius: 6px 0px 0px 6px; 1624c2010 < #surnames-hdr-icon, #surnames-icon {background-position: -285px 0px;} --- > #surnames-hdr-icon, #surnames-icon, #firstnames-icon {background-position: -285px 0px;} 1670d2055 < -moz-box-shadow: 1px 1px 3px 0px #666; 1673d2057 < -moz-border-radius: 8px; 1688d2071 < -moz-border-radius: 6px; 1691d2073 < -moz-box-shadow: 1px 1px 3px 0px #666; 1751a2134,2137 > .clearboth { > clear: both; > } > 1759d2144 < -moz-border-radius: 8px; 1780a2166,2174 > .pwdfield { > width: 85%; > } > > .pwdicon { > position: relative; > top: 4px; > } > 1788a2183,2186 > .adminlog { > white-space: nowrap; > } > 1795a2194,2222 > display: inline-block; > } > > .searchsidebar { > display: inline-block; > position: fixed; > margin-right: 100px; > } > > .remove-link { > float: right; > padding-right: 8px; > cursor: pointer; > } > > .cust-event-block { > border-radius: 20px; > padding: 7px 5px 5px 10px; > margin-bottom: 3px; > border: 1px solid #aaa; > } > > .cust-event-field { > border-radius: 8px; > border: 1px solid gray; > background-color: #FFFFFF; > padding: 3px 5px 3px 5px; > font-size: 14px; > min-height: 16px; 1816a2244 > } 1817a2246,2270 > .cookie-banner { > position: fixed; > bottom: 40px; > /* left: 10%; */ > right: 3%; > width: 300px; > padding: 10px 14px; > /* display: flex; */ > align-items: center; > justify-content: space-between; > background-color: #eee; > border-radius: 5px; > box-shadow: 2px 2px 4px 3px rgba(0, 0, 0, 0.2); > z-index: 999; > font-size: 14pt; > } > .cookie-close { > height: 30px; > background-color: #777; > border: none; > color: white; > border-radius: 2px; > cursor: pointer; > border-radius: 5px; > width: 100%; 1862c2315 < border: 1px #FF0000 dashed; --- > border: 1px #009900 solid; 1866c2319 < border: 1px #CCC dashed; --- > border: 1px #CCC solid; 1870a2324,2325 > border-radius: 5px; > box-shadow: 2px 2px 3px 0px #333; 1873a2329,2360 > #tags { > position:absolute; > left:0; > right:0; > margin-left: auto; > margin-right: auto; > z-index: 1; > } > > .imagetag { > position:absolute; > /*bottom:0;*/ > left:2px; > right:0; > padding:3px; > color:white; > background-color:rgba(0,0,0,0.6); > overflow:visible; > border-radius: 5px 5px 5px 5px; > text-align: center; > min-width: 100px; > } > > .delx { > background-color: red; > padding:3px; > width:15px; > float:right; > font-weight: bold; > cursor: pointer; > } > 1883a2371,2397 > .scroll-to-top { > display: none; > position: fixed; bottom: 20px; right: 10px; > z-index: 5; > width: 30px; > height: 30px; > padding: 8px; > text-align:center; > color: #ffffff; > text-decoration: none; > background-color: #444; > text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); > border-radius: 50%; > } > .scroll-to-top:hover { > text-decoration: none; > background-color: #777; > text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); > } > .scroll-to-top a, .scroll-to-top a:hover { > text-decoration: none; > } > > .grabbing { > cursor: grabbing; > } > 1920d2433 < -moz-border-radius: 4px; 1958a2472,2475 > .fambox a:link, .fambox a:visited, .mfambox a:link, .mfambox a:visited { > font-size: 11pt; > } > 1960c2477 < background-color:#cccccc; --- > background-color:#cccccc; 1969c2486 < text-align:right; --- > text-align:right; 1986c2503 < width:100px; --- > width:124px; 2075,2080c2592,2599 < height:125px; < width:20px; < font:9pt Verdana, Arial; < font-weight: bold; < display: block; < text-align: left; --- > height:112px; > width:16px; > font:9pt Verdana, Arial; > font-weight: bold; > display: block; > text-align:left; > margin: auto; > padding: 0.25em; 2101,2102d2619 < width: 100%; < height: 400px; 2114c2631 < #fanWrapper { --- > #fanWrapper { 2115a2633 > padding: 10px; 2157c2675 < color: #000 !important; --- > color: #000 !important; 2160c2678 < --- > 2162,2163c2680,2681 < background: #ffffff !important; < color: #000000 !important; --- > background: #ffffff !important; > color: #000000 !important; 2169a2688,2728 > .mag-icons { > margin-top:10px; > margin-bottom:5px; > z-index:100; > /*position: absolute;*/ > } > > .mag-icons img { > opacity:0.3; > } > > .mag-icons img:hover { > opacity:1.0; > cursor:pointer; > } > > .mag-fixed { > position: fixed; > top: 40px; > } > > .savestay { > position: fixed; > right: 30px; > top: 260px; > min-width: 150px; > } > > .saveret { > position: fixed; > right: 30px; > top: 220px; > min-width: 150px; > } > > @media (max-width: 900px) { > .savestay { > visibility: hidden; > } > } > 2185d2743 < -moz-user-select: none; 2221a2780,2802 > table.resultstable { > border-spacing: 1px; > } > > table.dnacomparetable { > border-spacing: 1px; > border: 0px; > } > > .dnacomparetable th, .dnacomparetable td { > padding: 0px; > } > > @media (max-width: 1100px) { > #corner-right { > display: none; > } > .searchsidebar { > position: unset; > } > } > > 2223,2224c2804,2805 < @media screen and (max-width:1200px) {.media-prev {height:100%; top:50px; background:none;}} < @media screen and (max-width:640px) {.media-prev {padding: 10px 4px 6px 0;}} --- > @media screen and (max-width:480px) {.media-prev {height:100%; top:50px; background:none;}} > @media screen and (max-width:480px) {.media-prev {padding: 10px 4px 6px 0;}} 2228c2809 < width: 180px; --- > width: 180px; 2233c2814 < left: 10px; --- > left: 10px; 2239c2820 < left: 50px; --- > left: 50px; 2241,2243d2821 < < } < } 2245,2248d2822 < @media only screen and (min-width:641px) and (max-width:1100px) { < .media-prev { < left: 50px; < 2260c2834,2837 < @media only screen and (min-width:320px) and (max-width:480px) { --- > @media only screen and (max-width:480px) { > .mag-icons img { > width: 30px; > } 2268c2845 < width: 280px; --- > width: 245px; 2287a2865,2867 > input.longfield { > width: 245px; > } 2307a2888,2901 > .img-right { > margin: 10px 0 10px 10px; > float: right; > } > > .img-left { > margin: 10px 10px 10px 0; > float: left; > } > > .cell-pad3 { > padding: 3px; > } > diff -r TNG/css/img_viewer.css TNG1403/css/img_viewer.css 29c29 < border: solid 1px #000; --- > border: solid 1px #666; 105,106d104 < padding-top: 10px; < padding-bottom: 10px; 108c106 < border: 1px solid silver; --- > border: 0px; diff -r TNG/css/media.css TNG1403/css/media.css 19c19 < margin:10px; --- > margin:3px; diff -r TNG/css/modmanager.css TNG1403/css/modmanager.css 1,7c1,7 < #mmhead-section { < position:fixed; < top:0; < width:99%; < background-image:url(../img/background.gif); < padding:5px 1px 1px 1px; < z-index:1000; --- > /* Prevents double vertical scroll bars in mm listing */ > html, body { > /* removes outer scroll bar */ > overflow:hidden !important; > > /* Some templates have height:100% - prevents scrolling */ > height:auto !important; 9,10c9,13 < #mmpage { < padding-top:110px; --- > > .mainback { > /* fixes tng header when using anchor to position in scrollable table */ > position:fixed; > z-index:-200; 12,13c15,17 < #modlist { < padding-top:150px; --- > > form { > width:100%; 15,18c19,26 < #mmoutter {width:99.8%;} < .leftmmanalyzer { < width: 35%; < vertical-align:top; --- > > /*************************************************************** > TABLES > ***************************************************************/ > /* Unstyled tables need 'cellspacing="0"' in the MM markup. */ > table { > border-collapse: collapse; > border-spacing: 0; 20,22c28,40 < .rightmmanalyzer { < width:65%; < vertical-align:top; --- > > /* mmtable2 in admin_analyzemods to prevent > ** internal tables inheriting from the outer mmtable2 > ** table. All mm pages use mmtable.*/ > table.mmtable2, > table.mmtable { > table-layout:fixed; > width:100%; > border-collapse:separate; > border-spacing:2px; > margin-left:-2px; > margin-top:-2px; > font-size:12px; 24,25c42,50 < .mmhighlight { < color:#990000; --- > > table.nested { > table-layout:fixed; > width:100%; > border-collapse:separate; > border-spacing:1px; > margin-top:-2px; > margin-bottom:1px; > font-size:12px; 27,28c52,54 < .mmfilenmfont { < font-size:120%; --- > > table.mmtable thead { > z-index:3; 30,31c56,61 < .mmlochdr { < color:blue; --- > > /* modlister, admin_analyzemods, admin_modtables > ** row highlighting */ > table.mmtable>tbody>tr:hover td.flink, > table.mmtable>tbody>tr:hover td.flink { > background-color:#EEEB8D; 33,34c63,65 < .mmkeyword { < color:#AA0000; --- > > table#modlist tr { > height:35px; 36,37c67,72 < .mmrightalign { < text-align:right; --- > > > /* modlister - affected files popups */ > .cellspace1 { > border-spacing: 2px; > border-collapse: separate; 39,40c74,81 < .mmlinks { < text-decoration:none; --- > > /*************************************************************** > TABLES TD (CELLS) > ***************************************************************/ > /* modlister */ > td.flink { > cursor:pointer; > vertical-align:top; 42,45c83,87 < .mmhdrtable {width:100%;} < .mmtable { < width:100%; < padding:10px 1px; --- > > td.flink a:visited, > td.flink a:link { > color:#000; > text-decoration:none; 47,48c89,97 < .mmpopuptable { < width:100%; --- > > /* added for Mod Manager error messages */ > td.avail{ > border-bottom:2px solid #00CC7A; > border-right:2px solid #00CC7A; > border-top:1px solid #00FF33; > border-left:1px solid #00FF33; > background-color:#FFFFFF; > text-align: center; 50,51c99,106 < .mmpad2 { < padding:2px; --- > > td.inst{ > border-bottom:2px solid #00CC7A; > border-right:2px solid #00CC7A; > border-top:1px solid #00FF33; > border-left:1px solid #00FF33; > background-color:#CCFFCC; > text-align: center; 53,54c108,132 < .mmpadtop5 { < padding-top:5px; --- > > td.failed{ > border-bottom:2px solid #CC0000; > border-right:2px solid #CC0000; > border-top:1px solid #CC0000; > border-left:1px solid #CC0000; > background-color:#FFE5E5; /* was FFCCCC in admin_modmanager.php */ > } > > /*************************************************************** > DIVS > ***************************************************************/ > /* Wrapped around a table, this allows a it > ** to scroll underneath its row */ > div.tableFixedHead { > overflow-y:auto; > height:100%; > height:calc(100vh - 260px); > padding:0px; > margin:0px; > } > > div.tableFixedHead thead { > position:sticky; > top:0; 56,57c134,138 < .mmpadleft { < padding-left:3px; --- > > /* modlister */ > div.list-indent { > margin-left:2em; > text-indent:-2em; 59,60c140,142 < .mmpopuphdr { < line-height:150%;padding-left:3px; --- > > div.edreturn { > padding:1em 0.5em; 63,69c145,147 < /* Batch Updates columns */ < .ptr {cursor:pointer;} < .colcb {width:5%;} < .colmn {width:35%;} < .colfn {width:35%;} < .colvr {width:10%;} < .colst {width:15%;} --- > div.edreturn form { > padding-left:10px; > } 71,111c149,184 < /* Mod List columns */ < .colmln {width:15%;} < .colmld {width:30%;} < .colmlfn {width:30%;} < .colmlvr {width:5%;} < .colmlst {width:20%;} < < div.descpop { < position: relative; < margin: 0 5px 3px 0; < float:right; < } < div.descpop div { < position: absolute; < max-height: 200px; < top:-2000px; < right:14px; < visibility: hidden; < } < div.descpop:hover div { < visibility: visible; < max-height: 200px; < overflow-y:auto; < top:-75px; < background: #ffffff; < padding: 3px 3px 3px 3px; < border-style:solid; < border-color:black; < border-width:2px; < z-index: 1001; < } < < @media screen and (max-width:750px) { < div.descpop:hover div { < width:300px; < } < } < @media screen and (min-width:750px) { < div.descpop:hover div { < width:500px; < } --- > /*************************************************************** > MODLISTER AFFECTED FILES > ***************************************************************/ > /* modlister - affected files */ > .afcell { > vertical-align:top; > margin-left:auto; > margin-right:auto; > text-align:center; > } > /* modlister - affected files popups */ > .mmpad2 { > padding:2px; > } > /* modlister - affected rows - from tngv103 */ > .mmpadleft { > padding-left:3px; > } > /* modlister - affected files popups */ > .cellspace1 { > border-spacing: 1px; > border-collapse: separate; > } > .imgcenter { > left:40%; > margin-right:-40%; > } > /* modlister -- affected files popups */ > /* from tngv103 */ > .mmpopuptable { > width:100%; > } > /* modlister - affected files popups */ > /* from tngv103 */ > .mmpopuphdr { > line-height:150%;padding-left:3px; 114,121c187,191 < /* added for Mod Manager error messages */ < td.avail{ < border-bottom:2px solid #00CC7A; < border-right:2px solid #00CC7A; < border-top:1px solid #00FF33; < border-left:1px solid #00FF33; < background-color:#FFFFFF; < text-align: center; --- > div.descpop1 { > position: relative; > width:16px; > margin:0; > z-index:1; 124,130c194,205 < td.inst{ < border-bottom:2px solid #00CC7A; < border-right:2px solid #00CC7A; < border-top:1px solid #00FF33; < border-left:1px solid #00FF33; < background-color:#CCFFCC; < text-align: center; --- > div.descpop1 div { > position: absolute; > display:none; > right:16px; > top:0px; > overflow-y:auto; > background: #ffffff; > padding: 3px 3px 3px 3px; > border-style:solid; > border-color:black; > border-width:2px; > /*z-index: 1001;*/ 133,138c208,210 < td.failed{ < border-bottom:2px solid #CC0000; < border-right:2px solid #CC0000; < border-top:1px solid #CC0000; < border-left:1px solid #CC0000; < background-color:#FFE5E5; /* was FFCCCC in admin_modmanager.php */ --- > div.descpop1:hover div { > display:block; > max-height:150px; 141c213,218 < /* The following was added for Mod Manager in TNG 10.1.0 */ --- > @media screen and (max-width:750px) > { > div.descpop1:hover div { > width:300px; > } > } 143,145c220,234 < /* modlister row highlighting */ < tr.modline:hover td.mmcell:nth-child(-n+5) { < background-color:#EEEB8D; --- > @media screen and (min-width:750px) > { > div.descpop1:hover div { > width:500px; > } > } > > /*************************************************************** > GENERAL STYLES > ***************************************************************/ > /* Adjust TNG .admin-main for padding-left > ** to line up with TNG adm-innermenu. */ > .admin-main { > position:relative; > padding-left:12px; 147c236,237 < /* Mod List column widths (layout-fixed) */ --- > > /* modlister column widths (layout-fixed) */ 155,159c245,250 < /* modlister */ < span.opened { < padding-left:14px; < cursor: pointer; < background: url(../img/tng_collapse.gif) no-repeat left center; --- > > /* admin_showmodslog */ > .mmpanel { > border: 1px solid #bbb; > padding-top:5px; > padding-bottom:5px 161,165c252,273 < /* modlister */ < span.closed { < padding-left:14px; < cursor: pointer; < background: url(../img/tng_expand.gif) no-repeat left center; --- > > /* admin_modhandler, modlister - prevents status > ** column content overflow */ > .moddiv { > overflow:hidden; > padding:5px; > } > > /* MM tabbed scripts */ > .mmrounded { > border-radius:8px; > } > > /* admin_modopotions */ > .mmrounded20 { > border-radius:20px; > } > > /* modlister, MM tabbed scripts */ > .roundtop { > border-top-left-radius:10px; > border-top-right-radius:10px; 166a275 > 168,171c277,279 < span.modlink { < display:inline-block; < width:96%; < cursor:pointer; --- > .roundleft { > border-top-left-radius:8px; > border-bottom-left-radius:8px; 172a281 > 174,175c283,284 < td.flink { < cursor:pointer; --- > .roundbl { > border-bottom-left-radius:8px; 176a286 > 178,182c288,294 < /* mod listing table cells */ < .mmcell, .stcell { < border:1px solid #aaa; < vertical-align:top; < padding:0 1px; --- > .hilighterr { > background-color: #FFCCF9; > } > > /* modlister, modinstaller, modremover, modeditor */ > .tag { > font-style:italic; 186,190c298,299 < /* used inside table cells to keep content from overflowing into next element */ < div.mminner { < overflow:hidden; < text-overflow:ellipsis; < white-space:nowrap; --- > .checkpad {padding-left: 0px; > padding-top: 0px; 192,193c301,303 < .mmcell { < white-space:nowrap; --- > > .copyfile, .mkdir, .newfile { > color:navy; 194a305 > 196,198c307,308 < .checkpad { < padding-left: 0px; < padding-top: 0px; --- > .hilight { > background-color:yellow; 200,205c310,326 < /* modlister - affected files */ < .afcell { < vertical-align:top; < margin-left:auto; < margin-right:auto; < text-align:center; --- > > .imgcenter { > left:40%; > margin-right:-40%; > } > > > /* mod listing table cells */ > .mmcell, .stcell { > border:1px solid #aaa; > vertical-align:top; > padding:3px; > } > > /* modlister status column content */ > .stcell div { > padding-right:7px; 206a328 > 209c331 < padding:2px; --- > padding:2px; 210a333 > 213c336 < padding-left:3px; --- > padding-left:3px; 215,222c338,341 < /* modlister - affected files popups */ < .cellspace1 { < border-spacing: 1px; < border-collapse: separate; < } < .imgcenter { < left:40%; < margin-right:-40%; --- > > /* admin_analyzemods */ > .mmpadtop5 { > padding-top:5px !important; 223a343 > 227c347 < width:100%; --- > width:100%; 228a349 > 232c353 < line-height:150%;padding-left:3px; --- > line-height:150%;padding-left:3px; 235,238c356,360 < div.descpop1 { < position: relative; < width:16px; < margin:0; --- > /* modlister */ > .mmsysmsg { > font-size:150%; > text-align:center; > color:red; /* was #77777; */ 241,252c363,369 < div.descpop1 div { < position: absolute; < display:none; < bottom:-5px; < right:16px; < overflow-y:auto; < background: #ffffff; < padding: 3px 3px 3px 3px; < border-style:solid; < border-color:black; < border-width:2px; < z-index: 1001; --- > /* modlister */ > .results { > list-style-type:square; > list-style-position:inside; > font-style:italic; > font-weight:bold; > padding:5px; 255,257c372,376 < div.descpop1:hover div { < display:block; < max-height:150px; --- > /* modlister */ > span.opened { > padding-left:14px; > cursor: pointer; > background: url(../img/tng_collapse.gif) no-repeat left center; 260,264c379,383 < @media screen and (max-width:750px) < { < div.descpop1:hover div { < width:300px; < } --- > /* modlister */ > span.closed { > padding-left:14px; > cursor: pointer; > background: url(../img/tng_expand.gif) no-repeat left center; 267,271c386,391 < @media screen and (min-width:750px) < { < div.descpop1:hover div { < width:500px; < } --- > /* modlister */ > span.modlink { > display:inline-block; > width:96%; > padding-left:16px; > cursor:pointer; 272a393,399 > > .fieldname a:visited, > .fieldname a:link { > color:inherit; > cursor:pointer; > } > 274,279c401,402 < .results { < list-style-type:square; < list-style-position:inside; < font-style:italic; < font-weight:bold; < padding:5px; --- > .target { > color:brown; 281,282c404,411 < .w100 { < width:100%; --- > > /* modlister */ > .target-note, > .location-note { > display:inline-block; > width:100%; > padding-left:3px; > border:1px solid gray; 284,285c413,416 < .hidden { < display:none; --- > > /* modlister */ > .tgtfile { > font-weight:bold; 287,289c418,424 < /*** modlister status backgrounds ***/ < .ready { < background-color:#F5FFF5; --- > > /* admin_showmodslog */ > .action { > cursor: pointer; > background: url(../img/tng_expand.gif) no-repeat left center; > padding:7px; > padding-left:15px; 291,292c426,429 < .installed { < background-color:#C6F6C6; --- > > /* admin_showmodslog */ > .logheader { > padding-left:15px; 294,295c431,435 < .partinst { < background-color:#FFE8BD; --- > > /* modlister -- provides space on bottom to show > ** affected files popup for last couple of rows .*/ > #modlist { > padding-bottom:150px; 297,298c437,442 < .badcfg { < background-color:#FFE5E5 !important; --- > > /* modlister filter bar */ > table#fbar { > padding-left:2px; > width:100%; > margin-left:0px; 300,302c444,470 < /* modlister */ < .tag { < font-style:italic; --- > > /*Analyze only installed mods Mod - #1 - MichelK */ > input[type='radio'], label{ > vertical-align: baseline; > padding: 1px; > margin: 0px; > } > > /* admin_analyzemods */ > .hideoverflow{ > overflow: hidden; > white-space : nowrap; > } > > /* admin_analyzemods */ > .centerit { > text-align: center; > } > > /* admin_analyzemods */ > .mmhighlight { > color:#990000; > } > > /* admin_analyzemods */ > .mmfilenmfont { > font-size:120%; 303a472,487 > > /* admin_analyzemods */ > .mmlochdr { > color:blue; > } > > /* admin_analyzemods */ > .mmkeyword { > color:#AA0000; > } > > /* admin_analyzemods */ > .mmrightalign { > text-align:right; > } > 305,306c489,507 < .tgtfile { < font-weight:bold; --- > .mmpopuptable { > width:100%; > } > > /*modlister */ > .mmpadleft { > padding-left:3px; > } > > /* modlister aff popup img */ > .imgcenter { > left:40%; > margin-right:-40%; > } > > /* modlister - affected files popups */ > .mmpopuphdr { > line-height:150%; > padding-left:3px; 307a509 > 309,310c511,516 < .hilight { < background-color:yellow; --- > .results { > list-style-type:square; > list-style-position:inside; > font-style:italic; > font-weight:bold; > padding:5px; 311a518 > 313,314c520,521 < .hilighterr { < background-color: #FFCCF9; --- > .w100 { > width:100%; 316,318c523,555 < .mmmenuwrap { < padding-left:5px; < padding-bottom:1px; --- > > /* modeditor */ > .w99 { > width:99%; > } > > .hidden { > display:none; > } > > /*** modlister status backgrounds ***/ > .ready, .ok2inst { > background-color:#F5FFF5; > } > > .installed { > background-color:#C6F6C6; > } > > .partinst { > background-color:#FFE8BD; > } > > .badcfg, .cantinst { > background-color:#FFE5E5 !important; > } > > .html, body { > height:100%; > } > > .lightback, .whiteback { > border:0px; 320d556 < /* standard tng admin header for all pages */ 323,326c559,562 < #mmgrid th, #mmgrid td, #mmgrid td div, .results { < border-radius:3px; < -moz-border-radius:3px; < -webkit-border-radius:3px; --- > .results { > border-radius:6px; > -moz-border-radius:6px; > -webkit-border-radius:6px; 327a564 > 330,337c567,568 < text-align:center; < padding-top:5px; < } < div.edreturn { < padding:1em 0.5em; < } < div.edreturn form { < padding-left:10px; --- > text-align:center; > padding-top:5px; 338a570 > 340,342c572,574 < text-align:center; < padding:5; < font-size:12px; --- > text-align:center; > padding:5; > font-size:12px; 345c577 < border:1px solid #aaa; --- > border:1px solid #aaa; 349,351c581,583 < border:1px solid #aaa; < vertical-align:top; < padding:5px; --- > border:1px solid #888; > vertical-align:top; > padding:15px; 354c586 < /* Analyser and Edit Parameter */ --- > /* Analyser and Edit Parameter */ 356,357c588,589 < width: 35%; < vertical-align:top; --- > width: 36%; > vertical-align:top; 358a591,592 > > /* Analyser and Edit Parameter */ 360,361c594,595 < width:65%; < vertical-align:top; --- > vertical-align:top; > min-height:350px; 364,366c598,601 < /***** Styles that depend on current template *****/ < .adminback { < background-image:url(../img/background.gif); --- > /* bars attached to bottom of head section */ > .fbar { > border-color:transparent; > border-bottom:1px solid white; 369,384c604,608 < /* Mod Manager table positioning except for Template 7 */ < /****** Standard TNG Admin Page Header ******/ < .mmhead-fixed { < position:fixed; < top:0; < } < .mmhead-scroll { < position:relative; < margin-top:0; < } < .mmhead-fixed, .mmhead-scroll { < margin-left:5px; < padding-top:5px; < width: 99.5%; < min-width:640px; < z-index:1000; --- > /* modlister */ > .mmsysmsg { > font-size:150%; > text-align:center; > color:red; /* was #77777; */ 387,392c611,616 < /****** BARS ATTACHED TO BOTTOM OF HEAD SECTION ******/ < .fbar-fixed, .tbar-fixed, .ibar-fixed { < position:fixed; < top:119px; /*from top of screen*/ < left:0; < z-index:1005; --- > /****************************************************** > MMv14 Deprecated Styles no longer used > *******************************************************/ > /* > .adminback { > background-image:url(../img/background.gif); 394,396c618,619 < .fbar-scroll, .tbar-scroll, .ibar-scroll { < position:relative; < margin-top:0; --- > table.list tr:first-child td:first-child, > table.list tr:last-child td:last-child { 398,407c621,623 < /*** common elements ***/ < .fbar-fixed, .fbar-scroll, < .tbar-fixed, .tbar-scroll, < .ibar-fixed, .ibar-scroll { < margin-top: 0; < margin-left:5px; < padding-left:5px; < padding-bottom:1px; < width:99.5%; < z-index:1001; --- > > table.list td { > padding-left:0px; 410c626,628 < /****************** CONTENT ******************/ --- > table.list tr:first-child td { > border-left:0px; > } 412d629 < /* main page mod listing positioning */ 414d630 < margin-top:156px; /*from top of screen*/ 416c632 < /* m2tables - for secondary MH pages Options and Analyzer */ --- > 418c634 < margin-top:119px; /*from top of screen*/ --- > padding-left:0px; 420c636 < /* modeditor */ --- > 422,426c638 < margin-top:156px; < } < /* View Log */ < table.mmlog-fixed { < margin-top:143px; --- > margin-top:5px; 431c643 < margin-top:0; /*overrides v10.03*/ --- > margin-top:0; 434,438c646,648 < /*** common elements ***/ < table.mmlist-fixed, table.mmlist-scroll, /* Main page*/ < table.m2table-fixed, table.m2table-scroll, /* Options, Analyzer */ < table.m3table-fixed, table.m3table-scroll, /* Mod Editor */ < table.mmlog-fixed, table.mmlog-scroll /* View Log */ --- > table.mmlist-fixed, table.mmlist-scroll, > table.m2table-fixed, table.m2table-scroll, > table.m3table-fixed, table.m3table-scroll, 440,446c650,654 < table-layout:fixed; < margin-left:5px; < padding:0; < padding-top:0; < padding-left:5px; < padding-bottom:5px; < width:99.5%; --- > table-layout:fixed; > padding:0; > padding-top:0; > width:100%; > border:1px solid red; 449,452c657,662 < .mmsysmsg { < font-size:150%; < text-align:center; < color:red; /* was #77777; */ --- > #mmhead-section { > position:fixed; > top:0; > width:99%; > background-image:url(../img/background.gif); > padding:5px 1px 1px 1px; 457c667 < color:#990000; --- > color:#990000; 460,462c670,675 < div.list-indent { < margin-left:2em; < text-indent:-2em; --- > .parse-table { > position:absolute; > min-width:98%; > top:120; > left:05; > padding:5px; 465,470c678,680 < .target-note, < .location-note { < display:inline-block; < width:100%; < padding-left:3px; < border:1px solid gray; --- > .admintop { > overflow-x:hidden; > white-space:nowrap; 473,474c683,684 < .target { < color:brown; --- > .topbanner { > z-index:5; 477,478c687,689 < .copyfile { < color:navy; --- > #tngnav a.here { > position:relative; > z-index:0 !important; 481,482c692,695 < .newfile { < color:navy; --- > table.list { > border-collapse:separate; > width:100%; > margin-left:-3px; 485,486c698,699 < .mkdir { < color:navy; --- > table.m3table-fixed { > margin-top:0; 489,494c702,720 < .parse-table { < position:absolute; < min-width:98%; < top:120; < left:05; < padding:5px; --- > table.mmlist-fixed { > margin-top:0 !important; > } > > #mmpage { > padding-top:110px; > } > > #mmoutter {width:99.8%;} > > .ptr {cursor:pointer;} > .colcb {width:5%;} > .colmn {width:35%;} > .colfn {width:35%;} > .colvr {width:10%;} > .colst {width:15%;} > > tr.modline:hover td.mmcell:nth-child(-n+5) { > background-color:#EEEB8D; 495a722,795 > > .mmmenuwrap { > position:relative; > padding-bottom:1px; > } > > .mmcontainer { > height:calc(100vh - 180px); > } > > #mmgrid.lightback { > border-bottom:0px; > padding-bottom:175px; > } > > #mmgrid td.tngshadow { > border: 0px; > } > > .mmhead-fixed { > top:0; > } > .mmhead-scroll { > position:relative; > margin-top:0; > } > .mmhead-fixed, .mmhead-scroll { > width: 99.5%; > min-width:640px; > } > > .fbar-scroll, .tbar-scroll, .ibar-scroll { > position:relative; > margin-top:0; > } > > .fbar-fixed, .fbar-scroll, > .tbar-fixed, .tbar-scroll, > .ibar-fixed, .ibar-scroll { > margin-top: 0; > padding-bottom:1px; > width:99.5%; > z-index:1; > } > > #mmlog { > background-color:transparent; > border-spacing:0 2px; > width: calc( 100% - 4px ); > } > > #mmlog td { > border:1px solid #aaa; > } > > .leftmmanalyzer { > width: 34.7%; > vertical-align:top; > padding-left:7px > } > > .rightmmanalyzer { > width:65%; > vertical-align:top; > } > > .mmlinks { > text-decoration:none; > } > > .mmhdrtable {width:100%;} > > */ > diff -r TNG/css/timeline.css TNG1403/css/timeline.css 61a62,63 > border-radius: 10px; > border-color: #ccc; diff -r TNG/css/tngmobile.css TNG1403/css/tngmobile.css 155a156,159 > .mright { > column-gap: 0px; > } > 192a197,208 > .mmulticol li:last-child a { > -moz-border-radius: 0 0 8px 0; > -webkit-border-radius: 0 0 8px 0; > border-radius: 0 0 8px 0; > } > > .mmulticollastleft { > -moz-border-radius: 0 0 0 8px; > -webkit-border-radius: 0 0 0 8px; > border-radius: 0 0 0 8px; > } > diff -r TNG/css/tngprint.css TNG1403/css/tngprint.css 2,3c2,3 < text-decoration : none; < color #000; --- > text-decoration: none; > color: #000; diff -r TNG/datelib.php TNG1403/datelib.php 17a18 > $newyear = $newmonth = $newday = 0; 59c60 < $tempmonth = trim(substr(strtoupper($dateparts[$ptr]),0,3)); --- > $tempmonth = isset($dateparts[$ptr]) ? trim(substr(strtoupper($dateparts[$ptr]),0,3)) : ""; 62c63 < if( $months[$tempmonth] ) { --- > if( !empty($months[$tempmonth]) ) { 66c67 < elseif( $hebrewmonths[$tempmonth] ) { --- > elseif( !empty($hebrewmonths[$tempmonth]) ) { 77c78 < $tempday = $dateparts[$ptr]; --- > $tempday = isset($dateparts[$ptr]) ? $dateparts[$ptr] : ""; 91c92 < $str = substr(strtoupper($dateparts[$ptr]),0,3); --- > $str = isset($dateparts[$ptr]) ? substr(strtoupper($dateparts[$ptr]),0,3) : ""; 139,140c140,143 < $newday = cal_days_in_month(CAL_GREGORIAN, $newmonth, $newyear); < //$newday = date('t', mktime(0, 0, 0, $newmonth, $newyear)); --- > if($newyear && function_exists('cal_days_in_month')) > $newday = cal_days_in_month(CAL_GREGORIAN, $newmonth, $newyear); > else > $newday = date('t', mktime(0, 0, 0, $newmonth, $newyear)); Only in TNG: deepindex.php diff -r TNG/deletelib.php TNG1403/deletelib.php 108c108 < $query = "SELECT count(ID) as ccount FROM $children_table WHERE familyID = \"$row[familyID]\" AND gedcom=\"$tree\""; --- > $query = "SELECT count(ID) as ccount FROM $children_table WHERE familyID = \"{$row['familyID']}\" AND gedcom=\"$tree\""; 128c128 < if($famrow['husband']) --- > if(!empty($famrow['husband'])) 130c130 < if($famrow['wife']) --- > if(!empty($famrow['wife'])) diff -r TNG/descend.php TNG1403/descend.php 8a9 > $descendvert_url = getURL( "descendvert", 1 ); 10c11,20 < if( $display == "textonly" || ( !$display && !$pedigree['defdesc'] ) ) { --- > $descendtables_url = getURL( "descendtables", 1 ); > if(empty($generations)) > $generations = $pedigree['initdescgens'] > 8 ? 8 : $pedigree['initdescgens']; > if(!$generations) $generations = 6; > if( $generations > $pedigree['maxdesc'] ) > $generations = $pedigree['maxdesc']; > else > $generations = intval( $generations ); > > if( (isset($display) && $display == "textonly") || ( !isset($display) && !$pedigree['defdesc'] ) ) { 14c24 < elseif( $display == "register" || ( !$display && $pedigree['defdesc'] == 1 ) ) { --- > elseif( (isset($display) && $display == "register") || ( !isset($display) && $pedigree['defdesc'] == 1 ) ) { 17a28,35 > elseif( (isset($display) && $display == "vertical") || ( !isset($display) && $pedigree['defdesc'] == 4 ) ) { > header( "Location: $descendvert_url" . "personID=$personID&tree=$tree&generations=$generations"); > exit; > } > elseif( (isset($display) && $display == "tables") || ( !isset($display) && $pedigree['defdesc'] == 5 ) ) { > header( "Location: $descendtables_url" . "personID=$personID&tree=$tree&generations=$generations"); > exit; > } 22c40 < if( !$display ) { --- > if(empty($display)) { 73c91 < $arrltpath = $rootpath . $endrootpath . "img/ArrowRight.gif"; --- > $arrltpath = $rootpath . $endrootpath . "img/ArrowLeft.gif"; 162c180 < $presult = getPersonData($tree, $parents['husband']); --- > $presult = getPersonFullPlusDates($tree, $parents['husband']); 177c195 < $presult = getPersonData($tree, $parents['wife']); --- > $presult = getPersonFullPlusDates($tree, $parents['wife']); 198c216 < global $tree, $generations, $cms, $text, $descend_url, $display; --- > global $tree, $generations, $cms, $text, $descend_url, $display, $kidsflag; 224,225c242,243 < $boxstr = ""; < if( $person['personID'] == $personID ) { --- > $boxstr = $mouseover = $mouseout = $hiddenbox = ""; > if( !empty($person['personID']) && $person['personID'] == $personID ) { 240,241c258,260 < if( $person['famc'] && $pedigree['popupchartlinks']) { < $iconactions = " onmouseover=\"if(jQuery('#ic$slot').length) jQuery('#ic$slot').show();\" onmouseout=\"if(jQuery('#ic$slot').length) jQuery('#ic$slot').hide();\""; --- > if( !empty($person['famc']) && $pedigree['popupchartlinks'] && $display != "compact") { > $mouseover .= "if(jQuery('#ic$slot').length) jQuery('#ic$slot').show();"; > $mouseout .= "if(jQuery('#ic$slot').length) jQuery('#ic$slot').hide();"; 243c262 < $iconlinks .= "{$pedigree['chartlink']}\n"; --- > $iconlinks .= "{$pedigree['chartlink']}\n"; 248a268,286 > > if( !empty($person) && $display != "compact" && $pedigree['usepopups'] ) { > $vitalinfo = getVitalDates( $person ); > if( $vitalinfo ) { > $mouseover .= "showPopup($numboxes,$top,{$pedigree['boxheight']});"; > $mouseout .= "setTimer($numboxes);"; > $hiddenbox = "
    "; > $hiddenbox .= "" . $pedigree['downarrow'] . "
    "; > > $hiddenbox .= "
    \n"; > $hiddenbox .= "
    \n
    \n"; > $hiddenbox .= "$vitalinfo\n
    \n"; > } > } > if($mouseover) > $mouseover = " onmouseover=\"$mouseover\""; > if($mouseout) > $mouseout = " onmouseout=\"$mouseout\""; > 250c288 < $boxstr .= "
    \n"; --- > $boxstr .= "
    \n"; 254c292 < if ( $pedigree['inclphotos'] && $pedigree['usepopups']) { --- > if( !empty($person) && $pedigree['inclphotos'] && $pedigree['usepopups']) { 268c306 < if( $person['name'] ) { --- > if(!empty($person['name'])) { 279,289c317 < if( $display != "compact" && $pedigree['usepopups'] ) { < $vitalinfo = getVitalDates( $person ); < if( $vitalinfo ) { < $boxstr .= ""; < < $boxstr .= "
    \n"; < $boxstr .= "
    \n\n"; < $boxstr .= "$vitalinfo\n
    \n"; < } < } --- > $boxstr .= $hiddenbox; 312c340 < global $tree, $generations, $pedigree, $righttree, $chart, $descend_url; --- > global $tree, $generations, $pedigree, $righttree, $chart, $descend_url, $display, $text; 316c344 < $result = getPersonData($tree, $person); --- > $result = getPersonFullPlusDates($tree, $person); 343c371 < $result = getSpouseFamilyMinimal($tree, $self, $person, $spouseorder); --- > $result = getSpouseFamilyData($tree, $self, $person, $spouseorder); 345c373 < $result = getSpouseFamilyMinimalUnion($tree, $person); --- > $result = getSpouseFamilyDataUnion($tree, $person); 348c376 < $result = getSpouseFamilyMinimalUnion($tree, $person); --- > $result = getSpouseFamilyDataUnion($tree, $person); 358a387,397 > if( !$spouse ) { > if( $row['personID'] == $famrow['husband'] ) { > $self = "husband"; > $spouse = "wife"; > $spouseorder = "husborder"; > } else { > $self = "wife"; > $spouse = "husband"; > $spouseorder = "wifeorder"; > } > } 404c443 < if( $needtop[$level] ) { --- > if( !empty($needtop[$level]) ) { 419c458 < $spouseresult = getPersonData($tree, $famrow[$spouse]); --- > $spouseresult = getPersonFullPlusDates($tree, $famrow[$spouse]); 450c489,501 < if($famrow[$spouse] || $marrtot > 1) --- > if($famrow[$spouse] || $marrtot > 1) { > $rightbranch = $righttree ? checkbranch($famrow['branch']) : false; > $rights = determineLivingPrivateRights($famrow, $righttree, $rightbranch); > $famrow['allow_living'] = $rights['living']; > $famrow['allow_private'] = $rights['private']; > if( $famrow[$spouse] ) { > if( $rights['both'] ) { > $spouserow['marrdate'] = $famrow['marrdate']; > $spouserow['marrplace'] = $famrow['marrplace']; > } > else > $spouserow['marrdate'] = $spouserow['marrplace'] = ""; > } 451a503 > } 456c508 < if( $top > $maxheight ) $maxheight = $top; --- > if( !isset($maxheight) || $top > $maxheight ) $maxheight = $top; 462c514 < setTopMarker($level,$originaltop + ($vslots[$vkey] * $pedigree['diff']),"raising, diff=$pedigree[diff], slots=" . $vslots[$vkey] . ", key=$vkey, 401"); --- > setTopMarker($level,$originaltop + ($vslots[$vkey] * $pedigree['diff']),"raising, diff={$pedigree['diff']}, slots=" . $vslots[$vkey] . ", key=$vkey, 401"); 473c525 < if( $needtop[$level] ) { --- > if( !empty($needtop[$level]) ) { 528c580 < if( $numkids ) { --- > if( $numkids && $level < $generations ) { 530,533c582,583 < if( $level < $generations ) { < $kidstats = getData( $crow['personID'], $crow['sex'], $level + 1 ); < $famslots += $kidstats['slots']; < } --- > $kidstats = getData( $crow['personID'], $crow['sex'], $level + 1 ); > $famslots += $kidstats['slots']; 611a662 > $marrabbr = $text['capmarrabbr'] . ":"; 620a672,680 > if( !empty($row['marrdate']) ) { > $vitalinfo .= "
    $marrabbr" . displayDate( $row['marrdate'] ) . "
    $marrabbr{$row['marrplace']}
    \n"; < $persontext .= "\n"; < < $persontext .= "\n"; < $persontext .= "\n"; < $persontext .= "\n"; < $persontext .= "\n"; < < //for each test, do a row < $testnum = 0; < while($dna_test = tng_fetch_assoc($dna_results)) { < $dna_pers_result = getPersonSimple($dna_test['tgedcom'], $dna_test['tpersonID']); < if($dna_pers_result) < $dprow = tng_fetch_assoc($dna_pers_result); < $dna_righttree = checktree($dna_test['gedcom']); < $dna_rightbranch = $dna_righttree ? checkbranch($prow['branch']) : false; < $dprights = determineLivingPrivateRights($dprow, $dna_righttree, $dna_rightbranch); < $dprow['allow_living'] = $dprights['living']; < $dprow['allow_private'] = $dprights['private']; < $dbname = getName( $dprow ); < $person_name = $dna_test['person_name']; < if ($dbname) < $dna_namestr = "" . getName( $dprow ) . ""; < else < $dna_namestr = $person_name; < if ($dna_test['private_dna'] && !$allow_edit) $dna_namestr = $admtext['text_private']; < tng_free_result($dna_pers_result); < < if($testnum) < $persontext .= "\n\n"; < $markercount = ($dna_test['test_type'] == "Y-DNA") ? "-{$dna_test['markers']}" : ""; < $persontext .= "\n"; < $persontext .= "\n"; < } < $persontext .= "\n"; < < $persontext .= "\n"; < $persontext .= "\n"; < $testnum++; < } < < $persontext .= "
    {$admtext['dna_tests']}$toggleicon $num_links $linkedstr \"\"
    {$text['test_type']}{$text['takenby']}{$text['haplogroup']} {$text['test_info']}
    {$dna_test['test_type']}$markercount$dna_namestr"; < $test_type = $dna_test['test_type']; < $haplogroup = $dna_test['haplogroup'] ? $dna_test['haplogroup'] : " "; < $ref_seq = $dna_test['ref_seq']; < $hvr1_results = $dna_test['hvr1_results']; < $hvr2_results = $dna_test['hvr2_results']; < $xtra_mut = $dna_test['xtra_mut']; < $coding_reg = $dna_test['coding_reg']; < $y_results = $dna_test['y_results']; < $surnames = $ancsurnameupper ? strtoupper($dna_test['surnames']) : $dna_test['surnames']; < $dna_notes = $dna_test['notes']; < $admin_notes = $dna_test['admin_notes']; < < $mdanc_namestr = ""; < if($dna_test['MD_ancestorID']) {// Get Most Distant Ancestor info < $dna_anc_result = getPersonData($dna_test['tgedcom'], $dna_test['MD_ancestorID']); < $ancrow = tng_fetch_assoc($dna_anc_result); < $anc_righttree = checktree($dna_test['tgedcom']); < $anc_rightbranch = $anc_righttree ? checkbranch($ancrow['branch']) : false; < $ancrights = determineLivingPrivateRights($ancrow, $anc_righttree, $anc_rightbranch); < $ancrow['allow_living'] = $ancrights['living']; < $ancrow['allow_private'] = $ancrights['private']; < $vitalinfo = getBirthInfo($ancrow); < $mdanc_namestr = getName( $ancrow ) . $vitalinfo; < < tng_free_result($dna_anc_result); < } < $mrcanc_namestr = ""; < if($dna_test['MRC_ancestorID']) {// Get MRCA Individual info < if ($dna_test['MRC_ancestorID'][0] == "I") { < $dna_anc_result = getPersonData($dna_test['tgedcom'], $dna_test['MRC_ancestorID']); < $ancrow = tng_fetch_assoc($dna_anc_result); < $anc_righttree = checktree($dna_test['tgedcom']); < $anc_rightbranch = $anc_righttree ? checkbranch($ancrow['branch']) : false; < $ancrights = determineLivingPrivateRights($ancrow, $anc_righttree, $anc_rightbranch); < $ancrow['allow_living'] = $ancrights['living']; < $ancrow['allow_private'] = $ancrights['private']; < $vitalinfo = getBirthInfo($ancrow); < $mrcanc_namestr = getName( $ancrow ) . $vitalinfo; < < tng_free_result($dna_anc_result); < } < else if ($dna_test['MRC_ancestorID'][0] == "F") {// Get MRCA Family info < $mrcquery = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$dna_test['MRC_ancestorID']}\" AND gedcom = \"{$dna_test['tgedcom']}\""; < $mrcresult = tng_query($mrcquery); < $ancrow = tng_fetch_assoc($mrcresult); < tng_free_result($mrcresult); < $anc_righttree = checktree($dna_test['tgedcom']); < $anc_rightbranch = checkbranch($ancrow['branch']); < $ancrights = determineLivingPrivateRights($ancrow, $anc_righttree, $anc_rightbranch); < $ancrow['allow_living'] = $ancrights['living']; < $ancrow['allow_private'] = $ancrights['private']; < $mrcanc_namestr = $text['family'] . ": " . getFamilyName( $ancrow ); < } < } < if( $dna_test['medialinks'] ) {// Get Media Links < $medialinks = showMediaLinks($dna_test['medialinks']); < } < else $medialinks = ""; < if( $dna_test['urls'] ) {// Get Relevant Links < $urls = showLinks($dna_test['urls']); < if($urls) $urls = "
      $urls
    "; < } < else < $urls = ""; < // Start test results < if($haplogroup) { < if ($dna_test['confirmed']) < $haplogroup = "" . $haplogroup . ""; < else < $haplogroup = "" . $haplogroup . ""; < $persontext .= "
    $haplogroup "; < $persontext .= $mdanc_namestr ? "" . $admtext['mda'] . ":
    " . $mdanc_namestr : ""; < $persontext .= $mdanc_namestr ? "
    " : ""; < $persontext .= $mrcanc_namestr ? "
    " . $admtext['mrca'] . ":
    " . $mrcanc_namestr : ""; < $persontext .= $mrcanc_namestr ? "
    " : ""; < if ($dna_test['markeropt']) { < $persontext .= $y_results ? "
    " . $dna_test['markers'] . " " . $admtext['marker_values'] . ":
    " . $y_results . "
    " : ""; < if($test_type == "mtDNA") { < if ($ref_seq) { < $persontext .= "
    " . $admtext['ref_seq'] . ":
    "; < if ($ref_seq == "rsrs") < $persontext .= "{$admtext['rsrs']}"; < if ($ref_seq == "rcrs") < $persontext .= "{$admtext['rcrs']}"; < $persontext .= "
    "; < } < if ($hvr1_results || $hvr2_results) { < $persontext .= "
    " . $admtext['hvr_values'] . ":
    "; < if($hvr1_results) < $persontext .= "{$text['hvr1']} = $hvr1_results
    "; < if($hvr2_results) < $persontext .= "
    " . nl2br($text['hvr2']) . " = $hvr2_results
    "; < } < $persontext .= $xtra_mut ? "

    " . nl2br($admtext['xtra_mut']) . ":
    $xtra_mut
    " : ""; < $persontext .= $allow_admin && $coding_reg ? "

    " . nl2br($admtext['coding_reg']) . ":
    " . $coding_reg . "
    " : ""; < } < } < $persontext .= $dna_test['surnamesopt'] && $surnames ? "
    " . $admtext['ancestral_surnames'] . ":
    " . $surnames . "
    " : ""; < $persontext .= $dna_test['linksopt'] && $urls ? "
    " . $text['relevant_links'] . ": " . $urls : ""; < $persontext .= $medialinks ? "
    " . $admtext['medialinks'] . ": " . $medialinks : ""; < $persontext .= $dna_test['notesopt'] && $dna_notes ? "
    " . $text['notes'] . ":
    " . $dna_notes . "
    " : ""; < $persontext .= $allow_admin && $dna_test['admin_notes'] ? "
    " . $admtext['admin_notes'] . ":
    " . $admin_notes . "
    " : ""; < $persontext .= "
    \n"; < $persontext .= "
    \n"; < } < tng_free_result($dna_results); --- > //dna tests > $debug = isset($_GET['debug']) ? $_GET['debug'] : false; //get URL debug parameter > //search for dna tests, if any found do the following > $query = "SELECT $dna_tests_table.testID, $dna_tests_table.personID as tpersonID, $dna_tests_table.gedcom as tgedcom, test_type, test_number, test_date, match_date, markers, mtdna_haplogroup, ydna_haplogroup, hvr1_results, hvr2_results, y_results, person_name, mtdna_confirmed, ydna_confirmed, notes, markeropt, notesopt, linksopt, surnamesopt, private_dna,urls, surnames, MD_ancestorID, MRC_ancestorID, admin_notes, medialinks, ref_seq, xtra_mut, coding_reg, shared_cMs, shared_segments, chromosome, segment_start, segment_end, centiMorgans, matching_SNPs, x_match, relationship_range, suggested_relationship, actual_relationship, related_side, GEDmatchID, private_test > FROM $dna_tests_table, $dna_links_table > WHERE $dna_links_table.personID = \"$personID\" AND $dna_links_table.gedcom = \"$tree\" AND $dna_links_table.testID = $dna_tests_table.testID > ORDER BY match_date DESC, test_type ASC, markers * 1 ASC, test_number * 1 ASC"; > $dna_results = tng_query($query); > $num_tests = tng_num_rows($dna_results); > if ($debug) { > echo "Allow Private - $allow_private
    "; > echo "Number of DNA Tests - $num_tests
    "; > } > > // following query added to check if this is a Private Test > $pquery = "SELECT $dna_tests_table.testID, $dna_tests_table.personID as tpersonID, $dna_tests_table.gedcom as tgedcom,private_test > FROM $dna_tests_table, $dna_links_table > WHERE $dna_links_table.personID = \"$personID\" AND $dna_links_table.gedcom = \"$tree\" AND $dna_links_table.testID = $dna_tests_table.testID AND $dna_tests_table.private_test = \"1\" > ORDER BY test_type, markers * 1 ASC, test_date, test_number * 1 ASC"; > $priv_results = tng_query($pquery); > $dnarow = tng_fetch_assoc($priv_results); // added for Private Test check > $num_private = tng_num_rows($priv_results); // added for Private Test check > if ($debug) > echo "Number of Private DNA Tests - $num_private
    "; > > $totnum_tests = $num_tests; > > if ( !$allow_private) > $totnum_tests = ($num_tests - $num_private); > if ($debug) > echo "Number of total DNA Tests - $totnum_tests
    "; > if($totnum_tests) { > $toggleicon = "\"\""; > $displaystyle = "display:none"; > $displayclass = "dnatest"; > > $uquery = "SELECT $dna_tests_table.testID, $dna_tests_table.personID, $dna_tests_table.gedcom FROM $dna_tests_table, $dna_links_table > WHERE $dna_links_table.personID = \"$personID\" AND $dna_links_table.gedcom = \"$tree\" AND $dna_links_table.testID = $dna_tests_table.testID AND $dna_tests_table.personID != \"$personID\""; > $dna_uresults = tng_query($uquery); > $num_utests = tng_num_rows($dna_uresults); > tng_free_result($dna_uresults); > > if ( $allow_private) { > $num_links = $num_tests; > $num_tests = $num_tests + 2; > } > else { > $num_links = $totnum_tests; > $num_tests = $totnum_tests + 2; > } > if ($num_utests) { > $linkedstr = ($num_links > 1 && $num_utests) ? $text['testsarelinked'] : $text['testislinked']; > $linkedstr .= " " . $dnanamestr; > } > else > $linkedstr = $num_links > 1 ? $admtext['dna_tests'] : $text['dna_test']; > $persontext .= "\n"; > $persontext .= "\n"; > > $persontext .= "\n"; > $persontext .= "\n"; > $persontext .= "\n"; > $persontext .= "\n"; > > //for each test, do a row > $testnum = 0; > while($dna_test = tng_fetch_assoc($dna_results)) { > if ($dna_test['private_test'] && ( $allow_private) || (!$dna_test['private_test'])) { > $dna_pers_result = getPersonSimple($dna_test['tgedcom'], $dna_test['tpersonID']); > $dprow = tng_fetch_assoc($dna_pers_result); > if( $dprow ) { > $dna_righttree = checktree($dna_test['tgedcom']); > $dna_rightbranch = !empty($dna_righttree) ? checkbranch(isset($dprow['branch'])) : false; > $dprights = determineLivingPrivateRights($dprow, $dna_righttree, $dna_rightbranch); > $dprow['allow_living'] = $dprights['living']; > $dprow['allow_private'] = $dprights['private']; > $dbname = getName( $dprow ); > $person_name = $dna_test['person_name']; > } else { > $dbname = ""; > $person_name = $dna_test['person_name']; > } > if ($dna_test['private_test']) > $privacy = " (" . $text['keep_test_private'] . ")"; > else > $privacy = ""; > if ($dbname) > $dna_namestr = "" . getName( $dprow ) . " $privacy"; > else > $dna_namestr = $person_name . $privacy; > if ($dna_test['private_dna'] && !$allow_edit) $dna_namestr = $admtext['text_private']; > tng_free_result($dna_pers_result); > > if($testnum) { > $persontext .= "\n\n"; > } > $markercount = ($dna_test['test_type'] == "Y-DNA") ? "-{$dna_test['markers']}" : ""; > $persontext .= "\n"; > $persontext .= ""; > $test_type = $dna_test['test_type']; > $haplogroup = ""; > if ($dna_test['test_type'] == "Y-DNA") > $haplogroup = $dna_test['ydna_haplogroup'] ? $dna_test['ydna_haplogroup'] : " "; > if ($dna_test['test_type'] == "mtDNA") > $haplogroup = $dna_test['mtdna_haplogroup'] ? $dna_test['mtdna_haplogroup'] : " "; > if ($dna_test['test_type'] == "atDNA") { > if ($dna_test['ydna_haplogroup']) > $haplogroup = "Y = " . $dna_test['ydna_haplogroup'] . "
    "; > if ($dna_test['mtdna_haplogroup']) { > $haplogroup .= "mt = " . $dna_test['mtdna_haplogroup']; > } > } > $ref_seq = $dna_test['ref_seq']; > $hvr1_results = $dna_test['hvr1_results']; > $hvr2_results = $dna_test['hvr2_results']; > $xtra_mut = $dna_test['xtra_mut']; > $coding_reg = $dna_test['coding_reg']; > $shared_cMs = $dna_test['shared_cMs']; > $shared_segments = $dna_test['shared_segments']; > $chromosome = $dna_test['chromosome']; > $segment_start = $dna_test['segment_start']; > $segment_end = $dna_test['segment_end']; > $centiMorgans = $dna_test['centiMorgans']; > $matching_SNPs = $dna_test['matching_SNPs']; > $x_match = $dna_test['x_match']; > $relationship_range = $dna_test['relationship_range']; > $suggested_relationship = $dna_test['suggested_relationship']; > $actual_relationship = $dna_test['actual_relationship']; > $related_side = $dna_test['related_side']; > $GEDmatchID = $dna_test['GEDmatchID']; > $y_results = $dna_test['y_results']; > $surnames = !empty($ancsurnameupper) ? strtoupper($dna_test['surnames']) : $dna_test['surnames']; > $dna_notes = $dna_test['notes']; > $admin_notes = $dna_test['admin_notes']; > > $mdanc_namestr = ""; > if($dna_test['MD_ancestorID']) {// Get Most Distant Ancestor info > $dna_anc_result = getPersonData($dna_test['tgedcom'], $dna_test['MD_ancestorID']); > $ancrow = tng_fetch_assoc($dna_anc_result); > if( $ancrow ) { > $anc_righttree = checktree($dna_test['tgedcom']); > $anc_rightbranch = $anc_righttree ? checkbranch($ancrow['branch']) : false; > $ancrights = determineLivingPrivateRights($ancrow, $anc_righttree, $anc_rightbranch); > $ancrow['allow_living'] = $ancrights['living']; > $ancrow['allow_private'] = $ancrights['private']; > $vitalinfo = getBirthInfo($ancrow); > $anc_namestr = getName( $ancrow ); > $mdanc_namestr = "$anc_namestr" . $vitalinfo; > } > > tng_free_result($dna_anc_result); > } > $mrcanc_namestr = ""; > if($dna_test['MRC_ancestorID']) {// Get MRCA Individual info > if ($dna_test['MRC_ancestorID'][0] == "I") { > $dna_anc_result = getPersonData($dna_test['tgedcom'], $dna_test['MRC_ancestorID']); > $ancrow = tng_fetch_assoc($dna_anc_result); > if( $ancrow ) { > $anc_righttree = checktree($dna_test['tgedcom']); > $anc_rightbranch = $anc_righttree ? checkbranch($ancrow['branch']) : false; > $ancrights = determineLivingPrivateRights($ancrow, $anc_righttree, $anc_rightbranch); > $ancrow['allow_living'] = $ancrights['living']; > $ancrow['allow_private'] = $ancrights['private']; > $vitalinfo = getBirthInfo($ancrow); > $anc_namestr = getName( $ancrow ); > $mrcanc_namestr = "$anc_namestr" . $vitalinfo; > } > > tng_free_result($dna_anc_result); > } > else if ($dna_test['MRC_ancestorID'][0] == $tngconfig['familyprefix']) { // Get MRCA Family info > $mrcquery = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"{$dna_test['MRC_ancestorID']}\" AND gedcom = \"{$dna_test['tgedcom']}\""; > $mrcresult = tng_query($mrcquery); > $ancrow = tng_fetch_assoc($mrcresult); > tng_free_result($mrcresult); > if( $ancrow ) { > $anc_righttree = checktree($dna_test['tgedcom']); > $anc_rightbranch = checkbranch($ancrow['branch']); > $ancrights = determineLivingPrivateRights($ancrow, $anc_righttree, $anc_rightbranch); > $ancrow['allow_living'] = $ancrights['living']; > $ancrow['allow_private'] = $ancrights['private']; > $famname = getFamilyName( $ancrow ); > $fammarried = "
      {$text['marrabbr']} " . $ancrow['marrdate']; > $mrcanc_namestr = $text['family'] . ": " . "$famname" . $fammarried; > } > } > } > if( $dna_test['medialinks'] ) {// Get Media Links > $medialinks = showMediaLinks($dna_test['medialinks']); > } > else $medialinks = ""; > if( $dna_test['urls'] ) {// Get Relevant Links > $urls = showLinks($dna_test['urls'],true); > if($urls) $urls = "
      $urls
    "; > } > else > $urls = ""; > // Start test results > if(isset($ydna_haplogroup)) { > if ($dna_test['ydna_confirmed']) > $haplogroup = "" . $ydna_haplogroup . ""; > else > $haplogroup = "" . $ydna_haplogroup . ""; > } > if(isset($mtdna_haplogroup)) { > if ($dna_test['mtdna_confirmed']) > $haplogroup = "" . $mtdna_haplogroup . ""; > else > $haplogroup = "" . $mtdna_haplogroup . ""; > } > $persontext .= "\n"; > $persontext .= "\n"; > $persontext .= "\n"; > $testnum++; > } > } > > $persontext .= "
    {$admtext['dna_tests']}$toggleicon $num_links $linkedstr \"\"
    {$text['test_type']}{$text['takenby']}{$text['haplogroup']} {$text['test_info']}
    {$dna_test['test_type']}$markercount$dna_namestr$haplogroup "; > if($GEDmatchID) { > $GEDmatch_str = "$GEDmatchID"; > $persontext .= "{$admtext['gedmatchID']} = $GEDmatch_str

    "; > } > if ($mdanc_namestr) > $persontext .= "" . $admtext['mda'] . ":
    " . $mdanc_namestr . "

    "; > if ($mrcanc_namestr) > $persontext .= "" . $admtext['mrca'] . ":
    " . $mrcanc_namestr . "
    "; > if ($dna_test['markeropt']) { > $persontext .= $y_results ? "
    " . $dna_test['markers'] . " " . $admtext['marker_values'] . ":
    " . $y_results . "
    " : ""; > if($test_type == "mtDNA") { > if ($ref_seq) { > $persontext .= "
    " . $admtext['ref_seq'] . ":
    "; > if ($ref_seq == "rsrs") > $persontext .= "{$admtext['rsrs']}"; > if ($ref_seq == "rcrs") > $persontext .= "{$admtext['rcrs']}"; > $persontext .= "
    "; > } > if ($hvr1_results || $hvr2_results) { > $persontext .= "
    " . $admtext['hvr_values'] . ":
    "; > if($hvr1_results) > $persontext .= "{$text['hvr1']} = $hvr1_results
    "; > if($hvr2_results) > $persontext .= "
    " . nl2br($text['hvr2']) . " = $hvr2_results
    "; > } > $persontext .= $xtra_mut ? "

    " . nl2br($admtext['xtra_mut']) . ":
    $xtra_mut
    " : ""; > $persontext .= $allow_admin && $coding_reg ? "

    " . nl2br($admtext['coding_reg']) . ":
    " . $coding_reg . "
    " : ""; > } > if($test_type == "atDNA") { > if($shared_cMs) { > $persontext .= "
    {$text['shared_dna']}:
    "; > $total_shared = $admtext['shared centimorgans'] . " " . $shared_cMs; > if ($shared_segments) > $total_shared .= " | $shared_segments {$admtext['shared_segments']} "; > else > $total_shared .= " "; > $persontext .= $admtext['shared_dna'] ." = $total_shared
    "; > } > if($chromosome && $centiMorgans) { > $segment = "{$admtext['chromosome']} $chromosome | $centiMorgans {$admtext['centiMorgans']} "; > $persontext .= $admtext['largest_segment'] ." = $segment
    "; > } > if($segment_start) > $persontext .= $admtext['segment_start'] ." = $segment_start
    "; > if($segment_end) > $persontext .= $admtext['segment_end'] ." = $segment_end
    "; > if($matching_SNPs) > $persontext .= $admtext['matchingSNPs'] ." = $matching_SNPs
    "; > if($x_match) > $persontext .= $admtext['xmatch'] ." = {$admtext['yes']}
    "; > if($relationship_range || $suggested_relationship || $actual_relationship || $related_side) > $persontext .= "
    {$admtext['relationship_section']}:
    "; > if($relationship_range) > $persontext .= $admtext['relationship_range'] ." = $relationship_range
    "; > if($suggested_relationship) > $persontext .= $admtext['suggested_relationship'] ." = $suggested_relationship
    "; > if($actual_relationship) > $persontext .= $admtext['actual_relationship'] ." = $actual_relationship
    "; > if($related_side) > $persontext .= $admtext['related_side'] ." = $related_side
    "; > } > } > $persontext .= $dna_test['surnamesopt'] && $surnames ? "
    " . $admtext['ancestral_surnames'] . ":
    " . $surnames . "
    " : ""; > $persontext .= $dna_test['linksopt'] && $urls ? "
    " . $text['relevant_links'] . ": " . $urls : ""; > $persontext .= $medialinks ? "
    " . $admtext['medialinks'] . ": " . $medialinks : ""; > $persontext .= $dna_test['notesopt'] && $dna_notes ? "
    " . $text['notes'] . ":
    " . $dna_notes . "
    " : ""; > $persontext .= $allow_admin && $dna_test['admin_notes'] ? "
    " . $admtext['admin_notes'] . ":
    " . $admin_notes . "
    " : ""; > $persontext .= "
    \n"; > $persontext .= "
    \n"; > } > tng_free_result($dna_results); Only in TNG1403: error_log diff -r TNG/eventlib_js.php TNG1403/eventlib_js.php 6,7c6,7 < var preferDateFormat = ''; < var tree = ""; --- > var preferDateFormat = ''; > var tree = ""; diff -r TNG/eventlib.php TNG1403/eventlib.php 5,6d4 < echo "
    \n"; < 14,25d11 < echo ""; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < echo "\n"; < 42a29,35 > $rowspan = 0; > if($info) $rowspan++; > if($event['eventdate'] || $event['eventplace']) $rowspan++; > if(!$rowspan) { > $rowspan = 1; > $info = " "; > } 46,47c39,46 < $actionstr = $allow_edit ? "" : ""; < $actionstr .= $allow_delete ? "" : " "; --- > if($allow_edit) { > $on_click_edit = " onclick=\"return editEvent({$event['eventID']});\""; > $actionstr = ""; > } > else { > $actionstr = $on_click_edit = ""; > } > $actionstr .= $allow_delete ? "" : " "; 49,50c48,49 < $notesicon = $gotnotes[$event['eventID']] ? "admin-note-on-icon" : "admin-note-off-icon"; < $actionstr .= ""; --- > $notesicon = !empty($gotnotes[$event['eventID']]) ? "admin-note-on-icon" : "admin-note-off-icon"; > $actionstr .= ""; 53,54c52,60 < $citesicon = $gotcites[$event['eventID']] ? "admin-cite-on-icon" : "admin-cite-off-icon"; < $actionstr .= ""; --- > $citesicon = !empty($gotcites[$event['eventID']]) ? "admin-cite-on-icon" : "admin-cite-off-icon"; > $actionstr .= ""; > } > if($event['eventdate'] || $event['eventplace']) { > echo ""; > echo ""; > echo "$actionstr\n"; > if($info) > echo "\n"; 56c62,68 < echo "\n"; --- > else { > echo ""; > echo ""; > echo "$actionstr\n"; > } > echo "\n"; > echo "\n"; 60,63d71 < < echo "\n"; < echo "
     " . $admtext['action'] . "  " . $admtext['event'] . "  " . $admtext['eventdate'] . "    " . $admtext['eventplace'] . "  " . $admtext['detail'] . " 
    {$displayval}:
    {$event['eventdate']} 
    {$event['eventplace']} 
    $info
    $actionstr$displayval{$event['eventdate']} {$event['eventplace']} $info 
    {$displayval}:
    $info
    \n"; < echo "
    \n"; diff -r TNG/eventmicro.php TNG1403/eventmicro.php 3c3 < $eventstr = $admtext[$eventID] ? $admtext[$eventID] : ""; --- > $eventstr = !empty($admtext[$eventID]) ? $admtext[$eventID] : ""; 5c5 < $query = "SELECT display, eventdate, eventplace, info FROM $events_table, $eventtypes_table WHERE eventID = \"$plink[eventID]\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID"; --- > $query = "SELECT display, eventdate, eventplace, info FROM $events_table, $eventtypes_table WHERE eventID = \"{$plink['eventID']}\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID"; 8c8 < $displayval = getEventDisplay( $custevent['display'] ); --- > $displayval = isset($custevent['display']) ? getEventDisplay( $custevent['display'] ) : ""; 10c10 < if( $custevent['eventdate'] ) --- > if( !empty($custevent['eventdate']) ) 12c12 < elseif( $custevent['eventplace'] ) --- > elseif( !empty($custevent['eventplace']) ) 14c14 < elseif( $custevent['info'] ) --- > elseif( !empty($custevent['info']) ) diff -r TNG/extrastree.php TNG1403/extrastree.php 16a17 > $parentset = isset($parentset) ? intval($parentset) : 0; 96,97c97,98 < if( $result2 ) { < $newrow = tng_fetch_assoc( $result2 ); --- > $newrow = tng_fetch_assoc( $result2 ); > if( $newrow ) { 100d100 < tng_free_result($result2); 101a102 > tng_free_result($result2); 142d142 < $flags['tabs'] = $tngconfig['tabs']; 154c154 < $innermenu .= "\n"; 191c191 < if( $columns[1][$nextgen] ) { --- > if(!empty($columns[1][$nextgen])) { 203c203 < if( $columns[2][$nextgen] ) { --- > if(!empty($columns[2][$nextgen])) { 212d211 < diff -r TNG/familychart.php TNG1403/familychart.php 8c8 < $reverse = $rev; --- > include($subroot . "pedconfig.php"); 10,12c10,14 < if($tngprint) { < if($familychart['boxwidth'] > 151) < $familychart['boxwidth'] = 151; #dimensions of individual boxes --- > $reverse = isset($rev) ? $rev : ""; > > if(!empty($tngprint)) { > if($familychart['boxwidth'] > 191) > $familychart['boxwidth'] = 191; #dimensions of individual boxes 20c22,24 < if(!($familyID || $personID)) die("no args\n"); --- > if( empty($familyID) && empty($personID) ) die("no args\n"); > if( !isset($familyID) ) $familyID = ""; > if( !isset($personID) ) $personID = ""; 23c27 < $family = array(); --- > pageNotFound(); 30c34 < $fatherID = $family['husband']['personID']; --- > $fatherID = isset($family['husband']['personID']) ? $family['husband']['personID'] : ""; 35c39 < $family['husband']['otherfamilies'] = $temp['otherfamilies']; #usually null --- > $family['husband']['otherfamilies'] = isset($temp['otherfamilies']) ? $temp['otherfamilies'] : ""; #usually null 37c41 < $motherID = $family['wife']['personID']; --- > $motherID = isset($family['wife']['personID']) ? $family['wife']['personID'] : ""; 41c45 < $temp =getChild($matfamily,$motherID); --- > $temp = getChild($matfamily,$motherID); 46c50 < $temp=getChild($family,$personID); --- > $temp = getChild($family,$personID); 50c54 < echo $text['parentfamily'] . " ".($name ?" {$text['of']} $name " : " {$text['shown']} ")." {$text['isthe']} $admtext[$type] {$text['family']}."; --- > echo "

    " . $text['parentfamily'] . " ".($name ?" {$text['of']} $name " : " {$text['shown']} ")." {$text['isthe']} $admtext[$type] {$text['family']}.

    "; 55c59 < $famsize = count($family['children']); --- > $famsize = isset($family['children']) && is_array($family['children']) ? count($family['children']) : 0; 79c83,98 < echo "
    \n"; --- > if( !$tngprint ) { > echo "" . $text['scrollnote'] . " "; > echo "\"\"" . $text['fcinstrdn'] . " "; > echo "\"\"" . $text['fcinstrup'] . " "; > echo "\"\"" . $text['fcinstrplus'] . " "; > echo "\"\"" . $text['fcinstrfam'] . " "; > echo ""; > > echo "
    \"{$text['zoomin']}\"/\"{$text['tng_reset']}\"/\"{$text['zoomout']}\"/
    \n"; > } > ?> >
    >
    >
    > > ?> 87c107,111 < echo "\n
    \n"; --- >
    >
    >
    > > 88a113 > $query="SELECT DISTINCT a.gedcom, a.familyID, husband, wife, c.personID, c.firstname, c.lastname, c.sex, IF(birthdatetr!='0000-00-00', year(birthdatetr), year(altbirthdatetr)) AS birth, IF(deathdatetr !='0000-00-00', year(deathdatetr), year(burialdatetr)) AS death, marrdate, c.birthdate, c.birthdatetr, c.altbirthdate, c.altbirthdatetr, c.deathdate, c.deathdatetr, c.living, c.private, c.branch, c.gedcom, nameorder, lnprefix, title, prefix, suffix, ordernum, a.living AS fliving, a.private AS fprivate, a.branch AS fbranch > FROM $families_table a left join $children_table b on a.familyID=b.familyID and a.gedcom=b.gedcom join $people_table c on c.personID in (a.husband,a.wife,b.personID) and a.gedcom=c.gedcom > WHERE a.familyID='$familyID' and a.gedcom='$tree' > order by b.ordernum"; 119c144,146 < $res['living'] = $row['living']; --- > $res['living'] = $row['fliving']; > $res['private'] = $row['fprivate']; > $res['branch'] = $row['fbranch']; 129a157,159 > if( !isset($res['husband']) ) $res['husband'] = ""; > if( !isset($res['wife']) ) $res['wife'] = ""; > 158c188,191 < return $row[0]; --- > if( isset($row[0]) ) > return $row[0]; > else > return null; 193a227 > $both = 0; 197a232 > $both = 0; 221,222c256,259 < $leftparent = $reverse ? $family['wife'] : $family['husband']; < $rightparent = $reverse ? $family['husband'] : $family['wife']; --- > $wife = !empty($family['wife']) ? $family['wife'] : ""; > $husband = !empty($family['husband']) ? $family['husband'] : ""; > $leftparent = $reverse ? $wife : $husband; > $rightparent = $reverse ? $husband : $wife; 245c282 < if ($family['children']) { --- > if (!empty($family['children'])) { 274c311 < elseif($familychart['livingsymbol'] && !$_SESSION['logged_in']) --- > elseif($familychart['livingsymbol'] && empty($_SESSION['logged_in']) ) 275a313,314 > else > $life = " "; 298c337 < if ($others=$person['otherfamilies']) { --- > if ($others=(isset($person['otherfamilies']) ? $person['otherfamilies'] : null)) { 300c339 < ($top+$familychart['boxheight']-15)."px;'>$text[otherfamilies] --- > ($top+$familychart['boxheight']-15)."px;'>{$text[ 303c342 < echo "\t$other[text]
    \n"; --- > echo "\t{$other['text']}
    \n"; 323c362 < Other spouses --- > Other spouses 327,329c366,369 < $sp=0; < while ($fam=$otherfamilies[$sp++]) { < $query = "SELECT personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, $people_table.living as living, $people_table.private as private --- > $count = count($otherfamilies); > for($sp = 0; $sp < $count; $sp++) { > $fam = $otherfamilies[$sp]; > $query = "SELECT personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, $people_table.living as living, $people_table.private as private, $people_table.branch as branch, $people_table.gedcom as gedcom 341a382,389 > $spousename = ""; > if( $spouserow ) { > $righttree = checktree($person['gedcom']); > $rightbranch = $righttree ? checkbranch($person['branch']) : false; > > $spouserights = determineLivingPrivateRights($spouserow, $righttree); > $spouserow['allow_living'] = $spouserights['living']; > $spouserow['allow_private'] = $spouserights['private']; 343,350c391,392 < $righttree = checktree($person['gedcom']); < $rightbranch = $righttree ? checkbranch($person['branch']) : false; < < $spouserights = determineLivingPrivateRights($spouserow, $righttree); < $spouserow['allow_living'] = $spouserights['living']; < $spouserow['allow_private'] = $spouserights['private']; < < $spousename = getName( $spouserow ); --- > $spousename = getName( $spouserow ); > } 353c395 < echo "$text[familywith] $spousename
    \n"; --- > echo "{$text['familywith']} $spousename
    \n"; 389c431 < 'text'=>"$text[showfamily] - $admtext[$type]")); #language independent --- > 'text'=>"{$text['showfamily']} - $admtext[$type]")); #language independent 414c456 < $righttree = checktree($person['tree']); --- > $righttree = checktree($person['gedcom']); 421c463 < global $text, $flags, $tngconfig, $allow_edit, $rightbranch, $disallowgedcreate, $allowpdf, $nonames, $allowgedcom, $family_url; --- > global $text, $flags, $tngconfig, $allow_edit, $rightbranch, $disallowgedcreate, $allow_pdf, $nonames, $allowgedcom, $family_url; 428c470 < $familyname = ($f && $m) ? "$f[displayname] / $m[displayname]" : ($f ? $f['displayname'] : ($m ? $m['displayname'] : $family['children'][0]['displayname'])); --- > $familyname = ($f && $m) ? "{$f['displayname']} / {$m['displayname']}" : ($f ? $f['displayname'] : ($m ? $m['displayname'] : $family['children'][0]['displayname'])); 440,443c482,485 < writelog( "{$text['familychart']}: $logname ($familyID)" ); < preparebookmark( "{$text['familychart']}: $familyname ($familyID)" ); < $flags['tabs'] = $tngconfig['tabs']; < $flags['scripting'] = famStylesheet(); --- > writelog( "{$text['familychart']}: $logname ($familyID)" ); > preparebookmark( "{$text['familychart']}: $familyname ($familyID)" ); > $flags['scripting'] = famJavaScript(); > $flags['css'] = famStylesheet(); 452,454c494,496 < $treeResult = getTreeSimple($tree); < $treerow = tng_fetch_assoc($treeResult); < $allowpdf = !$treerow['disallowpdf'] || ($allow_pdf && $rightbranch); --- > //$treeResult = getTreeSimple($tree); > //$treerow = tng_fetch_assoc($treeResult); > //$allowpdf = !$treerow['disallowpdf'] || ($allow_pdf && $rightbranch); 462c504 < #css and javascript for this module --- > #css for this module 474a517 > /* background-color: {$familychart['boxcolor']}; > box-shadow: 5px 5px 5px {$familychart['shadowcolor']}; 485c528 < background-color: $familychart[fboxcolor]; --- > background-color: {$familychart['fboxcolor']}; 538a582 > /*]]>*/ 539a584,589 > "; > } > > function famJavaScript() { > #JavaScript for this module > return " 540a591 > // //]]> 547d598 < diff -r TNG/familygroup.php TNG1403/familygroup.php 16c16 < $placelinkend = "\" title=\"{$text['findplaces']}\">\"{$text['findplaces']}\""; --- > $placelinkend = "\" title=\"{$text['findplaces']}\">\"{$text['findplaces']}\""; 75c75 < if($event['eventlds'] == "div") --- > if(isset($event['eventlds']) && $event['eventlds'] == "div") 106c106 < $rightbranch = checkbranch($ind['branch']); --- > $rightbranch = $righttree ? checkbranch($ind['branch']) : false; 112c112 < $haskids = $ind['haskids'] ? "X" : " "; --- > $haskids = !empty($ind['haskids']) ? "X" : " "; 116c116,119 < else $sex = $text['unknown']; --- > else if( $ind['sex'] == "U" ) $sex = $text['unknown']; > else if( !empty($ind['sex']) ) > $sex = isset($text[$ind['sex']]) ? $text[$ind['sex']] : $ind['sex']; > else $sex = ""; 124a128,131 > else > $label = ""; > if($label && $sex) > $label .= " |"; 127c134 < $indtext .= "\n"; --- > $indtext .= "
    \n"; 131,132c138,139 < $indtext .= "$label | $sex
    "; < if( $ind['haskids'] ) --- > $indtext .= "$label $sex
    "; > if( !empty($ind['haskids']) ) 137c144 < $indtext .= " | {$text['edit']}"; --- > $indtext .= " | {$text['edit']}"; 145c152 < $indtext .= $allow_lds_this ? "
    \n" : "\n"; --- > $indtext .= $allow_lds_this ? "\n" : "\n"; 147c154 < $event['text'] = $text['born']; --- > $event['text'] = $text['birth']; 151a159,161 > $event['date'] = ""; > $event['place'] = ""; > $event['type2'] = ""; 163c173,174 < $event['event'] = "CHR"; --- > list($altbirthtype,$altbirthlabel) = getAltBirthInfo($ind); > $event['event'] = $altbirthtype; 177c188,191 < $event['text'] = $text['christened']; --- > $event['text'] = $altbirthlabel; > if( !isset($event['date']) ) $event['date'] = ""; > if( !isset($event['place']) ) $event['place'] = ""; > if( !isset($event['type2']) ) $event['type2'] = ""; 182c196 < $event['text'] = $text['died']; --- > $event['text'] = $text['death']; 187a202,204 > $event['date'] = ""; > $event['place'] = ""; > $event['type2'] = ""; 199c216 < $event['text'] = $ind['burialtype'] ? $text['cremated'] : $text['buried']; --- > $event['text'] = $ind['burialtype'] ? $text['cremation'] : $text['burial']; 204a222,224 > $event['date'] = ""; > $event['place'] = ""; > $event['type2'] = ""; 213,214c233,234 < $ind['sealdate'] = $sealinfo['sealdate']; < $ind['sealplace'] = $sealinfo['sealplace']; --- > $ind['sealdate'] = isset($sealinfo['sealdate']) ? $sealinfo['sealdate'] : ""; > $ind['sealplace'] = isset($sealinfo['sealplace']) ? $sealinfo['sealplace'] : ""; 226c246 < $query = "SELECT marrdate, marrplace, divdate, divplace, sealdate, sealplace, living, private, branch, marrtype FROM $families_table WHERE familyID = \"$familyID\" AND gedcom = \"$tree\""; --- > $query = "SELECT marrdate, marrplace, divdate, divplace, sealdate, sealplace, living, private, gedcom, branch, marrtype, husband, wife FROM $families_table WHERE familyID = \"$familyID\" AND gedcom = \"$tree\""; 229c249 < if( $familyID || $fam['marrtype'] ) { --- > if( $familyID || !empty($fam['marrtype']) ) { 239c259 < $event['text'] = $text['married']; --- > $event['text'] = $text['marriage']; 244a265,267 > $event['date'] = ""; > $event['place'] = ""; > $event['type2'] = ""; 258a282,285 > if( !isset($eventd['date']) ) $eventd['date'] = ""; > if( !isset($eventd['place']) ) $eventd['place'] = ""; > $eventd['type'] = ""; > $eventd['ID'] = ""; 272c299 < $query = "SELECT familyID, personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, $families_table.living as fliving, $families_table.private as fprivate, $families_table.branch as branch, $people_table.living as living, $people_table.private as private, marrdate, marrplace, sealdate, sealplace, marrtype FROM $families_table "; --- > $query = "SELECT familyID, personID, firstname, lnprefix, lastname, title, prefix, suffix, nameorder, $families_table.living as fliving, $families_table.private as fprivate, $families_table.branch as branch, $families_table.gedcom as gedcom, birthdate, birthdatetr, altbirthdate, altbirthdatetr, $people_table.living as living, $people_table.private as private, marrdate, marrplace, sealdate, sealplace, marrtype FROM $families_table "; 301c328 < $event['text'] = $text['married']; --- > $event['text'] = $text['marriage']; 306a334,336 > $event['date'] = ""; > $event['place'] = ""; > $event['type2'] = ""; 319,320c349,350 < if( $familyID ) { < $query = "SELECT familyID, personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, $people_table.living, $people_table.private, $people_table.branch FROM ($families_table, $people_table) WHERE $families_table.familyID = \"{$ind['famc']}\" AND $families_table.gedcom = \"$tree\" AND $people_table.personID = $families_table.husband AND $people_table.gedcom = \"$tree\""; --- > if( $familyID && $ind['famc'] ) { > $query = "SELECT familyID, personID, firstname, lnprefix, lastname, title, prefix, suffix, nameorder, $people_table.birthdate, $people_table.birthdatetr, $people_table.altbirthdate, $people_table.altbirthdatetr, $people_table.living, $people_table.private, $people_table.branch, $people_table.gedcom FROM ($families_table, $people_table) WHERE $families_table.familyID = \"{$ind['famc']}\" AND $families_table.gedcom = \"$tree\" AND $people_table.personID = $families_table.husband AND $people_table.gedcom = \"$tree\""; 324,326c354,358 < $prights = determineLivingPrivateRights($parent, $righttree); < $parent['allow_living'] = $prights['living']; < $parent['allow_private'] = $prights['private']; --- > $fathername = ""; > if($parent) { > $prights = determineLivingPrivateRights($parent, $righttree); > $parent['allow_living'] = $prights['living']; > $parent['allow_private'] = $prights['private']; 328c360,361 < $fathername = getName( $parent ); --- > $fathername = getName( $parent ); > } 334c367 < $query = "SELECT familyID, personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, $people_table.living, $people_table.private, $people_table.branch FROM ($families_table, $people_table) WHERE $families_table.familyID = \"{$ind['famc']}\" AND $families_table.gedcom = \"$tree\" AND $people_table.personID = $families_table.wife AND $people_table.gedcom = \"$tree\""; --- > $query = "SELECT familyID, personID, firstname, lnprefix, lastname, title, prefix, suffix, nameorder, $people_table.birthdate, $people_table.birthdatetr, $people_table.altbirthdate, $people_table.altbirthdatetr, $people_table.living, $people_table.private, $people_table.branch, $people_table.gedcom FROM ($families_table, $people_table) WHERE $families_table.familyID = \"{$ind['famc']}\" AND $families_table.gedcom = \"$tree\" AND $people_table.personID = $families_table.wife AND $people_table.gedcom = \"$tree\""; 338,340c371,375 < $prights = determineLivingPrivateRights($parent, $righttree); < $parent['allow_living'] = $prights['living']; < $parent['allow_private'] = $prights['private']; --- > $mothername = ""; > if($parent) { > $prights = determineLivingPrivateRights($parent, $righttree); > $parent['allow_living'] = $prights['living']; > $parent['allow_private'] = $prights['private']; 342c377,378 < $mothername = getName( $parent ); --- > $mothername = getName( $parent ); > } 346a383,385 > } else if ( $familyID ) { > $indtext .= showFact( $text['father'], "" ); > $indtext .= showFact( $text['mother'], "" ); 373c412 < $logname = $tngconfig['nnpriv'] && $family['private'] ? $admtext['text_private'] : ($nonames && $famrow['living'] ? $text['living'] : $famname); --- > $logname = $tngconfig['nnpriv'] && $famrow['private'] ? $admtext['text_private'] : ($nonames && $famrow['living'] ? $text['living'] : $famname); 386d424 < $flags['tabs'] = $tngconfig['tabs']; 388a427,432 > > if($rights['both']) > tng_header( $text['familygroupfor'] . " $famname $years ", $flags ); > else > tng_header( $text['familygroupfor'] . " $famname", $flags ); > 397,400d440 < if($rights['both']) < tng_header( $text['familygroupfor'] . " $famname $years ", $flags ); < else < tng_header( $text['familygroupfor'] . " $famname", $flags ); 406c446 < $fammedia = getMedia( $famrow, "F" ); --- > $fammedia = getMedia( $famrow, "F", true ); 428c468 < $label = $husbrow['sex'] != "M" ? $text['wife'] : $text['husband']; --- > $label = $wiferow['sex'] != "M" ? $text['wife'] : $text['husband']; 434c474 < $query = "SELECT $people_table.personID as personID, branch, firstname, lnprefix, lastname, prefix, suffix, nameorder, living, private, famc, sex, birthdate, birthplace, altbirthdate, altbirthplace, haskids, deathdate, deathplace, burialdate, burialplace, burialtype, baptdate, baptplace, endldate, endlplace, sealdate, sealplace FROM $people_table, $children_table WHERE $people_table.personID = $children_table.personID AND $children_table.familyID = \"{$famrow['familyID']}\" AND $people_table.gedcom = \"$tree\" AND $children_table.gedcom = \"$tree\" ORDER BY ordernum"; --- > $query = "SELECT $people_table.personID as personID, branch, $people_table.gedcom as gedcom, firstname, lnprefix, lastname, title, prefix, suffix, nameorder, living, private, famc, sex, birthdate, birthdatetr, birthplace, altbirthtype, altbirthdate, altbirthdatetr, altbirthplace, haskids, deathdate, deathdatetr, deathplace, burialdate, burialdatetr, burialplace, burialtype, baptdate, baptplace, endldate, endlplace, sealdate, sealplace FROM $people_table, $children_table WHERE $people_table.personID = $children_table.personID AND $children_table.familyID = \"{$famrow['familyID']}\" AND $people_table.gedcom = \"$tree\" AND $children_table.gedcom = \"$tree\" ORDER BY ordernum"; 469c509 < $famtext .= "
    \n"; --- > $famtext .= "
    \n"; 489c529 < $famtext .= "
    \n"; --- > $famtext .= "
    \n"; 500c540 < $famtext .= "
    \n"; --- > $famtext .= "
    \n"; 507c547 < $famtext .= "
  • $cite
    "; --- > $famtext .= "
  • $cite
    "; 510c550 < $famtext .= "
  • \n"; --- > $famtext .= "\n"; 521c561 < $famtext .= "
    \n"; --- > $famtext .= "
    \n"; 529a570,571 > else > $notes = false; 628d669 < $flags['more'] = "\n"; diff -r TNG/famsearchform.php TNG1403/famsearchform.php 4c4 < if($cms['events']){include('cmsevents.php'); cms_search();} --- > if(!empty($cms['events'])){include('cmsevents.php'); cms_search();} 10,31c10,33 < if( $_SESSION['tng_search_ftree'] ) $tree = $_SESSION['tng_search_ftree']; < $flnqualify = $_SESSION['tng_search_flnqualify']; < $myflastname = $_SESSION['tng_search_flastname']; < $ffnqualify = $_SESSION['tng_search_ffnqualify']; < $myffirstname = $_SESSION['tng_search_ffirstname']; < $mlnqualify = $_SESSION['tng_search_mlnqualify']; < $mymlastname = $_SESSION['tng_search_mlastname']; < $mfnqualify = $_SESSION['tng_search_mfnqualify']; < $mymfirstname = $_SESSION['tng_search_mfirstname']; < $fidqualify = $_SESSION['tng_search_fidqualify']; < $myfamilyid = $_SESSION['tng_search_familyid']; < $mpqualify = $_SESSION['tng_search_mpqualify']; < $mymarrplace = $_SESSION['tng_search_marrplace']; < $myqualify = $_SESSION['tng_search_myqualify']; < $mymarryear = $_SESSION['tng_search_marryear']; < $dvpqualify = $_SESSION['tng_search_dvpqualify']; < $mydivplace = $_SESSION['tng_search_divhplace']; < $dvyqualify = $_SESSION['tng_search_dvyqualify']; < $mydivyear = $_SESSION['tng_search_divyear']; < $mymarrtype = $_SESSION['tng_search_marrtype']; < $mybool = $_SESSION['tng_search_fbool']; < $nr = $_SESSION['tng_nr']; --- > $saved_cust_events = isset($_COOKIE['tng_search_families_post']['cust_events']) ? explode(",",stripslashes($_COOKIE['tng_search_families_post']['cust_events'])) : []; > > if( isset($_SESSION['tng_search_ftree']) ) $tree = $_SESSION['tng_search_ftree']; > $flnqualify = isset($_SESSION['tng_search_flnqualify']) ? $_SESSION['tng_search_flnqualify'] : ""; > $myflastname = isset($_SESSION['tng_search_flastname']) ? $_SESSION['tng_search_flastname'] : ""; > $ffnqualify = isset($_SESSION['tng_search_ffnqualify']) ? $_SESSION['tng_search_ffnqualify'] : ""; > $myffirstname = isset($_SESSION['tng_search_ffirstname']) ? $_SESSION['tng_search_ffirstname'] : ""; > $mlnqualify = isset($_SESSION['tng_search_mlnqualify']) ? $_SESSION['tng_search_mlnqualify'] : ""; > $mymlastname = isset($_SESSION['tng_search_mlastname']) ? $_SESSION['tng_search_mlastname'] : ""; > $mfnqualify = isset($_SESSION['tng_search_mfnqualify']) ? $_SESSION['tng_search_mfnqualify'] : ""; > $mymfirstname = isset($_SESSION['tng_search_mfirstname']) ? $_SESSION['tng_search_mfirstname'] : ""; > $fidqualify = isset($_SESSION['tng_search_fidqualify']) ? $_SESSION['tng_search_fidqualify'] : ""; > $myfamilyid = isset($_SESSION['tng_search_familyid']) ? $_SESSION['tng_search_familyid'] : ""; > $mpqualify = isset($_SESSION['tng_search_mpqualify']) ? $_SESSION['tng_search_mpqualify'] : ""; > $mymarrplace = isset($_SESSION['tng_search_marrplace']) ? $_SESSION['tng_search_marrplace'] : ""; > $myqualify = isset($_SESSION['tng_search_myqualify']) ? $_SESSION['tng_search_myqualify'] : ""; > $mymarryear = isset($_SESSION['tng_search_marryear']) ? $_SESSION['tng_search_marryear'] : ""; > $dvpqualify = isset($_SESSION['tng_search_dvpqualify']) ? $_SESSION['tng_search_dvpqualify'] : ""; > $mydivplace = isset($_SESSION['tng_search_divplace']) ? $_SESSION['tng_search_divplace'] : ""; > $dvyqualify = isset($_SESSION['tng_search_dvyqualify']) ? $_SESSION['tng_search_dvyqualify'] : ""; > $mydivyear = isset($_SESSION['tng_search_divyear']) ? $_SESSION['tng_search_divyear'] : ""; > $mymarrtype = isset($_SESSION['tng_search_marrtype']) ? $_SESSION['tng_search_marrtype'] : ""; > $mybool = isset($_SESSION['tng_search_fbool']) ? $_SESSION['tng_search_fbool'] : ""; > $nr = isset($_SESSION['tng_nr']) ? $_SESSION['tng_nr'] : $maxsearchresults; 35a38,46 > function displayToggle($id,$state,$target,$headline) { > global $text; > > $rval = "
    \"{$text['clickdisplay']}\""; > $rval .= "$headline
    \n"; > > return $rval; > } > 68c79 < function toggleSection( flag ) { --- > function toggleEvSection( flag ) { 81a93,105 > function removeEvCookie( item, eventtypeID, type ) { > var params = {eventtypeID: eventtypeID, type: type}; > jQuery.ajax({ > url: 'ajx_remove_event_cookie.php', > data: params, > dataType: 'html', > success: function(req) { > $(item).hide(); > toggleSection('evt'+eventtypeID,'arr'+eventtypeID); > } > }) > } > 116c140 < if( !in_array( $row[tag], $dontdo ) ) { --- > if( !in_array( $row['tag'], $dontdo ) ) { 144c168 < if($msg) --- > if(!empty($msg)) 146a171 > echo "
    \n"; 151c176 <
    --- >
    178c203 < --- > 194c219 < --- > 211c236 < --- > 227c252 < --- > 244c269 < --- > 260c285 < --- > 276c301 < --- > 292c317 < --- > 308c333 < --- > 320c345 < if( $mtqualify == $item[1] ) echo " selected=\"selected\""; --- > if( isset($mtqualify) && $mtqualify == $item[1] ) echo " selected=\"selected\""; 325c350 < --- > 332d356 <
    334,336c358,360 <
      <
    • < --- >
        >
      • > 338,339c362 <
    < --- > \n"; < < echo "\n"; < echo "\n"; < echo " < < < <
    --- >
    >
    434d465 <
    $header = "
    $header = "
    $header = "
    "title" => $row['ftitle'], > "prefix" => $row['fprefix'], > "suffix" => $row['fsuffix'], > "birthdate" => $row['fbirthdate'], > "birthdatetr" => $row['fbirthdatetr'], > "altbirthdate" => $row['faltbirthdate'], > "altbirthdatetr" => $row['faltbirthdatetr'], > "deathdate" => $row['fdeathdate'], 381c399,401 < "branch" => $row['fbranch'] --- > "personID" => $row['fpersonID'], > "branch" => $row['fbranch'], > "gedcom" => $row['gedcom'] 390a411,418 > "title" => $row['mtitle'], > "prefix" => $row['mprefix'], > "suffix" => $row['msuffix'], > "birthdate" => $row['mbirthdate'], > "birthdatetr" => $row['mbirthdatetr'], > "altbirthdate" => $row['maltbirthdate'], > "altbirthdatetr" => $row['maltbirthdatetr'], > "deathdate" => $row['mdeathdate'], 391a420 > "private" => $row['mprivate'], 393c422,423 < "private" => $row['mprivate'] --- > "personID" => $row['mpersonID'], > "gedcom" => $row['gedcom'] diff -r TNG/fan_config.php TNG1403/fan_config.php 26c26 < $fan_width = 65; --- > $fan_width = 85; 62c62 < $fan_info_height = 80; --- > $fan_info_height = 85; 63a64 > $fan_info_header = "14pt Arial"; diff -r TNG/fan.php TNG1403/fan.php 9a10 > $parentset = isset($parentset) ? intval($parentset) : 0; 46c47 < $row['name'] = getName( $row ); --- > $namestr = getName( $row ); 48c49 < $logname = $tngconfig['nnpriv'] && $row['private'] ? $admtext['text_private'] : ($nonames && $row['living'] ? $text['living'] : $row['name']); --- > $logname = $tngconfig['nnpriv'] && $row['private'] ? $admtext['text_private'] : ($nonames && $row['living'] ? $text['living'] : $namestr); 59,60c60 < $flags['tabs'] = $tngconfig['tabs']; < tng_header( "{$text['fanchart']}: {$perName[0]} Generations: {$generations}",$flags); --- > tng_header( "{$text['fanchart']}: {$namestr} Generations: {$generations}",$flags); 62,63c62,63 < $photostr = showSmallPhoto( $personID, $row['name'], $rights['both'], 0, false, $row['sex'] ); < echo tng_DrawHeading( $photostr, $row['name'], getYears( $row ) ); --- > $photostr = showSmallPhoto( $personID, $namestr, $rights['both'], 0, false, $row['sex'] ); > echo tng_DrawHeading( $photostr, $namestr, getYears( $row ) ); 75a76,77 > $tData=null; > $years=null; 80c82 < for ($a=0; $a <= $generations; $a++) --- > for ($a=0; $a < $generations; $a++) 84c86 < if(isset($perID[pow(2,$a)+$b-1])) --- > if(!empty($perID[pow(2,$a)+$b-1])) 95a98 > $row['suffix'] = ""; 101c104,105 < $bio = addslashes($perName[$tID]) . "
    "; --- > $years .= "years[$tID] = "; > $bio = $perName[$tID] . "
    "; 107,118c111,124 < $perID[$h] = $rowM['husband']; < $perID[$w] = $rowM['wife']; < < $rightsM = determineLivingPrivateRights($rowM, $righttree, $rightbranch); < $rowM['allow_living'] = $rightsM['living']; < $rowM['allow_private'] = $rightsM['private']; < < if($rightsM['both'] && ($rowM['marrdate'] || $rowM['marrplace'])) { < $marr = trim($text['married'] . ": " . displayDate($rowM['marrdate'])); < if($rowM['marrdate'] && $rowM['marrplace']) $marr .= ", "; < $marr .= $rowM['marrplace']; < $marriages[$h] = $marriages[$w] = $marr; --- > if(!empty($rowM)) { > $perID[$h] = $rowM['husband']; > $perID[$w] = $rowM['wife']; > > $rightsM = determineLivingPrivateRights($rowM, $righttree, $rightbranch); > $rowM['allow_living'] = $rightsM['living']; > $rowM['allow_private'] = $rightsM['private']; > > if($rightsM['both'] && ($rowM['marrdate'] || $rowM['marrplace'])) { > $marr = trim($text['married'] . ": " . displayDate($rowM['marrdate'])); > if($rowM['marrdate'] && $rowM['marrplace']) $marr .= ", "; > $marr .= $rowM['marrplace']; > $marriages[$h] = $marriages[$w] = $marr; > } 121a128 > 141a149,151 > $years .= "\"" . strip_tags(justYears($row)) . "\";\n"; > } else { > $years .= "\"\";\n"; 204c214 <
    --- >
    209c219,220 < \n"; < echo "\n"; < } < else { < echo "\n"; < echo "\n"; < } < echo "\n"; < < if( isset( $flags['scripting'] ) ) < echo $flags['scripting']; < echo "\n"; < < if($tngconfig['showshare'] && $isConnected && $sitever != "mobile") { < $w = $http == "https" ? "ws" : "w"; < echo "\n"; < echo "\n"; < } < < //echo "\n"; < if( $tngconfig['menu'] < 2 && !$tngprint && $sitever != "mobile" ) { < echo "\n"; < } < < if ($sitever != "standard" && $responsivetables) { < echo "\n"; < echo ""; < } < < echo "\n"; < //echo "\n"; < echo "\n"; < < if($tngconfig['cookieapproval'] && strpos($_SERVER['REQUEST_URI'],"/data_protection_policy.php") === FALSE) < include($cms['tngpath'] . "cookie_approval.php"); < < @include( $custommeta ); < if( $tngprint ) < echo "\n"; < echo "\n"; < < $icons = ""; < if($sitever == "mobile") { < if(!isset($flags['nomobile']) || !$flags['nomobile']) { < $icons = tng_mobileicons($title); < $icons .= "
    \n"; < } < echo "\n"; < } < < if( !$cms['support'] ) { < echo "\n"; < if( $sitever != "mobile" && !$tngprint && (!isset($flags['noheader']) || !$flags['noheader']) ) < include( $templatepath . $customheader ); < elseif(!isset($flags['nobody']) || !$flags['nobody'] || $sitever == "mobile") { < $class = !empty($flags['homeclass']) ? $flags['homeclass'] : "publicbody"; < echo "\n"; < } < } < if( $sitever != "mobile" && (!isset($flags['noicons']) || !$flags['noicons']) ) < $icons = tng_icons( 1, $title ); < echo $icons; //from above < < if(!$cms['support'] && $sitever == "mobile" && !$tngprint && (!isset($flags['noheader']) || !$flags['noheader'])) { < $ttitle = "t{$templatenum}_maintitle"; < if($tmp[$ttitle]) < $mtitle = str_replace(array("
    ","
    ")," ", getTemplateMessage($ttitle)); < else { < $ttitle = "t{$templatenum}_headtitle"; < $i = 1; < $mtitle = ""; < while($tmp[$ttitle . $i]) { < $mtitle .= getTemplateMessage($ttitle . $i) . " "; < $i++; < } < } < if($mtitle) < echo "

    " . $mtitle . "



    \n"; < } < < if($tngconfig['maint']) < echo "{$text['mainton']}

    \n"; < } < < function tng_footer( $flags ) { < global $customfooter, $cms, $tngprint, $map, $text, $dbowner, $tngdomain, $sitename, $templatepath, $sitever, $tng_version, $tngconfig; < < $needtherest = true; < if( $tngprint ) { < $printfooter = $sitename; < if($dbowner) { < if($printfooter) $printfooter .= " - "; < $suggest_url = getURL( "suggest", 1 ); < if($tngconfig['dataprotect'] && strpos($_SERVER['REQUEST_URI'],"/data_protection_policy.php") === FALSE) { < $dataprotect_url = getURL( "data_protection_policy", 0 ); < $data_protection_link = " | {$text['dataprotect']}.\n"; < } < else < $data_protection_link = ""; < $printfooter .= $text['maintby'] . " $dbowner.{$data_protection_link}"; < } < echo "

    " . $printfooter . "
    \n$tngdomain

    "; < } < else { < if($sitever == "mobile") { < echo tng_basicfooter($flags); < if(!isset($flags['nomobile']) || !$flags['nomobile']) < echo "
    \n"; < } < else { < if(isset($flags['basicfooter']) && $flags['basicfooter']) { < echo tng_basicfooter($flags); < $needtherest = false; < } < else { < include( $templatepath . $customfooter ); < } < } < } < if($needtherest) { < if( isset( $flags['more'] ) ) < echo $flags['more']; < if(!$tngprint) < echo "\n"; < if($map['key'] && $map['pins']) < tng_map_pins(); < < if(!isset($flags['noend']) || !$flags['noend']) include($cms['tngpath'] . "end.php" ); < } < } < < function tng_basicfooter($flags) { < global $text, $cms, $tng_version, $sitever, $http, $tngconfig, $tree, $personID; < < $footer = ""; < $newsitever = getSiteVersion(); < //echo "ver=$sitever, nsv=$newsitever"; < if($sitever == "mobile" || $newsitever != "standard") { < $thispage = getScriptName(false); < $thispage = preg_replace('/\??\&?sitever=(mobile|standard|tablet)/',"",$thispage); < $con = strpos($thispage, "?") == false ? "?" : "&"; < < if($sitever == "mobile") { < $gotover = $newsitever == "mobile" ? "standard" : $newsitever; < $message = $text['switchs']; < } < else { < $gotover = "mobile"; < $message = $text['switchm']; < } < $footer .= "

    \n"; < $footer .= " {$message} \n"; < $footer .= "


    \n"; < } < include($cms['tngpath'] . "stdsitecredit.php"); < $footer .= $sitecredit; < /*if(!$tngconfig['webmatches'] && $personID) { < ?> < < < < $photoinfo[1] ) { < $photowtouse = $thumbmaxw; < $photohtouse = intval( $thumbmaxw * $photoinfo[1] / $photoinfo[0] ) ; < } < else { < $photohtouse = $thumbmaxh; < $photowtouse = intval( $thumbmaxh * $photoinfo[0] / $photoinfo[1] ) ; < } < } < //$dimensions = " width=\"$photowtouse\" height=\"$photohtouse\""; < $dimensions = " height=\"$photohtouse\""; < $class = " class=\"thumb\""; < } < else { < $thumb = $cms['tngpath'] . "img/" . $mediatypes_thumbs[$mediatypeID]; < $dimensions = $class = ""; < } < < $altmsg = $medialink['allow_living'] ? str_replace("\"","'",$medialink['description']) : ""; < $cleantitle = $tnggallery ? $altmsg : ""; < $imgsrc = "\"$altmsg\""; < < return $imgsrc; < } < < function tng_DrawHeading($photostr, $namestr, $years) { < global $tngconfig; < if( $photostr ) < $outputstr = "
    $photostr

    $namestr

    $years\n"; < else { < $outputstr = "

    $namestr

    "; < if($years) < $outputstr .= "$years
    \n"; < } < $outputstr .= "

    \n"; < if(!$tngconfig['webmatches']) < echo "
    \n"; < < return $outputstr; < } < < function getSurnameOnly( $row ) { < global $text, $admtext, $tngconfig; < < $nonames = showNames($row); < if( $row['allow_living'] || $nonames != 1 ) { < $namestr = trim( $row['lnprefix'] . " " . $row['lastname'] ); < if($tngconfig['ucsurnames']) $namestr = tng_strtoupper($namestr); < } < elseif( $row['private'] ) < $namestr = $admtext['text_private']; < else < $namestr = $text['living']; < < return $namestr; < } < < function getFirstNameOnly( $row ) { < global $text, $admtext; < < $nonames = showNames($row); < if( ($row['allow_living'] && $row['allow_private']) || !$nonames ) < $namestr = strtok( $row['firstname'], " " ); < elseif( $nonames == 2 ) < $namestr = initials( $row['firstname'] ); < elseif( $row['private'] ) < $namestr = $admtext['text_private']; < else < $namestr = $text['living']; < < return $namestr; < } < < function tng_menu( $enttype, $currpage, $entityID, $innermenu ) { < global $tree, $text, $disallowgedcreate, $target, $allow_admin, $allow_edit, $currentuser; < global $rightbranch, $cms, $allow_ged, $emailaddr, $newbrowser, $tngprint, $flags, $sitever; < < $nexttab = 0; < if( !$tngprint ) { < $menu = "
    \n"; < $menu .= $newbrowser ? "
      \n" : "
      \n"; < $choices = ""; < if( $enttype == "I" ) { < $getperson_url = getURL( "getperson", 1 ); < $pedigree_url = getURL( "pedigree", 1 ); < $descend_url = getURL( "descend", 1 ); < $gedform_url = getURL( "gedform", 1 ); < $relateform_url = getURL( "relateform", 1 ); < $timeline_url = getURL( "timeline", 1 ); < $familychart_url = getURL( "familychart", 1 ); < < $choices .= doMenuItem( $nexttab++, $getperson_url . "personID=$entityID&tree=$tree" , "ind", $text['indinfo'], $currpage, "person" ); < $choices .= doMenuItem( $nexttab++, $familychart_url . "personID=$entityID&tree=$tree" , "fam", $text['family'], $currpage, "familychart" ); < $choices .= doMenuItem( $nexttab++, $pedigree_url . "personID=$entityID&tree=$tree" , "ped", $text['ancestors'], $currpage, "pedigree" ); < $choices .= doMenuItem( $nexttab++, $descend_url . "personID=$entityID&tree=$tree" , "desc", $text['descendants'], $currpage, "descend" ); < $choices .= doMenuItem( $nexttab++, $relateform_url . "primaryID=$entityID&tree=$tree" , "rel", $text['relationship'], $currpage, "relate" ); < $choices .= doMenuItem( $nexttab++, $timeline_url . "primaryID=$entityID&tree=$tree" , "time", $text['timeline'], $currpage, "timeline" ); < if( !$disallowgedcreate || ($allow_ged && $rightbranch) ) < $choices .= doMenuItem( $nexttab++, "$gedform_url" . "personID=$entityID&tree=$tree" , "ged", $text['extractgedcom'], $currpage, "gedcom" ); < $editstr = "admin_editperson.php?person"; < } < elseif( $enttype == "F" ) { < $familygroup_url = getURL( "familygroup", 1 ); < $familychart_url = getURL( "familychart", 1 ); < < $choices .= doMenuItem( $nexttab++, "$familychart_url" . "familyID=$entityID&tree=$tree" , "fam", $text['familychart'], $currpage, "familychart" ); < $choices .= doMenuItem( $nexttab++, "$familygroup_url" . "familyID=$entityID&tree=$tree" , "rel", $text['groupsheet'], $currpage, "family" ); < $editstr = "admin_editfamily.php?family"; < } < elseif( $enttype == "S" ) { < $showsource_url = getURL( "showsource", 1 ); < < $choices .= doMenuItem( $nexttab++, "$showsource_url" . "sourceID=$entityID&tree=$tree" , "ged", $text['source'], $currpage, "source" ); < $editstr = "admin_editsource.php?source"; < } < elseif( $enttype == "R" ) { < $showrepo_url = getURL( "showrepo", 1 ); < < $choices .= doMenuItem( $nexttab++, "$showrepo_url" . "repoID=$entityID&tree=$tree" , "ged", $text['repository'], $currpage, "repo" ); < $editstr = "admin_editrepo.php?repo"; < } < elseif( $enttype == "D" ) { < $show_dna_test_url = getURL( "show_dna_test", 1 ); < if (!$_SESSION["ttree"]) $_SESSION["ttree"] = "-x--all--x-"; < $browse_dna_tests_url = getURL( "browse_dna_tests", 1 ) . "tree=" . $_SESSION["ttree"] . "&test_type=" . $_SESSION["ttype"] . "&test_group=" . $_SESSION["tgroup"] . "&testsearch=" . $_SESSION["tsearch"]; < < $choices .= doMenuItem( $nexttab++, "$browse_dna_tests_url" , "ged", $text['all_dna_tests'], $currpage, "alldna" ); < $choices .= doMenuItem( $nexttab++, "$show_dna_test_url" . "testID=$entityID" , "ged", $text['dna_test'], $currpage, "dna" ); < $editstr = "admin_edit_dna_test.php?test"; < } < elseif( $enttype == "L" ) { < $placesearch_url = getURL( "placesearch", 1 ); < < $treestr = $tngconfig['places1tree'] ? "" : "&tree=$tree"; < $choices .= doMenuItem( $nexttab++, "$placesearch_url" . "psearch=$entityID$treestr" , "place", $text['place'], $currpage, "place" ); < $editstr = "admin_editplace.php?"; < $entityID = urlencode($entityID); < } < if( $allow_edit && $rightbranch ) { < $choices .= doMenuItem( $nexttab, $cms['tngpath'] . "$editstr" . "ID=$entityID&tree=$tree&cw=1\" target=\"_blank", "sugg", $text['edit'], $currpage, "" ); < } < elseif( $emailaddr ) { < $suggest_url = getURL( "suggest", 1 ); < $choices .= doMenuItem( $nexttab, "$suggest_url" . "enttype=$enttype&ID=$entityID&tree=$tree", "sugg", $text['suggest'], $currpage, "suggest" ); < } < if($sitever == "mobile") { < $menu .= "
    • \n\n\n\n
    • \n"; < } < else < $menu .= $choices; < $menu .= $newbrowser ? "
    \n" : "
    \n"; < $menu .= "
    \n"; < $menu .= "
    \n"; < $menu .= $innermenu; < $menu .= "

    \n"; < < if ($flags['tabs'] == "tngtabs1.css") { < $more = ""; < for ($i = 7; $i <= $nexttab; $i++) { < $offset = 140 + ($i-6) * 25; < $more .= "\t#a$i {left: -{$offset}px;}\n"; < $more .= "\t#tngnav a#a$i {left: -{$offset}px;}\n"; < } < if($more) { < if(!isset($flags['more'])) $flags['more'] = ""; < $flags['more'] .= "\n\n"; < } < } < } < else $menu = ""; < < return $menu; < } < < //DEPRECATED < function tng_coreicons( ) { < return ""; < } < < function tng_smallIcon($options) { < global $sitever; < $target = ""; < < $url = isset($options['url']) ? $options['url'] : "#"; < $onclick = isset($options['onclick']) ? "onclick=\"{$options['onclick']}\"" : ""; < $targetloc = $target ? "target=\"$target\"" : ""; < $class = $sitever == "mobile" ? "mobileicon" : (isset($options['class']) ? $options['class'] : "tngsmallicon"); < $rel = isset($options['rel']) ? "rel=\"{$options['rel']}\"" : ""; < < if($sitever == "mobile") { < $begin = "
  • "; < $end = "
  • \n"; < } < else { < $begin = " "; < $end = "\n"; < } < < $link = "$begin{$options['label']}$end"; < < return $link; < } < < function tng_getLeftIcons() { < global $tngconfig, $text, $homepage, $currentuser, $allow_profile, $cms, $target, $sitever; < < if(!isset($tngconfig['menucount'])) < $tngconfig['menucount'] = 0; < < $left_icons = ""; < if( !$tngconfig['showhome'] ) { < $left_icons .= tng_smallIcon(array('url'=>getURL( $homepage, 0, ""), 'label'=>$text['homepage'], 'id'=>"home")); < $tngconfig['menucount']++; < } < if( !$tngconfig['showsearch'] ) { < $params = array('url'=>getURL( "searchform", 0 ), 'label'=>$text['search'], 'id'=>"search"); < if(!$tngconfig['searchchoice'] && $sitever != "mobile") < $params['onclick'] = "return openSearch();"; < $left_icons .= tng_smallIcon($params); < $tngconfig['menucount']++; < } < < $profilelink = $userparen = ""; < if($currentuser) { < if($allow_profile && $sitever != "mobile") { < $editprofile_url = getURL( "ajx_editprofile", 1 ); < $profilelink = tng_smallIcon(array('label'=>($sitever == "mobile" ? $text['editprofile'] : "({$text['editprofile']}: $currentuser)"), < 'class'=>"tngsmallicon3", 'id'=>"profile", < 'onclick'=>"tnglitbox = new LITBox('{$editprofile_url}p=" . urlencode($cms['tngpath']) . "',{width:520,height:560}); return false")); < $tngconfig['menucount']++; < } < else < $userparen = " ($currentuser)"; < } < if( !$tngconfig['showlogin'] ) { < if( $currentuser ) { < if( !$cms['cloaklogin'] || $cms['cloaklogin'] == "both" ) < $left_icons .= tng_smallIcon(array('url'=>getURL( "logout", 1 ) . "session=" . session_name(), 'label'=>$text['logout'] . $userparen, 'id'=>"log")); < } < else { < if( !$cms['cloaklogin'] || $cms['cloaklogin'] == "both" ) { < $login_url = getURL( "ajx_login", 1 ); < $left_icons .= tng_smallIcon(array('label'=>$text['login'], 'id'=>"log", 'onclick'=>"return openLogin('{$login_url}p=" . urlencode($cms['tngpath']) . "');")); < } < } < $tngconfig['menucount']++; < } < $left_icons .= $profilelink; < < return $left_icons; < } < < function tng_getRightIcons() { < global $text, $tngconfig, $cms, $gotlastpage, $sitever, $isConnected; < < $addbookmark_url = getURL( "ajx_addbookmark", 1 ); < < $right_icons = ""; < if( $tngconfig['showshare'] && $isConnected && $sitever != "mobile") < $right_icons .= tng_smallIcon(array('label'=>$text['share'], 'id'=>"share", 'onclick'=>"jQuery('#shareicons').toggle(200); if(!share) { jQuery('#share-smicon').html('{$text['hide']}'); share=1;} else { jQuery('#share-smicon').html('{$text['share']}'); share=0; }; return false;")); < < if( !$tngconfig['showprint'] && $sitever != "mobile") { < $print_url = getScriptName(); < if(preg_match("/\?/",$print_url)) < $print_url .= "&tngprint=1"; < else < $print_url .= "?tngprint=1"; < $right_icons .= tng_smallIcon(array('label'=>$text['tngprint'], 'id'=>"print", 'rel'=>"nofollow", 'onclick'=>"newwindow=window.open('$print_url','tngprint','width=850,height=600,status=no,resizable=yes,scrollbars=yes'); newwindow.focus(); return false;")); < } < < if( !$tngconfig['showbmarks'] && $gotlastpage ) { < $right_icons .= tng_smallIcon(array('label'=>$text['bookmark'], 'id'=>"bmk", 'onclick'=>"tnglitbox = new LITBox('{$addbookmark_url}p=" . urlencode($cms['tngpath']) . "',{width:350,height:100}); return false;")); < $tngconfig['menucount']++; < } < < return $right_icons; < } < < function tng_getFindMenu() { < global $tngconfig, $time_offset; < < $menu = tngddrow(getURL( "surnames", 0 ), "surnames-icon", "", "surnames"); < $menu .= tngddrow(getURL( "firstnames", 0 ), "surnames-icon", "", "firstnames"); < $menu .= tngddrow(getURL( "searchform", 0 ), "search-icon", "", "searchnames"); < $menu .= tngddrow(getURL( "famsearchform", 0 ), "fsearch-icon", "", "searchfams"); < $menu .= tngddrow(getURL( "searchsite", 0 ), "searchsite-icon", "", "searchsitemenu"); < $menu .= tngddrow(getURL( "places", 0 ), "places-icon", "", "places"); < $menu .= tngddrow(getURL( "anniversaries", 0 ), "dates-icon", "", "dates"); < $tngmonth = date("m", time() + ( 3600 * $time_offset ) ); < $menu .= tngddrow(getURL( "calendar", 1 ) . "m=$tngmonth", "calendar-icon", "", "calendar"); < $menu .= tngddrow(getURL( "cemeteries", 0 ), "cemeteries-icon", "", "cemeteries"); < $menu .= tngddrow(getURL( "bookmarks", 0 ), "bookmarks-icon", "", "bookmarks"); < < $tngconfig['menucount'] += 8; < < global $findmenulinks; < if( isset( $findmenulinks ) ) { < $menu .= custom_links( $findmenulinks ); < } < < return $menu; < } < < function tng_getMediaMenu() { < global $mediatypes, $tngconfig; < < $menu = ""; < foreach( $mediatypes as $mediatype ) { < if(!$mediatype['disabled']) { < $menu .= tngddrow(getURL( "browsemedia", 1 ) . "mediatypeID=" . $mediatype['ID'], $mediatype['ID'] . "-icon", $mediatype['icon'], $mediatype['display'], true); < $tngconfig['menucount']++; < } < } < $menu .= tngddrow(getURL( "browsealbums", 0 ), "albums-icon", "", "albums"); < $menu .= tngddrow(getURL( "browsemedia", 0 ), "media-icon", "", "allmedia"); < $tngconfig['menucount'] += 2; < < global $mediamenulinks; < if( isset( $mediamenulinks ) ) { < $menu .= custom_links( $mediamenulinks ); < } < < return $menu; < } < < function tng_getInfoMenu($title) { < global $allow_admin, $cms, $tngconfig; < < $menu = tngddrow(getURL( "whatsnew", 0 ), "whatsnew-icon", "", "whatsnew"); < $menu .= tngddrow(getURL( "mostwanted", 0 ), "mw-icon", "", "mostwanted"); < $menu .= tngddrow(getURL( "reports", 0 ), "reports-icon", "", "reports"); < $menu .= tngddrow(getURL( "statistics", 0 ), "stats-icon", "", "databasestatistics"); < $menu .= tngddrow(getURL( "browsetrees", 0 ), "trees-icon", "", "trees"); < $menu .= tngddrow(getURL( "browsebranches", 0 ), "branches-icon", "", "branches"); < $menu .= tngddrow(getURL( "browsenotes", 0 ), "notes-icon", "", "notes"); < $menu .= tngddrow(getURL( "browsesources", 0 ), "sources-icon", "", "sources"); < $menu .= tngddrow(getURL( "browserepos", 0 ), "repos-icon", "", "repositories"); < if(!$tngconfig['hidedna']) < $menu .= tngddrow(getURL( "browse_dna_tests", 0 ), "dna-icon", "", "dna_tests"); < if( $allow_admin ) { < $menu .= tngddrow(($cms['adminurl'] ? $cms['adminurl'] : $cms['tngpath']."admin.php"), "admin-icon", "", "administration"); < $menu .= tngddrow(getURL( "showlog", 0 ), "unlock-icon", "", "mnushowlog"); < $tngconfig['menucount'] += 2; < } < $menu .= tngddrow(getURL( "suggest", 1 ) . "page=" . urlencode(str_replace("?", "", $title)), "contact-icon", "", "contactus"); < $tngconfig['menucount'] += 10; //everything except the 2 admin links < < global $infomenulinks; < if( isset( $infomenulinks ) ) { < $menu .= custom_links( $infomenulinks ); < } < < return $menu; < } < < function tng_getLanguageSelect($instance) { < global $chooselang, $languages_table, $mylanguage, $languages_path; < < $menu = ""; < if( $chooselang ) { < $query = "SELECT languageID, display, folder FROM $languages_table ORDER BY display"; < $result = tng_query($query); < $numlangs = tng_num_rows( $result ); < < if( $numlangs > 1 ) { < $menu .= "
  • \n"; < $menu .= getFORM( "savelanguage2", "get", "tngmenu$instance", "" ); < $menu .= "  \n"; < $fullmenu .= "  \n"; < $fullmenu .= "  \n"; < $fullmenu .= "\n"; < $fullmenu .= "
  • "; < } < } < < if($tngconfig['menu'] == 1) < $fullmenu .= $left_icons; < < $sharemenu = ""; < if( $tngconfig['showshare'] && $sitever != "mobile" ) { < $sharemenu .= "
    \n"; < $sharemenu .= "\n"; < $sharemenu .= "\n"; < $sharemenu .= "\n"; < $sharemenu .= "\n"; < if(isset($customshare)) < eval($customshare); < $sharemenu .= "
    \n"; < } < < if($sharemenu || $right_icons || $tngconfig['menu'] < 2 || $numlangs) { < $fullmenu .= "
    "; < $fullmenu .= $sharemenu; < < if($tngconfig['menu'] < 2 || $numlangs) < $fullmenu .= $right_icons; < < $fullmenu .= "
    \n"; < < if($tngconfig['menu'] == 1) < $fullmenu .= "

    \n"; < } < < if($menu) { < $fullmenu .= '\n"; < } < < } < < return $fullmenu; < } < < function tngddrow($link, $id, $thumb, $label, $labelliteral = false) { < global $cms, $text, $sitever; < < $uselabel = $labelliteral ? $label : $text[$label]; < if($sitever == "mobile") { < $ddrow = "
  • $uselabel
  • \n"; < } < else { < $ddrow = "
  • "; < if($thumb) < $ddrow .= "\"\""; < else < $ddrow .= ""; < $ddrow .= " $uselabel
  • \n"; < } < < return $ddrow; < } < < function treeDropdown($forminfo) { < global $text, $requirelogin, $assignedtree, $trees_table, $time_offset, $treerestrict, $cms, $tree, $numtrees, $tngconfig; < < $ret = ""; < if(!$requirelogin || !$treerestrict || !$assignedtree) { < $query = "SELECT gedcom, treename, lastimportdate FROM $trees_table ORDER BY treename"; < $treeresult = tng_query($query); < $numtrees = tng_num_rows($treeresult); < $foundtree = false; < < if( $numtrees > 1 ) { < if($forminfo['startform']) < $ret .= getFORM( $forminfo['action'], $forminfo['method'], $forminfo['name'], $forminfo['id'] ); < $ret .= "{$text['tree']}: "; < $ret .= treeSelect($treeresult, $forminfo['name']); < $ret .= "  \"\"\n"; < if(is_array($forminfo['hidden'])) { < foreach($forminfo['hidden'] as $hidden) < $ret .= "\n"; < } < //$ret .= "\n"; < if($forminfo['endform']) < $ret .= "
    \n"; < else < $ret .= "

    \n"; < $treeresult = tng_query($query); < if($tree) { < $foundtree = true; < while( $row = tng_fetch_assoc($treeresult) ) { < if($row['gedcom'] == $tree) break; < } < } < } < else { < $foundtree = true; < $row = tng_fetch_assoc( $treeresult ); < } < if( $tngconfig['lastimport'] && $foundtree && $forminfo['lastimport']) { < $lastimport = $row['lastimportdate']; < < if( $lastimport ) { < $importtime = strtotime($lastimport); < if(substr($lastimport,11,8) != "00:00:00") < $importtime += ($time_offset * 3600); < $importdate = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? strftime("%#d %b %Y %H:%M:%S",$importtime) : strftime("%e %b %Y %H:%M:%S",$importtime); < echo "

    {$text['lastimportdate']}: " . displayDate($importdate) . "

    "; < } < } < tng_free_result($treeresult); < } < return $ret; < } < < function treeSelect($treeresult, $formname = null, $onchange = null) { < global $text, $tree; < < $ret = "\n$choices\n\n\n"; > } > else > $menu .= $choices; > $menu .= "\n"; > $menu .= "\n"; > $menu .= "
    \n"; > $menu .= $innermenu; > $menu .= "

    \n"; > } > else $menu = ""; > > return $menu; > } > > //DEPRECATED > function tng_coreicons( ) { > return ""; > } > > function tng_smallIcon($options) { > global $sitever; > $target = ""; > > $url = isset($options['url']) ? $options['url'] : "#"; > $onclick = isset($options['onclick']) ? "onclick=\"{$options['onclick']}\"" : ""; > $targetloc = $target ? "target=\"$target\"" : ""; > $class = $sitever == "mobile" ? "mobileicon" : (isset($options['class']) ? $options['class'] : "tngsmallicon"); > $rel = isset($options['rel']) ? "rel=\"{$options['rel']}\"" : ""; > > if($sitever == "mobile") { > $begin = "
  • "; > $end = "
  • \n"; > } > else { > $begin = " "; > $end = "\n"; > } > > $link = "$begin{$options['label']}$end"; > > return $link; > } > > function tng_getLeftIcons() { > global $tngconfig, $text, $homepage, $currentuser, $allow_profile, $cms, $target, $sitever; > > if(!isset($tngconfig['menucount'])) > $tngconfig['menucount'] = 0; > > $left_icons = ""; > if( empty($tngconfig['showhome']) ) { > $left_icons .= tng_smallIcon(array('url'=>getURL( $homepage, 0, ""), 'label'=>$text['homepage'], 'id'=>"home")); > $tngconfig['menucount']++; > } > if( empty($tngconfig['showsearch']) ) { > $params = array('url'=>getURL( "searchform", 0 ), 'label'=>$text['search'], 'id'=>"search"); > if(empty($tngconfig['searchchoice']) && $sitever != "mobile") > $params['onclick'] = "return openSearch();"; > $left_icons .= tng_smallIcon($params); > $tngconfig['menucount']++; > } > > $profilelink = $userparen = ""; > if($currentuser) { > if($allow_profile && $sitever != "mobile") { > $editprofile_url = getURL( "ajx_editprofile", 1 ); > $profilelink = tng_smallIcon(array('label'=>($sitever == "mobile" ? $text['editprofile'] : "({$text['editprofile']}: $currentuser)"), > 'class'=>"tngsmallicon3", 'id'=>"profile", > 'onclick'=>"tnglitbox = new LITBox('{$editprofile_url}p=" . urlencode($cms['tngpath']) . "',{width:520,height:560}); return false")); > $tngconfig['menucount']++; > } > else > $userparen = " ($currentuser)"; > } > if( empty($tngconfig['showlogin']) ) { > if( $currentuser ) { > if( !$cms['cloaklogin'] || $cms['cloaklogin'] == "both" ) > $left_icons .= tng_smallIcon(array('url'=>getURL( "logout", 1 ) . "session=" . session_name(), 'label'=>$text['logout'] . $userparen, 'id'=>"log")); > } > else { > if( !$cms['cloaklogin'] || $cms['cloaklogin'] == "both" ) { > $login_url = getURL( "ajx_login", 1 ); > $left_icons .= tng_smallIcon(array('label'=>$text['login'], 'id'=>"log", 'onclick'=>"return openLogin('{$login_url}p=" . urlencode($cms['tngpath']) . "');")); > } > } > $tngconfig['menucount']++; > } > $left_icons .= $profilelink; > > return $left_icons; > } > > function tng_getRightIcons($showlangselect) { > global $text, $tngconfig, $cms, $gotlastpage, $sitever, $isConnected; > > $addbookmark_url = getURL( "ajx_addbookmark", 1 ); > > $right_icons = ""; > if( !empty($tngconfig['showshare']) && $isConnected && $sitever != "mobile") > $right_icons .= tng_smallIcon(array('label'=>$text['share'], 'id'=>"share", 'onclick'=>"jQuery('#shareicons').toggle(200); if(!share) { jQuery('#share-smicon').html('{$text['hide']}'); share=1;} else { jQuery('#share-smicon').html('{$text['share']}'); share=0; }; return false;")); > > if( empty($tngconfig['showprint']) && $sitever != "mobile") { > $print_url = getScriptName(); > if(preg_match("/\?/",$print_url)) > $print_url .= "&tngprint=1"; > else > $print_url .= "?tngprint=1"; > $right_icons .= tng_smallIcon(array('label'=>$text['tngprint'], 'id'=>"print", 'rel'=>"nofollow", 'onclick'=>"newwindow=window.open('$print_url','tngprint','width=850,height=600,status=no,resizable=yes,scrollbars=yes'); newwindow.focus(); return false;")); > } > > if( empty($tngconfig['showbmarks']) && $gotlastpage ) { > $right_icons .= tng_smallIcon(array('label'=>$text['bookmark'], 'id'=>"bmk", 'onclick'=>"tnglitbox = new LITBox('{$addbookmark_url}p=" . urlencode($cms['tngpath']) . "',{width:350,height:100}); return false;")); > $tngconfig['menucount']++; > } > > if($showlangselect) > $right_icons .= tng_getLanguageSelect(1); > > return $right_icons; > } > > function tng_getFindMenu() { > global $tngconfig, $time_offset; > > $menu = array(); > $menu[] = tngddrow(getURL( "surnames", 0 ), "surnames-icon", "", "surnames"); > $menu[] = tngddrow(getURL( "firstnames", 0 ), "firstnames-icon", "", "firstnames"); > $menu[] = tngddrow(getURL( "searchform", 0 ), "search-icon", "", "searchnames"); > $menu[] = tngddrow(getURL( "famsearchform", 0 ), "fsearch-icon", "", "searchfams"); > $menu[] = tngddrow(getURL( "searchsite", 0 ), "searchsite-icon", "", "searchsitemenu"); > $menu[] = tngddrow(getURL( "places", 0 ), "places-icon", "", "places"); > $menu[] = tngddrow(getURL( "anniversaries", 0 ), "dates-icon", "", "dates"); > $tngmonth = date("m", time() + ( 3600 * intval($time_offset) ) ); > $menu[] = tngddrow(getURL( "calendar", 1 ) . "m=$tngmonth", "calendar-icon", "", "calendar"); > $menu[] = tngddrow(getURL( "cemeteries", 0 ), "cemeteries-icon", "", "cemeteries"); > $menu[] = tngddrow(getURL( "bookmarks", 0 ), "bookmarks-icon", "", "bookmarks"); > > $tngconfig['menucount'] += 10; > > global $findmenulinks; > if( isset( $findmenulinks ) ) { > $menu = array_merge($menu,custom_links( $findmenulinks )); > } > > return $menu; > } > > function tng_getMediaMenu() { > global $mediatypes, $tngconfig; > > $menu = array(); > foreach( $mediatypes as $mediatype ) { > if(!$mediatype['disabled']) { > $menu[] = tngddrow(getURL( "browsemedia", 1 ) . "mediatypeID=" . $mediatype['ID'], $mediatype['ID'] . "-icon", $mediatype['icon'], $mediatype['display'], true); > $tngconfig['menucount']++; > } > } > if(!empty($_SESSION['albumcount'])) > $menu[] = tngddrow(getURL( "browsealbums", 0 ), "albums-icon", "", "albums"); > $menu[] = tngddrow(getURL( "browsemedia", 0 ), "media-icon", "", "allmedia"); > $tngconfig['menucount'] += 2; > > global $mediamenulinks; > if( isset( $mediamenulinks ) ) { > $menu = array_merge($menu,custom_links( $mediamenulinks )); > } > > return $menu; > } > > function tng_getInfoMenu($title) { > global $allow_admin, $cms, $tngconfig; > > $menu = array(); > $menu[] = tngddrow(getURL( "whatsnew", 0 ), "whatsnew-icon", "", "whatsnew"); > $menu[] = tngddrow(getURL( "mostwanted", 0 ), "mw-icon", "", "mostwanted"); > $menu[] = tngddrow(getURL( "reports", 0 ), "reports-icon", "", "reports"); > $menu[] = tngddrow(getURL( "statistics", 0 ), "stats-icon", "", "databasestatistics"); > $menu[] = tngddrow(getURL( "browsetrees", 0 ), "trees-icon", "", "trees"); > $menu[] = tngddrow(getURL( "browsebranches", 0 ), "branches-icon", "", "branches"); > $menu[] = tngddrow(getURL( "browsenotes", 0 ), "notes-icon", "", "notes"); > $menu[] = tngddrow(getURL( "browsesources", 0 ), "sources-icon", "", "sources"); > $menu[] = tngddrow(getURL( "browserepos", 0 ), "repos-icon", "", "repositories"); > if(empty($tngconfig['hidedna'])) { > $menu[] = tngddrow(getURL( "browse_dna_tests", 0 ), "dna-icon", "", "dna_tests"); > $tngconfig['menucount']++; > } > if( $allow_admin ) { > $menu[] = tngddrow((!empty($cms['adminurl']) ? $cms['adminurl'] : $cms['tngpath']."admin.php"), "admin-icon", "", "administration"); > $menu[] = tngddrow(getURL( "showlog", 0 ), "unlock-icon", "", "mnushowlog"); > $tngconfig['menucount'] += 2; > } > $menu[] = tngddrow(getURL( "suggest", 1 ) . "page=" . urlencode(str_replace("?", "", $title)), "contact-icon", "", "contactus"); > $tngconfig['menucount'] += 10; //everything except the 2 admin links > > global $infomenulinks; > if( isset( $infomenulinks ) ) { > $menu = array_merge($menu,custom_links( $infomenulinks )); > } > > return $menu; > } > > function tng_getLanguageSelect($instance) { > global $chooselang, $languages_table, $mylanguage, $languages_path; > > $menu = ""; > if( $chooselang ) { > $query = "SELECT languageID, display, folder FROM $languages_table ORDER BY display"; > $result = tng_query($query); > $numlangs = tng_num_rows( $result ); > > if( $numlangs > 1 ) { > $menu .= getFORM( "savelanguage2", "get", "tngmenu$instance", "" ); > $menu .= "\n"; > $menu .= "\n"; > } > > tng_free_result($result); > } > > return $menu; > } > > function tng_getLangMenu($title) { > global $chooselang, $languages_table, $mylanguage, $languages_path, $text, $tngconfig; > > $menuitems = array(); > $menustr = ""; > if( $chooselang ) { > $query = "SELECT languageID, display, folder FROM $languages_table ORDER BY display"; > $result = tng_query($query); > $numlangs = tng_num_rows( $result ); > > if( $numlangs > 1 ) { > while( $row = tng_fetch_assoc($result)) { > $prefix = $languages_path . $row['folder'] == $mylanguage ? "*" : ""; > $menuitems[] = tngddrow(getURL( "savelanguage2", 1 ) . "newlanguage=" . $row['languageID'], "", "", $prefix . $row['display'], true); > $tngconfig['menucount']++; > } > if(!empty($menuitems)) { > if(count($menuitems) % 2) > $menuitems[] = tngddrow("", "", "", "", true); > if(count($menuitems) > 10) { > $cols = " style=\"columns:2; -webkit-columns:2; -webkit-column-gap:0px;\""; > $multicolclass = " mmulticol"; > $left_bottom = count($menuitems)/2 - 1; > $menuitems[$left_bottom] = str_replace("mobileicon", "mobileicon mmulticollastleft", $menuitems[$left_bottom]); > } > else > $cols = $multicolclass = ""; > $menucontent = implode("",$menuitems); > $menustr = "
      \n" . $menucontent . "
    \n"; > } > } > > tng_free_result($result); > } > > return $menustr; > } > > function get_menustyle($key,$itemcount) { > $mmenustyle = ""; > if($itemcount) { > $moffset = 50 * $itemcount; > $mmenustyle .= "ul#m" . $key . "menu {-webkit-transform: translate3d(0,-" . $moffset . "px,0);}\n"; > $mmenustyle .= "ul#m" . $key . "menu {transform: translate3d(0,-" . $moffset . "px,0);}\n"; > } > return $mmenustyle; > } > > function tng_mobileicons($title) { > global $text, $tngconfig, $custommenu, $custmenu, $custommobilemenu, $custommenulinks; > > //container, full width, fixed at top > //get left & right icons, put in single list > //get menus, link to icons > //do something with languages > $menu = "
    \n"; > $menu .= "
    \n"; > $menu .= "
    \n"; > $menu .= "\n"; > > $tngconfig['mmenustyle'] = ""; > $tngconfig['menucount'] = 0; > $menu .= "
      \n"; > $menu .= tng_getLeftIcons(); > $menu .= tng_getRightIcons(false); > $menu .= "
    \n"; > $tngconfig['mmenustyle'] .= get_menustyle("core",$tngconfig['menucount']); > > $menuicons = "
    \n"; > $menuitems = ""; > > $tngconfig['menucount'] = 0; > $finditems = tng_getFindMenu(); > if($tngconfig['menucount']) { > $cols = $multicolclass = ""; > if(count($finditems) > 10) { > $cols = " style=\"columns:2; -webkit-columns:2; -webkit-column-gap:0px;\""; > $multicolclass = " mmulticol"; > if(count($finditems) % 2) > $finditems[] = tngddrow("", "", "", "", true); > $left_bottom = count($finditems)/2 - 1; > $finditems[$left_bottom] = str_replace("mobileicon", "mobileicon mmulticollastleft", $finditems[$left_bottom]); > } > $findcontent = implode("",$finditems); > $menuitems .= "
      \n" . $findcontent . "
    \n"; > $menuicons .= "\n"; > $tngconfig['mmenustyle'] .= get_menustyle("find",$tngconfig['menucount']); > } > > $tngconfig['menucount'] = 0; > $mediaitems = tng_getMediaMenu(); > if($tngconfig['menucount']) { > $cols = $multicolclass = ""; > if(count($mediaitems) > 10) { > $cols = " style=\"columns:2; -webkit-columns:2; -webkit-column-gap:0px;\""; > $multicolclass = " mmulticol"; > if(count($mediaitems) % 2) > $mediaitems[] = tngddrow("", "", "", "", true); > $left_bottom = count($mediaitems)/2 - 1; > $mediaitems[$left_bottom] = str_replace("mobileicon", "mobileicon mmulticollastleft", $mediaitems[$left_bottom]); > } > $mediacontent = implode("",$mediaitems); > $menuitems .= "
      \n" . $mediacontent . "
    \n"; > $menuicons .= "\n"; > $tngconfig['mmenustyle'] .= get_menustyle("media",$tngconfig['menucount']); > } > > $tngconfig['menucount'] = 0; > $infoitems = tng_getInfoMenu($title); > if($tngconfig['menucount']) { > $cols = $multicolclass = ""; > if(count($infoitems) > 10) { > $cols = " style=\"columns:2; -webkit-columns:2; -webkit-column-gap:0px;\""; > $multicolclass = " mmulticol"; > if(count($infoitems) % 2) > $infoitems[] = tngddrow("", "", "", "", true); > $left_bottom = count($infoitems)/2 - 1; > $infoitems[$left_bottom] = str_replace("mobileicon", "mobileicon mmulticollastleft", $infoitems[$left_bottom]); > } > $infocontent = implode("",$infoitems); > $menuitems .= "
      \n" . $infocontent . "
    \n"; > $menuicons .= "\n"; > $tngconfig['mmenustyle'] .= get_menustyle("info",$tngconfig['menucount']); > } > > //hook for custom dropdown options > $tngconfig['menucount'] = 0; > if(isset($custmenu['title_text'])) > $mtext = $custmenu['title_text']; > elseif(isset($custmenu['title_index'])) > $mtext = $text[$custmenu['title_index']]; > else > $mtext = ""; > > if(isset($custommobilemenu)) > eval($custommobilemenu); > //Rick Bisbee's mod > elseif(isset($custmenu)) { > $items = implode("",custom_links( $custommenulinks )); > $menuitems .= custom_menu( $custmenu, $items, true ); > $cust_title = isset($custmenu['title_text']) ? $custmenu['title_text'] : ""; > $menuicons .= "\n"; > $tngconfig['mmenustyle'] .= get_menustyle("cust",$tngconfig['menucount']); > } > > $tngconfig['menucount'] = 0; > $menuitems .= tng_getLangMenu($title); > if($tngconfig['menucount']) { > $menuicons .= "\n"; > $tngconfig['mmenustyle'] .= get_menustyle("lang",$tngconfig['menucount']); > } > > $menuicons .= "
    \n"; > $menu .= $menuicons . $menuitems . "
    \n
    \n
    \n"; > > //return both menu and transform style > return $menu; > } > > function tng_icons( $title = "" ) { > global $text, $tngconfig, $customshare, $cms, $tngprint, $custommenu, $custmenu, $custommenulinks, $sitever, $chooselang; > > $fullmenu = ""; > if( $tngprint ) { > $fullmenu .= "\n"; > } > else { > > if( $tngconfig['menu'] == 1 ) { > $iconalign = "float-left"; > //$innerborder = ""; > } > else { > $iconalign = " float-right"; > //$innerborder = " style=\"border-right:1px solid #aaaaaa\""; > } > > $left_icons = tng_getLeftIcons(); > if($left_icons) { > $iconmargin = $tngconfig['menu'] == 2 && $chooselang ? " style=\"margin-top:2px\"" : ""; > $left_icons = "
    \n{$left_icons} \n
    \n"; > } > > $right_icons = tng_getRightIcons(true); > > $menu = ""; > if($tngconfig['menu'] < 2) { > $menu .= "
  • {$text['find_menu']}\n"; > $menu .= "
      \n"; > $menu .= implode("",tng_getFindMenu()); > $menu .= "
    \n"; > $menu .= "
  • \n"; > > $menu .= "
  • {$text['media']}\n"; > $menu .= "
      \n"; > $menu .= implode("",tng_getMediaMenu()); > $menu .= "
    \n"; > $menu .= "
  • \n"; > > $menu .= "
  • {$text['info']}\n"; > $last = !isset($custommenu) ? " class=\"last\"" : ""; > $menu .= "\n"; > $menu .= implode("",tng_getInfoMenu($title)); > $menu .= "\n"; > $menu .= "
  • \n"; > > //hook for custom dropdown options > if(isset($custommenu)) > eval($custommenu); > //Rick Bisbee's mod > elseif(isset($custmenu)) { > $items = implode("",custom_links( $custommenulinks )); > $menu .= custom_menu( $custmenu, $items ); > } > $innerstyle = ""; > } > else > $innerstyle = " style=\"height:25px\""; > > $outermenu = $rightmenu = ""; > > if($menu) { > $outermenu .= "
      \n"; > > if($tngconfig['menu'] != 1) > $outermenu .= "

    • \n"; > > $outermenu .= $menu; > > if($tngconfig['menu'] == 1) > $outermenu .= "

    • \n"; > > $outermenu .= "
    \n"; > } > if($tngconfig['menu'] != 1) > $outermenu .= $left_icons; > > if($tngconfig['menu'] == 2 && empty($langmenu)) { > $outermenu .= "
    \n$right_icons\n
    \n"; > $shift_str = " shift100left"; > } > else > $shift_str = ""; > > if($outermenu) { > $fullmenu .= "
    \n"; > $fullmenu .= "
    \n"; > > $fullmenu .= $outermenu; > > $fullmenu .= "
    \n"; > $fullmenu .= "
    \n"; > > if(empty($tngconfig['searchchoice']) && empty($tngconfig['showsearch'])) { > $searchform_url = getURL( "searchform", 0 ); > $famsearch_url = getURL( "famsearchform", 0 ); > $searchsite_url = getURL( "searchsite", 0 ); > > $fullmenu .= '"; > } > } > > if($tngconfig['menu'] == 1) > $fullmenu .= $left_icons; > > $sharemenu = ""; > if( !empty($tngconfig['showshare']) && $sitever != "mobile" ) { > $sharemenu .= "
    \n"; > $sharemenu .= "\n"; > $sharemenu .= "\n"; > $sharemenu .= "\n"; > if(isset($customshare)) > eval($customshare); > $sharemenu .= "
    \n"; > } > > if($sharemenu || $right_icons || $tngconfig['menu'] < 2 || !empty($numlangs)) { > $fullmenu .= "
    "; > $fullmenu .= $sharemenu; > > if($tngconfig['menu'] < 2 || !empty($numlangs)) > $fullmenu .= $right_icons; > > $fullmenu .= "
    \n"; > > if($tngconfig['menu'] == 1) > $fullmenu .= "

    \n"; > } > > if($menu) { > $fullmenu .= '\n"; > } > > } > > return $fullmenu; > } > > function tngddrow($link, $id, $thumb, $label, $labelliteral = false) { > global $cms, $text, $sitever; > static $id_counter = 1; > > $uselabel = $labelliteral ? $label : $text[$label]; > if($id == "") > $id = "tng_menu_row_" . $id_counter++; > if($sitever == "mobile") { > $ddrow = "
  • $uselabel
  • \n"; > } > else { > $ddrow = "
  • "; > if($thumb) > $ddrow .= "\"\""; > else > $ddrow .= ""; > $ddrow .= " $uselabel
  • \n"; > } > > return $ddrow; > } > > function treeDropdown($forminfo) { > global $text, $requirelogin, $assignedtree, $trees_table, $time_offset, $treerestrict, $cms, $tree, $numtrees, $tngconfig; > > $ret = ""; > if(!$requirelogin || !$treerestrict || !$assignedtree) { > $query = "SELECT gedcom, treename, lastimportdate FROM $trees_table ORDER BY treename"; > $treeresult = tng_query($query); > $numtrees = tng_num_rows($treeresult); > $foundtree = false; > > if( $numtrees > 1 ) { > if($forminfo['startform']) > $ret .= getFORM( $forminfo['action'], $forminfo['method'], $forminfo['name'], $forminfo['id'] ); > $ret .= "{$text['tree']}: "; > $ret .= treeSelect($treeresult, $forminfo['name']); > $ret .= "  \"\"\n"; > if(isset($forminfo['hidden']) && is_array($forminfo['hidden'])) { > foreach($forminfo['hidden'] as $hidden) > $ret .= "\n"; > } > //$ret .= "\n"; > if($forminfo['endform']) > $ret .= "
    \n"; > else > $ret .= "

    \n"; > $treeresult = tng_query($query); > if($tree) { > $foundtree = true; > while( $row = tng_fetch_assoc($treeresult) ) { > if($row['gedcom'] == $tree) break; > } > } > } > else { > $foundtree = true; > $row = tng_fetch_assoc( $treeresult ); > } > if( !empty($tngconfig['lastimport']) && $foundtree && !empty($forminfo['lastimport'])) { > $lastimport = $row['lastimportdate']; > > if( $lastimport ) { > $importtime = strtotime($lastimport); > if(substr($lastimport,11,8) != "00:00:00") > $importtime += ($time_offset * 3600); > $importdate = strlen(date("j", $importtime)) == 1 ? date(" j M Y H:i:s", $importtime) : date("j M Y H:i:s", $importtime); > echo "

    {$text['lastimportdate']}: " . displayDate($importdate) . "

    "; > } > } > tng_free_result($treeresult); > } > return $ret; > } > > function treeSelect($treeresult, $formname = null, $onchange = null) { > global $text, $tree; > > $ret = "\n"; > return $ret; > } > > function getMediaHREF($row,$mlflag) { > global $mediatypes_assoc, $mediapath, $htmldocs, $imagetypes, $videotypes, $recordingtypes, $notrunc, $cms; > > $histories_url = getURL( "histories", 1 ); > $showmedia_url = getURL( "showmedia", 1 ); > > $uselink = ""; > > if( $row['form'] ) > $form = strtoupper($row['form']); > else { > preg_match( "/\.(.+)$/", $row['path'], $matches ); > $form = isset($matches[1]) ? strtoupper($matches[1]) : ''; > } > $thismediatype = $row['mediatypeID']; > $usefolder = $row['usecollfolder'] ? $mediatypes_assoc[$thismediatype] : $mediapath; > > > //if($mlflag != 1) > // $notrunc = 1; //ok, I'm not sure if this is really needed, so I'm commenting it out > $other_acceptable_form_types = ["PDF","TXT","DOC","DOCX"]; > if( !$row['abspath'] && (in_array($form,$imagetypes) || in_array($form,$videotypes) || in_array($form,$recordingtypes) || in_array($form,$other_acceptable_form_types) || !$form) ) { > $uselink = $showmedia_url . "mediaID=" . $row['mediaID']; > if( $mlflag == 1 && !empty($row['medialinkID'])) > $uselink .= "&medialinkID=" . $row['medialinkID']; > elseif( $mlflag == 2 && !empty($row['albumlinkID'])) > $uselink .= "&albumlinkID=" . $row['albumlinkID']; > elseif( $mlflag == 3 && !empty($row['cemeteryID'])) > $uselink .= "&cemeteryID=" . $row['cemeteryID']; > //$uselink .= $row['all'] ? "&all=1" : ""; > } > else { > if($row['abspath'] || substr($row['path'],0,4) == "http" || substr($row['path'],0,1) == "/") > $uselink = $row['path']; > elseif( in_array( $form, $htmldocs ) && $cms['support'] ) > $uselink = $histories_url . "inc=" . $row['path']; > else { > $url = rawurlencode( $row['path'] ); > $url = str_replace("%2F","/",$url); > $url = str_replace("%3F","?",$url); > $url = str_replace("%23","#",$url); > $url = str_replace("%26","&",$url); > $url = str_replace("%3D","=",$url); > $uselink = "$usefolder/$url"; > } > } > if(!empty($row['newwindow'])) > $uselink .= "\" target=\"_blank"; > > return $uselink; > } > > function insertLinks($notes) { > if($notes) { > $pos = 0; > $notepos = array(); > while (($pos = strpos($notes, "http", $pos)) !== FALSE) { > if( $pos ) $prevchar = substr( $notes, $pos - 1, 1 ); > if( $pos == 0 || ($prevchar != "\"" && $prevchar != "=") ) > $notepos[] = $pos++; > else > $pos++; > } > $posidx = count($notepos); > while( $posidx > 0 ) { > $actual = $posidx - 1; > $pos = $notepos[$actual]; > $firstpart = substr($notes,0,$pos); > $rest = substr($notes,$pos); > $linkstr = strtok($rest," <\n\r"); > if( substr( $linkstr, -1 ) == "." ) $linkstr = substr( $linkstr, 0, -1 ); > $lastpart = substr($notes,$pos + strlen($linkstr)); > $notes = $firstpart . "$linkstr" . $lastpart; > $posidx--; > } > } > > return $notes; > } > > function getTemplateMessage($key) { > global $tmp, $session_language; > > $langkey = $key . "_" . $session_language; > > return isset($tmp[$langkey]) ? $tmp[$langkey] : $tmp[$key]; > } > > function showLinks($linkList, $newtab = false, $class = null, $inner_html = null) { > $links = explode("\r",$linkList); > $finishedList = ""; > if(count($links) == 1) > $links = explode("\n",$linkList); > $orgtab = $newtab; > foreach($links as $link) { > $newtab = $orgtab; > $parts = explode(",", $link); > $len = count($parts); > if($len == 1) { > $title = $href = $parts[0]; > } > elseif($len == 2) { > $title = trim($parts[0]); > $href = trim($parts[1]); > } > elseif($len == 3) { > $title = trim($parts[0]); > $href = trim($parts[1]); > $newtab = true; > } > else { > $href = trim(array_pop($parts)); > $title = implode("", $parts); > } > $target = $newtab ? " target=\"_blank\"" : ""; > $finishedList .= " if($class) $finishedList .= " class=\"$class\""; > if($inner_html) > $html = preg_replace( "/xxx/", $title, $inner_html ); > else > $html = $title; > $finishedList .= ">$html\n"; > } > return $finishedList; > } > > function showMediaLinks($linkList) { > global $media_table, $rootpath, $photopath, $documentpath, $headstonepath, $historypath, $mediapath, $mediatypes_assoc, $thumbmaxw, $thumbmaxh, $cms, $mediatypes_thumbs, $sitever; > $links = explode(",",$linkList); > $finishedmedList = ""; > > foreach($links as $link) { > $thumbquery = "SELECT * FROM $media_table WHERE mediaID = \"$link\""; > $thumbresult = tng_query($thumbquery); > $thumbrow = tng_fetch_assoc( $thumbresult ); > tng_free_result( $thumbresult ); > if( !empty($thumbrow) ) { > $mediatypeID = $thumbrow['mediatypeID']; > $usefolder = $thumbrow['usecollfolder'] ? $mediatypes_assoc[$mediatypeID] : $mediapath; > $thumb = $cms['tngpath'] . "$usefolder/" . str_replace("%2F","/",rawurlencode( $thumbrow['thumbpath'] )); > $title = !empty($thumbrow['altdescription']) ? $thumbrow['altdescription'] : $thumbrow['description']; > $imgsrc = "\"$title\""; > $href = getMediaHREF($thumbrow,0); > $finishedmedList .= "
    " . $imgsrc . " $title
    "; > } > } > return $finishedmedList; > } > > function custom_menu( $custmenu, $items, $mobile = false ) { > global $text; > > if( isset($custmenu['title_text'])) { > $mtext = $custmenu['title_text']; > } > elseif( isset($custmenu['title_index']) ) { > $mtext = $text[$custmenu['title_index']]; > } > // Check for deprecated options > elseif(isset($custmenu['text'])) { > if( $custmenu['literal'] == true ) { > $mtext = $custmenu['text']; > } > else { > $mtext = $text[$custmenu['text']]; > } > } > else > $mtext = "Other"; > > if($mobile) { > $menu = "
      \n" . $items . "
    \n"; > } > else { > $menu = "
  • $mtext\n"; > $menu .= "
      \n" . $items . "\n
    \n"; > $menu .= "
  • \n"; > } > > return $menu; > } > > function custom_links( $linkdefs ) { > global $cms, $text, $allow_admin, $currentuser, $users_table, $tngconfig; > > $menu = array(); > for( $i=0; isset($linkdefs[$i]); $i++ ) { > if( isset($linkdefs[$i]['admin']) && $linkdefs[$i]['admin']) { > if( !$allow_admin ) continue; > $query = "SELECT role FROM $users_table WHERE username='$currentuser'"; > $result = tng_query( $query ) or die( "cannot execute query: $query" ); > $row = tng_fetch_assoc( $result ); > if( $row['role'] != 'admin' ) continue; > } > > if( isset( $linkdefs[$i]['user'] ) && $linkdefs[$i]['user'] === true && !$currentuser ) continue; > if( !isset( $linkdefs[$i]['target'] ) ) continue; > //echo "doingx $i
    "; > $target = $linkdefs[$i]['target']; > $linkpath = !empty( $linkdefs[$i]['external'] ) ? '' : $cms['tngpath']; > > // add options to target section > if( !empty( $linkdefs[$i]['tip_text'] ) ){ > $target .= "\" title=\"{$linkdefs[$i]['tip_text']}"; > } > elseif( isset( $linkdefs[$i]['tip_index'] ) ) { > $target .= "\" title=\"{$text[$linkdefs[$i]['tip_index']]}"; > } > if( isset( $linkdefs[$i]['newwin'] ) ) { > $target .= "\" target=\"_blank"; > } > // set label for the link > if( isset( $linkdefs[$i]['label_text'] ) ) { > $label = $linkdefs[$i]['label_text']; > $literal = true; > } > elseif( isset( $linkdefs[$i]['label_index'] ) ) { > $label = $linkdefs[$i]['label_index']; > $literal = false; > } > // handle deprecated defs > elseif( isset( $linkdefs[$i]['text'] ) ) { > if( $linkdefs[$i]['literal'] ) { > $literal = true; > $label = $linkdefs[$i]['text']; > } > else { > $label = $text[$linkdefs[$i]['text']]; > $literal = false; > } > } > if( empty( $linkdefs[$i]['sprite'] ) ) > $linkdefs[$i]['sprite'] = ''; > if( empty( $linkdefs[$i]['icon'] ) ) > $linkdefs[$i]['icon'] = ''; > //echo $linkpath.$target . " " . $linkdefs[$i]['sprite'] . " " . $linkdefs[$i]['icon'] . " " . $label . " " . $literal . "
    "; > $menu[] = tngddrow( > $linkpath.$target, > $linkdefs[$i]['sprite'], > $linkdefs[$i]['icon'], > $label, > $literal > ); > $tngconfig['menucount']++; > } > > //debugPrint($linkdefs); > return $menu; > } > > function findlangfolder( $file ) { > global $mylanguage, $language; > > if( file_exists("$mylanguage/$file") ) > $foundlang = "$mylanguage"; > elseif( file_exists("languages/$language/$file") ) > $foundlang = "languages/$language"; > else > $foundlang = "languages/English"; > > return $foundlang; > } diff -r TNG/geocodelib.php TNG1403/geocodelib.php 4c4 < $base_url = "{$http}://maps.googleapis.com/maps/api/geocode/xml?"; --- > $base_url = "https://maps.googleapis.com/maps/api/geocode/xml?key=" . $map['key']; 15c15 < $request_url = $base_url . "address=" . urlencode($address); --- > $request_url = $base_url . "&address=" . urlencode($address); 49c49 < $message = "$lat, $lng — {$admtext['edit']}"; --- > $message = "$lat, $lng — {$admtext['edit']}"; 55c55 < $message = "{$admtext['toomany']}{$admtext['edit']}"; --- > $message = "{$admtext['toomany']}{$admtext['edit']}"; 57c57 < if($delay) --- > if( !empty($delay) ) 70c70 < $message = "{$admtext['nogeocode']} ($status){$admtext['edit']}"; --- > $message = "{$admtext['nogeocode']} ($status){$admtext['edit']}"; 72c72 < if($delay) { --- > if( !empty($delay) ) { diff -r TNG/getlang.php TNG1403/getlang.php 13c13 < if( $_COOKIE[$langcookiename] ) { --- > if( !empty($_COOKIE[$langcookiename]) ) { 16,17c16,23 < $session_charset = $_SESSION['session_charset'] = $_COOKIE[$charcookiename]; < $session_norels = $_SESSION['session_norels'] = $_COOKIE[$norelscookiename]; --- > if(isset($_COOKIE[$charcookiename])) > $session_charset = $_SESSION['session_charset'] = $_COOKIE[$charcookiename]; > else > $session_charset = $_SESSION['session_charset'] = ""; > if(isset($_COOKIE[$norelscookiename])) > $session_norels = $_SESSION['session_norels'] = $_COOKIE[$norelscookiename]; > else > $session_norels = $_SESSION['session_norels'] = ""; 19c25 < elseif($lang) { --- > elseif(!empty($lang)) { 28,29c34,37 < else < $file_exists = file_exists($rootpath . $endrootpath . "$mylanguage/text.php"); --- > else { > if(!isset($endrootpath)) $endrootpath = ''; > $file_exists = file_exists($rootpath . $endrootpath . "$mylanguage/text.php"); > } diff -r TNG/getperson.php TNG1403/getperson.php 6,7c6,7 < if(!$personID) {header( "Location: thispagedoesnotexist.html" ); exit;} < if($tngprint) { --- > if(empty($personID)) pageNotFound(); > if(!empty($tngprint)) { 36d35 < $indnotes = getNotes( $personID, "I" ); 38a38,47 > $indexlist = array( 'BIRT','CHR','BAPL','CONL','INIT','ENDL','DEAT','BURI' ); > if(!empty($tngconfig['altbirth'])) > $indexlist = array_unique(array_merge($indexlist, explode(",",$tngconfig['altbirth']))); > > foreach( $indexlist as $myindex ) > if( !isset( $stdex[$myindex] ) ) $stdex[$myindex] = ''; > > if(!isset($tngconfig['scrollnotes'])) $tngconfig['scrollnotes'] = 1; > $notearea = $tngconfig['scrollnotes'] ? " class=\"notearea\"" : ""; > 42,43c51 < header( "Location: thispagedoesnotexist.html" ); < exit; --- > pageNotFound(); 60a69,70 > $indnotes = getNotes( $personID, "I" ); > 67c77,88 < $logname = $tngconfig['nnpriv'] && $row['private'] ? $admtext['text_private'] : ($nonames && $row['living'] ? $text['living'] : $namestr); --- > $ldjson = array(); > $ldjsonparents = array(); > $ldjson += ['@type' => "Person"]; > $ldjson += ['@id' => $getperson_url . "personID=$personID&tree=$tree"]; > $ldjson += ['name' => getFirstNameOnly($row)]; > $ldjson += ['familyName' => getSurnameOnly($row)]; > $ldjson += ['birthPlace' => $row['birthplace']]; > $ldjson += ['birthDate' => $row['birthdatetr']]; > $ldjson += ['deathPlace' => $row['deathplace']]; > $ldjson += ['deathDate' => $row['deathdatetr']]; > > $logname = !empty($tngconfig['nnpriv']) && $row['private'] ? $admtext['text_private'] : ($nonames && $row['living'] ? $text['living'] : $namestr); 78c99 < $branchstr .= $brrow['description'] ? $brrow['description'] : $branch; --- > $branchstr .= !empty($brrow['description']) ? $brrow['description'] : $branch; 91d111 < $flags['tabs'] = $tngconfig['tabs']; 93c113,114 < if(!$tngconfig['hidedna']) { --- > $flags['scripting'] .= "\n"; > if(empty($tngconfig['hidedna'])) { 95c116 < \n"; diff -r TNG/globallib.php TNG1403/globallib.php 1,1207c1,1455 < \n"; < print_r($obj); < echo "\n"; < } < < function constructName($firstnames, $lastnames, $title, $suffix, $order) { < if($title) $title .= " "; < if($firstnames) $firstnames .= " "; < < switch($order) { < case "3": < if($lastnames && $firstnames) $lastnames .= ","; < if($lastnames) $lastnames .= " "; < $namestr = trim("$lastnames $title$firstnames$suffix"); < break; < case "2": < if($lastnames) $lastnames .= " "; < $namestr = trim("$title$lastnames$firstnames"); < if($suffix) $namestr .= ", $suffix"; < break; < default: < $namestr = trim("$title$firstnames$lastnames"); < if($suffix) $namestr .= ", $suffix"; < break; < } < < return preg_replace('/\s\s+/'," ",$namestr); < } < < function getName( $row, $hcard = null ) { < global $nameorder; < < $locnameorder = $row['nameorder'] ? $row['nameorder'] : ($nameorder ? $nameorder : 1); < $namestr = getNameUniversal($row, $locnameorder, $hcard); < < return $namestr; < } < < function getNameRev( $row, $hcard = null ) { < global $nameorder; < < $locnameorder = $row['nameorder'] ? $row['nameorder'] : ($nameorder ? $nameorder : 1); < if($locnameorder != 2) $locnameorder = 3; < $namestr = getNameUniversal($row, $locnameorder, $hcard); < < return $namestr; < } < < function getNameUniversal($row, $order, $hcard=null) { < global $text, $admtext, $tngconfig, $nonames; < < //$nonames = showNames($row); < $lastname = trim( $row['lnprefix']." ".$row['lastname'] ); < if($tngconfig['ucsurnames']) $lastname = tng_strtoupper($lastname); < if($hcard) { < $lastname = "" . $lastname . ""; < $title = $suffix = ""; < } < else { < $title = $row['title'] && ($row['title'] == $row['prefix']) ? $row['title'] : trim($row['title'] . " " . $row['prefix']); < $suffix = $row['suffix']; < } < if( ($row['allow_living'] || !$nonames) && ($row['allow_private'] || !$tngconfig['nnpriv']) ) { < $firstname = $hcard ? "" . $row['firstname'] . "" : $row['firstname']; < $namestr = constructName($firstname, $lastname, $title, $suffix, $order); < } < elseif( $row['living'] && !$row['allow_living'] && $nonames == 1 ) < $namestr = $text['living']; < elseif( $row['private'] && !$row['allow_private'] && $tngconfig['nnpriv'] == 1 ) < $namestr = $admtext['text_private']; < else { //initials < $firstname = $hcard ? "" . initials( $row['firstname']) . "" : initials( $row['firstname']); < $namestr = constructName($firstname, $lastname, $title, $suffix, $order); < } < < if($hcard) $namestr = "$namestr"; < return $namestr; < } < < function getFamilyName( $row ) { < global $text, $people_table; < < $righttree = checktree($row['gedcom']); < < $hquery = "SELECT firstname, lnprefix, lastname, title, prefix, suffix, living, private, branch, nameorder, gedcom FROM $people_table WHERE personID = \"{$row['husband']}\" AND gedcom = \"{$row['gedcom']}\""; < $hresult = tng_query($hquery) or die ($text['cannotexecutequery'] . ": $hquery"); < $hrow = tng_fetch_assoc( $hresult ); < < $hrights = determineLivingPrivateRights($hrow, $righttree); < $hrow['allow_living'] = $hrights['living']; < $hrow['allow_private'] = $hrights['private']; < < $husbname = getName( $hrow ); < tng_free_result( $hresult ); < < $wquery = "SELECT firstname, lnprefix, lastname, title, prefix, suffix, living, private, branch, nameorder, gedcom FROM $people_table WHERE personID = \"{$row['wife']}\" AND gedcom = \"{$row['gedcom']}\""; < $wresult = tng_query($wquery) or die ($text['cannotexecutequery'] . ": $wquery"); < $wrow = tng_fetch_assoc( $wresult ); < < $wrights = determineLivingPrivateRights($wrow, $righttree); < $wrow['allow_living'] = $wrights['living']; < $wrow['allow_private'] = $wrights['private']; < < $wifename = getName( $wrow ); < tng_free_result( $wresult ); < < return "$husbname / $wifename"; < } < < function initials( $name ) { < global $session_charset; < < $newname = ""; < if($session_charset == "UTF-8") $name = utf8_decode($name); < < $token = strtok( $name, " " ); < do{ < if( substr( $token, 0, 1 ) != "(" ) { //In case there is a name in brackets, in which case ignore < if($session_charset == "UTF-8") < $newname .= utf8_encode(substr( $token, 0, 1 )) . "."; < else < $newname .= substr( $token, 0, 1 ) . "."; < } < $token = strtok(" "); < } < while( $token != "" ); < < return $newname; < } < < function showNames($row) { < global $nonames, $tngconfig; < < return $row['private'] ? $tngconfig['nnpriv'] : $nonames; < } < < function getGenderIcon($gender, $valign) { < global $text, $cms; < < $icon = ""; < if($gender) { < if($gender == "M") $genderstr = "male"; < elseif($gender == "F") $genderstr = "female"; < if($genderstr) < $icon = "\"""; < } < return $icon; < } < < function getURL( $destination, $args, $ext=".php") { < global $cms; < < if( $cms['support'] ) { < if (class_exists('TNGcms')) { < $url=TNGcms::getURL($destination, $args, $ext=".php", $cms); < } < else < $url = $args ? $cms['url'] . "=$destination&" : $cms['url'] . "=$destination"; < } < else < $url = $args ? $cms['tngpath'] . $destination . $ext . "?" : $cms['tngpath'] . $destination . $ext; < < return $url; < } < < function getFORM( $action, $method, $name, $id, $onsubmit=null ) { < global $cms; < < if( !$cms['support'] ) < $url = $action ? $cms['tngpath'] . $action . ".php" : ""; < elseif(class_exists('TNGcms')) < return TNGcms::getFORM($action, $method, $name, $id, $cms); < elseif($cms['support']=="joomla") // backwards compatibility < $url = "index.php"; < elseif($cms['support']=="zikula") // backwards compatibility < $url = "index.php"; < else < $url = "modules.php"; // backwards compatibility < < $formstr = "
    \n"; < $formstr .=" \n"; < $formstr .=" \n"; < } < elseif($cms['support']=="zikula") { < $formstr .= "\n"; < $formstr .= "\n"; < } < else { < $formstr .= "\n"; < $formstr .= "\n"; < $formstr .= "\n"; < } < } < < return $formstr; < } < < function isPhoto($row) { < global $imagetypes; < < if( $row['form'] ) < $form = strtoupper($row['form']); < else { < preg_match( "/\.(.+)$/", $row['path'], $matches ); < $form = strtoupper($matches[1]); < } < < if($row['path'] && !$row['abspath'] && in_array($form,$imagetypes)) < return true; < else < return false; < } < < function getEventDisplay( $displaystr ) { < global $mylanguage, $languages_path; < < $dispvalues = explode( "|", $displaystr ); < $numvalues = count( $dispvalues ); < if( $numvalues > 1 ) { < $displayval = ""; < for( $i = 0; $i < $numvalues; $i += 2 ) { < $lang = $dispvalues[$i]; < if( $mylanguage == $languages_path . $lang ) { < $displayval = $dispvalues[$i+1]; < break; < } < } < } < else < $displayval = $displaystr; < < return $displayval; < } < < function checkbranch( $branch ) { < global $assignedbranch; < < return ( !$assignedbranch || ( FALSE !== ( $pos = strpos( $branch, $assignedbranch, 0 ) ) ) ) ? 1 : 0; < } < < function checktree( $tree ) { < global $assignedtree; < < return ( !$assignedtree || $tree == $assignedtree ); < } < < //The following function is now obsolete < function determineLivingRights($row, $usedb = 0, $allow_living_db = 0, $allow_private_db = 0) { < global $livedefault, $allow_living, $allow_private, $rightbranch, $tree; < < $allow_living_loc = $usedb ? $allow_living_db : $allow_living; < $allow_private_loc = $usedb ? $allow_private_db : $allow_private; < < $rightbranch = checkbranch($row['branch']) ? 1 : 0; < //echo "myg=" . $_SESSION['mygedcom'] . ", myp=" . $_SESSION['mypersonID'] . "rp=" . $row['personID'] . "
    "; < //change $tree back to $row[gedcom] after all calling pages can be updated < $living = $row['living']; < $private = $row['private']; < < if(!$private && !$living) { < $livingrights = 1; < } < else { < $yes_living = $yes_private = true; < $user_person = $_SESSION['mypersonID'] && $_SESSION['mygedcom'] == $tree && $_SESSION['mypersonID'] == $row['personID']; < if($living) { < if($livedefault != 2) { //everyone has living rights < if((!$allow_living_loc || !$rightbranch) && !$user_person) { < $yes_living = false; < //echo "fn={$row['firstname']}, al=$allow_living, br={$row['branch']}, rb=$rightbranch, up=$user_person
    "; < } < } < } < if($private) { < if((!$allow_private_loc || !$rightbranch) && !$user_person) < $yes_private = false; < } < $livingrights = $yes_living && $yes_private ? 1 : 0; < } < //$livingrights = ((!$row['private'] || $allow_private) && (!$row['living'] || $livedefault == 2)) || ($allow_living && $rightbranch) || ($_SESSION['mypersonID'] && $_SESSION['mygedcom'] == $tree && $_SESSION['mypersonID'] == $row['personID']) ? 1 : 0; < < return $livingrights; < } < //end obsolete function < < function determineLivingPrivateRights($row, $pagerighttree = -1, $pagerightbranch = -1) { < global $livedefault, $ldsdefault, $allow_living, $allow_private, $allow_lds, $tree; < < $rights = array('private' => true, 'living' => true, 'lds' => (!$ldsdefault ? true : false)); < < $living = $livedefault == 2 ? false : $row['living']; < $private = $row['private']; < < if($private || $living || $ldsdefault == 2) { < //check tree < $righttree = $pagerighttree >= 0 ? $pagerighttree : checktree($row['gedcom']); < $righttreebranch = $pagerightbranch >= 0 ? $pagerightbranch : ($righttree ? checkbranch($row['branch']) : false); < $user_person = $_SESSION['mypersonID'] && $_SESSION['mygedcom'] == $tree && $_SESSION['mypersonID'] == $row['personID']; < < if($living && (!$allow_living || !$righttreebranch) && !$user_person) < $rights['living'] = false; < < if($private && (!$allow_private || !$righttreebranch) && !$user_person) < $rights['private'] = false; < < if($ldsdefault == 2 && (($allow_lds && $righttreebranch) || $user_person)) < $rights['lds'] = true; < //echo $righttree . " " . $righttreebranch . " " . $row['branch'] . " | "; < } < $rights['both'] = $rights['private'] && $rights['living']; < < return $rights; < } < < function determineLDSRights($notree = false) { < global $ldsdefault, $allow_lds, $tree, $assignedtree; < < $treeOK = !$tree || $notree || !$assignedtree || $tree == $assignedtree; < $ldsOK = !$ldsdefault || ($ldsdefault == 2 && $allow_lds && $treeOK) ? true : false; < < return $ldsOK; < } < < function getLivingPrivateRestrictions($table, $firstname, $allOtherInput) { < global $livedefault, $nonames, $tngconfig, $allow_living, $allow_private, $assignedtree, $assignedbranch, $people_table; < < $query = ""; < if($table) $table .= "."; < $limitedLivingRights = $allow_living && !$livedefault; < $limitedPrivateRights = $allow_private; < $allLivingRights = $livedefault == 2 || ($allow_living && !$assignedtree); < $allPrivateRights = $allow_private && !$assignedtree; < $livingNameRestrictions = $livedefault == 1 || (!$livedefault && ($nonames == 1 || ($nonames == 2 && $firstname)) && !$allLivingRights); < $privateNameRestrictions = ($tngconfig['nnpriv'] == 1 || ($tngconfig['nnpriv'] == 2 && $firstname)) && !$allPrivateRights; < < if($livingNameRestrictions || $privateNameRestrictions || $allOtherInput) { < $atreestr = $matchperson = ""; < if($_SESSION['mypersonID'] && $table == $people_table) { < //this is me (current user) < $matchperson = " OR ({$table}gedcom = \"{$_SESSION['mygedcom']}\" AND {$table}personID = \"{$_SESSION['mypersonID']}\")"; < } < if($assignedtree) { < //rights are limited to a tree or tree+branch < $atreestr = $assignedbranch ? " OR ({$table}gedcom = \"$assignedtree\" AND {$table}branch LIKE \"%$assignedbranch%\")" : " OR {$table}gedcom = \"$assignedtree\""; < } < if(($livingNameRestrictions && $privateNameRestrictions) || ($allOtherInput && !$allLivingRights && !$allPrivateRights)) { < if($limitedLivingRights && $limitedPrivateRights) < $query .= "(({$table}living != 1 && {$table}private != 1)$atreestr$matchperson)"; < elseif($limitedLivingRights) < $query .= "({$table}private != 1 && ({$table}living != 1$atreestr$matchperson))"; < elseif($limitedPrivateRights) < $query .= "({$table}living != 1 && ({$table}private != 1$atreestr$matchperson))"; < else < $query .= "(({$table}living !=1 && {$table}private != 1)$matchperson)"; < } < else { < if($livingNameRestrictions || ($allOtherInput && !$allLivingRights)) { < if($limitedLivingRights) < $query .= "({$table}living != 1$atreestr$matchperson)"; < else < $query .= "({$table}living != 1$matchperson)"; < } < elseif($privateNameRestrictions || ($allOtherInput && !$allPrivateRights)) { < if($limitedPrivateRights) < $query .= "({$table}private != 1$atreestr$matchperson)"; < else < $query .= "({$table}private != 1$matchperson)"; < } < } < } < < return $query; < } < < function checkLivingLinks($itemID) { < global $livedefault, $assignedtree, $assignedbranch, $people_table, $text, $medialinks_table, $sources_table, $citations_table, $families_table, $allow_living, $allow_private; < < if(($livedefault == 2 || $allow_living) && $allow_private && !$assignedtree) < return true; < < $icriteria = $fcriteria = ""; < if (!$allow_living && !$allow_private) { < // Viewer can not see media of Living individuals regardless of tree/branch, < // So need to check all links to this media for living individuals (don't narrow the search.) < $icriteria = $fcriteria = "AND (living = 1 OR private = 1)"; < } < else { < // Viewer can see some media of Living individuals, now figure if there are some the viewer should not see < if( $assignedtree && $livedefault != 2 ) { < // Should not be able to see Living individuals in other Trees, so narrow search to those other Trees < $icriteria = "$people_table.gedcom != \"$assignedtree\""; < $fcriteria = "$families_table.gedcom != \"$assignedtree\""; < < if ($assignedbranch ) { // Note: must have a Tree selected to have a Branch < // Should not be able to see Living individuals in other Branches either, so need to check for those too. < $bcriteria = "OR !(branch LIKE \"%$assignedbranch%\")"; < $icriteria = "($icriteria $bcriteria)"; < $fcriteria = "($fcriteria $bcriteria)"; < } < } < if(!$allow_living && $livedefault != 2) { < $icriteria = $icriteria ? "AND (living = 1 OR ($icriteria AND private = 1))" : "AND living = 1"; < $fcriteria = $fcriteria ? "AND (living = 1 OR ($fcriteria AND private = 1))" : "AND living = 1"; < } < elseif(!$allow_private) { //!$allow_private_db < $icriteria = $icriteria ? "AND (private = 1 OR ($icriteria AND living = 1))" : "AND private = 1"; < $fcriteria = $fcriteria ? "AND (private = 1 OR ($fcriteria AND living = 1))" : "AND private = 1"; < } < else { < if($icriteria) $icriteria = "AND $icriteria AND (living = 1 OR private = 1)"; < if($fcriteria) $fcriteria = "AND $fcriteria AND (living = 1 OR private = 1)"; < } < } < < if($icriteria) { < // Now find Living individuals linked to the media that fit the criteria set above. < $query = "SELECT count(*) as pcount < FROM ($medialinks_table, $people_table) < WHERE $medialinks_table.personID = $people_table.personID < AND $medialinks_table.gedcom = $people_table.gedcom < AND $medialinks_table.mediaID = '$itemID' < $icriteria"; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < tng_free_result( $result ); < if( $row['pcount'] ) < return false; // found at least one < } < < if($fcriteria) { < $query = "SELECT count(*) as pcount < FROM ($medialinks_table, $families_table) < WHERE $medialinks_table.personID = $families_table.familyID < AND $medialinks_table.gedcom = $families_table.gedcom < AND $medialinks_table.mediaID = '$itemID' < $fcriteria"; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < tng_free_result( $result ); < if( $row['pcount'] ) < return false; // found at least one < } < /* < $query = "SELECT count(*) as pcount < FROM ($medialinks_table, $sources_table, $citations_table, $people_table) < WHERE $medialinks_table.personID = $sources_table.sourceID < AND $medialinks_table.gedcom = $sources_table.gedcom < AND $medialinks_table.gedcom = $citations_table.gedcom < AND $medialinks_table.gedcom = $people_table.gedcom < AND $sources_table.sourceID = $citations_table.sourceID < AND $citations_table.persfamID = $people_table.personID < AND $medialinks_table.mediaID = '$itemID' < AND living = 1 $criteria"; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < tng_free_result( $result ); < if( $row['pcount'] ) < return false; < < $query = "SELECT count(*) as pcount < FROM ($medialinks_table, $sources_table, $citations_table, $families_table) < WHERE $medialinks_table.personID = $sources_table.sourceID < AND $medialinks_table.gedcom = $sources_table.gedcom < AND $medialinks_table.gedcom = $citations_table.gedcom < AND $medialinks_table.gedcom = $families_table.gedcom < AND $sources_table.sourceID = $citations_table.sourceID < AND $citations_table.persfamID = $families_table.familyID < AND $medialinks_table.mediaID = '$itemID' < AND living = 1 $fcriteria"; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < tng_free_result( $result ); < if( $row['pcount'] ) < return false; < */ < < // so we made it here ok, so there must not be any Living individulals linked to this media < return true; < } < < function checkMediaFileSize($path) { < global $maxmediafilesize; < < return file_exists($path) && filesize($path) < $maxmediafilesize; < } < < function getScriptName($replace = true) { < global $_SERVER; < < $scriptname = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . "?" . $_SERVER['QUERY_STRING']; < if($replace) { < $scriptname = str_replace("&","&",$scriptname); < $scriptname = str_replace("amp;amp;", "amp;", $scriptname); < } < < return $scriptname; < } < < function getScriptPath() { < $uri = getScriptName(); < return dirname($uri); < } < < function get_browseitems_nav( $total, $address, $perpage, $pagenavpages ) { < global $tngpage, $totalpages, $tree, $text, $orgtree, $test_type, $test_group; < < if( !$tngpage ) $tngpage = 1; < if( !$perpage ) $perpage = 50; < < if( $total <= $perpage ) < return ""; < < $totalpages = ceil( $total / $perpage ); < if ( $tngpage > $totalpages ) $tngpage = $totalpages; < < if( $tngpage > 1 ) { < $prevpage = $tngpage-1; < $navoffset = ( ( $prevpage * $perpage ) - $perpage ); < $prevlink = " «{$text['text_prev']} "; < } < if ($tngpage<$totalpages) { < $nextpage = $tngpage+1; < $navoffset = (($nextpage * $perpage) - $perpage); < $nextlink = "{$text['text_next']}»"; < } < while( $curpage++ < $totalpages ) { < $navoffset = ( ($curpage - 1 ) * $perpage ); < if( ( $curpage <= $tngpage - $pagenavpages || $curpage >= $tngpage + $pagenavpages ) && $pagenavpages ) { < if( $curpage == 1 ) < $firstlink = " «1 ... "; < if( $curpage == $totalpages ) < $lastlink = "... $totalpages»"; < } < else { < if( $curpage == $tngpage ) < $pagenav .= " $curpage "; < else < $pagenav .= " $curpage "; < } < } < if($firstlink || $lastlink) { < $gotolink = " "; < } < else < $gotolink = ""; < $pagenav = "$prevlink $firstlink $pagenav $lastlink $nextlink$gotolink"; < < return $pagenav; < } < < function doMenuItem( $index, $link, $image, $label, $page, $thispage ) { < global $sitever; < < if($sitever == "mobile") { < $selected = $page == $thispage ? " selected" : ""; < $item = "\n"; < } < else { < $class = $page == $thispage ? " class=\"here\"" : ""; < $imagetext = $image ? "" : ""; < $item = "
  • $imagetext$label
  • \n"; < } < < return $item; < } < < function displayDate( $date ) { < global $dates; < < $newdate = ""; < $dateparts = explode( " ", $date ); < foreach( $dateparts as $datepart ) { < if( !is_numeric( $datepart ) ) { < $datepartu = strtoupper( $datepart ); < if( isset( $dates[$datepartu] ) ) < $datepart = $dates[$datepartu]; < elseif( $datepartu == "AND" ) < $datepart = $dates['TEXT_AND']; < elseif( $datepartu == "@#DJULIAN@" ) < $datepart = "[J]"; < } < $newdate .= $newdate ? " $datepart" : $datepart; < } < < return $newdate; < } < < function xmlcharacters($string) { < $string = str_replace(array('&','"','\''), array('&','"','''), $string); < return preg_replace('/&([A-Za-z]+;|#[0-9]+;)/',"&$1", $string); < } < < function generatePassword($flag) { < $password = ""; < $possible = $flag ? "bcdfghjkmnpqrstvwxyz" : "0123456789bcdfghjkmnpqrstvwxyz"; < $length = 8; < < $i = 0; < while( $i < $length ) { < $char = substr( $possible, mt_rand( 0, strlen( $possible ) - 1 ), 1 ); < if( !strstr( $password, $char ) ) { < $password .= $char; < $i++; < } < } < < return $password; < } < < function getXrefNotes($noteref, $tree="") { < global $xnotes_table; < < preg_match( "/^@(\S+)@/", $noteref, $matches ); < if( $matches[1] ) { < $query = "SELECT note from $xnotes_table WHERE noteID = \"$matches[1]\" AND gedcom=\"$tree\""; < $xnoteres = @tng_query( $query ); < if( $xnoteres ) { < $xnote = tng_fetch_assoc( $xnoteres ); < $note = trim( $xnote['note'] ); < } < tng_free_result($xnoteres); < } < else < $note = $noteref; < return $note; < } < < function getDatePrefix($datestr) { < global $dates; < < $prefix = ""; < if($datestr) { < $orgstr = $datestr; < $datestr = strtoupper($datestr); < $prefixes = array($dates['BEF'], $dates['AFT'], $dates['ABT'], $dates['CAL'], $dates['EST']); < foreach($prefixes as $str) { < if(strpos($datestr, strtoupper($str)) === 0) { < $prefix = $str . " "; < break; < } < } < } < return $prefix; < } < < function getDisplayYear($datestr,$trueyear) { < global $dates; < < if($datestr == "Y") < $display = $dates['Y']; < else { < $newstr = displayDate($datestr); //translated < $prefix = getDatePrefix($newstr); //first part of translated string < $rest = trim(substr($newstr,strlen($prefix))); < $parts = explode(" ",$rest); < $numParts = count($parts); < $lastPart = $parts[$numParts-1]; < if(is_numeric($lastPart)) < $display = $prefix . $lastPart; < else < $display = $trueyear ? $prefix . $trueyear : $newstr; < } < //echo "dd=$datestr, ds=$newstr, np=$numParts, r=$rest, lp=" . $parts[$numParts-1]; < < return $display; < } < < function getYears( $row ) { < global $dates; < < $years = getGenderIcon( $row['sex'], -1 ); < if( $row['allow_living'] && $row['allow_private'] ) { < $deathdate = $row['deathdate'] ? $row['deathdate'] : $row['burialdate']; < $displaydeath = getDisplayYear($deathdate, $row['death']); < < $birthdate = $row['birthdate'] ? $row['birthdate'] : $row['altbirthdate']; < $displaybirth = getDisplayYear($birthdate, $row['birth']); < < if( $displaybirth || $displaydeath ) { < $years .= " $displaybirth - $displaydeath"; < $age = age($row); < if($age) < $years .= "  ($age)"; < } < } < < return $years; < } < < function justYears( $row ) { < if( $row['allow_living'] && $row['allow_private'] ) { < $deathdate = $row['deathdate'] ? $row['deathdate'] : $row['burialdate']; < $displaydeath = getDisplayYear($deathdate, $row['death']); < < $birthdate = $row['birthdate'] ? $row['birthdate'] : $row['altbirthdate']; < $displaybirth = getDisplayYear($birthdate, $row['birth']); < < if( $displaybirth || $displaydeath ) { < $years = "$displaybirth-$displaydeath"; < } < } < < return $years; < } < < function age($row) { < // If person is living calculate todays age < $datum_1_tr = $row['birthdatetr']; < $datum_1 = $row['birthdate']; < $datum_alt_1_tr = $row['altbirthdatetr']; < $datum_alt_1 = $row['altbirthdate']; < $datum_2_tr = $row['deathdatetr']; < $datum_2 = $row['deathdate']; < $datum_alt_2_tr = $row['burialdatetr']; < $datum_alt_2 = $row['burialdate']; < $age = ""; < < if($row['living'] == "1" && !$datum_2 && !$datum_alt_2) { < // Today < $datum_2_tr = date ("Y-m-d", time() + ( 3600 * $time_offset ) ); < } < < // Only if one of the FROM and one of the TO dates are filled < if(($datum_1_tr != "0000-00-00" || $datum_alt_1_tr != "0000-00-00") && ($datum_2_tr != "0000-00-00" || $datum_alt_2_tr != "0000-00-00")) { < < // FROM date < // $datum1 = result datum1 < // $datum_1_tr = date numeric, Datum_1 = date alfanumeric < // $datum_alt_1_tr = alternative date numeric, $datum_alt_1 = alternative date alfanumeric < < if($datum_1_tr != "0000-00-00") { < $datum1 = $datum_1_tr; < if(substr($datum_1, 0, 3) == "BEF") < $sign1 = ">"; < else { < if (substr($datum_1, 0, 3) == "AFT") { < $sign1 = "<"; < $datum1 = substr_replace($datum1, "12-31", 5); < } < else { < if(substr($datum_1, 1, 4) == substr($datum1, 0, 4)) { < $sign1 = "~"; < $datum1 = substr_replace($datum1, "07-15", 5); < } < else { < if(substr($datum_1, 0, 2) < 1) { < $sign1 = "~"; < $datum1 = substr_replace($datum1, "15", 8); < } < } < } < } < } < else { < $datum1 = $datum_alt_1_tr; < $sign1 = "~"; < if(substr($datum_alt_1, 0, 3) == "BEF") < $sign1 = ">"; < else { < if(substr($datum_alt_1, 0, 3) == "AFT") { < $sign1 = "<"; < $datum1 = substr_replace($datum1, "12-31", 5); < } < else { < if(substr($datum_alt_1, 1, 4) == substr($datum1, 0, 4)) < $datum1 = substr_replace($datum1, "07-15", 5); < else { < if(substr($datum_alt_1, 0, 2) < 1) < $datum1 = substr_replace($datum1, "15", 8); < } < } < } < } < < // TO date < // $datum2 = result datum2 < // $datum_2_tr = date numeric, Datum_2 = datum alfanumeric < // $datum_alt_2_tr = alternative date numeric, $datum_alt_2 = alternative date alfanumeric < < if($datum_2_tr != "0000-00-00") { < $datum2 = $datum_2_tr; < if(substr($datum_2, 0, 3) == "BEF") < $sign2 = "<"; < else { < if(substr($datum_2, 0, 3) == "AFT") { < $sign2 = ">"; < $datum2 = substr_replace($datum2, "12-31", 5); < } < else { < if(substr($datum_2, 1, 4) == substr($datum2, 0, 4)) < $datum2 = substr_replace($datum2, "07-15", 5); < else { < if(substr($datum2, 8, 2) < 1) < $datum2 = substr_replace($datum2, "15", 8); < } < } < } < } < else { < $datum2 = $datum_alt_2_tr; < $sign2 = "~"; < if(substr($datum_alt_2, 0, 3) == "BEF") < $sign2 = "<"; < else { < if(substr($datum_alt_2, 0, 3) == "AFT") { < $sign2 = ">"; < $datum2 = substr_replace($datum2, "12-31", 5); < } < else { < if(substr($datum_alt_2, 1, 4) == substr($datum2, 0, 4)) < $datum2 = substr_replace($datum2, "07-15", 5); < else { < if(substr($datum_alt_2, 0, 2) < 1) < $datum2 = substr_replace($datum2, "15", 8); < } < } < } < } < < // age = date2 - date1 < < $datum1 = substr($datum1, 0, 4) . substr($datum1, 5, 2) . substr($datum1, 8, 2); < $datum2 = substr($datum2, 0, 4) . substr($datum2, 5, 2) . substr($datum2, 8, 2); < $age = $datum2 - $datum1; < < // format age < < if($age < 0) < $age = ""; < else { < if($age >= 0 && $age < 10000) < $age = "0 "; < else { < if($age > 9999 && $age < 100000) < $age = substr($age, 0, 1); < else { < if($age > 99999 && $age < 1000000) < $age = substr($age, 0, 2); < else { < if($age > 999999) < $age = substr($age, 0, 3); < } < } < } < } < < // format sign < < if ((($sign1 == "<") || ($sign1 == ">")) && (($sign2 == "<") || ($sign2 == ">"))) < $sign = "~"; < else { < if (($sign1 == "~") || ($sign2 == "~")) < $sign = "~"; < else { < if ($sign1 && $sign1 <> " ") $sign = $sign1; < if ($sign2 && $sign2 <> " ") $sign = $sign2; < } < } < < if ($age && $sign <> "") < $age = $sign . " " . $age; < < } < < if ($age <> "") { < global $text; < $age .= " {$text['years']}"; < } < < return $age; < } < < function showSmallPhoto( $persfamID, $alttext, $rights, $height, $type=false, $gender="" ) { < global $rootpath, $photopath, $documentpath, $headstonepath, $historypath, $mediapath, $mediatypes_assoc; < global $photosext, $tree, $medialinks_table, $media_table, $text, $cms, $admtext, $tngconfig; < < $photo = ""; < $photocheck = ""; < < $query = "SELECT $media_table.mediaID, medialinkID, alwayson, thumbpath, mediatypeID, usecollfolder, newwindow, $media_table.gedcom FROM ($media_table, $medialinks_table) < WHERE personID = \"$persfamID\" AND $medialinks_table.gedcom = \"$tree\" AND $media_table.mediaID = $medialinks_table.mediaID AND defphoto = '1'"; < $result = tng_query($query); < $row = tng_fetch_assoc( $result ); < < if($row['thumbpath']) { < $targettext = $row['newwindow'] ? " target=\"_blank\"" : ""; < < if( $adm || $row['alwayson'] || $rights || checkLivingLinks($row['mediaID'])) { < $treestr = $tngconfig['mediatrees'] && $row['gedcom'] ? $row['gedcom'] . "/" : ""; < $mediatypeID = $row['mediatypeID']; < $usefolder = $row['usecollfolder'] ? $mediatypes_assoc[$mediatypeID] : $mediapath; < $photocheck = "$usefolder/$treestr" . $row['thumbpath']; < $photoref = $cms['tngpath'] . "$usefolder/$treestr" . str_replace("%2F","/",rawurlencode( $row['thumbpath'] )); < if($type) < $prefix = ""; < else { < $showmedia_url = getURL( "showmedia", 1 ); < $prefix = ""; < } < $suffix = ""; < } < } < elseif($rights) { < $photoref = $photocheck = $tree ? "$photopath/$tree.$persfamID.$photosext" : "$photopath/$persfamID.$photosext"; < $prefix = $suffix = ""; < } < < $gotfile = $photocheck ? file_exists( "$rootpath$photocheck" ) : false; < if(!$gotfile) { < if($type) { < $query = "SELECT medialinkID FROM ($media_table, $medialinks_table) < WHERE personID = \"$persfamID\" AND $medialinks_table.gedcom = \"$tree\" AND $media_table.mediaID = $medialinks_table.mediaID AND mediatypeID = \"photos\" AND thumbpath != \"\""; < $result2 = tng_query($query); < $numphotos = tng_num_rows($result2); < tng_free_result($result2); < if($numphotos) { < //if photos exist, show box with link to sort page where they can pick a default < $photo = "{$admtext['choosedef']}"; < } < } < elseif( $gender && $tngconfig['usedefthumbs'] ) { < if($gender == "M") { < $photocheck = "img/male.jpg"; < } < elseif ($gender == "F") { < $photocheck = "img/female.jpg"; < } < $photoref = $cms['tngpath'] . $photocheck; < $gotfile = file_exists( "$rootpath$photocheck" ); < } < } < if( $gotfile ) { < $border = $height ? 0 : 1; < $align = $height ? "" : " style=\"float:left;\""; < $photoinfo = @GetImageSize( "$rootpath$photocheck" ); < $photohtouse = $height ? $height : 100; < if( $photoinfo[1] <= $photohtouse ) { < $photohtouse = $photoinfo[1]; < $photowtouse = $photoinfo[0]; < } < else < $photowtouse = intval( $photohtouse * $photoinfo[0] / $photoinfo[1] ) ; < $photo = "$prefix\""$suffix"; < } < tng_free_result( $result ); < < return $photo; < } < < function placeImage($place) { < global $placesearch_url, $cms; < < return "\"\""; < } < < function checkMaintenanceMode($area){ < global $tngconfig; < < if(strpos($_SERVER['SCRIPT_NAME'],"/suggest.php") === FALSE && strpos($_SERVER['SCRIPT_NAME'],"admin") === FALSE && isset($tngconfig['maint']) && $tngconfig['maint'] < && (!$_SESSION['allow_admin'] || $_SESSION['assignedtree']) && strpos($_SERVER['SCRIPT_NAME'],"/index.") === FALSE) { < $maint_url = $area ? "adminmaint.php" : getURL("maint",0); < header("Location:$maint_url"); < exit; < } < } < < function cleanIt($string) { < global $session_charset; < $string = @htmlspecialchars(preg_replace("/\n/"," ",$string), ENT_QUOTES, $session_charset); < $string = preg_replace("/\"/", """,$string); < $string = preg_replace("//", ">",$string); < $string = preg_replace("/\t/", " ",$string); < $string = str_replace("`","",$string); < $string = tng_real_escape_string($string); < < return $string; < } < < function filterString($string) { < $string = strip_tags($string); < $string = tng_real_escape_string($string); < < return $string; < } < < < function truncateIt($string,$length) { < global $notrunc; < < if($length > 0 && !$notrunc && strlen($string) > $length) { < $truncated = substr(strip_tags($string),0,$length); < $truncated = substr($truncated,0,strrpos($truncated,' ')) . '…'; < } < else < $truncated = $string; < return $truncated; < } < < function tng_strtoupper($string) { < global $session_charset; < < $ucharset = strtoupper($session_charset); < $enc = function_exists('mb_detect_encoding') ? @mb_detect_encoding($string) : ""; < if($enc && strtoupper($enc) == "UTF-8" && $ucharset == "UTF-8") < $string = mb_strtoupper($string, "UTF-8"); < else < $string = strtoupper($string); < < return $string; < } < < function tng_strtolower($string) { < global $session_charset; < < $ucharset = strtoupper($session_charset); < $enc = function_exists('mb_detect_encoding') ? @mb_detect_encoding($string) : ""; < if($enc && strtoupper($enc) == "UTF-8" && $ucharset == "UTF-8") < $string = mb_strtolower($string, "UTF-8"); < else < $string = strtolower($string); < < return $string; < } < < function tng_utf8_decode($text) { < global $session_charset; < < $ucharset = strtoupper($session_charset); < if($ucharset == "ISO-8859-1") { < $text = utf8_decode($text); < } < elseif($ucharset == "ISO-8859-2") { < $text = utf82iso88592($text); < } < return $text; < } < < function utf82iso88592_chris($text) { < if (function_exists('mb_convert_encoding')) < return mb_convert_encoding ($text,'ISO-8859-2','UTF-8'); < return str_replace(array("\xC4\x85", "\xC4\x84","\xC4\x87","\xC4\x86","\xC4\x99","\xC4\x98","\xC5\x82","\xC5\x81", < "\xC3\xB3","\xC3\x93","\xC5\x9B","\xC5\x9A","\xC5\xBC","\xC5\xBB","\xC5\xBA","\xC5\xB9","\xc5\x84","\xc5\x83"), < array("\xB1","\xA1","\xE6","\xC6","\xEA","\xCA","\xB3","\xA3","\xF3","\xD3","\xB6","\xA6","\xBF","\xAF","\xBC","\xAC","\xF1","\xD1"), $text < ); < } < < function utf82iso88592($text) { < $text = str_replace("\xC4\x85", '±', $text); < $text = str_replace("\xC4\x84", '¡', $text); < $text = str_replace("\xC4\x87", 'æ', $text); < $text = str_replace("\xC4\x86", 'Æ', $text); < $text = str_replace("\xC4\x99", 'ê', $text); < $text = str_replace("\xC4\x98", 'Ê', $text); < $text = str_replace("\xC5\x82", '³', $text); < $text = str_replace("\xC5\x81", '£', $text); < $text = str_replace("\xC3\xB3", 'ó', $text); < $text = str_replace("\xC3\x93", 'Ó', $text); < $text = str_replace("\xC5\x9B", '¶', $text); < $text = str_replace("\xC5\x9A", '¦', $text); < $text = str_replace("\xC5\xBC", '¿', $text); < $text = str_replace("\xC5\xBB", '¯', $text); < $text = str_replace("\xC5\xBA", '¼', $text); < $text = str_replace("\xC5\xB9", '¬', $text); < $text = str_replace("\xc5\x84", 'ñ', $text); < $text = str_replace("\xc5\x83", 'Ñ', $text); < < return $text; < } < < function getAllTextPath() { < global $rootpath, $mylanguage, $language, $languages_path, $endrootpath, $cms, $text, $admtext, $dates; < < $rootpath = trim($rootpath); < if($rootpath && strpos($rootpath,"http") !== 0 ) { < $thislanguage = trim($mylanguage ? $mylanguage : $languages_path . $language); < if(strpos($thislanguage,"http") !== 0) { < if($cms['support']) < @include_once($rootpath . $cms['tngpath'] . "$thislanguage/alltext.php"); < else < @include_once($rootpath . $endrootpath . "$thislanguage/alltext.php"); < } < } < } < < function attachPrefixSuffix($entityID, $type) { < global $tngconfig; < < switch($type) { < case "I": < $prefix = $tngconfig['personprefix']; < $suffix = $tngconfig['personsuffix']; < break; < case "F": < $prefix = $tngconfig['familyprefix']; < $suffix = $tngconfig['familysuffix']; < break; < case "S": < $prefix = $tngconfig['sourceprefix']; < $suffix = $tngconfig['sourcesuffix']; < break; < case "R": < $prefix = $tngconfig['repoprefix']; < $suffix = $tngconfig['reposuffix']; < break; < default: < $prefix = $suffix = ""; < break; < } < $entityID = tng_utf8_decode(trim($entityID)); < $prefixlen = strlen($prefix); < $suffixlen = strlen($suffix); < $entity_prefix = substr($entityID,0,$prefixlen); < $entity_suffix = substr($entityID,-1 * $suffixlen); < if($prefix && $entity_prefix != $prefix) $entityID = $prefix . $entityID; < if($suffix && $entity_suffix != $suffix) $entityID = $entityID . $suffix; < < return $entityID; < } < < function formatInternalDate($truedate) { < if($truedate == "0000-00-00") < return ""; < $parts = explode("-",$truedate); < $newdate = ""; < $numparts = 0; < foreach($parts as $part) { < if($part != "0000" && $part != "00") < $numparts++; < elseif($part == "00") < $part = "01"; < if($newdate) < $newdate .= "-"; < $newdate .= $part; < } < < if($numparts == 1) < $formatted = $parts[0]; < else { < $newdate = date_create($newdate); < if($numparts == 2) < $formatted = date_format($newdate,"M Y"); < else < $formatted = date_format($newdate,"j M Y"); < } < < return $formatted; < } < < function isConnected() { < global $tngconfig; < < if($tngconfig['offline']) < return false; < else < return true; < < // use 80 for http or 443 for https protocol < //$connected = @fsockopen("www.google.com", 80); < //if ($connected){ < // fclose($connected); < // return true; < //} < //else < // return false; < } --- > @ini_set( "session.bug_compat_warn", "0" ); > @ini_set( "allow_url_fopen", "0" ); > $http = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' )) ? 'https' : 'http'; > > @set_time_limit(0); > //set binary to "binary" for more sensitive searches > $binary = ""; > $notrunc = 0; //don't truncate if link doesn't go to showmedia > $envelope = false; > > if( isset($offset) && $offset && !is_numeric($offset) ) die ("invalid offset"); > //$endrootpath = ""; > > $newroot = preg_replace( "/\//", "", $rootpath ); > $newroot = preg_replace( "/ /", "", $newroot ); > $newroot = preg_replace( "/\./", "", $newroot ); > $errorcookiename = "tngerror_$newroot"; > if( isset($_COOKIE[$errorcookiename]) ) { > $message = $_COOKIE[$errorcookiename]; > $error = $message; > setcookie("tngerror_$newroot", "", time()-31536000, "/"); > } > else > $error = ""; > > function debugPrint($obj) { > echo "
    \n";
    > 	print_r($obj);
    > 	echo "
    \n"; > } > > function pageNotFound() { > header('HTTP/1.0 404 Not Found'); > die; > } > > function constructName($firstnames, $lastnames, $title, $suffix, $order) { > if($title) $title .= " "; > if($firstnames) $firstnames .= " "; > > switch($order) { > case "3": > if($lastnames && $firstnames) $lastnames .= ","; > if($lastnames) $lastnames .= " "; > $namestr = trim("$lastnames $title$firstnames$suffix"); > break; > case "2": > if($lastnames) $lastnames .= " "; > $namestr = trim("$title$lastnames$firstnames"); > if($suffix) $namestr .= ", $suffix"; > break; > default: > $namestr = trim("$title$firstnames$lastnames"); > if($suffix) $namestr .= ", $suffix"; > break; > } > > return preg_replace('/\s\s+/'," ",$namestr); > } > > function getName( $row, $hcard = null ) { > global $nameorder; > > $locnameorder = !empty($row['nameorder']) ? $row['nameorder'] : (!empty($nameorder) ? $nameorder : 1); > $namestr = getNameUniversal($row, $locnameorder, $hcard); > > return $namestr; > } > > function getNameRev( $row, $hcard = null ) { > global $nameorder; > > $locnameorder = !empty($row['nameorder']) ? $row['nameorder'] : (!empty($nameorder) ? $nameorder : 1); > if($locnameorder != 2) $locnameorder = 3; > $namestr = getNameUniversal($row, $locnameorder, $hcard); > > return $namestr; > } > > function getNameUniversal($row, $order, $hcard=null) { > global $text, $admtext, $tngconfig, $nonames; > > $indexlist= array('lastname','firstname','lnprefix','allow_living','allow_private'); > foreach($indexlist as $index) > if(!isset($row[$index])) $row[$index] = ''; > > //$nonames = showNames($row); > $lastname = trim( $row['lnprefix']." ".$row['lastname'] ); > if(!empty($tngconfig['ucsurnames'])) $lastname = tng_strtoupper($lastname); > if($hcard) { > $lastname = "" . $lastname . ""; > $title = $suffix = ""; > } > else { > if( !isset($row['title'])) $row['title'] = ''; > if( !isset($row['prefix'])) $row['prefix'] = ''; > $title = $row['title'] && ($row['title'] == $row['prefix']) ? $row['title'] : trim($row['title'] . " " . $row['prefix']); > > $suffix = isset($row['suffix']) ? $row['suffix'] : ''; > } > if( ($row['allow_living'] || !$nonames) && ($row['allow_private'] || !$tngconfig['nnpriv']) ) { > $firstname = $hcard ? "" . $row['firstname'] . "" : $row['firstname']; > $namestr = constructName($firstname, $lastname, $title, $suffix, $order); > } > elseif( $row['living'] && !$row['allow_living'] && $nonames == 1 ) > $namestr = $text['living']; > elseif( $row['private'] && !$row['allow_private'] && $tngconfig['nnpriv'] == 1 ) > $namestr = $admtext['text_private']; > else { //initials > $firstname = $hcard ? "" . initials( $row['firstname']) . "" : initials( $row['firstname']); > $namestr = constructName($firstname, $lastname, "", $suffix, $order); //title intentionally omitted > } > > if($hcard) $namestr = "$namestr"; > return $namestr; > } > > function getFamilyName( $row ) { > global $text, $people_table; > > $righttree = checktree($row['gedcom']); > > $hquery = "SELECT personID, firstname, lnprefix, lastname, title, prefix, suffix, birthdate, birthdatetr, altbirthdate, altbirthdatetr, living, private, branch, nameorder, gedcom FROM $people_table WHERE personID = \"{$row['husband']}\" AND gedcom = \"{$row['gedcom']}\""; > $hresult = tng_query($hquery) or die ($text['cannotexecutequery'] . ": $hquery"); > $hrow = tng_fetch_assoc( $hresult ); > > if($hrow != null) { > $hrights = determineLivingPrivateRights($hrow, $righttree); > $hrow['allow_living'] = $hrights['living']; > $hrow['allow_private'] = $hrights['private']; > $husbname = getName( $hrow ); > } > else > $husbname = ""; > tng_free_result( $hresult ); > > $wquery = "SELECT personID, firstname, lnprefix, lastname, title, prefix, suffix, birthdate, birthdatetr, altbirthdate, altbirthdatetr, living, private, branch, nameorder, gedcom FROM $people_table WHERE personID = \"{$row['wife']}\" AND gedcom = \"{$row['gedcom']}\""; > $wresult = tng_query($wquery) or die ($text['cannotexecutequery'] . ": $wquery"); > $wrow = tng_fetch_assoc( $wresult ); > > if($wrow != null) { > $wrights = determineLivingPrivateRights($wrow, $righttree); > $wrow['allow_living'] = $wrights['living']; > $wrow['allow_private'] = $wrights['private']; > $wifename = getName( $wrow ); > } > else > $wifename = ""; > tng_free_result( $wresult ); > > return "$husbname / $wifename"; > } > > function initials ($allnames) { > $initials = ""; > $allnames = preg_replace('/[^\p{L}( )-]/u',"",$allnames); // remove UTF non-letter leaving ( )- > $names = explode(" ",$allnames); > > foreach($names as $name) { > $name = preg_replace('/^-|-$/',"",$name); // leave hyphens only inside name (just for case) > $chars = preg_split("//u", $name, -1, PREG_SPLIT_NO_EMPTY); // array of UTF chars > if(empty($chars) || (reset($chars) == "(" && end($chars) == ")" )) // spec case - name in brackets - ignore > continue; > elseif(in_array("-",$chars)) { // spec case - compound name like Jean-Marie > $initials .= $chars[0]; > foreach($chars as $pos=>$ch) { > if($ch=="-") > $initials .= "-{$chars[$pos+1]}"; > } > } > else > $initials .= "$chars[0]."; > } > > return $initials; > } > > function showNames($row) { > global $nonames, $tngconfig; > > return $row['private'] ? $tngconfig['nnpriv'] : $nonames; > } > > function getGenderIcon($gender, $valign) { > global $text, $cms; > > $icon = $genderstr = ""; > if($gender) { > if($gender == "M") $genderstr = "male"; > elseif($gender == "F") $genderstr = "female"; > if($genderstr) > $icon = "\"""; > } > return $icon; > } > > function getAltBirthInfo($row) { > global $tngconfig, $text, $admtext; > > if(!empty($row['altbirthtype'])) > $altbirthtype = $row['altbirthtype']; > else > $altbirthtype = empty($tngconfig['altbirth']) ? "CHR" : explode(',',$tngconfig['altbirth'])[0]; > > $label = isset($admtext[$altbirthtype]) ? $admtext[$altbirthtype] : $altbirthtype; > > return [$altbirthtype, $label]; > } > > function getURL( $destination, $args, $ext=".php") { > global $cms; > > if( $cms['support'] ) { > if (class_exists('TNGcms')) { > $url=TNGcms::getURL($destination, $args, $ext=".php", $cms); > } > else > $url = $args ? $cms['url'] . "=$destination&" : $cms['url'] . "=$destination"; > } > else > $url = $args ? $cms['tngpath'] . $destination . $ext . "?" : $cms['tngpath'] . $destination . $ext; > if (substr($url, -2) == '//') > $url = substr($url, 0, -1); > > return $url; > } > > function getFORM( $action, $method, $name, $id, $onsubmit=null ) { > global $cms; > > if( !$cms['support'] ) > $url = $action ? $cms['tngpath'] . $action . ".php" : ""; > elseif(class_exists('TNGcms')) > return TNGcms::getFORM($action, $method, $name, $id, $cms); > elseif($cms['support']=="joomla") // backwards compatibility > $url = "index.php"; > elseif($cms['support']=="zikula") // backwards compatibility > $url = "index.php"; > else > $url = "modules.php"; // backwards compatibility > > $formstr = " if( $method ) > $formstr .= " method=\"$method\""; > if( $name ) > $formstr .= " name=\"$name\""; > if( $id ) > $formstr .= " id=\"$id\""; > if( $onsubmit ) > $formstr .= " onsubmit=\"$onsubmit\""; > > $formstr .= ">\n"; > > if( $cms['support'] ) { > if ($cms['support']=="joomla") { > $formstr .="\n"; > $formstr .=" \n"; > $formstr .=" \n"; > } > elseif($cms['support']=="zikula") { > $formstr .= "\n"; > $formstr .= "\n"; > } > else { > $formstr .= "\n"; > $formstr .= "\n"; > $formstr .= "\n"; > } > } > > return $formstr; > } > > function isPhoto($row) { > global $imagetypes; > > if( $row['form'] ) > $form = strtoupper($row['form']); > else { > preg_match( "/\.(.+)$/", $row['path'], $matches ); > $form = isset($matches[1]) ? strtoupper($matches[1]) : ''; > } > > if($row['path'] && !$row['abspath'] && in_array($form,$imagetypes)) > return true; > else > return false; > } > > function getEventDisplay( $displaystr ) { > global $mylanguage, $languages_path; > > $dispvalues = explode( "|", $displaystr ); > $numvalues = count( $dispvalues ); > if( $numvalues > 1 ) { > $displayval = ""; > for( $i = 0; $i < $numvalues; $i += 2 ) { > $lang = $dispvalues[$i]; > if( $mylanguage == $languages_path . $lang ) { > $displayval = $dispvalues[$i+1]; > break; > } > } > } > else > $displayval = $displaystr; > > return $displayval; > } > > function checkbranch( $branch ) { > global $assignedbranch; > > return ( !$assignedbranch || ( FALSE !== ( $pos = strpos( $branch, $assignedbranch, 0 ) ) ) ) ? 1 : 0; > } > > function checktree( $tree ) { > global $assignedtree; > > return ( !$assignedtree || $tree == $assignedtree ); > } > > //The following function is now obsolete > function determineLivingRights($row, $usedb = 0, $allow_living_db = 0, $allow_private_db = 0) { > global $livedefault, $allow_living, $allow_private, $rightbranch, $tree; > > $allow_living_loc = $usedb ? $allow_living_db : $allow_living; > $allow_private_loc = $usedb ? $allow_private_db : $allow_private; > > $rightbranch = checkbranch($row['branch']) ? 1 : 0; > //echo "myg=" . $_SESSION['mygedcom'] . ", myp=" . $_SESSION['mypersonID'] . "rp=" . $row['personID'] . "
    "; > //change $tree back to $row[gedcom] after all calling pages can be updated > $living = $row['living']; > $private = $row['private']; > > if(!$private && !$living) { > $livingrights = 1; > } > else { > $yes_living = $yes_private = true; > if(!empty($row['personID'])) > $user_person = !empty($_SESSION['mypersonID']) && $_SESSION['mygedcom'] == $tree && $_SESSION['mypersonID'] == $row['personID']; > else > $user_person = !empty($_SESSION['mypersonID']) && $_SESSION['mygedcom'] == $tree && ($_SESSION['mypersonID'] == $row['husband'] || $_SESSION['mypersonID'] == $row['wife']); > if($living) { > if($livedefault != 2) { //everyone has living rights > if((!$allow_living_loc || !$rightbranch) && !$user_person) { > $yes_living = false; > //echo "fn={$row['firstname']}, al=$allow_living, br={$row['branch']}, rb=$rightbranch, up=$user_person
    "; > } > } > } > if($private) { > if((!$allow_private_loc || !$rightbranch) && !$user_person) > $yes_private = false; > } > $livingrights = $yes_living && $yes_private ? 1 : 0; > } > //$livingrights = ((!$row['private'] || $allow_private) && (!$row['living'] || $livedefault == 2)) || ($allow_living && $rightbranch) || ($_SESSION['mypersonID'] && $_SESSION['mygedcom'] == $tree && $_SESSION['mypersonID'] == $row['personID']) ? 1 : 0; > > return $livingrights; > } > //end obsolete function > > function determineLivingPrivateRights($row, $pagerighttree = -1, $pagerightbranch = -1) { > global $livedefault, $ldsdefault, $allow_living, $allow_private, $allow_private_notes, $allow_lds, $tree; > > if(!isset($row['living'])) $row['living'] = 0; > if(!isset($row['private'])) $row['private'] = 0; > if(!isset($row['branch'])) $row['branch'] = ''; > if(!isset($row['gedcom'])) $row['gedcom'] = ''; > if(!isset($row['personID'] )) $row['personID'] = ''; > > $rights = array('private' => true, 'living' => true, 'private_notes' => true, 'lds' => (!$ldsdefault ? true : false)); > > $living = $livedefault == 2 ? false : $row['living']; > $private = $row['private']; > > //check tree > $righttree = $pagerighttree >= 0 ? $pagerighttree : checktree($row['gedcom']); > $righttreebranch = $pagerightbranch >= 0 ? $pagerightbranch : ($righttree ? checkbranch($row['branch']) : false); > if(!empty($row['personID'])) > $user_person = !empty($_SESSION['mypersonID']) && $_SESSION['mygedcom'] == $tree && $_SESSION['mypersonID'] == $row['personID']; > else > $user_person = !empty($_SESSION['mypersonID']) && $_SESSION['mygedcom'] == $tree && ((!empty($row['husband']) && $_SESSION['mypersonID'] == $row['husband']) || (!empty($row['wife']) && $_SESSION['mypersonID'] == $row['wife'])); > > if($private || $living || $ldsdefault == 2) { > if($living && (!$allow_living || !$righttreebranch) && !$user_person) > $rights['living'] = false; > > if($private && (!$allow_private || !$righttreebranch) && !$user_person) > $rights['private'] = false; > > if($ldsdefault == 2 && (($allow_lds && $righttreebranch) || $user_person)) > $rights['lds'] = true; > //echo $righttree . " " . $righttreebranch . " " . $row['branch'] . " | "; > } > $rights['both'] = $rights['private'] && $rights['living']; > > if((!$allow_private_notes || !$righttreebranch) && !$user_person) > $rights['private_notes'] = false; > > return $rights; > } > > function determineLDSRights($notree = false) { > global $ldsdefault, $allow_lds, $tree, $assignedtree; > > $treeOK = !$tree || $notree || !$assignedtree || $tree == $assignedtree; > $ldsOK = !$ldsdefault || ($ldsdefault == 2 && $allow_lds && $treeOK) ? true : false; > > return $ldsOK; > } > > function getLivingPrivateRestrictions($table, $firstname, $allOtherInput) { > global $livedefault, $nonames, $tngconfig, $allow_living, $allow_private, $assignedtree, $assignedbranch, $people_table; > > $query = ""; > if($table) $table .= "."; > $limitedLivingRights = $allow_living && !$livedefault; > $limitedPrivateRights = $allow_private; > $allLivingRights = $livedefault == 2 || ($allow_living && !$assignedtree); > $allPrivateRights = $allow_private && !$assignedtree; > $livingNameRestrictions = $livedefault == 1 || (!$livedefault && ($nonames == 1 || ($nonames == 2 && $firstname)) && !$allLivingRights); > $privateNameRestrictions = ($tngconfig['nnpriv'] == 1 || ($tngconfig['nnpriv'] == 2 && $firstname)) && !$allPrivateRights; > > if($livingNameRestrictions || $privateNameRestrictions || $allOtherInput) { > $atreestr = $matchperson = ""; > if(isset($_SESSION['mypersonID']) && ($table == $people_table || $table == "p.")) { //this is me (current user) > $matchperson = " OR ({$table}gedcom = \"{$_SESSION['mygedcom']}\" AND {$table}personID = \"{$_SESSION['mypersonID']}\")"; > } > if($assignedtree) { > //rights are limited to a tree or tree+branch > $atreestr = $assignedbranch ? " OR ({$table}gedcom = \"$assignedtree\" AND {$table}branch LIKE \"%$assignedbranch%\")" : " OR {$table}gedcom = \"$assignedtree\""; > } > if(($livingNameRestrictions && $privateNameRestrictions) || ($allOtherInput && !$allLivingRights && !$allPrivateRights)) { > if($limitedLivingRights && $limitedPrivateRights) > $query .= "(({$table}living != 1 && {$table}private != 1)$atreestr$matchperson)"; > elseif($limitedLivingRights) > $query .= "({$table}private != 1 && ({$table}living != 1$atreestr$matchperson))"; > elseif($limitedPrivateRights) > $query .= "({$table}living != 1 && ({$table}private != 1$atreestr$matchperson))"; > else > $query .= "(({$table}living !=1 && {$table}private != 1)$matchperson)"; > } > else { > if($livingNameRestrictions || ($allOtherInput && !$allLivingRights)) { > if($limitedLivingRights) > $query .= "({$table}living != 1$atreestr$matchperson)"; > else > $query .= "({$table}living != 1$matchperson)"; > } > elseif($privateNameRestrictions || ($allOtherInput && !$allPrivateRights)) { > if($limitedPrivateRights) > $query .= "({$table}private != 1$atreestr$matchperson)"; > else > $query .= "({$table}private != 1$matchperson)"; > } > } > } > > return $query; > } > > function checkLivingLinks($itemID) { > global $livedefault, $assignedtree, $assignedbranch, $people_table, $text, $medialinks_table, $sources_table, $citations_table, $families_table, $allow_living, $allow_private; > > if(($livedefault == 2 || $allow_living) && $allow_private && !$assignedtree) > return true; > > $icriteria = $fcriteria = ""; > if (!$allow_living && !$allow_private) { > // Viewer can not see media of Living individuals regardless of tree/branch, > // So need to check all links to this media for living individuals (don't narrow the search.) > $icriteria = $fcriteria = "AND (living = 1 OR private = 1)"; > } > else { > // Viewer can see some media of Living individuals, now figure if there are some the viewer should not see > if( $assignedtree && $livedefault != 2 ) { > // Should not be able to see Living individuals in other Trees, so narrow search to those other Trees > $icriteria = "$people_table.gedcom != \"$assignedtree\""; > $fcriteria = "$families_table.gedcom != \"$assignedtree\""; > > if ($assignedbranch ) { // Note: must have a Tree selected to have a Branch > // Should not be able to see Living individuals in other Branches either, so need to check for those too. > $bcriteria = "OR !(branch LIKE \"%$assignedbranch%\")"; > $icriteria = "($icriteria $bcriteria)"; > $fcriteria = "($fcriteria $bcriteria)"; > } > } > if(!$allow_living && $livedefault != 2) { > $icriteria = $icriteria ? "AND (living = 1 OR ($icriteria AND private = 1))" : "AND living = 1"; > $fcriteria = $fcriteria ? "AND (living = 1 OR ($fcriteria AND private = 1))" : "AND living = 1"; > } > elseif(!$allow_private) { //!$allow_private_db > $icriteria = $icriteria ? "AND (private = 1 OR ($icriteria AND living = 1))" : "AND private = 1"; > $fcriteria = $fcriteria ? "AND (private = 1 OR ($fcriteria AND living = 1))" : "AND private = 1"; > } > else { > if($icriteria) $icriteria = "AND $icriteria AND (living = 1 OR private = 1)"; > if($fcriteria) $fcriteria = "AND $fcriteria AND (living = 1 OR private = 1)"; > } > } > > if($icriteria) { > // Now find Living individuals linked to the media that fit the criteria set above. > $query = "SELECT count(*) as pcount > FROM ($medialinks_table, $people_table) > WHERE $medialinks_table.personID = $people_table.personID > AND $medialinks_table.gedcom = $people_table.gedcom > AND $medialinks_table.mediaID = '$itemID' > $icriteria"; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > tng_free_result( $result ); > if( $row['pcount'] ) > return false; // found at least one > } > > if($fcriteria) { > $query = "SELECT count(*) as pcount > FROM ($medialinks_table, $families_table) > WHERE $medialinks_table.personID = $families_table.familyID > AND $medialinks_table.gedcom = $families_table.gedcom > AND $medialinks_table.mediaID = '$itemID' > $fcriteria"; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > tng_free_result( $result ); > if( $row['pcount'] ) > return false; // found at least one > } > /* > $query = "SELECT count(*) as pcount > FROM ($medialinks_table, $sources_table, $citations_table, $people_table) > WHERE $medialinks_table.personID = $sources_table.sourceID > AND $medialinks_table.gedcom = $sources_table.gedcom > AND $medialinks_table.gedcom = $citations_table.gedcom > AND $medialinks_table.gedcom = $people_table.gedcom > AND $sources_table.sourceID = $citations_table.sourceID > AND $citations_table.persfamID = $people_table.personID > AND $medialinks_table.mediaID = '$itemID' > AND living = 1 $criteria"; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > tng_free_result( $result ); > if( $row['pcount'] ) > return false; > > $query = "SELECT count(*) as pcount > FROM ($medialinks_table, $sources_table, $citations_table, $families_table) > WHERE $medialinks_table.personID = $sources_table.sourceID > AND $medialinks_table.gedcom = $sources_table.gedcom > AND $medialinks_table.gedcom = $citations_table.gedcom > AND $medialinks_table.gedcom = $families_table.gedcom > AND $sources_table.sourceID = $citations_table.sourceID > AND $citations_table.persfamID = $families_table.familyID > AND $medialinks_table.mediaID = '$itemID' > AND living = 1 $fcriteria"; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > tng_free_result( $result ); > if( $row['pcount'] ) > return false; > */ > > // so we made it here ok, so there must not be any Living individulals linked to this media > return true; > } > > function checkMediaFileSize($path) { > global $maxmediafilesize; > > return file_exists($path) && filesize($path) < $maxmediafilesize; > } > > function getScriptName($replace = true) { > global $_SERVER; > > $scriptname = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . "?" . $_SERVER['QUERY_STRING']; > if($replace) { > $scriptname = str_replace("&","&",$scriptname); > $scriptname = str_replace("amp;amp;", "amp;", $scriptname); > } > > return $scriptname; > } > > function getScriptPath() { > $uri = getScriptName(); > return dirname($uri); > } > > function get_browseitems_nav( $total, $address, $perpage, $pagenavpages ) { > global $tngpage, $totalpages, $tree, $text, $orgtree, $test_type, $test_group; > > $pagenav = $firstlink = $lastlink = $nextlink = $prevlink = ""; > $curpage = 0; > > if( !$tngpage ) $tngpage = 1; > if( !$perpage ) $perpage = 50; > > if( $total <= $perpage ) > return ""; > > $totalpages = ceil( $total / $perpage ); > if ( $tngpage > $totalpages ) $tngpage = $totalpages; > > if( $tngpage > 1 ) { > $prevpage = $tngpage-1; > $navoffset = ( ( $prevpage * $perpage ) - $perpage ); > if ( !empty($test_type) || !empty($test_group) ) > $prevlink = " «{$text['text_prev']} "; > else > $prevlink = " «{$text['text_prev']} "; > } > if ($tngpage<$totalpages) { > $nextpage = $tngpage+1; > $navoffset = (($nextpage * $perpage) - $perpage); > if ( !empty($test_type) || !empty($test_group) ) > $nextlink = "{$text['text_next']}»"; > else > $nextlink = "{$text['text_next']}»"; > } > while( $curpage++ < $totalpages ) { > $navoffset = ( ($curpage - 1 ) * $perpage ); > if( ( $curpage <= $tngpage - $pagenavpages || $curpage >= $tngpage + $pagenavpages ) && $pagenavpages ) { > if( $curpage == 1 ) { > if ( !empty($test_type) || !empty($test_group) ) > $firstlink = " «1 ... "; > else > $firstlink = " «1 ... "; > } > if( $curpage == $totalpages ) { > if ( !empty($test_type) || !empty($test_group) ) > $lastlink = "... $totalpages»"; > else > $lastlink = "... $totalpages»"; > } > } > else { > if( $curpage == $tngpage ) > $pagenav .= " $curpage "; > else { > if ( !empty($test_type) || !empty($test_group) ) > $pagenav .= " $curpage "; > else > $pagenav .= " $curpage "; > } > } > } > if($firstlink || $lastlink) { > $gotolink = " "; > } > else > $gotolink = ""; > $pagenav = "$prevlink $firstlink $pagenav $lastlink $nextlink$gotolink"; > > return $pagenav; > } > > function doMenuItem( $index, $link, $image, $label, $page, $thispage ) { > global $sitever; > > if($sitever == "mobile") { > $selected = $page == $thispage ? " selected" : ""; > $item = "\n"; > } > else { > $class = $page == $thispage ? " class=\"here\"" : ""; > $imagetext = $image ? "" : ""; > $item = "
  • $imagetext$label
  • \n"; > } > > return $item; > } > > function displayDate( $date = "" ) { > global $dates; > > $newdate = ""; > if(!empty($date)) { > $dateparts = explode( " ", $date ); > foreach( $dateparts as $datepart ) { > if( !is_numeric( $datepart ) ) { > $datepartu = strtoupper( $datepart ); > if( isset( $dates[$datepartu] ) ) > $datepart = $dates[$datepartu]; > elseif( $datepartu == "AND" ) > $datepart = $dates['TEXT_AND']; > elseif( $datepartu == "@#DJULIAN@" ) > $datepart = "[J]"; > } > $newdate .= $newdate ? " $datepart" : $datepart; > } > } > > return $newdate; > } > > //added in 12.1.1 for Register and Ahnentafel reports > function printDate( $datetr, $date = "" ) { > global $dates, $text; > > $newdate = ""; > $prefix = 0; // added to displayDate function > $dateparts = explode( " ", $date ); > foreach( $dateparts as $datepart ) { > if( !is_numeric( $datepart ) ) { > $datepartu = strtoupper( $datepart ); > if( isset( $dates[$datepartu] ) ) { > $datepart = $dates[$datepartu]; > $dtprefix = in_array($datepartu, array("ABT", "ABT.", "ABOUT", "AFT", "AFT.", "AFTER", "BEF", "BEF.", "BEFORE", "BET", "BET.", "BETWEEN", "CAL", "CAL.", "EST", "EST.")); > if ( $dtprefix ) { > $prefix = 1; > switch ($datepartu) { > case "ABT": > $datepart = tng_strtolower($dates['ABOUT']); > break; > case "ABT.": > $datepart = tng_strtolower($dates['ABOUT']); > break; > case "AFT": > $datepart = tng_strtolower($dates['AFTER']); > break; > case "AFT.": > $datepart = tng_strtolower($dates['AFTER']); > break; > case "BEF": > $datepart = tng_strtolower($dates['BEFORE']); > break; > case "BEF.": > $datepart = tng_strtolower($dates['BEFORE']); > break; > case "BET": > $datepart = tng_strtolower($dates['BETWEEN']); > break; > case "BET.": > $datepart = tng_strtolower($dates['BETWEEN']); > break; > case "CAL": > $datepart = tng_strtolower($dates['CAL']); > break; > case "CAL.": > $datepart = tng_strtolower($dates['CAL']); > break; > case "EST": > $datepart = tng_strtolower($dates['EST']); > break; > case "EST.": > $datepart = tng_strtolower($dates['EST']); > break; > default: > $datepart = tng_strtolower($datepart); > break; > } > } > } > elseif( $datepartu == "AND" ) > $datepart = $dates['TEXT_AND']; > elseif( $datepartu == "@#DJULIAN@" ) > $datepart = "[J]"; > } > $newdate .= $newdate ? (" " . $datepart) : $datepart; > } > if ( $prefix == 0 && substr_count($newdate," ") == 2 ) { > $newdate = " " . trim($text['onthisdate']) . " " . $newdate; > } > elseif ( !empty($newdate) && $prefix == 0 ) > $newdate = " " . trim($text['inthisyear']) . " " . $newdate; > elseif ( $newdate != "" ) > $newdate = " " . $newdate; > > return $newdate; > } > > function xmlcharacters($string) { > if(empty($string)) return ""; > $string = str_replace(array('&','"','\''), array('&','"','''), $string); > return preg_replace('/&([A-Za-z]+;|#[0-9]+;)/',"&$1", $string); > } > > function generatePassword($flag) { > $password = ""; > $possible = $flag ? "bcdfghjkmnpqrstvwxyz" : "0123456789bcdfghjkmnpqrstvwxyz"; > $length = 8; > > $i = 0; > while( $i < $length ) { > $char = substr( $possible, mt_rand( 0, strlen( $possible ) - 1 ), 1 ); > if( !strstr( $password, $char ) ) { > $password .= $char; > $i++; > } > } > > return $password; > } > > function getXrefNotes($noteref, $tree="") { > global $xnotes_table; > > preg_match( "/^@(\S+)@/", $noteref, $matches ); > if( isset( $matches[1] ) ) { > $query = "SELECT note from $xnotes_table WHERE noteID = \"$matches[1]\" AND gedcom=\"$tree\""; > $xnoteres = @tng_query( $query ); > if( $xnoteres ) { > $xnote = tng_fetch_assoc( $xnoteres ); > $note = trim( $xnote['note'] ); > } > tng_free_result($xnoteres); > } > else > $note = $noteref; > return $note; > } > > function getDatePrefix($datestr) { > global $dates; > > $prefix = ""; > if($datestr) { > $orgstr = $datestr; > $firststr = strtok(strtoupper($datestr)," "); > $prefixes = array($dates['BEF'], $dates['AFT'], $dates['ABT'], $dates['CAL'], $dates['EST']); > foreach($prefixes as $str) { > if($firststr == strtoupper($str)) { > $prefix = $str . " "; > break; > } > } > } > return $prefix; > } > > function getDisplayYear($datestr,$trueyear) { > global $dates; > > if($datestr == "Y") > $display = $dates['Y']; > else { > $newstr = displayDate($datestr); //translated > $prefix = getDatePrefix($newstr); //first part of translated string > $rest = trim(substr($newstr,strlen($prefix))); > $parts = explode(" ",$rest); > $numParts = count($parts); > $lastPart = $parts[$numParts-1]; > if(is_numeric($lastPart)) > $display = $prefix . $lastPart; > else > $display = $trueyear ? $prefix . $trueyear : $newstr; > } > //echo "dd=$datestr, ds=$newstr, np=$numParts, r=$rest, lp=" . $parts[$numParts-1]; > > return $display; > } > > function getYears( $row ) { > global $dates; > > if(!isset($row['death'])) $row['death'] = ''; > if(!isset($row['birth'])) $row['birth'] = ''; > > if( $row['allow_living'] && $row['allow_private'] ) { > $years = getGenderIcon( $row['sex'], -1 ); > $deathdate = $row['deathdate'] ? $row['deathdate'] : $row['burialdate']; > $displaydeath = getDisplayYear($deathdate, $row['death']); > > $birthdate = $row['birthdate'] ? $row['birthdate'] : $row['altbirthdate']; > $displaybirth = getDisplayYear($birthdate, $row['birth']); > > if( $displaybirth || $displaydeath ) { > $years .= " $displaybirth - $displaydeath"; > $age = age($row); > if($age) > $years .= "  ($age)"; > } > } > else > $years = ""; > > return $years; > } > > function justYears( $row ) { > $years = ""; > if( $row['allow_living'] && $row['allow_private'] ) { > $deathdate = $row['deathdate'] ? $row['deathdate'] : $row['burialdate']; > $displaydeath = getDisplayYear($deathdate, $row['death']); > > $birthdate = $row['birthdate'] ? $row['birthdate'] : $row['altbirthdate']; > $displaybirth = getDisplayYear($birthdate, $row['birth']); > > if( $displaybirth || $displaydeath ) { > $years = "$displaybirth-$displaydeath"; > } > } > > return $years; > } > > function age($row) { > global $time_offset; > > // If person is living calculate todays age > $datum_1_tr = $row['birthdatetr']; > $datum_1 = $row['birthdate']; > $datum_alt_1_tr = $row['altbirthdatetr']; > $datum_alt_1 = $row['altbirthdate']; > $datum_2_tr = $row['deathdatetr']; > $datum_2 = $row['deathdate']; > $datum_alt_2_tr = $row['burialdatetr']; > $datum_alt_2 = $row['burialdate']; > $age = $sign = $sign1 = $sign2 = ''; > > if($row['living'] == "1" && !$datum_2 && !$datum_alt_2) { > // Today > $datum_2_tr = date ("Y-m-d", time() + ( 3600 * $time_offset ) ); > } > > // Only if one of the FROM and one of the TO dates are filled > if(($datum_1_tr != "0000-00-00" || $datum_alt_1_tr != "0000-00-00") && ($datum_2_tr != "0000-00-00" || $datum_alt_2_tr != "0000-00-00")) { > > // FROM date > // $datum1 = result datum1 > // $datum_1_tr = date numeric, Datum_1 = date alfanumeric > // $datum_alt_1_tr = alternative date numeric, $datum_alt_1 = alternative date alfanumeric > > if($datum_1_tr != "0000-00-00") { > $datum1 = $datum_1_tr; > if(substr($datum_1, 0, 3) == "BEF") > $sign1 = ">"; > else { > if (substr($datum_1, 0, 3) == "AFT") { > $sign1 = "<"; > $datum1 = substr_replace($datum1, "12-31", 5); > } > else { > if(substr($datum_1, 1, 4) == substr($datum1, 0, 4)) { > $sign1 = "~"; > $datum1 = substr_replace($datum1, "07-15", 5); > } > else { > if(substr($datum_1, 0, 2) < 1) { > $sign1 = "~"; > $datum1 = substr_replace($datum1, "15", 8); > } > } > } > } > } > else { > $datum1 = $datum_alt_1_tr; > $sign1 = "~"; > if(substr($datum_alt_1, 0, 3) == "BEF") > $sign1 = ">"; > else { > if(substr($datum_alt_1, 0, 3) == "AFT") { > $sign1 = "<"; > $datum1 = substr_replace($datum1, "12-31", 5); > } > else { > if(substr($datum_alt_1, 1, 4) == substr($datum1, 0, 4)) > $datum1 = substr_replace($datum1, "07-15", 5); > else { > if(substr($datum_alt_1, 0, 2) < 1) > $datum1 = substr_replace($datum1, "15", 8); > } > } > } > } > > // TO date > // $datum2 = result datum2 > // $datum_2_tr = date numeric, Datum_2 = datum alfanumeric > // $datum_alt_2_tr = alternative date numeric, $datum_alt_2 = alternative date alfanumeric > > if($datum_2_tr != "0000-00-00") { > $datum2 = $datum_2_tr; > if(substr($datum_2, 0, 3) == "BEF") > $sign2 = "<"; > else { > if(substr($datum_2, 0, 3) == "AFT") { > $sign2 = ">"; > $datum2 = substr_replace($datum2, "12-31", 5); > } > else { > if(substr($datum_2, 1, 4) == substr($datum2, 0, 4)) > $datum2 = substr_replace($datum2, "07-15", 5); > else { > if(substr($datum2, 8, 2) < 1) > $datum2 = substr_replace($datum2, "15", 8); > } > } > } > } > else { > $datum2 = $datum_alt_2_tr; > $sign2 = "~"; > if(substr($datum_alt_2, 0, 3) == "BEF") > $sign2 = "<"; > else { > if(substr($datum_alt_2, 0, 3) == "AFT") { > $sign2 = ">"; > $datum2 = substr_replace($datum2, "12-31", 5); > } > else { > if(substr($datum_alt_2, 1, 4) == substr($datum2, 0, 4)) > $datum2 = substr_replace($datum2, "07-15", 5); > else { > if(substr($datum_alt_2, 0, 2) < 1) > $datum2 = substr_replace($datum2, "15", 8); > } > } > } > } > > // age = date2 - date1 > > $datum1 = substr($datum1, 0, 4) . substr($datum1, 5, 2) . substr($datum1, 8, 2); > $datum2 = substr($datum2, 0, 4) . substr($datum2, 5, 2) . substr($datum2, 8, 2); > $age = $datum2 - $datum1; > > // format age > > if($age < 0) > $age = ""; > else { > if($age >= 0 && $age < 10000) > $age = "0 "; > else { > if($age > 9999 && $age < 100000) > $age = substr($age, 0, 1); > else { > if($age > 99999 && $age < 1000000) > $age = substr($age, 0, 2); > else { > if($age > 999999) > $age = substr($age, 0, 3); > } > } > } > } > > // format sign > if ((($sign1 == "<") || ($sign1 == ">")) && (($sign2 == "<") || ($sign2 == ">"))) > $sign = "~"; > else { > if (($sign1 == "~") || ($sign2 == "~")) > $sign = "~"; > else { > if ($sign1 && $sign1 <> " ") $sign = $sign1; > if ($sign2 && $sign2 <> " ") $sign = $sign2; > } > } > > if ($age && $sign <> "") > $age = $sign . " " . $age; > > } > > if ($age <> "") { > global $text; > $age .= $age != 1 ? " {$text['years']}" : " {$text['oneyear']}"; > } > > return $age; > } > > function showSmallPhoto( $persfamID, $alttext, $rights, $height, $type=false, $gender="", $rowtree="" ) { > global $rootpath, $photopath, $documentpath, $headstonepath, $historypath, $mediapath, $mediatypes_assoc; > global $photosext, $tree, $medialinks_table, $media_table, $text, $cms, $admtext, $tngconfig, $allow_private; > > $photo = ""; > $photocheck = ""; > $prefix = $suffix = ""; > if(!$rowtree) $rowtree = $tree; > > $query = "SELECT $media_table.mediaID, medialinkID, alwayson, private, thumbpath, mediatypeID, usecollfolder, newwindow, $media_table.gedcom FROM ($media_table, $medialinks_table) > WHERE personID = \"$persfamID\" AND $medialinks_table.gedcom = \"$rowtree\" AND $media_table.mediaID = $medialinks_table.mediaID AND defphoto = '1'"; > $result = tng_query($query); > $row = tng_fetch_assoc( $result ); > > if(!empty($row['thumbpath'])) { > $targettext = $row['newwindow'] ? " target=\"blank\"" : ""; > > if( $row['alwayson'] || (($rights || checkLivingLinks($row['mediaID'])) && (!$row['private'] || $allow_private))) { > $treestr = $tngconfig['mediatrees'] && $row['gedcom'] ? $row['gedcom'] . "/" : ""; > $mediatypeID = $row['mediatypeID']; > $usefolder = $row['usecollfolder'] ? $mediatypes_assoc[$mediatypeID] : $mediapath; > $photocheck = "$usefolder/$treestr" . $row['thumbpath']; > $photoref = $cms['tngpath'] . "$usefolder/$treestr" . str_replace("%2F","/",rawurlencode( $row['thumbpath'] )); > if($type) > $prefix = ""; > else { > $showmedia_url = getURL( "showmedia", 1 ); > $prefix = ""; > } > $suffix = ""; > } > } > elseif($rights) { > $photoref = $photocheck = $rowtree ? "$photopath/$rowtree.$persfamID.$photosext" : "$photopath/$persfamID.$photosext"; > } > > $gotfile = $photocheck ? file_exists( "$rootpath$photocheck" ) : false; > if(!$gotfile) { > if($type) { > $query = "SELECT medialinkID FROM ($media_table, $medialinks_table) > WHERE personID = \"$persfamID\" AND $medialinks_table.gedcom = \"$rowtree\" AND $media_table.mediaID = $medialinks_table.mediaID AND mediatypeID = \"photos\" AND thumbpath != \"\""; > $result2 = tng_query($query); > $numphotos = tng_num_rows($result2); > tng_free_result($result2); > if($numphotos) { > //if photos exist, show box with link to sort page where they can pick a default > $photo = "{$admtext['choosedef']}"; > } > } > elseif( $gender && !empty($tngconfig['usedefthumbs']) ) { > if($gender == "M") { > $photocheck = "img/male.jpg"; > } > elseif ($gender == "F") { > $photocheck = "img/female.jpg"; > } > if($photocheck) { > $photoref = $cms['tngpath'] . $photocheck; > $gotfile = file_exists( "$rootpath$photocheck" ); > } > } > } > if( $gotfile ) { > $border = $height ? 0 : 1; > $align = $height ? "" : " style=\"float:left;\""; > $photoinfo = @GetImageSize( "$rootpath$photocheck" ); > $photohtouse = $height ? $height : 100; > if( $photoinfo[1] <= $photohtouse ) { > $photohtouse = $photoinfo[1]; > $photowtouse = $photoinfo[0]; > } > else > $photowtouse = intval( $photohtouse * $photoinfo[0] / $photoinfo[1] ) ; > $photo = "$prefix\""$suffix"; > } > tng_free_result( $result ); > > return $photo; > } > > function placeImage($place) { > global $placesearch_url, $cms; > > return "\"\""; > } > > function checkMaintenanceMode($area){ > global $tngconfig; > > if(strpos($_SERVER['SCRIPT_NAME'],"/suggest.php") === FALSE && strpos($_SERVER['SCRIPT_NAME'],"admin") === FALSE && isset($tngconfig['maint']) && $tngconfig['maint'] > && (empty($_SESSION['allow_admin']) || !empty($_SESSION['assignedtree'])) && strpos($_SERVER['SCRIPT_NAME'],"/index.") === FALSE) { > $maint_url = $area ? "adminmaint.php" : getURL("maint",0); > header("Location:$maint_url"); > exit; > } > } > > function cleanIt($string) { > global $session_charset; > $string = @htmlspecialchars(preg_replace("/\n/"," ",$string), ENT_QUOTES, $session_charset); > $string = preg_replace("/\"/", """,$string); > $string = preg_replace("/ $string = preg_replace("/>/", ">",$string); > $string = preg_replace("/=/", "",$string); > $string = preg_replace("/\t/", " ",$string); > $string = str_replace("`","`",$string); > $string = tng_real_escape_string($string); > > return $string; > } > > function cleanItLite($string) { > global $session_charset; > $string = preg_replace("/\"/", """,$string); > $string = preg_replace("/ $string = preg_replace("/>/", ">",$string); > $string = preg_replace("/=/", "",$string); > $string = preg_replace("/\t/", " ",$string); > $string = str_replace("`","`",$string); > > return $string; > } > > function filterString($string) { > $string = strip_tags($string); > $string = tng_real_escape_string($string); > > return $string; > } > > > function truncateIt($string,$length) { > global $notrunc; > > if($length > 0 && !$notrunc && strlen($string) > $length) { > $truncated = substr(strip_tags($string),0,$length); > $truncated = substr($truncated,0,strrpos($truncated,' ')) . '…'; > } > else > $truncated = $string; > return $truncated; > } > > function tng_strtoupper($string) { > global $session_charset; > > $ucharset = strtoupper($session_charset); > $enc = function_exists('mb_detect_encoding') ? @mb_detect_encoding($string) : ""; > if($enc && strtoupper($enc) == "UTF-8" && $ucharset == "UTF-8") > $string = mb_strtoupper($string, "UTF-8"); > else > $string = strtoupper($string); > > return $string; > } > > function tng_strtolower($string) { > global $session_charset; > > $ucharset = strtoupper($session_charset); > $enc = function_exists('mb_detect_encoding') ? @mb_detect_encoding($string) : ""; > if($enc && strtoupper($enc) == "UTF-8" && $ucharset == "UTF-8") > $string = mb_strtolower($string, "UTF-8"); > else > $string = strtolower($string); > > return $string; > } > > function tng_utf8_decode($text) { > global $session_charset; > > $ucharset = strtoupper($session_charset); > if($ucharset == "ISO-8859-1") { > $text = mb_convert_encoding( $text, 'ISO-8859-1', 'UTF-8' ); > } > elseif($ucharset == "ISO-8859-2") { > $text = utf82iso88592($text); > } > return $text; > } > > function utf82iso88592_chris($text) { > if (function_exists('mb_convert_encoding')) > return mb_convert_encoding ($text,'ISO-8859-2','UTF-8'); > return str_replace(array("\xC4\x85", "\xC4\x84","\xC4\x87","\xC4\x86","\xC4\x99","\xC4\x98","\xC5\x82","\xC5\x81", > "\xC3\xB3","\xC3\x93","\xC5\x9B","\xC5\x9A","\xC5\xBC","\xC5\xBB","\xC5\xBA","\xC5\xB9","\xc5\x84","\xc5\x83"), > array("\xB1","\xA1","\xE6","\xC6","\xEA","\xCA","\xB3","\xA3","\xF3","\xD3","\xB6","\xA6","\xBF","\xAF","\xBC","\xAC","\xF1","\xD1"), $text > ); > } > > function utf82iso88592($text) { > $text = str_replace("\xC4\x85", '±', $text); > $text = str_replace("\xC4\x84", '¡', $text); > $text = str_replace("\xC4\x87", 'æ', $text); > $text = str_replace("\xC4\x86", 'Æ', $text); > $text = str_replace("\xC4\x99", 'ê', $text); > $text = str_replace("\xC4\x98", 'Ê', $text); > $text = str_replace("\xC5\x82", '³', $text); > $text = str_replace("\xC5\x81", '£', $text); > $text = str_replace("\xC3\xB3", 'ó', $text); > $text = str_replace("\xC3\x93", 'Ó', $text); > $text = str_replace("\xC5\x9B", '¶', $text); > $text = str_replace("\xC5\x9A", '¦', $text); > $text = str_replace("\xC5\xBC", '¿', $text); > $text = str_replace("\xC5\xBB", '¯', $text); > $text = str_replace("\xC5\xBA", '¼', $text); > $text = str_replace("\xC5\xB9", '¬', $text); > $text = str_replace("\xc5\x84", 'ñ', $text); > $text = str_replace("\xc5\x83", 'Ñ', $text); > > return $text; > } > > function getAllTextPath() { > global $rootpath, $mylanguage, $language, $languages_path, $endrootpath, $cms, $text, $admtext, $dates, $session_charset; > > $rootpath = trim($rootpath); > if($rootpath && strpos($rootpath,"http") !== 0 ) { > $thislanguage = trim($mylanguage ? $mylanguage : $languages_path . $language); > if(strpos($thislanguage,"http") !== 0) { > if($cms['support']) > @include_once($rootpath . $cms['tngpath'] . "$thislanguage/alltext.php"); > else > @include_once($rootpath . $endrootpath . "$thislanguage/alltext.php"); > } > } > } > > function attachPrefixSuffix($entityID, $type) { > global $tngconfig; > > switch($type) { > case "I": > $prefix = $tngconfig['personprefix']; > $suffix = $tngconfig['personsuffix']; > break; > case "F": > $prefix = $tngconfig['familyprefix']; > $suffix = $tngconfig['familysuffix']; > break; > case "S": > $prefix = $tngconfig['sourceprefix']; > $suffix = $tngconfig['sourcesuffix']; > break; > case "R": > $prefix = $tngconfig['repoprefix']; > $suffix = $tngconfig['reposuffix']; > break; > default: > $prefix = $suffix = ""; > break; > } > $entityID = tng_utf8_decode(trim($entityID)); > $prefixlen = strlen($prefix); > $suffixlen = strlen($suffix); > $entity_prefix = substr($entityID,0,$prefixlen); > $entity_suffix = substr($entityID,-1 * $suffixlen); > if($prefix && $entity_prefix != $prefix && is_numeric($entity_prefix)) $entityID = $prefix . $entityID; > if($suffix && $entity_suffix != $suffix && is_numeric($entity_suffix)) $entityID = $entityID . $suffix; > > return $entityID; > } > > function formatInternalDate($truedate) { > if($truedate == "0000-00-00") > return ""; > $parts = explode("-",$truedate); > $newdate = ""; > $numparts = 0; > foreach($parts as $part) { > if($part != "0000" && $part != "00") > $numparts++; > elseif($part == "00") > $part = "01"; > if($newdate) > $newdate .= "-"; > $newdate .= $part; > } > > if($numparts == 1) > $formatted = $parts[0]; > else { > $newdate = date_create($newdate); > if($numparts == 2) > $formatted = date_format($newdate,"M Y"); > else > $formatted = date_format($newdate,"j M Y"); > } > > return $formatted; > } > > function isConnected() { > global $tngconfig; > > if(!empty($tngconfig['offline'])) > return false; > else > return true; > > // use 80 for http or 443 for https protocol > //$connected = @fsockopen("www.google.com", 80); > //if ($connected){ > // fclose($connected); > // return true; > //} > //else > // return false; > } > > function getImageTags($mediaID) { > global $image_tags_table, $people_table, $families_table, $sources_table, $repositories_table, $places_table; > > $query = "SELECT i.ID, rtop, rleft, rwidth, rheight, linktype, label, i.gedcom, persfamID, people.living as living, people.private as private, people.branch as branch, > familyID, husband, wife, people.lastname as lastname, people.lnprefix as lnprefix, people.firstname as firstname, > people.prefix as prefix, people.suffix as suffix, nameorder, people.title as title, place, > s.title as stitle, s.sourceID, r.repoID, reponame, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, burialdate > FROM $image_tags_table AS i > LEFT JOIN $people_table AS people ON i.persfamID = people.personID AND i.gedcom = people.gedcom > LEFT JOIN $families_table AS f ON i.persfamID = f.familyID AND i.gedcom = f.gedcom > LEFT JOIN $sources_table AS s ON i.persfamID = s.sourceID AND i.gedcom = s.gedcom > LEFT JOIN $repositories_table AS r ON i.persfamID = r.repoID AND i.gedcom = r.gedcom > LEFT JOIN $places_table AS places ON i.persfamID = places.ID > WHERE mediaID = \"$mediaID\""; > > return tng_query($query); > } > > function getImageTagInfo($tag) { > global $admtext, $citations_table, $sources_table, $tngconfig; > > switch($tag['linktype']) { > case "I": > $righttree = checktree($tag['gedcom']); > $rightbranch = $righttree ? checkbranch($tag['branch']) : false; > $rights = determineLivingPrivateRights($tag, $righttree, $rightbranch); > $tag['allow_living'] = $rights['living']; > $tag['allow_private'] = $rights['private']; > $label = getName($tag); > $getperson_url = getURL( "getperson", 1 ); > $media_link_url = "{$getperson_url}tree={$tag['gedcom']}&personID={$tag['persfamID']}"; > break; > case "F": > $label = getFamilyName( $tag ); > $familygroup_url = getURL( "familygroup", 1 ); > $media_link_url = "{$familygroup_url}familyID={$tag['persfamID']}&tree={$tag['gedcom']}"; > break; > case "S": > $label = $tag['stitle'] ? $tag['stitle'] : $tag['sourceID']; > $showsource_url = getURL( "showsource", 1 ); > $media_link_url = "{$showsource_url}sourceID={$tag['persfamID']}&tree={$tag['gedcom']}"; > break; > case "R": > $label = $tag['reponame'] ? $tag['reponame'] : $tag['repoID']; > $showrepo_url = getURL( "showrepo", 1 ); > $media_link_url = "{$showrepo_url}repoID={$tag['persfamID']}&tree={$tag['gedcom']}"; > break; > case "C": > $query = "SELECT title, c.sourceID, persfamID, page FROM $citations_table as c, $sources_table as s > WHERE citationID = \"{$tag['persfamID']}\" AND c.gedcom = s.gedcom AND c.sourceID = s.sourceID"; > $result= @tng_query($query) or die ($admtext['cannotexecutequery'] . ": $query"); > $row = tng_fetch_assoc( $result ); > $label = $row['title'] . " ({$row['persfamID']})"; > $showsource_url = getURL( "showsource", 1 ); > $media_link_url = "{$showsource_url}sourceID={$row['sourceID']}&tree={$tag['gedcom']}"; > break; > case "L": > $label = $tag['place']; > $treestr = $tngconfig['places1tree'] ? "" : "&tree={$tag['gedcom']}"; > $placesearch_url = getURL( "placesearch", 1 ); > $media_link_url = "{$placesearch_url}psearch={$tag['place']}$treestr"; > break; > case "U": > $label = $tag['label']; > $media_link_url = strpos($tag['persfamID'], "label-") === 0 ? "" : $tag['persfamID']; > break; > default: > $label = "error"; > $media_link_url = ""; > break; > } > > return [$label, $media_link_url]; > } diff -r TNG/googleearthbylatlong.php TNG1403/googleearthbylatlong.php 21c21 < header('Content-Disposition: inline; filename="tng.kml"'); --- > header('Content-Disposition: inline; filename="' . $name . '.kml"'); diff -r TNG/googlemapdrawthemap.php TNG1403/googlemapdrawthemap.php 11c11 < $searchstring = $row['place'] ? $row['place'] : $admtext['searchstring']; --- > $searchstring = !empty($row['place']) ? $row['place'] : $admtext['searchstring']; 15c15 < if(!$row['place']) --- > if( empty($row['place']) ) 22c22,23 < echo "
    {$admtext['difficultmap']} | {$admtext['maphelp']}
    \n"; --- > $glang = isset($text['glang']) ? $text['glang'] : "en"; > echo "
    {$admtext['difficultmap']} | {$admtext['maphelp']}
    \n"; diff -r TNG/googlemaplib2.php TNG1403/googlemaplib2.php 31d30 < //var placelevel = ; 59c58 < if(jQuery('#location').val() && jQuery('#latbox').val()=="" && jQuery('#lonbox').val()=="") --- > if(jQuery('#location').val() && jQuery('#placelevel').val()!='-1' && jQuery('#latbox').val()=="" && jQuery('#lonbox').val()=="") diff -r TNG/googlemaplib.php TNG1403/googlemaplib.php 25c25 < while (list($key, $val) = each($locations2map)) { --- > foreach($locations2map as $key => $val) { 69c69 < while(list($key, $val) = each($locations2map)) { --- > foreach($locations2map as $key => $val) { 77c77 < $uniqueplace = $val['place'] . " " . $lat . $long; --- > $uniqueplace = isset($val['place']) ? $val['place'] : "" . " " . $lat . $long; diff -r TNG/headstones.php TNG1403/headstones.php 7c7 < $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] : ""; --- > $mapkeystr = $map['key'] && $map['key'] != "1" ? "&key=" . $map['key'] . "&callback=initMap" : ""; 19a20 > if(!isset($flags['scripting'])) $flags['scripting'] = ""; 24,36c25,39 < if(!isset($max_cemeteries)) $max_cemeteries = 5; < < $city = preg_replace("/[<>{};!=]/", '', $city); < $county = preg_replace("/[<>{};!=]/", '', $county); < $state = preg_replace("/[<>{};!=]/", '', $state); < $country = preg_replace("/[<>{};!=]/", '', $country); < < if (get_magic_quotes_gpc() == 0) { < $city = addslashes($city); < $county = addslashes($county); < $state = addslashes($state); < $country = addslashes($country); < } --- > $cemnewoffset = 0; > $cemoffsetplus = 0; > if(!isset($max_cemeteries)) $max_cemeteries = 100; > $mcharsetstr = "&oe=$session_charset"; > > $city = isset($city) ? preg_replace("/[<>{};!=]/", '', $city) : ""; > $county = isset($county) ? preg_replace("/[<>{};!=]/", '', $county) : ""; > $state = isset($state) ? preg_replace("/[<>{};!=]/", '', $state) : ""; > $country = isset($country) ? preg_replace("/[<>{};!=]/", '', $country) : ""; > > $city = addslashes($city); > $county = addslashes($county); > $state = addslashes($state); > $country = addslashes($country); > if(!isset($cemeteryID)) $cemeteryID = ""; 41c44 < if( $cemoffset ) { --- > if(!empty($cemoffset)) { 68a72 > $totrows = 0; 92c96 < if(!$tngpage && !$cemeteryID && $cemresult && tng_num_rows($cemresult) == 1) { --- > if(empty($tngpage) && !$cemeteryID && $cemresult && tng_num_rows($cemresult) == 1) { 96a101,103 > } else { > // Initialize the cemeteryID for use in the link on line 118. > $cemetery['cemeteryID'] = ""; 99c106 < if( $offset ) { --- > if(!empty($offset)) { 152c159 < $query = "SELECT DISTINCT $media_table.mediaID, description, notes, path, thumbpath, status, plot, showmap, usecollfolder, form, mediatypeID, abspath, newwindow --- > $query = "SELECT DISTINCT $media_table.mediaID, description, notes, path, thumbpath, status, plot, showmap, usecollfolder, form, mediatypeID, abspath, newwindow, latitude, longitude 157a165 > $cemetery['cemeteryID'] = ""; 197,199c205,207 < $lat = $cemetery['latitude']; < $long = $cemetery['longitude']; < $zoom = $cemetery['zoom'] ? $cemetery['zoom'] : 10; --- > $lat = isset($cemetery['latitude']) ? $cemetery['latitude'] : ""; > $long = isset($cemetery['longitude']) ? $cemetery['longitude'] : ""; > $zoom = isset($cemetery['zoom']) ? $cemetery['zoom'] : 10; 204c212 < $cemeteryplace = "{$cemetery['city']}, {$cemetery['county']}, {$cemetery['state']}, {$cemetery['country']}"; --- > $cemeteryplace = "{$cemetery['cemname']}, {$cemetery['city']}, {$cemetery['county']}, {$cemetery['state']}, {$cemetery['country']}"; 209c217 < $codednotes .= "

    {$text['getdirections']}{$text['directionsto']} $localballooncemeteryname"; --- > $codednotes .= "

    {$text['getdirections']}{$text['directionsto']} $localballooncemeteryname"; 212c220 < $body .= "\"\""; --- > $body .= "\"\""; 229c237 < $header = "
    \n"; --- > $header = "
    \n"; 231c239 < $header = "
    "; --- > $header = "
    "; 298c306 < $hs['allow_living'] = 1; --- > $hs['allow_living'] = $hs['allow_private'] = 1; 335c343 < echo "
    \n"; --- > echo "
    \n"; 337c345 < if($toppagenav) --- > if(!empty($toppagenav)) diff -r TNG/heatmap.php TNG1403/heatmap.php 12,13c12,13 < $heatmap = $mtype == "h" || !isset($mtype); < $markermap = $mtype == "m" || !isset($mtype); --- > $heatmap = !isset($mtype) || $mtype == "h" ; > $markermap = !isset($mtype) || $mtype == "m"; 15c15,16 < tng_query_noerror(" SET OPTION SQL_BIG_SELECTS = 1 " ); --- > $query = "SET SQL_BIG_SELECTS=1"; > $result = tng_query($query); 53,54c54,55 < if($psearch) { < $query = "SELECT place, latitude, longitude, notes FROM $places_table WHERE place LIKE \"%$psearch%\" AND latitude != \"\" AND longitude != \"\""; --- > if( !empty($psearch) ) { > $query = "SELECT place, latitude, longitude, notes FROM $places_table WHERE place REGEXP \"[[:<:]]{$psearch}[[:>:]]\" AND latitude != \"\" AND longitude != \"\""; 62c63 < elseif($firstchar) { --- > elseif( !empty($firstchar) ) { 71,82c72,83 < elseif($mylastname || $myfirstname || $mypersonid || $mybirthplace || $mybirthyear || $myaltbirthplace || $mydeathplace || $mydeathyear || $myburialplace || $myburialyear || $mygender || $branch) { < $mylastname = trim(stripslashes($mylastname)); < $myfirstname = trim(stripslashes($myfirstname)); < $mypersonid = trim(stripslashes($mypersonid)); < $mybirthplace = trim(stripslashes($mybirthplace)); < $mybirthyear = trim(stripslashes($mybirthyear)); < $myaltbirthplace = trim(stripslashes($myaltbirthplace)); < $myaltbirthyear = trim(stripslashes($myaltbirthyear)); < $mydeathplace = trim(stripslashes($mydeathplace)); < $mydeathyear = trim(stripslashes($mydeathyear)); < $myburialplace = trim(stripslashes($myburialplace)); < $myburialyear = trim(stripslashes($myburialyear)); --- > elseif( !empty($mylastname) || !empty($myfirstname) || !empty($mypersonid) || !empty($mybirthplace) || !empty($mybirthyear) || !empty($myaltbirthplace) || !empty($mydeathplace) || !empty($mydeathyear) || !empty($myburialplace) || !empty($myburialyear) || !empty($mygender) || !empty($branch) ) { > $mylastname = !empty($mylastname) ? trim(stripslashes($mylastname)) : ""; > $myfirstname = !empty($myfirstname) ? trim(stripslashes($myfirstname)) : ""; > $mypersonid = !empty($mypersonid) ? trim(stripslashes($mypersonid)) : ""; > $mybirthplace = !empty($mybirthplace) ? trim(stripslashes($mybirthplace)) : ""; > $mybirthyear = !empty($mybirthyear) ? trim(stripslashes($mybirthyear)) : ""; > $myaltbirthplace = !empty($myaltbirthplace) ? trim(stripslashes($myaltbirthplace)) : ""; > $myaltbirthyear = !empty($myaltbirthyear) ? trim(stripslashes($myaltbirthyear)) : ""; > $mydeathplace = !empty($mydeathplace) ? trim(stripslashes($mydeathplace)) : ""; > $mydeathyear = !empty($mydeathyear) ? trim(stripslashes($mydeathyear)) : ""; > $myburialplace = !empty($myburialplace) ? trim(stripslashes($myburialplace)) : ""; > $myburialyear = !empty($myburialyear) ? trim(stripslashes($myburialyear)) : ""; 85c86 < $currargs = $orderloc > 0 ? substr($_SERVER['QUERY_STRING'],0,$orderloc) : $_SERVER['QUERY_STRING']; --- > $currargs = isset($orderloc) && $orderloc > 0 ? substr($_SERVER['QUERY_STRING'],0,$orderloc) : $_SERVER['QUERY_STRING']; 91c92 < if( $mylastname || $lnqualify == "exists" || $lnqualify == "dnexist" ) { --- > if( !empty($mylastname) || (isset($lnqualify) && ($lnqualify == "exists" || $lnqualify == "dnexist")) ) { 98c99 < if( $myfirstname || $fnqualify == "exists" || $fnqualify == "dnexist" ) { --- > if( !empty($myfirstname) || (isset($fnqualify) && ($fnqualify == "exists" || $fnqualify == "dnexist")) ) { 103c104 < if($idqualify == "equals" && is_numeric($mypersonid)) $mypersonid = $personprefix . $mypersonid . $personsuffix; --- > if($idqualify == "equals" && is_numeric($mypersonid)) $mypersonid = $tngconfig['personprefix'] . $mypersonid . $tngconfig['personsuffix']; 106c107 < if( $mytitle || $tqualify == "exists" || $tqualify == "dnexist" ) { --- > if( !empty($mytitle) || (isset($tqualify) && ($tqualify == "exists" || $tqualify == "dnexist")) ) { 109c110 < if( $myprefix || $pfqualify == "exists" || $pfqualify == "dnexist" ) { --- > if( !empty($myprefix) || (isset($pfqualify) && ($pfqualify == "exists" || $pfqualify == "dnexist")) ) { 112c113 < if( $mysuffix || $sfqualify == "exists" || $sfqualify == "dnexist" ) { --- > if( !empty($mysuffix) || (isset($sfqualify) && ($sfqualify == "exists" || $sfqualify == "dnexist")) ) { 115c116 < if( $mynickname || $nnqualify == "exists" || $nnqualify == "dnexist" ) { --- > if( !empty($mynickname) || (isset($nnqualify) && ($nnqualify == "exists" || $nnqualify == "dnexist")) ) { 118c119 < if( $mybirthplace || $bpqualify == "exists" || $bpqualify == "dnexist" ) { --- > if( !empty($mybirthplace) || (isset($bpqualify) && ($bpqualify == "exists" || $bpqualify == "dnexist")) ) { 121c122 < if( $mybirthyear || $byqualify == "exists" || $byqualify == "dnexist" ) { --- > if( !empty($mybirthyear) || (isset($byqualify) && ($byqualify == "exists" || $byqualify == "dnexist")) ) { 124c125 < if( $myaltbirthplace || $cpqualify == "exists" || $cpqualify == "dnexist" ) { --- > if( !empty($myaltbirthplace) || (isset($cpqualify) && ($cpqualify == "exists" || $cpqualify == "dnexist")) ) { 127c128 < if( $myaltbirthyear || $cyqualify == "exists" || $cyqualify == "dnexist" ) { --- > if( !empty($myaltbirthyear) || (isset($cyqualify) && ($cyqualify == "exists" || $cyqualify == "dnexist")) ) { 130c131 < if( $mydeathplace || $dpqualify == "exists" || $dpqualify == "dnexist" ) { --- > if( !empty($mydeathplace) || (isset($dpqualify) && ($dpqualify == "exists" || $dpqualify == "dnexist")) ) { 133c134 < if( $mydeathyear || $dyqualify == "exists" || $dyqualify == "dnexist" ) { --- > if( !empty($mydeathyear) || (isset($dyqualify) && ($dyqualify == "exists" || $dyqualify == "dnexist")) ) { 136c137 < if( $myburialplace || $brpqualify == "exists" || $brpqualify == "dnexist" ) { --- > if( !empty($myburialplace) || (isset($brpqualify) && ($brpqualify == "exists" || $brpqualify == "dnexist")) ) { 139c140 < if( $myburialyear || $bryqualify == "exists" || $bryqualify == "dnexist" ) { --- > if( !empty($myburialyear) || (isset($bryqualify) && ($bryqualify == "exists" || $bryqualify == "dnexist")) ) { 142c143 < if( $mygender ) { --- > if( !empty($mygender) ) { 175c176 < $gotInput = $mytitle || $myprefix || $mysuffix || $mynickname || $mybirthplace || $mydeathplace || $mybirthyear || $mydeathyear || $ecount; --- > $gotInput = !empty($mytitle) || !empty($myprefix) || !empty($mysuffix) || !empty($mynickname) || !empty($mybirthplace) || !empty($mydeathplace) || !empty($mybirthyear) || !empty($mydeathyear) || !empty($ecount); 178c179 < if($more) { --- > if( !empty($more) ) { 197c198 < IF(birthplace, birthplace, altbirthplace) as birthp, birthdate, altbirthdate, p.gedcom "; --- > IF(birthplace, birthplace, altbirthplace) as birthp, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, p.gedcom "; 224c225,226 < if( $map['key'] && $isConnected) --- > if( $map['key'] && $isConnected) { > if( !isset($flags['scripting']) ) $flags['scripting'] = ""; 225a228 > } 231a235 > if( !isset($querystring) ) $querystring = ""; 258c262 < $person->name = "" . getName($row) . ""; --- > $person->name = "" . getName($row) . ""; 277a282,283 > $rawbirthplace = !empty($person->birthplace) ? $person->birthplace : ""; > $rawbirthdate = !empty($person->birthdate) ? $person->birthdate : ""; 280,282c286,288 < $person->name = utf8_encode($person->name); < $birthplace = utf8_encode($person->birthplace); < $birthdate = utf8_encode($person->birthdate); --- > $person->name = mb_convert_encoding($person->name, 'UTF-8', 'ISO-8859-1'); > $birthplace = mb_convert_encoding($rawbirthplace, 'UTF-8', 'ISO-8859-1'); > $birthdate = mb_convert_encoding($rawbirthdate, 'UTF-8', 'ISO-8859-1'); 288c294 < $birthplace = json_encode(trim($person->birthplace)); --- > $birthplace = json_encode(trim($rawbirthplace)); 291c297 < $birthdate = json_encode(trim($person->birthdate)); --- > $birthdate = json_encode(trim($rawbirthdate)); 302,305c308,311 < $thisplace = utf8_encode(trim($place->place)); < $notes = utf8_encode(trim($place->notes)); < $latitude = utf8_encode($place->latitude); < $longitude = utf8_encode($place->longitude); --- > $thisplace = mb_convert_encoding(trim($place->place), 'UTF-8', 'ISO-8859-1'); > $notes = mb_convert_encoding(trim($place->notes), 'UTF-8', 'ISO-8859-1'); > $latitude = mb_convert_encoding($place->latitude, 'UTF-8', 'ISO-8859-1'); > $longitude = mb_convert_encoding($place->longitude, 'UTF-8', 'ISO-8859-1'); 347c353 < var imageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png'; --- > var imageUrl = 'https://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png'; 368c374 < var imageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png'; --- > var imageUrl = 'https://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png'; 388c394 < imagePath: 'https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m' --- > imagePath: 'img/m' diff -r TNG/historytemplate.php TNG1403/historytemplate.php 15c15 < //1a: If you want to skip the login check when displaying this page, remote the comment marks from this line: --- > //1a: If you want to skip the login check when displaying this page, remove the comment marks from this line: 17a18 > $cms['tngpath'] = "../"; 40a42 > echo "

    $yourtitle


    \n"; 53c55 < http://tng.lythgoes.net/wiki/index.php?title=User_Pages_-_Getting_Started

    --- > https://tng.lythgoes.net/wiki/index.php?title=User_Pages_-_Getting_Started

    diff -r TNG/imageutils.php TNG1403/imageutils.php 36c36 < if($session_charset == "UTF-8") $dest = utf8_decode($dest); --- > //if($session_charset == "UTF-8") $dest = utf8_decode($dest); 92a93,97 > if( strtolower($destInfo['extension']) == "gif" || strtolower($destInfo['extension']) == "png" ) { > imagecolortransparent($destImage, imagecolorallocatealpha($destImage, 0, 0, 0, 127)); > imagealphablending($destImage, false); > imagesavealpha($destImage, true); > } 129,162c134 < if(function_exists('exif_read_data')) { < $exif = @exif_read_data($src); < if($exif !== false) { < //get the orientation < $ort = $exif['Orientation']; < < //determine what oreientation the image was taken at < switch($ort) { < case 2: // horizontal flip < tngImageFlip($destImage); < break; < case 3: // 180 rotate left < $destImage = imagerotate($destImage, 180, -1); < break; < case 4: // vertical flip < tngImageFlip($destImage); < break; < case 5: // vertical flip + 90 rotate right < tngImageFlip($destImage); < $destImage = imagerotate($destImage, -90, -1); < break; < case 6: // 90 rotate right < $destImage = imagerotate($destImage, -90, -1); < break; < case 7: // horizontal flip + 90 rotate right < tngImageFlip($destImage); < $destImage = imagerotate($destImage, -90, -1); < break; < case 8: // 90 rotate left < $destImage = imagerotate($destImage, 90, -1); < break; < } < } < } --- > $destImage = tngImageRotate($src, $destImage); 177a150,187 > function tngImageRotate($src, $destImage) { > if(function_exists('exif_read_data')) { > $exif = @exif_read_data($src); > if($exif !== false) { > //get the orientation > $ort = isset($exif['Orientation']) ? $exif['Orientation'] : ""; > > //determine what oreientation the image was taken at > switch($ort) { > case 2: // horizontal flip > tngImageFlip($destImage); > break; > case 3: // 180 rotate left > $destImage = imagerotate($destImage, 180, imagecolorallocatealpha($destImage, 0, 0, 0 , 127)); > break; > case 4: // vertical flip > tngImageFlip($destImage); > break; > case 5: // vertical flip + 90 rotate right > tngImageFlip($destImage); > $destImage = imagerotate($destImage, -90, imagecolorallocatealpha($destImage, 0, 0, 0 , 127)); > break; > case 6: // 90 rotate right > $destImage = imagerotate($destImage, -90, imagecolorallocatealpha($destImage, 0, 0, 0 , 127)); > break; > case 7: // horizontal flip + 90 rotate right > tngImageFlip($destImage); > $destImage = imagerotate($destImage, -90, imagecolorallocatealpha($destImage, 0, 0, 0 , 127)); > break; > case 8: // 90 rotate left > $destImage = imagerotate($destImage, 90, imagecolorallocatealpha($destImage, 0, 0, 0 , 127)); > break; > } > } > } > return $destImage; > } > Only in TNG1403/img: admin Only in TNG1403/img: admin_background.jpg Only in TNG1403/img: admin_banner1.jpg Only in TNG1403/img: admin_banner2.jpg Only in TNG1403/img: admin_banner3.jpg Only in TNG1403/img: admin_banner4.jpg Only in TNG1403/img: admin_banner5.jpg Binary files TNG/img/admin_icon_sprites.png and TNG1403/img/admin_icon_sprites.png differ Only in TNG1403/img: ArrowDownYellow.gif Only in TNG1403/img: arrowright2.gif Only in TNG1403/img: ArrowUpYellow.gif Only in TNG1403/img: backtotop.png Only in TNG1403/img: eye-slash2.png Only in TNG1403/img: eye-slash.webp Only in TNG1403/img: m1.png Only in TNG1403/img: m2.png Only in TNG1403/img: m3.png Only in TNG1403/img: m4.png Only in TNG1403/img: m5.png Only in TNG1403/img: public Only in TNG1403/img: pwdoff.png Only in TNG1403/img: pwdon.png Only in TNG1403/img: reportback1.jpg Only in TNG1403/img: tng_collapse_yellow.gif Only in TNG1403/img: tng_expand_yellow.gif Only in TNG1403/img: tnglogo.png Binary files TNG/img/tng_small_icon_sprites.gif and TNG1403/img/tng_small_icon_sprites.gif differ Only in TNG1403/img: zoomin.png Only in TNG1403/img: zoomout.png Only in TNG1403/img: zoomreset.png diff -r TNG/img_newwin.php TNG1403/img_newwin.php 21c21 < --- > 31c31 < "; 523d599 < if($imgrow['path']) echo "

    \n"; 524a601 > if(!empty($imgrow['path'])) echo "

    \n"; 531c608 < return "\n"; --- > return "\n"; 539c616 < $tabletext .= "
    $label" . insertLinks($fact) . "
    $label" . insertLinks($fact) . "
    \n"; --- > $tabletext .= "
    \n"; 559c636 < if( in_array($imgrow['form'],$imagetypes) ) --- > if( in_array($imgrow['form'],$imagetypes) && isset($size[0]) && isset($size[1]) ) 561c638,639 < $tabletext .= output_iptc_data( $info ); --- > if(isset($info)) > $tabletext .= output_iptc_data( $info ); 606c684 < if( $cemetery['maplink'] && file_exists( "$rootpath$headstonepath/" . $cemetery['maplink'] ) ) { --- > if( !empty($cemetery['maplink']) && file_exists("$rootpath$headstonepath/" . $cemetery['maplink']) ) { 629c707 < $hs['allow_living'] = 1; --- > $hs['allow_living'] = $hs['allow_private'] = 1; 649a728,760 > > function getRectangles($mediaID, $show_at_start = true) { > $result = getImageTags($mediaID); > > $rectangles = ""; > while( $row = tng_fetch_assoc($result) ) { > list($label, $media_link_url) = getImageTagInfo($row); > > if($show_at_start) { > $handlers = ""; > $more_style = ""; > } > else { > $more_style = "opacity:0;cursor:pointer"; > $handlers = "onmouseover=\"this.style.opacity = '1';\" onmouseout=\"this.style.opacity = toggle_off;\""; > if($media_link_url) $handlers .= " onclick=\"window.location.href='{$media_link_url}'\""; > } > $rectangles .= "
    \n"; > $label_top = $row['rheight'] + 1; > $overhang = 100 - $row['rwidth']; > if($overhang > 0) { > $side = -1 * round($overhang/2); > $stylestr = "left:{$side}px;right:{$side}px;"; > } > else > $stylestr = ""; > $rectangles .= "
    {$label}
    \n"; > $rectangles .= "
    \n"; > } > tng_free_result($result); > > return $rectangles; > } diff -r TNG/showmedia.php TNG1403/showmedia.php 27,30c27,32 < $mediaID = preg_replace("/[^0-9]/", '', $mediaID); < $medialinkID = preg_replace("/[^0-9]/", '', $medialinkID); < $albumlinkID = preg_replace("/[^0-9]/", '', $albumlinkID); < $cemeteryID = preg_replace("/[^0-9]/", '', $cemeteryID); --- > $mediaID = isset($mediaID) ? preg_replace("/[^0-9]/", '', $mediaID) : ""; > $medialinkID = isset($medialinkID) ? preg_replace("/[^0-9]/", '', $medialinkID) : ""; > $albumlinkID = isset($albumlinkID) ? preg_replace("/[^0-9]/", '', $albumlinkID) : ""; > $cemeteryID = isset($cemeteryID) ? preg_replace("/[^0-9]/", '', $cemeteryID) : ""; > $tngprint = isset($tngprint) ? $tngprint : ""; > $albumID = $eventID = $personID = ""; 101c103 < $query = "SELECT familyID, husband, wife, living, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"$personID\" AND gedcom = \"$tree\""; --- > $query = "SELECT familyID, husband, wife, living, private, marrdate, gedcom, branch FROM $families_table WHERE familyID = \"$personID\" AND gedcom = \"$tree\""; 123c125 < $disallowgedcreate = $row['disallowgedcreate']; --- > $disallowgedcreate = isset($row['disallowgedcreate']) ? $row['disallowgedcreate'] : false; 130a133,136 > if($imgrow['private'] && !$allow_private) { > $livinginfo['noneprivate'] = false; > $livinginfo['private'] = true; > } 135a142,161 > if(!$tngconfig['ssdisabled'] && !$tngprint && $numitems > 1) { > $sscontrols = "     » {$text['slidestart']}\n"; > } > else > $sscontrols = ""; > > $imgviewer = $tngconfig['imgviewer']; > > if($sitever != "mobile" && (!$imgviewer || in_array($imgrow['mediatypeID'],$mediatypes_like[$imgviewer]))) { > $rquery = "SELECT count(*) as rcount FROM $image_tags_table WHERE mediaID=\"$mediaID\""; > $rresult = @tng_query($rquery); > $rrow = tng_fetch_assoc($rresult); > $num_rects = $rrow['rcount']; > if($num_rects) > $sscontrols .= "     » {$text['toggletags']}\n"; > tng_free_result($rresult); > } > else > $num_rects = 0; > 139c165,166 < if( $noneliving || !$nonamesloc || $imgrow['alwayson'] ) { --- > //if( $noneliving || !$nonamesloc || $imgrow['alwayson'] ) { > if((($livinginfo['noneliving'] || !$nonames) && ($livinginfo['noneprivate'] || !$tngconfig['nnpriv'])) || $imgrow['alwayson']) { 142c169 < $mapnote = $info['gotmap'] ? "

    " . $text['mediamaptext'] . "

    \n" : ""; --- > $mapnote = $info['gotmap'] || $num_rects ? "

    " . $text['mediamaptext'] . "

    \n" : ""; 149c176 < $mediatypeIDstr = $text[$mediatypeID] ? $text[$mediatypeID] : $mediatypes_display[$mediatypeID]; --- > $mediatypeIDstr = !empty($text[$mediatypeID]) ? $text[$mediatypeID] : $mediatypes_display[$mediatypeID]; 164,165c191 < $flags['tabs'] = $tngconfig['tabs']; < $flags['scripting'] .= "\n"; --- > $flags['css'] = "\n"; 166a193 > if( !isset($flags['scripting']) ) $flags['scripting'] = ""; 168c195 < $flags['scripting'] .= "\n"; --- > $flags['scripting'] .= "//]]>\n\n"; 171a199,204 > > $imageFolder = $imgrow['usecollfolder'] ? $mediatypes_assoc[$mediatypeID] : $mediapath; > $fixImagePath = str_replace(' ','%20',$imgrow['path']); > $fbOGimage = "\n"; > $pageURL = $showmedia_url . "mediaID=" . $mediaID; > 174d206 < $imgviewer = $tngconfig['imgviewer']; 180,186c212 < $adjheight = $size['1'] - 1; < < if(!$tngconfig['ssdisabled'] && !$tngprint && $numitems > 1) { < $sscontrols = "     » {$text['slidestart']}\n"; < } < else < $sscontrols = ""; --- > $adjheight = is_array($size) ? $size['1'] - 1 : -1; 188a215 > $years = ""; 210a238 > if(!isset($row['sex'])) $row['sex'] = ""; 224c252 < $titlemsg = $text[$mediatypeID] ? $text[$mediatypeID] : $mediatypes_display[$mediatypeID]; --- > $titlemsg = !empty($text[$mediatypeID]) ? $text[$mediatypeID] : $mediatypes_display[$mediatypeID]; 250a279,280 > > echo "

    $pagenav$sscontrols

    "; 254,255d283 < echo "

    $pagenav$sscontrols

    "; < 261d288 < echo "

    "; 290a318 > if( !isset($ioffset) ) $ioffset = ""; 305c333 <
    --- >
    310c338,356 < if(!$tngprint && !$tngconfig['ssdisabled']) { --- > if(!$tngprint) { > $flags['more'] = " < < < > > > \n"; --- > $flags['scripting'] .= "\n"; 378c379 < $flags['scripting'] .= "\n"; --- > $flags['css'] = "\n"; 473c474 < echo "
    {$timeentry['name']}
    \n"; --- > echo "
    {$timeentry['name']}
    \n"; 476,477c477,478 < echo "
    \n"; < echo "
    \n"; --- > echo "
    \n"; > echo "
    \n"; 533,538c534,541 < < < < < < --- >
       
    > > > > > > > 554c557 < \n"; < */ < ?> < < <
    < <
    < < < < < < < // based on the code supplied by the reCAPTCHA web site > // with modifications by Roger Moffat and Bryan S. Larson to work with TNG > // Version: No Captcha reCAPTCHA v10.1.0.3 last modified 23 Feb 2015 by Bryan S. Larson > // This update adds a feature to 'remember' if a visitor has successfully completed a reCAPTCHA challenge, no further challenges will be presented to that visitor during the visit. > > global $currentuser, $enttype; > // The $_SESSION variable is not set upon initial entry. > if ( $currentuser || !empty($_SESSION['passedcaptcha']) ) > return; > > include_once($cms['tngpath'] . "$mylanguage/admintext.php"); > require_once($cms['tngpath'] . "recaptchalib.php"); > > // Sign up for a reCAPTCHA account from https://www.google.com/recaptcha/admin/create > // Once your account is created, enter your assigned keys > // in customconfig.php or uncomment the next 2 lines and enter it below. > //$siteKey = "yoursiteKeyHere"; > //$secret = "yoursecretKeyHere"; > > // These variables seem to not be set. > $tngSiteKey = !empty($siteKey) ? $siteKey : $tngconfig['sitekey']; > $tngSecret = !empty($secret) ? $secret : $tngconfig['secret']; > > if($tngSiteKey && $tngSecret) { > > // In the next group of 2 lines, comment out the line that you do NOT want > //as the Theme. The last uncommented line will be in effect. > > $captchatheme = "light"; > //$captchatheme = "dark"; > > > // This "switch" statement sets the language code for the reCAPTCHA > $captchalang = isset($text['glang']) ? $text['glang'] : ""; > > // The response from reCAPTCHA > $resp = null; > // The error code from reCAPTCHA, if any > $error = null; > > $reCaptcha = new ReCaptcha($tngSecret); > if (empty($reCaptcha->_secret)) { > $reCaptcha->ReCaptcha($tngSecret); > } > > # was there a reCAPTCHA response? > // There isn't a response the first time. > if (!empty($_POST["g-recaptcha-response"])) { > $resp = $reCaptcha->verifyResponse( > $_SERVER["REMOTE_ADDR"], > $_POST["g-recaptcha-response"] > ); > } > > if ($resp != null && $resp->success) { > $_SESSION['passedcaptcha'] = 'true'; > return; > } > // if the response from the reCAPTCHA is valid, return to suggest.php > > /* > echo "\n"; > */ > $uri = $_SERVER['REQUEST_URI']; > // Typo in the regex > $uri = preg_replace("/[^a-zA-Z0-9\s_.%&\/=?\-#]/", "", $uri); > > ?> > > >
    > >
    > > > > > > > tng_footer( "" ); > exit; > } diff -r TNG/tngconnect.php TNG1403/tngconnect.php 5,6c5,6 < if(!trim($dbport)) $dbport = null; < if(!trim($dbsocket)) $dbsocket = null; --- > $dbport = !empty($dbport) ? trim($dbport) : null; > $dbsocket = !empty($dbsocket) ? trim($dbsocket) : null; 7a8 > //mysqli_report(MYSQLI_REPORT_OFF); 10,11c11,24 < if($session_charset == 'UTF-8') < tng_set_charset($link, 'utf8'); --- > if($session_charset == 'UTF-8') { > $query = "SELECT @@collation_database AS collation"; > $result = mysqli_query($link, $query); > > $collation = tng_fetch_assoc($result); > $collation = $collation['collation']; > tng_free_result($result); > > if( strpos($collation, "utf8mb4") !== false ) { > tng_set_charset($link, 'utf8mb4'); > } else { > tng_set_charset($link, 'utf8'); > } > } 28c41,46 < return mysqli_affected_rows($link); --- > try { > $return = mysqli_affected_rows($link); > } catch (mysqli_sql_exception $e) { > $return = 0; > } > return $return; 32c50,55 < return mysqli_stmt_affected_rows($stmt); --- > try { > $return = mysqli_stmt_affected_rows($stmt); > } catch (mysqli_sql_exception $e) { > $return = 0; > } > return $return; 36,37c59,64 < global $link; < return @mysqli_connect($dbhost, $dbusername, $dbpassword, $dbname, $dbport, $dbsocket); --- > try { > $link = mysqli_connect($dbhost, $dbusername, $dbpassword, $dbname, $dbport, $dbsocket); > } catch (mysqli_sql_exception $e) { > $link = false; > } > return $link; 41c68,73 < return mysqli_data_seek($result, $offset); --- > try { > $return = mysqli_data_seek($result, $offset); > } catch (mysqli_sql_exception $e) { > $return = false; > } > return $return; 66,67c98 < eval("\$fieldinfo = \$fielddef->$info;"); < return $fieldinfo; --- > return $fielddef->$info; 91c122,128 < return mysqli_real_escape_string($link, $escapestr); --- > > if(isset($escapestr)) { > $return = mysqli_real_escape_string($link, $escapestr); > } else { > $return = ""; > } > return $return; 95c132,137 < return mysqli_num_fields($result); --- > try { > $return = mysqli_num_fields($result); > } catch (mysqli_sql_exception $e) { > $return = 0; > } > return $return; 99c141,146 < return mysqli_num_rows($result); --- > try { > $return = mysqli_num_rows($result); > } catch (mysqli_sql_exception $e) { > $return = 0; > } > return $return; 103c150,155 < return mysqli_set_charset($link, $charset); --- > try { > $return = mysqli_set_charset($link, $charset); > } catch (mysqli_sql_exception $e) { > $return = false; > } > return $return; 107c159,164 < return mysqli_select_db($link, $dbname); --- > try { > $return = mysqli_select_db($link, $dbname); > } catch (mysqli_sql_exception $e) { > $return = false; > } > return $return; 114a172,177 > if(!$stmt) { > $error = mysqli_error($link); > $errorstr = $error ? "

    $error" : ""; > echo $text['problem'] . "

    {$text['query']}: $query
    " . implode(" | ", $params) . " " . $errorstr; > exit; > } 119a183,185 > if(!$stmt) { > return 0; > } 126c192,197 < return mysqli_prepare($link, $query); --- > try { > $result = mysqli_prepare($link, $query); > } catch (mysqli_sql_exception $e) { > $result = false; > } > return $result; 132,136c203,217 < call_user_func_array(array($stmt,'bind_param'),$params); < if(!mysqli_stmt_execute($stmt)) { < $error = mysqli_error($link); < $errorstr = $error ? "

    $error" : ""; < echo $text['problem'] . "

    {$text['query']}: $query
    " . implode(" | ", $params) . " " . $errorstr; --- > try { > call_user_func_array(array($stmt,'bind_param'),$params); > } catch (Error $e) { > $errorstr = $e->getMessage(); > echo $text['problem'] . "

    {$text['query']}: $query
    " . implode(" | ", $params) . "

    " . $errorstr; > exit; > } > try { > mysqli_stmt_execute($stmt); > $affected_rows = tng_stmt_affected_rows($stmt); > mysqli_stmt_close($stmt); > } catch (mysqli_sql_exception $e) { > mysqli_stmt_close($stmt); > $errorstr = $e->getMessage(); > echo $text['problem'] . "

    {$text['query']}: $query
    " . implode(" | ", $params) . "

    " . $errorstr; 139,140d219 < $affected_rows = tng_stmt_affected_rows($stmt); < mysqli_stmt_close($stmt); 146,150c225,238 < call_user_func_array(array($stmt,'bind_param'),$params); < @mysqli_stmt_execute($stmt); < $affected_rows = tng_stmt_affected_rows($stmt); < mysqli_stmt_close($stmt); < --- > try { > call_user_func_array(array($stmt,'bind_param'),$params); > } catch (Error $e) { > return 0; > } > try { > mysqli_stmt_execute($stmt); > $affected_rows = tng_stmt_affected_rows($stmt); > mysqli_stmt_close($stmt); > } catch (mysqli_sql_exception $e) { > mysqli_stmt_close($stmt); > $affected_rows = -1; > } > 157c245,249 < $result = mysqli_query($link, $query); --- > try { > $result = mysqli_query($link, $query); > } catch (mysqli_sql_exception $e) { > $result = false; > } 160,161c252,253 < $errorstr = $error ? "

    $error" : ""; < echo $text['problem'] . "

    {$text['query']}: $query$errorstr"; --- > $errorstr = $error ? "

    $error" : ""; > echo $text['problem'] . "

    {$text['query']}: $query$errorstr"; 170c262,266 < $result = @mysqli_query($link, $query); --- > try { > $result = mysqli_query($link, $query); > } catch (mysqli_sql_exception $e) { > $result = false; > } diff -r TNG/tngdblib.php TNG1403/tngdblib.php 64c64 < $query = "SELECT $people_table.personID as personID, $people_table.gedcom as gedcom, firstname, lnprefix, lastname, prefix, suffix, nameorder, --- > $query = "SELECT $people_table.personID as personID, $people_table.gedcom as gedcom, firstname, lnprefix, lastname, prefix, suffix, title, nameorder, 78c78 < $query = "SELECT $people_table.personID as personID, $people_table.gedcom as gedcom, firstname, lnprefix, lastname, prefix, suffix, nameorder, birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, burialdate, sex, living, private, branch, ordernum, --- > $query = "SELECT $people_table.personID as personID, $people_table.gedcom as gedcom, firstname, lnprefix, lastname, prefix, suffix, title, nameorder, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, deathdate, deathdatetr, deathplace, burialdate, sex, living, private, branch, ordernum, 138c138 < $query = "SELECT $people_table.gedcom, personID, lastname, lnprefix, firstname, prefix, suffix, nameorder, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, altbirthplace, deathdate, deathdatetr, deathplace, burialdate, burialdatetr, burialplace, burialtype, marrdate, marrplace, --- > $query = "SELECT $people_table.gedcom, personID, lastname, lnprefix, firstname, prefix, suffix, title, nameorder, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, altbirthplace, deathdate, deathdatetr, deathplace, burialdate, burialdatetr, burialplace, burialtype, marrdate, marrplace, 150,151c150,152 < $query = "SELECT $people_table.gedcom, personID, firstname, lnprefix, lastname, prefix, suffix, nameorder, sex, $people_table.living, $people_table.private, $people_table.branch, < IF(birthdate!='',YEAR(birthdatetr),YEAR(altbirthdatetr)) as birth, IF(deathdate!='',YEAR(deathdatetr),YEAR(burialdatetr)) as death, $people_table.gedcom --- > $query = "SELECT $people_table.gedcom, personID, firstname, lnprefix, lastname, prefix, suffix, title, nameorder, sex, $people_table.living, $people_table.private, $people_table.branch, > IF(birthdate!='',YEAR(birthdatetr),YEAR(altbirthdatetr)) as birth, IF(deathdate!='',YEAR(deathdatetr),YEAR(burialdatetr)) as death, $people_table.gedcom, > birthdate, birthdatetr, altbirthdatetr, deathdate, deathdatetr, burialdatetr 174,175c175,176 < $query = "SELECT $people_table.gedcom, personID, lastname, lnprefix, firstname, prefix, suffix, nameorder, birthdate, < YEAR(birthdatetr) as birthyear, deathdate, YEAR(deathdatetr) as deathyear, $people_table.living, $people_table.private, $people_table.branch --- > $query = "SELECT $people_table.gedcom, personID, lastname, lnprefix, firstname, prefix, suffix, nameorder, title, birthdate, birthdatetr, altbirthdate, altbirthdatetr, > YEAR(birthdatetr) as birthyear, deathdate, YEAR(deathdatetr) as deathyear, burialdate, $people_table.living, $people_table.private, $people_table.branch 197c198 < $query = "SELECT gedcom, husband, wife, living, private, branch, marrdate, marrdatetr, marrplace, divdate, divdatetr, divplace, familyID --- > $query = "SELECT gedcom, husband, wife, living, private, branch, marrdate, marrdatetr, marrplace, marrtype, divdate, divdatetr, divplace, familyID 245c246 < $query = "SELECT gedcom, husband, wife, familyID, marrdate, marrplace, marrtype, divdate, divplace, living, private, branch --- > $query = "SELECT gedcom, husband, wife, familyID, marrdate, marrdatetr, marrplace, marrtype, divdate, divdatetr, divplace, living, private, branch 257c258 < $query = "SELECT gedcom, husband, wife, familyID, marrdate, marrplace, marrtype, divdate, divplace, living, private, branch --- > $query = "SELECT gedcom, husband, wife, familyID, marrdate, marrdatetr, marrplace, marrtype, divdate, divdatetr, divplace, living, private, branch 261c262 < SELECT gedcom, husband, wife, familyID, marrdate, marrplace, marrtype, divdate, divplace, living, private, branch --- > SELECT gedcom, husband, wife, familyID, marrdate, marrdatetr, marrplace, marrtype, divdate, divdatetr, divplace, living, private, branch 343c344 < $query = "SELECT UPPER(personID) as personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, nickname, sex, nameorder, living, private, branch, --- > $query = "SELECT UPPER(personID) as personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, title, nickname, sex, nameorder, living, private, branch, 355c356 < $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, sex, nameorder, living, private, branch, --- > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, title, sex, nameorder, living, private, branch, 390c391 < $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, sex, nameorder, living, private, branch, birthdate, birthdatetr, altbirthdatetr, deathdate --- > $query = "SELECT personID, gedcom, firstname, lnprefix, lastname, prefix, suffix, title, sex, nameorder, living, private, branch, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, deathdate, deathdatetr, deathplace, burialdate, burialdatetr, burialplace diff -r TNG/tngfiletypes.php TNG1403/tngfiletypes.php 2c2 < $imagetypes = array( "JPG", "GIF","PNG","JPEG","GIFF" ); --- > $imagetypes = array( "JPG", "GIF", "PNG", "JPEG", "GIFF", "JFIF" ); 4c4 < $historytypes = array( "DOC", "TXT", "PHP", "HTM", "HTML", "WPD" ); --- > $historytypes = array( "DOC", "DOCX", "TXT", "PHP", "HTM", "HTML", "WPD" ); diff -r TNG/tngmaillib.php TNG1403/tngmaillib.php 4a5,6 > // In case that one time wasn't just a fluke. > $success = false; 10a13,14 > // New exception handling > require_once("class.exception.php"); 15c19,20 < $mail = new PHPMailer($options); --- > // Update for the new namespace security. > $mail = new PHPMailer\PHPMailer\PHPMailer($options); 27,47c32,81 < $mail->IsSMTP(); // set mailer to use SMTP < $mail->Host = $tngconfig['mailhost']; // specify main and backup server or localhost < $mail->SMTPAuth = true; // turn on SMTP authentication < $mail->Username = $tngconfig['mailuser']; // SMTP username < $mail->Password = $tngconfig['mailpass']; // SMTP password < if(!empty($tngconfig['mailenc'])) < $mail->SMTPSecure = $tngconfig['mailenc']; // SMTP encryption < //It should be same as that of the SMTP user < $mail->Port = $tngconfig['mailport']; < < $mail->From = $from_email; //Default From email same as smtp user < $mail->FromName = $from_name; < < $mail->AddAddress($to_email, $to_name); //Email address where you wish to receive/collect those emails. < $mail->AddReplyTo($replyto, $from_name); < < $mail->CharSet = strtolower($session_charset); < //$mail->WordWrap = 50; < if($session_charset && strtoupper($session_charset) != "ISO-8859-1") { < $mail->IsHTML(true); // set email format to HTML < $body = nl2br($body); --- > // Make sure to use try/catch to keep the errors safe. > try { > $mail->IsSMTP(); // set mailer to use SMTP > $mail->Host = $tngconfig['mailhost']; // specify main and backup server or localhost > $mail->SMTPAuth = true; // turn on SMTP authentication > $mail->Username = $tngconfig['mailuser']; // SMTP username > $mail->Password = $tngconfig['mailpass']; // SMTP password > if(!empty($tngconfig['mailenc'])) > $mail->SMTPSecure = $tngconfig['mailenc']; // SMTP encryption > //It should be same as that of the SMTP user > $mail->Port = $tngconfig['mailport']; > > $mail->From = $from_email; //Default From email same as smtp user > $mail->FromName = $from_name; > > $mail->AddAddress($to_email, $to_name); //Email address where you wish to receive/collect those emails. > $mail->AddReplyTo($replyto, $from_name); > > $mail->CharSet = strtolower($session_charset); > //$mail->WordWrap = 50; > if($session_charset && strtoupper($session_charset) != "ISO-8859-1") { > $mail->IsHTML(true); // set email format to HTML > $body = nl2br($body); > } > > $mail->Subject = $subject; > $mail->Body = $body; > > $success = $mail->Send(); > > if(!$success) > { > error_log('Mailer Error: ' . $mail->ErrorInfo, 0); > error_log($subject, 0); > error_log($body, 0); > echo 'Mailer Error: ' . $mail->ErrorInfo; > } > } catch (Exception $e) { > error_log($e->getMessage(), 0); > error_log($e->getTraceAsString(), 0); > error_log($subject, 0); > error_log($body, 0); > echo $e->getMessage(); > $success = false; > } catch (\Exception $e) { //The leading slash means the Global PHP Exception class will be caught > error_log($e->getMessage(), 0); > error_log($subject, 0); > error_log($body, 0); > echo $e->getMessage(); //Boring error messages from anything else! > $success = false; 49,53d82 < < $mail->Subject = $subject; < $mail->Body = $body; < < $success = $mail->Send(); diff -r TNG/tngpdf.php TNG1403/tngpdf.php 29a30 > var $bold; // character weight being used 36c37 < function TNGPDF($orientation='P',$unit='mm',$format='A4') --- > function __construct($orientation='P',$unit='mm',$format='A4') 42c43 < tFPDF::tFPDF($orientation, $unit, $format); --- > tFPDF::__construct($orientation, $unit, $format); 67,70c68,71 < $mqr=get_magic_quotes_runtime(); < if(version_compare(PHP_VERSION, '5.3.0', '<')){ < set_magic_quotes_runtime(0); < } --- > //$mqr=get_magic_quotes_runtime(); > //if(version_compare(PHP_VERSION, '5.3.0', '<')){ > //set_magic_quotes_runtime(0); > //} 83,85c84,86 < if(version_compare(PHP_VERSION, '5.3.0', '<')){ < set_magic_quotes_runtime($mqr); < } --- > //if(version_compare(PHP_VERSION, '5.3.0', '<')){ > //set_magic_quotes_runtime($mqr); > //} 129c130 < $c=$s{$i}; --- > $c=$s[$i]; 226c227 < if ($e{0} == '/') { --- > if ($e[0] == '/') { 354a356,357 > if(!isset($titleConfig['image'])) $titleConfig['image'] = ""; > if(!isset($titleConfig['outline'])) $titleConfig['outline'] = ""; 423c426 < $txt = "$text[maintby] $dbowner"; --- > $txt = "{$text['maintby']} $dbowner"; 519a523,576 > function RoundedRect($x, $y, $w, $h, $r, $corners = '1234', $style = '') { > $k = $this->k; > $hp = $this->h; > if($style=='F') > $op='f'; > elseif($style=='FD' || $style=='DF') > $op='B'; > else > $op='S'; > $MyArc = 4/3 * (sqrt(2) - 1); > $this->_out(sprintf('%.2F %.2F m',($x+$r)*$k,($hp-$y)*$k )); > > $xc = $x+$w-$r; > $yc = $y+$r; > $this->_out(sprintf('%.2F %.2F l', $xc*$k,($hp-$y)*$k )); > if (strpos($corners, '2')===false) > $this->_out(sprintf('%.2F %.2F l', ($x+$w)*$k,($hp-$y)*$k )); > else > $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc, $xc + $r, $yc); > > $xc = $x+$w-$r; > $yc = $y+$h-$r; > $this->_out(sprintf('%.2F %.2F l',($x+$w)*$k,($hp-$yc)*$k)); > if (strpos($corners, '3')===false) > $this->_out(sprintf('%.2F %.2F l',($x+$w)*$k,($hp-($y+$h))*$k)); > else > $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc, $yc + $r); > > $xc = $x+$r; > $yc = $y+$h-$r; > $this->_out(sprintf('%.2F %.2F l',$xc*$k,($hp-($y+$h))*$k)); > if (strpos($corners, '4')===false) > $this->_out(sprintf('%.2F %.2F l',($x)*$k,($hp-($y+$h))*$k)); > else > $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc, $xc - $r, $yc); > > $xc = $x+$r ; > $yc = $y+$r; > $this->_out(sprintf('%.2F %.2F l',($x)*$k,($hp-$yc)*$k )); > if (strpos($corners, '1')===false) > { > $this->_out(sprintf('%.2F %.2F l',($x)*$k,($hp-$y)*$k )); > $this->_out(sprintf('%.2F %.2F l',($x+$r)*$k,($hp-$y)*$k )); > } > else > $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r); > $this->_out($op); > } > > function _Arc($x1, $y1, $x2, $y2, $x3, $y3) { > $h = $this->h; > $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $x1*$this->k, ($h-$y1)*$this->k, > $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k)); > } diff -r TNG/tngrobots.php TNG1403/tngrobots.php 17c17 < if( $tngprint ) --- > if(!empty($tngprint)) 55a56 > case "img_viewer": diff -r TNG/tngrss.php TNG1403/tngrss.php 29c29 < global $getperson_url, $livedefault, $whatsnew, $wherestr2, $showmap_url, $thumbmaxw, $events_table, $eventtypes_table, $tngconfig; --- > global $getperson_url, $livedefault, $whatsnew, $wherestr, $wherestr2, $showmap_url, $thumbmaxw, $events_table, $eventtypes_table, $tngconfig; 36a37,38 > if(empty($wherestr)) $wherestr = ""; > if(empty($wherestr2)) $wherestr2 = ""; 91c93 < $mediatext = "$text[family]: " . getFamilyName( $prow ); --- > $mediatext = "{$text['family']}: " . getFamilyName( $prow ); 99c101 < $medialink = $showrepo_url . "repoID={$prow['repoID']}&tree=$prow[gedcom]"; --- > $medialink = $showrepo_url . "repoID={$prow['repoID']}&tree={$prow['gedcom']}"; 102c104 < $medialink = $placesearch_url . "psearch={$prow['personID']}&tree=$prow[gedcom]"; --- > $medialink = $placesearch_url . "psearch={$prow['personID']}&tree={$prow['gedcom']}"; 106,107c108,109 < $query = "SELECT description from $events_table, $eventtypes_table WHERE eventID = \"$prow[eventID]\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID"; < $eresult = tng_query($query) or die ("$text[cannotexecutequery]: $query"); --- > $query = "SELECT description from $events_table, $eventtypes_table WHERE eventID = \"{$prow['eventID']}\" AND $events_table.eventtypeID = $eventtypes_table.eventtypeID"; > $eresult = tng_query($query) or die ("{$text['cannotexecutequery']}: $query"); 121c123 < if( ($foundliving || $foundprivate) && !$row['alwayson'] ) $notes .= " ($text[livingphoto])"; --- > if( ($foundliving || $foundprivate) && !$row['alwayson'] ) $notes .= " ({$text['livingphoto']})"; 125c127 < $notes = "($text[livingphoto])"; --- > $notes = "({$text['livingphoto']})"; 131c133 < if( $row['status'] ) $notes = "$text[status]: $row[status]. $notes"; --- > if( $row['status'] ) $notes = "{$text['status']}: {$row['status']}. $notes"; 160c162 < $item .= "\n"; --- > $item = "\n"; 173c175 < if($personID) { --- > if(!empty($personID)) { 176c178 < elseif($familyID) { --- > elseif(!empty($familyID)) { 185c187 < if($rssimage) { // define $rssimage in your customconfig.php file this will allow you to put a logo on your feed once you have subscribed --- > if(!empty($rssimage)) { // define $rssimage in your customconfig.php file this will allow you to put a logo on your feed once you have subscribed 210c212 < if(!$personID && !$familyID) { // only feed the changes when not monitoring an person or a family --- > if(empty($personID) && empty($familyID)) { // only feed the changes when not monitoring an person or a family 213c215 < $mediatypeID = $mediatype[ID]; --- > $mediatypeID = $mediatype['ID']; 228c230 < if(!$familyID) { // if a family is NOT specified (ie: we are looking for a personID or the What's New --- > if(empty($familyID)) { // if a family is NOT specified (ie: we are looking for a personID or the What's New 287,288c289,290 < if($familyID) { < $whereclause = "WHERE $families_table.familyID = \"$familyID\"$privacystr ORDER BY changedate LIMIT $change_limit"; --- > if(!empty($familyID)) { > $whereclause = "WHERE $families_table.familyID = \"$familyID\" ORDER BY changedate LIMIT $change_limit"; 291c293 < $whereclause = $change_cutoff ? "WHERE TO_DAYS(NOW()) - TO_DAYS($families_table.changedate) <= $change_cutoff$privacystr" : "WHERE 1=1$privacystr"; --- > $whereclause = $change_cutoff ? "WHERE TO_DAYS(NOW()) - TO_DAYS($families_table.changedate) <= $change_cutoff" : "WHERE 1=1"; 295c297 < if (!$personID) { --- > if (empty($personID)) { diff -r TNG/tngsendmail.php TNG1403/tngsendmail.php 2a3 > $tngconfig['maint'] = ""; 8c9 < if($enttype) --- > if(!empty($enttype)) 15,16c16,21 < $emailfield = $_SESSION['tng_email']; < eval("\$youremail = \$$emailfield;"); --- > if(!empty($_SESSION['tng_email'])) { > $emailfield = $_SESSION['tng_email']; > $youremail = $$emailfield; > } > else > $youremail = ""; 19,20c24,29 < $commentsfield = $_SESSION['tng_comments']; < eval("\$comments = \$$commentsfield;"); --- > if(!empty($_SESSION['tng_comments'])) { > $commentsfield = $_SESSION['tng_comments']; > $comments = $$commentsfield; > } > else > $comments = ""; 23,24c32,37 < $yournamefield = $_SESSION['tng_yourname']; < eval("\$yourname = \$$yournamefield;"); --- > if(!empty($_SESSION['tng_yourname'])) { > $yournamefield = $_SESSION['tng_yourname']; > $yourname = $$yournamefield; > } > else > $yourname = ""; 61c74 < $query = "SELECT firstname, lnprefix, lastname, prefix, suffix, sex, nameorder, living, private, branch, disallowgedcreate, IF(birthdatetr !='0000-00-00',YEAR(birthdatetr),YEAR(altbirthdatetr)) as birth, IF(deathdatetr !='0000-00-00',YEAR(deathdatetr),YEAR(burialdatetr)) as death --- > $query = "SELECT firstname, lnprefix, lastname, prefix, suffix, title, sex, nameorder, living, private, branch, $people_table.gedcom, disallowgedcreate, IF(birthdatetr !='0000-00-00',YEAR(birthdatetr),YEAR(altbirthdatetr)) as birth, IF(deathdatetr !='0000-00-00',YEAR(deathdatetr),YEAR(burialdatetr)) as death 134c147 < if($currentuser) --- > if(!empty($currentuser)) 139,146c152,153 < if( $success ) { < $message = "mailsent"; < if( $mailme ) { < tng_sendmail($yourname, $emailtouse, $yourname, $youremail, $subject, $body, $emailaddr, $youremail); < } < } < else < $message = "mailnotsent&sowner=" . urlencode($owner) . "&ssendemail=" . urlencode($sendemail); --- > $message = $success ? "mailsent" : $message = "mailnotsent&sowner=" . urlencode($owner) . "&ssendemail=" . urlencode($sendemail); > diff -r TNG/treelib.php TNG1403/treelib.php 53a54 > if(!isset($branch)) $branch = ""; diff -r TNG/version.php TNG1403/version.php 4c4 < $tng_version = "12.0.2"; --- > $tng_version = "14.0.3"; 6c6 < $tng_date = "22 September 2018"; --- > $tng_date = "22 September 2023"; diff -r TNG/verticalchart.php TNG1403/verticalchart.php 7a8,9 > include $cms['tngpath'] . "pedbox.php"; > 16a19,21 > if ($pedigree['inclphotos'] && (trim($photopath) == "" || trim($photosext) == "" )) $pedigree['inclphotos'] = false; > > if(!isset($generations)) $generations = 0; 48,49c53,59 < writelog( "" . xmlcharacters("{$text['pedigreefor']} $logname ($personID)") . " $gens " . $gentext ); < preparebookmark( "" . xmlcharacters("{$text['pedigreefor']} $pedname ($personID)") . " $gens " . $gentext ); --- > if(!isset($display)) $display = ""; > if(!isset($gentext)) $gentext = ""; > if(!isset($pedname)) $pedname = ""; > if(!isset($parentset)) $parentset = ""; > > writelog( "" . xmlcharacters("{$text['pedigreefor']} $logname ($personID)") . " $generations " . $gentext ); > preparebookmark( "" . xmlcharacters("{$text['pedigreefor']} $pedname ($personID)") . " $generations " . $gentext ); 51d60 < $flags['tabs'] = $tngconfig['tabs']; 53c62 < $flags['scripting'] = "\n"; --- > $flags['css'] = "\n"; 75c84 < if($gens <= 6 && $allowpdf) --- > if($generations <= 6 && $allowpdf) 82,83c91,92 < $height = $pedigree['vheight'] ? $pedigree['vheight'] : 42; < $width = $pedigree['vwidth'] ? $pedigree['vwidth'] : 100; --- > $height = $pedigree['vheight'] ? $pedigree['vheight'] : 150; > $width = $pedigree['vwidth'] ? $pedigree['vwidth'] : 90; 85c94 < $fontsize = $pedigree['vfontsize'] ? $pedigree['vfontsize'] : 7; --- > $fontsize = $pedigree['vfontsize'] ? $pedigree['vfontsize'] : 8; 87a97 > $highestx = 0; 253c263,264 < for ($next = $num+1; $next <= count($generation); $next++) --- > $num_generations = count($generation); > for ($next = $num+1; $next <= $num_generations; $next++) 311c322 < global $width, $height, $spacing, $fontsize, $start_person, $session_charset, $cms, $templatepath, $text, $containerheight; --- > global $width, $height, $spacing, $fontsize, $start_person, $session_charset, $cms, $templatepath, $text, $containerheight, $highestx, $pedigree, $vertical_url, $tngprint; 331a343,344 > if($person['xpos'] > $highestx) > $highestx = $person['xpos']; 350a364,367 > if($gen_num == count($gens) && ($person['father'] || $person['mother'])) { > $row[$rows-$gen_num] .= ""; > } > 356,358c373,387 < $row [$rows-$gen_num] .= "\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t"; < $url = htmlentities("getperson.php?personID={$person['personID']}&tree={$_GET['tree']}"); < $row [$rows-$gen_num] .= "{$person['name']}
    " . getGenderIcon($person['sex'], -2); --- > $row [$rows-$gen_num] .= "\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t"; > $url = htmlentities("getperson.php?personID={$person['personID']}&tree={$_GET['tree']}"); > //$row [$rows-$gen_num] .= "{$person['name']}
    " . getGenderIcon($person['sex'], -2); > > $rights = determineLivingPrivateRights($person); > $photo_block = ""; > if($pedigree['inclphotos']) { > $photo = getPhotoSrc($person['personID'], $rights['both'], $person['sex']); > if ($photo['link'] != "") $photo_block .= ""; > if ($photo['ref'] != "") $photo_block .= "\"\""; > if ($photo['link'] != "") $photo_block .= ""; > } > > $row [$rows-$gen_num] .= $photo_block . "{$person['name']}
    " . getGenderIcon($person['sex'], -2); > 377a407 > width:'.($highestx+$width+2*$spacing).'px; //double the spacing to give a little padding on the end 405,408c435,443 < <
    '; < $html .= implode ($row, "\r\n"); < $html .= '
    '; --- > '; > if(!$tngprint) { > $html .= '' . $text['scrollnote'] . ' >
    ' . $text['zoomin'] . '' . $text['tng_reset'] . '' . $text['zoomout'] . '
    '; > } > $html .= '
    >
    '; > $html .= implode ("\r\n", $row); > $html .= '
    '; 411a447,464 > ?> > > > > if(!empty($cms['events'])){include('cmsevents.php'); cms_whatsnew();} 27a28,30 > $query = "SET SQL_BIG_SELECTS=1"; > $result = tng_query($query); > 82c85 < $header = ""; --- > $header = $header2 = ""; 88c91 < $header = "
       
    \n"; --- > $header = "
    \n"; 90c93 < $header = "
    "; --- > $header = "
    "; 204c207 < $birthplacestr .= "psearch=" . urlencode($birthplace) . "\">\"\""; --- > $birthplacestr .= "psearch=" . urlencode($birthplace) . "\">\"\""; diff -r TNG/widget_whatsnew.php TNG1403/widget_whatsnew.php 33c33 < global $livedefault, $wherestr2, $thumbmaxw, $altstr, $tngconfig, $maxmediafilesize; --- > global $livedefault, $wherestr2, $thumbmaxw, $tngconfig, $maxmediafilesize, $hsfields, $cutoffstr; 37c37 < $query = "SELECT distinct $media_table.mediaID as mediaID, description $altstr, $media_table.notes, thumbpath, path, form, mediatypeID, $media_table.gedcom as gedcom, alwayson, usecollfolder, DATE_FORMAT(changedate,'%e %b %Y') as changedatef, changedby, status, plot, abspath, newwindow $hsfields --- > $query = "SELECT distinct $media_table.mediaID as mediaID, description, $media_table.notes, thumbpath, path, form, mediatypeID, $media_table.gedcom as gedcom, alwayson, usecollfolder, DATE_FORMAT(changedate,'%e %b %Y') as changedatef, changedby, status, plot, abspath, newwindow, private $hsfields 54c54 < $gotImageJpeg = function_exists(imageJpeg); --- > $gotImageJpeg = function_exists('imageJpeg'); 60a61 > birthdate, birthdatetr, altbirthdate, altbirthdatetr, deathdate, deathdatetr, husband, wife, 66c67 < WHERE mediaID = \"{$row['mediaID']}\"$Wherestr2 ORDER BY lastname, lnprefix, firstname, $medialinks_table.personID"; --- > WHERE mediaID = \"{$row['mediaID']}\"$wherestr2 ORDER BY lastname, lnprefix, firstname, $medialinks_table.personID"; 69c70 < $foundprivate = 0; --- > $foundprivate = $row['private'] && !$allow_private; 95c96,98 < $showPhotoInfo = $row['allow_living'] = $row['alwayson'] || (!$foundprivate && !$foundliving); --- > $row['allow_living'] = !$foundliving || $row['alwayson']; > $row['allow_private'] = !$foundprivate || $row['alwayson']; > $showPhotoInfo = $row['allow_living'] && $row['allow_private']; 99d101 < $notes = $wherestr && $row['altnotes'] ? $row['altnotes'] : $row['notes']; 101c103 < $description = $wherestr && $row['altdescription'] ? $row['altdescription'] : $row['description']; --- > $description = $row['description']; 155c157 < $query = "SELECT p.personID, lastname, lnprefix, firstname, birthdate, prefix, suffix, nameorder, living, private, branch, DATE_FORMAT(changedate,'%e %b %Y') as changedatef, changedby, LPAD(SUBSTRING_INDEX(birthdate, ' ', -1),4,'0') as birthyear, birthplace, altbirthdate, LPAD(SUBSTRING_INDEX(altbirthdate, ' ', -1),4,'0') as altbirthyear, altbirthplace, p.gedcom as gedcom, treename --- > $query = "SELECT p.personID, lastname, lnprefix, firstname, birthdate, prefix, suffix, title, nameorder, living, private, branch, DATE_FORMAT(changedate,'%e %b %Y') as changedatef, changedby, LPAD(SUBSTRING_INDEX(birthdate, ' ', -1),4,'0') as birthyear, birthdate, birthdatetr, birthplace, altbirthdate, altbirthdatetr, LPAD(SUBSTRING_INDEX(altbirthdate, ' ', -1),4,'0') as altbirthyear, altbirthplace, deathdate, deathdatetr, p.gedcom as gedcom, treename Only in TNG1403: zoom-lib.php