예제 #1
0
파일: index.php 프로젝트: seta-hungnh/test
echo $text['latupdates'];
?>
</span></td>
												</tr>
		<tr>
				<td colspan="4" class="line"></td>		</tr>
												<tr><td><span class="smallest">&nbsp;</span></td></tr>
												<tr><td valign="top">
							<div class="normal">
					<?php 
$tngquery = "SELECT lastname, firstname, changedate, personID, gedcom, living, private, branch, lnprefix, title, suffix, prefix FROM {$people_table} ORDER BY changedate DESC LIMIT 10";
$resulttng = tng_query($tngquery) or die($text['cannotexecutequery'] . ": {$tngquery}");
$found = tng_num_rows($resulttng);
while ($dbrow = tng_fetch_assoc($resulttng)) {
    $lastadd .= "<a href=\"getperson.php?personID={$dbrow['personID']}&amp;tree={$dbrow['gedcom']}\">";
    $dbrights = determineLivingPrivateRights($dbrow);
    $dbrow['allow_living'] = $dbrights['living'];
    $dbrow['allow_private'] = $dbrights['private'];
    $lastadd .= getNameRev($dbrow);
    $lastadd .= "</a><br />\n";
}
tng_free_result($resulttng);
echo $lastadd;
?>
							
							</div> <!-- end of normal div -->
						</td></tr>
												<tr><td valign="top"><span class="normal">&nbsp;</span></td></tr>
						<tr><td valign="top"><span class="emphasis"><?php 
echo $text['featphoto'];
?>
예제 #2
0
function getFamilyName($row)
{
    global $text, $people_table;
    $righttree = checktree($row['gedcom']);
    $hquery = "SELECT firstname, lnprefix, lastname, living, private, branch, nameorder, gedcom FROM {$people_table} WHERE personID = \"{$row['husband']}\" AND gedcom = \"{$row['gedcom']}\"";
    $hresult = mysql_query($hquery) or die($text['cannotexecutequery'] . ": {$hquery}");
    $hrow = mysql_fetch_assoc($hresult);
    $hrights = determineLivingPrivateRights($hrow, $righttree);
    $hrow['allow_living'] = $hrights['living'];
    $hrow['allow_private'] = $hrights['private'];
    $husbname = getName($hrow);
    mysql_free_result($hresult);
    $wquery = "SELECT firstname, lnprefix, lastname, living, private, branch, nameorder, gedcom FROM {$people_table} WHERE personID = \"{$row['wife']}\" AND gedcom = \"{$row['gedcom']}\"";
    $wresult = mysql_query($wquery) or die($text['cannotexecutequery'] . ": {$wquery}");
    $wrow = mysql_fetch_assoc($wresult);
    $wrights = determineLivingPrivateRights($wrow, $righttree);
    $wrow['allow_living'] = $wrights['living'];
    $wrow['allow_private'] = $wrights['private'];
    $wifename = getName($wrow);
    mysql_free_result($wresult);
    return "{$husbname}/{$wifename} ({$row['familyID']})";
}