summaryrefslogtreecommitdiff
path: root/app/Module/FamilyTreeStatisticsModule.php
blob: 559e0b1a7fcb9b4b834415da3c45a74a5916e329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<?php
/**
 * webtrees: online genealogy
 * Copyright (C) 2016 webtrees development team
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
namespace Fisharebest\Webtrees\Module;

use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\Filter;
use Fisharebest\Webtrees\Functions\FunctionsDb;
use Fisharebest\Webtrees\Functions\FunctionsPrintLists;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Module;
use Fisharebest\Webtrees\Query\QueryName;
use Fisharebest\Webtrees\Stats;
use Fisharebest\Webtrees\Theme;

/**
 * Class FamilyTreeStatisticsModule
 */
class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockInterface {
	/** Show this number of surnames by default */
	const DEFAULT_NUMBER_OF_SURNAMES = 10;

	/** {@inheritdoc} */
	public function getTitle() {
		return /* I18N: Name of a module */ I18N::translate('Statistics');
	}

	/** {@inheritdoc} */
	public function getDescription() {
		return /* I18N: Description of “Statistics” module */ I18N::translate('The size of the family tree, earliest and latest events, common names, etc.');
	}

	/**
	 * Generate the HTML content of this block.
	 *
	 * @param int      $block_id
	 * @param bool     $template
	 * @param string[] $cfg
	 *
	 * @return string
	 */
	public function getBlock($block_id, $template = true, $cfg = []) {
		global $WT_TREE, $ctype;

		$show_last_update     = $this->getBlockSetting($block_id, 'show_last_update', '1');
		$show_common_surnames = $this->getBlockSetting($block_id, 'show_common_surnames', '1');
		$number_of_surnames   = $this->getBlockSetting($block_id, 'number_of_surnames', self::DEFAULT_NUMBER_OF_SURNAMES);
		$stat_indi            = $this->getBlockSetting($block_id, 'stat_indi', '1');
		$stat_fam             = $this->getBlockSetting($block_id, 'stat_fam', '1');
		$stat_sour            = $this->getBlockSetting($block_id, 'stat_sour', '1');
		$stat_media           = $this->getBlockSetting($block_id, 'stat_media', '1');
		$stat_repo            = $this->getBlockSetting($block_id, 'stat_repo', '1');
		$stat_surname         = $this->getBlockSetting($block_id, 'stat_surname', '1');
		$stat_events          = $this->getBlockSetting($block_id, 'stat_events', '1');
		$stat_users           = $this->getBlockSetting($block_id, 'stat_users', '1');
		$stat_first_birth     = $this->getBlockSetting($block_id, 'stat_first_birth', '1');
		$stat_last_birth      = $this->getBlockSetting($block_id, 'stat_last_birth', '1');
		$stat_first_death     = $this->getBlockSetting($block_id, 'stat_first_death', '1');
		$stat_last_death      = $this->getBlockSetting($block_id, 'stat_last_death', '1');
		$stat_long_life       = $this->getBlockSetting($block_id, 'stat_long_life', '1');
		$stat_avg_life        = $this->getBlockSetting($block_id, 'stat_avg_life', '1');
		$stat_most_chil       = $this->getBlockSetting($block_id, 'stat_most_chil', '1');
		$stat_avg_chil        = $this->getBlockSetting($block_id, 'stat_avg_chil', '1');

		// This can be overriden when embedding in an HTML block
		$block = '0';

		foreach (['show_common_surnames', 'number_common_surnames', 'stat_indi', 'stat_fam', 'stat_sour', 'stat_media', 'stat_surname', 'stat_events', 'stat_users', 'stat_first_birth', 'stat_last_birth', 'stat_first_death', 'stat_last_death', 'stat_long_life', 'stat_avg_life', 'stat_most_chil', 'stat_avg_chil', 'block'] as $name) {
			if (array_key_exists($name, $cfg)) {
				$$name = $cfg[$name];
			}
		}

		$id    = $this->getName() . $block_id;
		$class = $this->getName() . '_block';
		if ($ctype === 'gedcom' && Auth::isManager($WT_TREE) || $ctype === 'user' && Auth::check()) {
			$title = '<a class="icon-admin" title="' . I18N::translate('Preferences') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;ctype=' . $ctype . '"></a>';
		} else {
			$title = '';
		}
		$title .= $this->getTitle() . ' — ' . $WT_TREE->getTitleHtml();

		$stats = new Stats($WT_TREE);

		$content = '';

		if ($show_last_update) {
			$content .= '<p>' . /* I18N: %s is a date */
				I18N::translate('This family tree was last updated on %s.', strip_tags($stats->gedcomUpdated())) . '</p>';
		}

		/** Responsive Design */
		$content .= '<div class="stat-table1">';
		if ($stat_indi) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Individuals') . '</div><div class="facts_value stats_value stat-cell"><a href="' . 'indilist.php?surname_sublist=no&amp;ged=' . $WT_TREE->getNameUrl() . '">' . $stats->totalIndividuals() . '</a></div></div>';
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Males') . '</div><div class="facts_value stats_value stat-cell">' . $stats->totalSexMales() . '<br>' . $stats->totalSexMalesPercentage() . '</div></div>';
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Females') . '</div><div class="facts_value stats_value stat-cell">' . $stats->totalSexFemales() . '<br>' . $stats->totalSexFemalesPercentage() . '</div></div>';
		}
		if ($stat_surname) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Total surnames') . '</div><div class="facts_value stats_value stat-cell"><a href="indilist.php?show_all=yes&amp;surname_sublist=yes&amp;ged=' . $WT_TREE->getNameUrl() . '">' . $stats->totalSurnames() . '</a></div></div>';
		}
		if ($stat_fam) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Families') . '</div><div class="facts_value stats_value stat-cell"><a href="famlist.php?ged=' . $WT_TREE->getNameUrl() . '">' . $stats->totalFamilies() . '</a></div></div>';
		}
		if ($stat_sour) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Sources') . '</div><div class="facts_value stats_value stat-cell"><a href="sourcelist.php?ged=' . $WT_TREE->getNameUrl() . '">' . $stats->totalSources() . '</a></div></div>';
		}
		if ($stat_media) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Media objects') . '</div><div class="facts_value stats_value stat-cell"><a href="medialist.php?ged=' . $WT_TREE->getNameUrl() . '">' . $stats->totalMedia() . '</a></div></div>';
		}
		if ($stat_repo) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Repositories') . '</div><div class="facts_value stats_value stat-cell"><a href="repolist.php?ged=' . $WT_TREE->getNameUrl() . '">' . $stats->totalRepositories() . '</a></div></div>';
		}
		if ($stat_events) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Total events') . '</div><div class="facts_value stats_value stat-cell">' . $stats->totalEvents() . '</div></div>';
		}
		if ($stat_users) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Total users') . '</div><div class="facts_value stats_value stat-cell">';
			if (Auth::isManager($WT_TREE)) {
				$content .= '<a href="admin_users.php">' . $stats->totalUsers() . '</a>';
			} else {
				$content .= $stats->totalUsers();
			}
			$content .= '</div></div>';
		}
		if (!$block) {
			$content .= '</div><div class="facts_table stat-table2">';
		}
		if ($stat_first_birth) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Earliest birth year') . '</div><div class="facts_value stats_value stat-cell">' . $stats->firstBirthYear() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . $stats->firstBirth() . '</div>';
			}
			$content .= '</div>';
		}
		if ($stat_last_birth) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Latest birth year') . '</div><div class="facts_value stats_value stat-cell">' . $stats->lastBirthYear() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . $stats->lastBirth() . '</div>';
			}
			$content .= '</div>';
		}
		if ($stat_first_death) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Earliest death year') . '</div><div class="facts_value stats_value stat-cell">' . $stats->firstDeathYear() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . $stats->firstDeath() . '</div>';
			}
			$content .= '</div>';
		}
		if ($stat_last_death) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Latest death year') . '</div><div class="facts_value stats_value stat-cell">' . $stats->lastDeathYear() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . $stats->lastDeath() . '</div>';
			}
			$content .= '</div>';
		}
		if ($stat_long_life) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Individual who lived the longest') . '</div><div class="facts_value stats_value stat-cell">' . $stats->longestLifeAge() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . $stats->longestLife() . '</div>';
			}
			$content .= '</div>';
		}
		if ($stat_avg_life) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Average age at death') . '</div><div class="facts_value stats_value stat-cell">' . $stats->averageLifespan() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . I18N::translate('Males') . ':&nbsp;' . $stats->averageLifespanMale();
				$content .= '&nbsp;&nbsp;&nbsp;' . I18N::translate('Females') . ':&nbsp;' . $stats->averageLifespanFemale() . '</div>';
			}
			$content .= '</div>';
		}

		if ($stat_most_chil && !$block) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Family with the most children') . '</div><div class="facts_value stats_value stat-cell">' . $stats->largestFamilySize() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left">' . $stats->largestFamily() . '</div>';
			}
			$content .= '</div>';
		}
		if ($stat_avg_chil) {
			$content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Average number of children per family') . '</div><div class="facts_value stats_value stat-cell">' . $stats->averageChildren() . '</div>';
			if (!$block) {
				$content .= '<div class="facts_value stat-cell left"></div>';
			}
			$content .= '</div>';
		}
		$content .= '</div>';

		if ($show_common_surnames) {
			$surnames = FunctionsDb::getTopSurnames($WT_TREE->getTreeId(), 0, (int) $number_of_surnames);

			$all_surnames = [];
			foreach (array_keys($surnames) as $surname) {
				$all_surnames = array_merge($all_surnames, QueryName::surnames($WT_TREE, $surname, '', false, false));
			}

			if (!empty($surnames)) {
				ksort($all_surnames);
				$content .= '<div class="clearfloat">';
				$content .= '<p>';
				$content .= '<strong>' . I18N::translate('Most common surnames') . '</strong>';
				$content .= '<br>';
				$content .= '<span class="common_surnames">' . FunctionsPrintLists::surnameList($all_surnames, 2, false, 'indilist.php', $WT_TREE) . '</span>';
				$content .= '</p>';
				$content .= '</div>';
			}
		}

		if ($template) {
			return Theme::theme()->formatBlock($id, $title, $class, $content);
		} else {
			return $content;
		}
	}

	/** {@inheritdoc} */
	public function loadAjax() {
		return true;
	}

	/** {@inheritdoc} */
	public function isUserBlock() {
		return true;
	}

	/** {@inheritdoc} */
	public function isGedcomBlock() {
		return true;
	}

	/**
	 * An HTML form to edit block settings
	 *
	 * @param int $block_id
	 */
	public function configureBlock($block_id) {
		if (Filter::postBool('save') && Filter::checkCsrf()) {
			$this->setBlockSetting($block_id, 'show_last_update', Filter::postBool('show_last_update'));
			$this->setBlockSetting($block_id, 'show_common_surnames', Filter::postBool('show_common_surnames'));
			$this->setBlockSetting($block_id, 'number_of_surnames', Filter::postInteger('number_of_surnames'));
			$this->setBlockSetting($block_id, 'stat_indi', Filter::postBool('stat_indi'));
			$this->setBlockSetting($block_id, 'stat_fam', Filter::postBool('stat_fam'));
			$this->setBlockSetting($block_id, 'stat_sour', Filter::postBool('stat_sour'));
			$this->setBlockSetting($block_id, 'stat_other', Filter::postBool('stat_other'));
			$this->setBlockSetting($block_id, 'stat_media', Filter::postBool('stat_media'));
			$this->setBlockSetting($block_id, 'stat_repo', Filter::postBool('stat_repo'));
			$this->setBlockSetting($block_id, 'stat_surname', Filter::postBool('stat_surname'));
			$this->setBlockSetting($block_id, 'stat_events', Filter::postBool('stat_events'));
			$this->setBlockSetting($block_id, 'stat_users', Filter::postBool('stat_users'));
			$this->setBlockSetting($block_id, 'stat_first_birth', Filter::postBool('stat_first_birth'));
			$this->setBlockSetting($block_id, 'stat_last_birth', Filter::postBool('stat_last_birth'));
			$this->setBlockSetting($block_id, 'stat_first_death', Filter::postBool('stat_first_death'));
			$this->setBlockSetting($block_id, 'stat_last_death', Filter::postBool('stat_last_death'));
			$this->setBlockSetting($block_id, 'stat_long_life', Filter::postBool('stat_long_life'));
			$this->setBlockSetting($block_id, 'stat_avg_life', Filter::postBool('stat_avg_life'));
			$this->setBlockSetting($block_id, 'stat_most_chil', Filter::postBool('stat_most_chil'));
			$this->setBlockSetting($block_id, 'stat_avg_chil', Filter::postBool('stat_avg_chil'));
		}

		$show_last_update     = $this->getBlockSetting($block_id, 'show_last_update', '1');
		$show_common_surnames = $this->getBlockSetting($block_id, 'show_common_surnames', '1');
		$number_of_surnames   = $this->getBlockSetting($block_id, 'number_of_surnames', self::DEFAULT_NUMBER_OF_SURNAMES);
		$stat_indi            = $this->getBlockSetting($block_id, 'stat_indi', '1');
		$stat_fam             = $this->getBlockSetting($block_id, 'stat_fam', '1');
		$stat_sour            = $this->getBlockSetting($block_id, 'stat_sour', '1');
		$stat_media           = $this->getBlockSetting($block_id, 'stat_media', '1');
		$stat_repo            = $this->getBlockSetting($block_id, 'stat_repo', '1');
		$stat_surname         = $this->getBlockSetting($block_id, 'stat_surname', '1');
		$stat_events          = $this->getBlockSetting($block_id, 'stat_events', '1');
		$stat_users           = $this->getBlockSetting($block_id, 'stat_users', '1');
		$stat_first_birth     = $this->getBlockSetting($block_id, 'stat_first_birth', '1');
		$stat_last_birth      = $this->getBlockSetting($block_id, 'stat_last_birth', '1');
		$stat_first_death     = $this->getBlockSetting($block_id, 'stat_first_death', '1');
		$stat_last_death      = $this->getBlockSetting($block_id, 'stat_last_death', '1');
		$stat_long_life       = $this->getBlockSetting($block_id, 'stat_long_life', '1');
		$stat_avg_life        = $this->getBlockSetting($block_id, 'stat_avg_life', '1');
		$stat_most_chil       = $this->getBlockSetting($block_id, 'stat_most_chil', '1');
		$stat_avg_chil        = $this->getBlockSetting($block_id, 'stat_avg_chil', '1');

		?>
		<tr>
			<td class="descriptionbox wrap width33">
				<label for="show-last-update">
					<?= /* I18N: label for yes/no option */ I18N::translate('Show date of last update') ?>
				</label>
			</td>
			<td class="optionbox">
				<input type="checkbox" value="yes" id="show-last-update" name="show_last_update" <?= $show_last_update ? 'checked' : '' ?>>
			</td>
		</tr>
		<tr>
			<td class="descriptionbox wrap width33">
				<?= I18N::translate('Statistics') ?>
			</td>
			<td class="optionbox">
				<table>
					<tbody>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_indi" <?= $stat_indi ? 'checked' : '' ?>>
									<?= I18N::translate('Individuals') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_first_birth" <?= $stat_first_birth ? 'checked' : '' ?>>
									<?= I18N::translate('Earliest birth year') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_surname" <?= $stat_surname ? 'checked' : '' ?>>
									<?= I18N::translate('Total surnames') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_last_birth" <?= $stat_last_birth ? 'checked' : '' ?>>
									<?= I18N::translate('Latest birth year') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_fam" <?= $stat_fam ? 'checked' : '' ?>>
									<?= I18N::translate('Families') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_first_death" <?= $stat_first_death ? 'checked' : '' ?>>
									<?= I18N::translate('Earliest death year') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_sour" <?= $stat_sour ? 'checked' : '' ?>>
									<?= I18N::translate('Sources') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_last_death" <?= $stat_last_death ? 'checked' : '' ?>>
									<?= I18N::translate('Latest death year') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_media" <?= $stat_media ? 'checked' : '' ?>>
									<?= I18N::translate('Media objects') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_long_life" <?= $stat_long_life ? 'checked' : '' ?>>
									<?= I18N::translate('Individual who lived the longest') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_repo" <?= $stat_repo ? 'checked' : '' ?>>
									<?= I18N::translate('Repositories') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_avg_life" <?= $stat_avg_life ? 'checked' : '' ?>>
									<?= I18N::translate('Average age at death') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_events" <?= $stat_events ? 'checked' : '' ?>>
									<?= I18N::translate('Total events') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_most_chil" <?= $stat_most_chil ? 'checked' : '' ?>>
									<?= I18N::translate('Family with the most children') ?>
								</label>
							</td>
						</tr>
						<tr>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_users" <?= $stat_users ? 'checked' : '' ?>>
									<?= I18N::translate('Total users') ?>
								</label>
							</td>
							<td>
								<label>
									<input type="checkbox" value="yes" name="stat_avg_chil" <?= $stat_avg_chil ? 'checked' : '' ?>>
									<?= I18N::translate('Average number of children per family') ?>
								</label>
							</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
		<tr>
			<td class="descriptionbox wrap width33">
				<label for="show-common-surnames">
					<?= I18N::translate('Most common surnames') ?>
				</label>
			</td>
			<td class="optionbox">
				<input type="checkbox" value="yes" id="show-common-surnames" name="show_common_surnames" <?= $show_common_surnames ? 'checked' : '' ?>>
			</td>
		</tr>
		<tr>
			<td class="descriptionbox wrap width33">
				<label for="number-of-surnames">
					<?= /* I18N: ... to show in a list */ I18N::translate('Number of surnames') ?>
				</label>
			</td>
			<td class="optionbox">
				<input
					id="number-of-surnames"
					maxlength="5"
					name="number_of_surnames"
					pattern="[1-9][0-9]*"
					required
					type="text"
					value="<?= Filter::escapeHtml($number_of_surnames) ?>"
				>
			</td>
		</tr>
		<?php
	}
}