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
|
<?php
/**
* Miscellaneous administrative functions
*
*
* webtrees: Web based Family History software
* Copyright (C) 2011 webtrees development team.
*
* Partly Derived from PhpGedView
* Copyright (C) 2002 to 2010 PGV Development Team. All rights reserved.
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @package webtrees
* @subpackage admin
* @version $Id$
*/
define('WT_SCRIPT_NAME', 'admin_site_other.php');
require './includes/session.php';
print_header(WT_I18N::translate('Add unlinked records'));
// The addnewXXX() functions work only for the default tree.
// Choose one...
$html='<p><form method="post" action="'.WT_SCRIPT_NAME.'" name="tree"><select name="ged" onChange="tree.submit();">';
$n=0;
foreach (get_gedcom_titles() as $gedcom) {
if (userGedcomAdmin(WT_USER_ID, $gedcom->gedcom_id)) {
$html.='<option value="'.htmlspecialchars($gedcom->gedcom_name).'"';
if ($gedcom->gedcom_id==WT_GED_ID) {
$html.=' selected="selected"';
}
$html.='>'.$gedcom->gedcom_title.'</option>';
++$n;
}
}
$html.='</select></form></p>';
// Don't show gedcom list if there is only one...
if ($n==1) {
$html='';
}
echo
'<div id="other">',
'<p>', WT_I18N::translate('Add unlinked records'), '</p>',
$html,
'<table id="other">',
'<tr><td>',
'<a href="javascript:;" onclick="addnewchild(\'\'); return false;">', WT_I18N::translate('Add an unlinked person'), '</a>',
help_link('edit_add_unlinked_person'),
'</td></tr>',
'<tr><td>',
'<a href="javascript:;" onclick="addnewnote(\'\'); return false;">', WT_I18N::translate('Add an unlinked note'), '</a>',
help_link('edit_add_unlinked_note'),
'</td></tr>',
'<tr><td>',
'<a href="javascript:;" onclick="addnewsource(\'\'); return false;">', WT_I18N::translate('Add an unlinked source'), '</a>',
help_link('edit_add_unlinked_source'),
'</td></tr>',
'</table>',
'</div>';
print_footer();
|