Пример #1
0
 *
 * 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: export_gedcom.php 6879 2010-01-30 11:35:46Z fisharebest $
 */
define('PGV_SCRIPT_NAME', 'export_gedcom.php');
require './config.php';
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>';
Пример #2
0
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * @author PGV Development Team
 * @package PhpGedView
 * @subpackage Privacy
 * @version $Id: edit_privacy.php 6879 2010-01-30 11:35:46Z fisharebest $
 */
define('PGV_SCRIPT_NAME', 'edit_privacy.php');
require './config.php';
require PGV_ROOT . 'includes/functions/functions_print_facts.php';
loadLangFile('pgv_confighelp, pgv_help');
if (empty($ged)) {
    $ged = $GEDCOM;
}
if (!userGedcomAdmin(PGV_USER_ID, $ged)) {
    header('Location: editgedcoms.php');
    exit;
}
$PRIVACY_CONSTANTS = array(PGV_PRIV_NONE => 'PGV_PRIV_NONE', PGV_PRIV_USER => 'PGV_PRIV_USER', PGV_PRIV_PUBLIC => 'PGV_PRIV_PUBLIC', PGV_PRIV_HIDE => 'PGV_PRIV_HIDE');
$action = safe_POST('action', 'update');
$v_new_person_privacy_access_ID = safe_POST('v_new_person_privacy_access_ID', PGV_REGEX_XREF);
$v_new_person_privacy_access_option = safe_POST('v_new_person_privacy_access_option', $PRIVACY_CONSTANTS);
$v_person_privacy_del = safe_POST('v_person_privacy_del', '1');
$v_person_privacy = safe_POST('v_person_privacy', $PRIVACY_CONSTANTS);
$v_new_user_privacy_username = safe_POST('v_new_user_privacy_username', get_all_users());
$v_new_user_privacy_access_ID = safe_POST('v_new_user_privacy_access_ID', PGV_REGEX_XREF);
$v_new_user_privacy_access_option = safe_POST('v_new_user_privacy_access_option', $PRIVACY_CONSTANTS);
$v_user_privacy_del = safe_POST('v_user_privacy_del', '1');
$v_user_privacy = safe_POST('v_user_privacy');
$v_new_global_facts_abbr = safe_POST('v_new_global_facts_abbr', array_keys($factarray));
Пример #3
0
 *
 * @package PhpGedView
 * @subpackage Admin
 * @version $Id$
 */
/**
 * load the main configuration and context
 */
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';
if (!userGedcomAdmin(getUserName()) || empty($fname) || preg_match("/\\.zip\$/", $fname) == 0) {
    print $pgv_lang['access_denied'];
    exit;
}
if (ini_get('zlib.output_compression')) {
    @ini_set('zlib.output_compression', 'Off');
}
header('Pragma: public');
// required
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
// required for certain browsers
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . $fname . '"');
header('Content-length: ' . filesize($INDEX_DIRECTORY . $fname));
Пример #4
0
    $_SESSION['exportConvSlashes'] = 'forward';
}
$ged = safe_GET('ged', get_all_gedcoms());
$action = safe_GET('action', 'download');
$remove = safe_GET('remove', 'yes', 'no');
$convert = safe_GET('convert', 'yes', 'no');
$zip = safe_GET('zip', 'yes', 'no');
$conv_path = safe_GET('conv_path', PGV_REGEX_NOSCRIPT, $_SESSION['exportConvPath']);
$conv_slashes = safe_GET('conv_slashes', array('forward', 'backward'), $_SESSION['exportConvSlashes']);
$privatize_export = safe_GET('privatize_export', array('none', 'visitor', 'user', 'gedadmin', 'admin'));
$filetype = safe_GET('filetype', array('gedcom', 'gramps'));
$conv_path = stripLRMRLM($conv_path);
$_SESSION['exportConvPath'] = $conv_path;
// remember this for the next Download
$_SESSION['exportConvSlashes'] = $conv_slashes;
if (!userGedcomAdmin(getUserName()) || empty($ged)) {
    header("Location: editgedcoms.php");
    exit;
}
if ($action == 'download') {
    $conv_path = rtrim(str_replace('\\', '/', trim($conv_path)), '/') . '/';
    // make sure we have a trailing slash here
    if ($conv_path == '/') {
        $conv_path = '';
    }
    $exportOptions = array();
    $exportOptions['privatize'] = $privatize_export;
    $exportOptions['toANSI'] = $convert;
    $exportOptions['noCustomTags'] = $remove;
    $exportOptions['path'] = $conv_path;
    $exportOptions['slashes'] = $conv_slashes;