Пример #1
0
                    $tree->userPreference($user->getUserId(), 'RELATIONSHIP_PATH_LENGTH', WT_Filter::postInteger('RELATIONSHIP_PATH_LENGTH' . $tree->tree_id, 0, 10, 0));
                } else {
                    // Do not allow a path length to be set if the individual ID is not
                    $tree->userPreference($user->getUserId(), 'RELATIONSHIP_PATH_LENGTH', null);
                }
            }
            Log::addAuthenticationLog("User ->{$username}<- created");
            header('Location: ' . WT_SERVER_NAME . WT_SCRIPT_PATH . WT_SCRIPT_NAME);
            WT_Session::writeClose();
            exit;
        }
}
$controller->pageHeader();
switch ($action) {
    case 'createform':
        $controller->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('autocomplete();');
        init_calendar_popup();
        $controller->addInlineJavascript('
		function checkform(frm) {
			if (frm.username.value=="") {
				alert("' . WT_I18N::translate('You must enter a user name.') . '");
				frm.username.focus();
				return false;
			}
			if (frm.realname.value=="") {
				alert("' . WT_I18N::translate('You must enter a real name.') . '");
				frm.realname.focus();
				return false;
			}
			if (frm.pass1.value=="") {
				alert("' . WT_I18N::translate('You must enter a password.') . '");
Пример #2
0
$asc = WT_Filter::getBool('asc');
$asc = $asc ? -1 : 1;
$Dbwidth = $bwidth;
if (!$show_full) {
    $bwidth = $cbwidth;
    $bheight = $cbheight;
    $Dbwidth = $cbwidth;
}
$Dbheight = $bheight;
$Dbxspacing = 0;
$Dbyspacing = 0;
$Dbasexoffset = 0;
$Dbaseyoffset = 0;
$person1 = WT_Individual::getInstance($pid1);
$person2 = WT_Individual::getInstance($pid2);
$controller->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('autocomplete();');
if ($person1 && $person1->canShowName() && $person2 && $person2->canShowName()) {
    $controller->setPageTitle(WT_I18N::translate('Relationships between %1$s and %2$s', $person1->getFullName(), $person2->getFullName()))->PageHeader();
    $node = get_relationship($person1, $person2, $followspouse, 0, $path_to_find);
    // If no blood relationship exists, look for relationship via marriage
    if ($path_to_find == 0 && $node == false && $followspouse == false) {
        $followspouse = true;
        $node = get_relationship($person1, $person2, $followspouse, 0, $path_to_find);
    }
    $disp = true;
} else {
    $controller->setPageTitle(WT_I18N::translate('Relationships'))->PageHeader();
    $node = false;
    $disp = false;
}
?>