Beispiel #1
0
                 $spouse_qry .= ' pers_gedcomnumber="' . safe_text($famDb->fam_man) . '"';
             }
             if ($selection['spouse_lastname']) {
                 if ($selection['spouse_lastname'] == __('...')) {
                     $spouse_qry .= " AND pers_lastname=''";
                 } elseif ($user['group_kindindex'] == "j") {
                     $spouse_qry .= " AND CONCAT( REPLACE(pers_prefix,'_',' ') ,pers_lastname) " . name_qry($selection['spouse_lastname'], $selection['part_spouse_lastname']);
                 } else {
                     $spouse_qry .= " AND pers_lastname " . name_qry($selection['spouse_lastname'], $selection['part_spouse_lastname']);
                 }
             }
             //if ($selection['pers_prefix']){
             //  $spouse_qry.=" AND pers_prefix='".$selection['pers_prefix']."'";
             //}
             if ($selection['spouse_firstname']) {
                 $spouse_qry .= " AND pers_firstname " . name_qry($selection['spouse_firstname'], $selection['part_spouse_firstname']);
             }
             $spouse_result = $dbh->query($spouse_qry);
             $spouseDb = $spouse_result->fetch(PDO::FETCH_OBJ);
             if (isset($spouseDb->pers_id)) {
                 $spouse_found = '1';
                 break;
             }
         }
     }
 }
 // End of spouse search
 // *** Show search results ***
 if ($spouse_found == '1') {
     // Added by Yossi
     $person_cls = new person_cls();
        $query .= " WHERE fam_tree_id='" . $tree_id . "' AND fam_marr_notice_place LIKE '_%'";
    }
    $query .= ')';
    $start = true;
}
// *** Search marriage notice place ***
if ($select_marriage_notice_religious == '1') {
    if ($start == true) {
        $query .= ' UNION ';
        $calc = '';
    } else {
        $calc = 'SQL_CALC_FOUND_ROWS ';
    }
    $query .= "(SELECT " . $calc . "*, fam_marr_church_notice_place as place_order\n\t\tFROM humo_families";
    if ($place_name) {
        $query .= " WHERE fam_tree_id='" . $tree_id . "' AND fam_marr_church_notice_place " . name_qry($place_name, $part_place_name);
    } else {
        $query .= " WHERE fam_tree_id='" . $tree_id . "' AND fam_marr_church_notice_place LIKE '_%'";
    }
    $query .= ')';
    $start = true;
}
// *** Order by place and marriage date ***
$query .= ' ORDER BY place_order, substring(fam_marr_date,-4)';
// **************************
// *** Generate indexlist ***
// **************************
include_once CMS_ROOTPATH . "menu.php";
//*** Show number of persons and pages *****************************************
$item = 0;
if (isset($_GET['item'])) {