コード例 #1
0
ファイル: module.php プロジェクト: jacoline/webtrees
 private function printHowManyPeople($level, $parent)
 {
     $stats = new WT_Stats(WT_GEDCOM);
     $place_count_indi = 0;
     $place_count_fam = 0;
     if (!isset($parent[$level - 1])) {
         $parent[$level - 1] = "";
     }
     $p_id = $this->set_placeid_map($level, $parent);
     $indi = $stats->statsPlaces('INDI', false, $p_id);
     $fam = $stats->statsPlaces('FAM', false, $p_id);
     if (!empty($indi)) {
         foreach ($indi as $place) {
             $place_count_indi = $place['tot'];
         }
     }
     if (!empty($fam)) {
         foreach ($fam as $place) {
             $place_count_fam = $place['tot'];
         }
     }
     echo "<br><br>", WT_I18N::translate('Individuals'), ": ", $place_count_indi, ", ", WT_I18N::translate('Families'), ": ", $place_count_fam;
 }