$gid = safe_REQUEST($_REQUEST, 'gid', PGV_REGEX_XREF); $linktoid = safe_REQUEST($_REQUEST, 'linktoid', PGV_REGEX_XREF); $action = safe_REQUEST($_REQUEST, 'action', PGV_REGEX_NOSCRIPT, 'showmediaform'); $folder = safe_REQUEST($_REQUEST, 'folder', PGV_REGEX_UNSAFE); $oldFolder = safe_REQUEST($_REQUEST, 'oldFolder', PGV_REGEX_UNSAFE); $filename = safe_REQUEST($_REQUEST, 'filename', PGV_REGEX_UNSAFE); $oldFilename = safe_REQUEST($_REQUEST, 'oldFilename', PGV_REGEX_UNSAFE, $filename); $level = safe_REQUEST($_REQUEST, 'level', PGV_REGEX_UNSAFE); $text = safe_REQUEST($_REQUEST, 'text', PGV_REGEX_UNSAFE); $tag = safe_REQUEST($_REQUEST, 'tag', PGV_REGEX_UNSAFE); $islink = safe_REQUEST($_REQUEST, 'islink', PGV_REGEX_UNSAFE); $glevels = safe_REQUEST($_REQUEST, 'glevels', PGV_REGEX_UNSAFE); $update_CHAN = !safe_POST_bool('preserve_last_changed'); $filename = decrypt($filename); $oldFilename = decrypt($oldFilename); print_simple_header($pgv_lang["add_media_tool"]); $disp = true; if (empty($pid) && !empty($mid)) { $pid = $mid; } if (!empty($pid)) { if (!isset($pgv_changes[$pid . "_" . $GEDCOM])) { $gedrec = find_media_record($pid); } else { $gedrec = find_updated_record($pid); } $disp = displayDetailsById($pid, "OBJE"); } if ($action == "update" || $action == "newentry") { if (!isset($linktoid) || $linktoid == "new") { $linktoid = "";
* 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 PhpGedView * @subpackage Display * @version $Id: addsearchlink.php 6879 2010-01-30 11:35:46Z fisharebest $ */ define('PGV_SCRIPT_NAME', 'addsearchlink.php'); require './config.php'; print_simple_header($pgv_lang["title_search_link"]); //-- only allow users with editing access to this page if (!PGV_USER_CAN_EDIT) { print $pgv_lang["access_denied"]; print_simple_footer(); exit; } if (isset($_REQUEST['pid'])) { $pid = $_REQUEST['pid']; } if (isset($_REQUEST['server'])) { $server = $_REQUEST['server']; } if (isset($_REQUEST['indiName'])) { $indiName = $_REQUEST['indiName']; }
require PGV_ROOT . 'includes/functions/functions_editlang.php'; //-- make sure that they have admin status before they can use this page //-- otherwise have them login again if (!PGV_USER_IS_ADMIN) { echo "Please close this window and do a Login in the former window first..."; exit; } $lang_filename = safe_REQUEST($_REQUEST, 'lang_filename', PGV_REGEX_NOSCRIPT, ''); $file_type = safe_REQUEST($_REQUEST, 'file_type', PGV_REGEX_NOSCRIPT, ''); $language2 = safe_REQUEST($_REQUEST, 'language2', PGV_REGEX_NOSCRIPT, ''); $ls01 = safe_REQUEST($_REQUEST, 'ls01', PGV_REGEX_NOSCRIPT, ''); $ls02 = safe_REQUEST($_REQUEST, 'ls02', PGV_REGEX_NOSCRIPT, ''); $lang_filename_orig = safe_REQUEST($_REQUEST, 'lang_filename_orig', PGV_REGEX_NOSCRIPT, ''); $action = safe_REQUEST($_REQUEST, 'action', PGV_REGEX_NOSCRIPT, ''); $anchor = safe_REQUEST($_REQUEST, 'anchor', PGV_REGEX_NOSCRIPT, ''); print_simple_header($pgv_lang["editlang"]); echo PGV_JS_START, "self.focus();", PGV_JS_END; switch ($file_type) { case "facts": $lang_filename = $factsfile[$language2]; $lang_filename_orig = $factsfile["english"]; break; case "configure_help": $lang_filename = $confighelpfile[$language2]; $lang_filename_orig = $confighelpfile["english"]; break; case "help_text": $lang_filename = $helptextfile[$language2]; $lang_filename_orig = $helptextfile["english"]; break; case "admin":
if ($useFCK) { require PGV_ROOT . 'modules/FCKeditor/fckeditor.php'; } if (!PGV_USER_ID) { print_simple_header(""); print $pgv_lang["access_denied"]; print_simple_footer(); exit; } $action = safe_GET('action', array('compose', 'save', 'delete'), 'compose'); $news_id = safe_GET('news_id'); $username = safe_REQUEST($_REQUEST, 'username'); $date = safe_POST('date', PGV_REGEX_UNSAFE); $title = safe_POST('title', PGV_REGEX_UNSAFE); $text = safe_POST('text', PGV_REGEX_UNSAFE); print_simple_header($pgv_lang["edit_news"]); if (empty($username)) { $username = $GEDCOM; } if ($action == "compose") { print '<span class="subheaders">' . $pgv_lang["edit_news"] . '</span>'; ?> <script language="JavaScript" type="text/javascript"> function checkForm(frm) { if (frm.title.value=="") { alert('<?php print $pgv_lang["enter_title"]; ?> '); document.messageform.title.focus(); return false;
* @subpackage Edit * @version $Id: edit_changes.php 6879 2010-01-30 11:35:46Z fisharebest $ */ define('PGV_SCRIPT_NAME', 'edit_changes.php'); require './config.php'; require PGV_ROOT . 'includes/functions/functions_edit.php'; if (!PGV_USER_CAN_ACCEPT) { header('Location: login.php?url=edit_changes.php'); exit; } require $INDEX_DIRECTORY . 'pgv_changes.php'; $action = safe_GET('action'); $cid = safe_GET('cid'); $index = safe_GET('index'); $ged = safe_GET('ged'); print_simple_header($pgv_lang['review_changes']); ?> <script language="JavaScript" type="text/javascript"> <!-- function show_gedcom_record(xref) { var recwin = window.open("gedrecord.php?fromfile=1&pid="+xref, "_blank", "top=50, left=50, width=600, height=400, scrollbars=1, scrollable=1, resizable=1"); } function showchanges() { window.location = '<?php echo PGV_SCRIPT_NAME; ?> '; } function show_diff(diffurl) { window.opener.location = diffurl;
$COLLATION[$ln] = $_POST["v_collation"]; $DATE_FORMAT_array[$ln] = $_POST["v_date_format"]; $TIME_FORMAT_array[$ln] = $_POST["v_time_format"]; $WEEK_START_array[$ln] = $_POST["v_week_start"]; if ($_POST["v_text_direction"] == "0") { $TEXT_DIRECTION_array[$ln] = "ltr"; } else { $TEXT_DIRECTION_array[$ln] = "rtl"; } $NAME_REVERSE_array[$ln] = $_POST["v_name_reverse"]; } if ($action == "save" or $action == "toggleActive") { $error = update_lang_settings(); if ($error != "") { if (!$sentHeader) { print_simple_header($pgv_lang["config_lang_utility"]); $sentHeader = true; echo '<div class="center"><center>'; } echo '<span class="error">', $pgv_lang[$error], '</span><br /><br />'; echo '<form name="Form2" method="post" action="', PGV_SCRIPT_NAME, '">'; echo '<table class="facts_table">'; echo '<tr><td class="facts_value" style="text-align:center; " >'; srand((double) microtime() * 1000000); echo '<input type="submit" value="', $pgv_lang["close_window"], '" onclick="window.opener.showchanges(); self.close();" />'; echo '</td></tr>'; echo '</table>'; echo '</form>'; } } if ($sentHeader) {
require_once PGV_ROOT . 'includes/functions/functions_export.php'; // Which gedcoms do we have permission to export? $gedcoms = array(); foreach (get_all_gedcoms() as $ged_id => $gedcom) { if (userGedcomAdmin(PGV_USER_ID, $ged_id)) { $gedcoms[$ged_id] = $gedcom; } } // If we don't have permission to administer any gedcoms, redirect to // this page, which will force a login and provide a list. if (empty($gedcoms)) { header('Location: editgedcoms.php'); } // Which gedcom have we requested to export $export = safe_GET('export', $gedcoms); print_simple_header($pgv_lang['ged_export']); if ($export) { $ged_id = get_id_from_gedcom($export); $filename = get_gedcom_setting($ged_id, 'path'); echo '<h1>', $pgv_lang['ged_export'], '</h1>'; echo '<p>', htmlspecialchars(filename_decode($export)), ' => ', $filename, '</p>'; flush(); $gedout = fopen($filename . '.tmp', 'w'); if ($gedout) { $start = microtime(true); $exportOptions = array(); $exportOptions['privatize'] = 'none'; $exportOptions['toANSI'] = 'no'; $exportOptions['noCustomTags'] = 'no'; $exportOptions['path'] = $MEDIA_DIRECTORY; $exportOptions['slashes'] = 'forward';
$action = "filter"; break; case "repo": print_simple_header($pgv_lang["repo_list"]); $action = "filter"; break; case "note": print_simple_header($pgv_lang["find_shared_note"]); $action = "filter"; break; case "source": print_simple_header($pgv_lang["find_source"]); $action = "filter"; break; case "specialchar": print_simple_header($pgv_lang["find_specialchar"]); $action = "filter"; break; } echo PGV_JS_START; ?> function pasteid(id, name, thumb) { if(thumb) { window.opener.<?php echo $callback; ?> (id, name, thumb); <?php if (!$multiple) { echo "window.close();"; }
if (isset($_POST["preserve_last_changed"]) && $_POST["preserve_last_changed"] == "on") { $update_CHAN = false; } else { $update_CHAN = true; } $addfacts = preg_split("/[,; ]/", $QUICK_ADD_FACTS); usort($addfacts, "factsort"); $reqdfacts = preg_split("/[,; ]/", $QUICK_REQUIRED_FACTS); $famaddfacts = preg_split("/[,; ]/", $QUICK_ADD_FAMFACTS); usort($famaddfacts, "factsort"); $famreqdfacts = preg_split("/[,; ]/", $QUICK_REQUIRED_FAMFACTS); $align = "right"; if ($TEXT_DIRECTION == "rtl") { $align = "left"; } print_simple_header($pgv_lang["quick_update_title"]); if ($ENABLE_AUTOCOMPLETE) { require PGV_ROOT . 'js/autocomplete.js.htm'; } //-- only allow logged in users to access this page if (!$ALLOW_EDIT_GEDCOM || !$USE_QUICK_UPDATE || !PGV_USER_ID) { echo $pgv_lang["access_denied"]; print_simple_footer(); exit; } if (!isset($closewin)) { $closewin = 0; } // TODO Decide whether to use GET/POST and appropriate validation $pid = safe_REQUEST($_REQUEST, 'pid', PGV_REGEX_XREF, PGV_USER_GEDCOM_ID); $action = safe_REQUEST($_REQUEST, 'action');
require './config.dist'; } loadLangFile("all"); require PGV_ROOT . 'includes/help_text_vars.php'; $help = safe_GET('help'); // Make sure this input variable isn't a script if (empty($help)) { exit; } // Quit if this isn't a legitimate request for help if (substr($help, -5) != "_help") { if (substr($help, 0, 5) != 'help_' || substr($help, -4) != '.php') { exit; } } print_simple_header($pgv_lang["config_help"]); print '<span class="helpheader">'; print_text("config_help"); print '</span><br /><br /><span class="helptext">'; if ($help == "help_contents_help") { if (PGV_USER_IS_ADMIN) { $help = "admin_help_contents_help"; print_text("admin_help_contents_head_help"); } else { print_text("help_contents_head_help"); } print_help_index($help); } else { if ($help == "help_uploadgedcom.php") { $help = "help_addgedcom.php"; }
* 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 PhpGedView * @subpackage Charts * @version $Id: addremotelink.php 6879 2010-01-30 11:35:46Z fisharebest $ */ define('PGV_SCRIPT_NAME', 'addremotelink.php'); require './config.php'; require PGV_ROOT . 'includes/controllers/remotelink_ctrl.php'; $controller = new RemoteLinkController(); $controller->init(); print_simple_header($pgv_lang['title_remote_link']); $pid = safe_REQUEST($_REQUEST, 'pid', PGV_REGEX_XREF); $action = safe_POST('action', array('addlink')); //-- only allow gedcom admins to create remote links if (!$controller->canAccess()) { echo '<span class="error">', $pgv_lang['access_denied'], '<br />'; if (!PGV_USER_GEDCOM_ADMIN) { echo $pgv_lang['user_cannot_edit']; } else { if (!$ALLOW_EDIT_GEDCOM) { echo $pgv_lang['gedcom_editing_disabled']; } else { echo $pgv_lang['privacy_prevented_editing']; if ($pid) { echo '<br />', $pgv_lang['privacy_not_granted'], ' ', $pid; }
* @version $Id$ */ /** * Initialization */ require_once '../kernel/setup_inc.php'; // Is package installed and enabled $gBitSystem->verifyPackage('phpgedview'); include_once PHPGEDVIEW_PKG_PATH . 'BitGEDCOM.php'; $gGedcom = new BitGEDCOM(); // leave manual config until we can move it to bitweaver table require "config.php"; loadLangFile("pgv_help, pgv_admin, pgv_editor, ra_lang, gm_lang, gm_help, sm_lang, sm_help"); // Load language keys require 'includes/help_text_vars.php'; print_simple_header($pgv_lang['help_header']); echo '<a name="top"></a><span class="helpheader">', $pgv_lang['help_header'], '</span><br /><br /><div class="helptext">'; $help = safe_GET('help'); $action = safe_GET('action'); if ($help == 'help_useradmin.php' && $action == 'edituser') { $help = 'edit_useradmin_help'; } if ($help == 'help_login_register.php' && $action == 'pwlost') { $help = 'help_login_lost_pw.php'; } if ($help == 'help_contents_help') { if (PGV_USER_IS_ADMIN) { $help = 'admin_help_contents_help'; echo $pgv_lang['admin_help_contents_head_help']; } else { echo $pgv_lang['help_contents_head_help'];
$pids_array_add = safe_REQUEST($_REQUEST, 'pids_array_add', PGV_REGEX_XREF); $pids_array_edit = safe_REQUEST($_REQUEST, 'pids_array_edit', PGV_REGEX_XREF); $update_CHAN = !safe_POST_bool('preserve_last_changed'); $uploaded_files = array(); // items for ASSO RELA selector : $assokeys = array('attendant', 'attending', 'best_man', 'bridesmaid', 'buyer', 'circumciser', 'civil_registrar', 'employee', 'employer', 'foster_child', 'foster_father', 'foster_mother', 'friend', 'godfather', 'godmother', 'godparent', 'godson', 'goddaughter', 'godchild', 'guardian', 'informant', 'lodger', 'nanny', 'nurse', 'owner', 'priest', 'rabbi', 'registry_officer', 'seller', 'servant', 'slave', 'twin', 'twin_brother', 'twin_sister', 'ward', 'witness', ''); $assorela = array(); foreach ($assokeys as $indexval => $key) { if (isset($pgv_lang["{$key}"])) { $assorela["{$key}"] = $pgv_lang["{$key}"]; } else { $assorela["{$key}"] = "? {$key}"; } } uasort($assorela, "stringsort"); print_simple_header('Edit Interface'); if ($ENABLE_AUTOCOMPLETE) { require PGV_ROOT . 'js/autocomplete.js.htm'; } echo PGV_JS_START; ?> var locale_date_format='<?php echo preg_replace('/[^DMY]/', '', str_replace(array('J', 'F'), array('D', 'M'), strtoupper($DATE_FORMAT))); ?> '; function findIndi(field, indiname) { pastefield = field; findwin = window.open('find.php?type=indi', '_blank', 'left=50, top=50, width=600, height=500, resizable=1, scrollbars=1'); return false; }
if (isset($_REQUEST['action'])) { $action = $_REQUEST['action']; } if (isset($_REQUEST['cid'])) { $cid = $_REQUEST['cid']; } if (isset($_REQUEST['index'])) { $index = $_REQUEST['index']; } if (isset($_REQUEST['ged'])) { $ged = $_REQUEST['ged']; } if (empty($action)) { $action = ""; } print_simple_header($pgv_lang["review_changes"]); ?> <script language="JavaScript" type="text/javascript"> <!-- function show_gedcom_record(xref) { var recwin = window.open("gedrecord.php?fromfile=1&pid="+xref, "_blank", "top=50,left=50,width=600,height=400,scrollbars=1,scrollable=1,resizable=1"); } function showchanges() { window.location = '<?php print $SCRIPT_NAME; ?> '; } function show_diff(diffurl) { window.opener.location = diffurl;