當前位置: 首頁>>代碼示例>>PHP>>正文


PHP safe_GET函數代碼示例

本文整理匯總了PHP中safe_GET函數的典型用法代碼示例。如果您正苦於以下問題:PHP safe_GET函數的具體用法?PHP safe_GET怎麽用?PHP safe_GET使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了safe_GET函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: BaseController

 /**
  * constructor for this class
  */
 function BaseController()
 {
     $this->view = safe_GET('view', 'preview');
     $this->action = safe_GET('action');
     $this->show_changes = safe_GET('show_changes', 'no', 'yes') == 'yes';
     // if not specified, then default to "yes"
 }
開發者ID:bitweaver,項目名稱:phpgedview,代碼行數:10,代碼來源:basecontrol.php

示例2: define

 * @package PhpGedView
 */
define('PGV_SCRIPT_NAME', 'editnews.php');
require './config.php';
$useFCK = file_exists(PGV_ROOT . 'modules/FCKeditor/fckeditor.php');
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 
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:editnews.php

示例3: init

 function init()
 {
     global $PRIV_HIDE, $PRIV_PUBLIC, $ENABLE_CLIPPINGS_CART, $SCRIPT_NAME, $pgv_lang, $SERVER_URL, $CONTACT_EMAIL, $HOME_SITE_TEXT, $HOME_SITE_URL, $MEDIA_DIRECTORY;
     global $GEDCOM, $CHARACTER_SET, $cart;
     if (!isset($ENABLE_CLIPPINGS_CART)) {
         $ENABLE_CLIPPINGS_CART = $PRIV_HIDE;
     }
     if ($ENABLE_CLIPPINGS_CART === true) {
         $ENABLE_CLIPPING_CART = $PRIV_PUBLIC;
     }
     if ($ENABLE_CLIPPINGS_CART < PGV_USER_ACCESS_LEVEL) {
         header("Location: index.php");
         exit;
     }
     if (!isset($_SESSION['exportConvPath'])) {
         $_SESSION['exportConvPath'] = $MEDIA_DIRECTORY;
     }
     if (!isset($_SESSION['exportConvSlashes'])) {
         $_SESSION['exportConvSlashes'] = 'forward';
     }
     $this->action = safe_GET("action");
     $this->id = safe_GET('id');
     $remove = safe_GET('remove', "", "no");
     $convert = safe_GET('convert', "", "no");
     $this->Zip = safe_GET('Zip');
     $this->IncludeMedia = safe_GET('IncludeMedia');
     $this->conv_path = safe_GET('conv_path', PGV_REGEX_NOSCRIPT, $_SESSION['exportConvPath']);
     $this->conv_slashes = safe_GET('conv_slashes', array('forward', 'backward'), $_SESSION['exportConvSlashes']);
     $this->privatize_export = safe_GET('privatize_export', array('none', 'visitor', 'user', 'gedadmin', 'admin'));
     $this->filetype = safe_GET('filetype');
     $this->level1 = safe_GET('level1');
     $this->level2 = safe_GET('level2');
     $this->level3 = safe_GET('level3');
     if (empty($this->filetype)) {
         $this->filetype = "gedcom";
     }
     $others = safe_GET('others');
     $item = safe_GET('item');
     if (!isset($cart)) {
         $cart = $_SESSION['cart'];
     }
     $this->type = safe_GET('type');
     $this->conv_path = stripLRMRLM($this->conv_path);
     $_SESSION['exportConvPath'] = $this->conv_path;
     // remember this for the next Download
     $_SESSION['exportConvSlashes'] = $this->conv_slashes;
     if ($this->action == 'add') {
         if (empty($this->type) && !empty($this->id)) {
             $this->type = "";
             $obj = GedcomRecord::getInstance($this->id);
             if (is_null($obj)) {
                 $this->id = "";
                 $this->action = "";
             } else {
                 $this->type = strtolower($obj->getType());
             }
         } else {
             if (empty($this->id)) {
                 $this->action = "";
             }
         }
         if (!empty($this->id) && $this->type != 'fam' && $this->type != 'indi' && $this->type != 'sour') {
             $this->action = 'add1';
         }
     }
     if ($this->action == 'add1') {
         $clipping = array();
         $clipping['type'] = $this->type;
         $clipping['id'] = $this->id;
         $clipping['gedcom'] = $GEDCOM;
         $ret = $this->add_clipping($clipping);
         if ($ret) {
             if ($this->type == 'sour') {
                 if ($others == 'linked') {
                     foreach (fetch_linked_indi($this->id, 'SOUR', PGV_GED_ID) as $indi) {
                         if ($indi->canDisplayName()) {
                             $this->add_clipping(array('type' => 'indi', 'id' => $indi->getXref()));
                         }
                     }
                     foreach (fetch_linked_fam($this->id, 'SOUR', PGV_GED_ID) as $fam) {
                         if ($fam->canDisplayName()) {
                             $this->add_clipping(array('type' => 'fam', 'id' => $fam->getXref()));
                         }
                     }
                 }
             }
             if ($this->type == 'fam') {
                 if ($others == 'parents') {
                     $parents = find_parents($this->id);
                     if (!empty($parents["HUSB"])) {
                         $clipping = array();
                         $clipping['type'] = "indi";
                         $clipping['id'] = $parents["HUSB"];
                         $ret = $this->add_clipping($clipping);
                     }
                     if (!empty($parents["WIFE"])) {
                         $clipping = array();
                         $clipping['type'] = "indi";
                         $clipping['id'] = $parents["WIFE"];
                         $ret = $this->add_clipping($clipping);
//.........這裏部分代碼省略.........
開發者ID:bitweaver,項目名稱:phpgedview,代碼行數:101,代碼來源:clippings_ctrl.php

示例4: define

* phpGedView: Genealogy Viewer
* Copyright (C) 2002 to 2009 PGV 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 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
*
* @version $Id: config_download.php 6879 2010-01-30 11:35:46Z fisharebest $
* @package PhpGedView
* @subpackage Admin
*/
define('PGV_SCRIPT_NAME', 'config_download.php');
require './config.php';
if (PGV_ADMIN_USER_EXISTS && !PGV_USER_IS_ADMIN && $CONFIGURED) {
    header('Location: admin.php');
    exit;
}
$file = safe_GET('file', PGV_REGEX_NOSCRIPT, 'config.php');
header('Content-Type: text/plain');
header('Content-Disposition: attachment; filename="' . $file . '"');
echo $_SESSION[$file];
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:config_download.php

示例5: array

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>';
    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;
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:export_gedcom.php

示例6: print_simple_footer

        }
    }
    if (!$related) {
        echo $pgv_lang["access_denied"];
        print_simple_footer();
        exit;
    }
}
//-- find the latest gedrec for the individual
if (!isset($pgv_changes[$pid . "_" . PGV_GEDCOM])) {
    $gedrec = find_gedcom_record($pid, PGV_GED_ID);
} else {
    $gedrec = find_updated_record($pid, PGV_GED_ID);
}
// Don't allow edits if the record has changed since the edit-link was created
checkChangeTime($pid, $gedrec, safe_GET('accesstime', PGV_REGEX_INTEGER));
//-- only allow edit of individual records
$disp = true;
$ct = preg_match("/0 @{$pid}@ (.*)/", $gedrec, $match);
if ($ct > 0) {
    $type = trim($match[1]);
    if ($type == "INDI") {
        $disp = displayDetailsById($pid);
    } else {
        echo $pgv_lang["access_denied"];
        print_simple_footer();
        exit;
    }
}
if (!$disp || !$ALLOW_EDIT_GEDCOM) {
    echo $pgv_lang["access_denied"];
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:edit_quickupdate.php

示例7: define

 *
 * 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: familybook.php 6879 2010-01-30 11:35:46Z fisharebest $
 */
define('PGV_SCRIPT_NAME', 'familybook.php');
require './config.php';
require_once PGV_ROOT . 'includes/functions/functions_charts.php';
// Extract form variables
$pid = safe_GET_xref('pid');
$show_full = safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS);
$show_spouse = safe_GET('show_spouse', '1', '0');
$descent = safe_GET_integer('descent', 0, 9, 5);
$generations = safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, 2);
$box_width = safe_GET_integer('box_width', 50, 300, 100);
// -- size of the boxes
if (!$show_full) {
    $bwidth = $bwidth / 1.5;
}
$bwidth = (int) ($bwidth * $box_width / 100);
if ($show_full == false) {
    $bheight = (int) ($bheight / 2.5);
}
$bhalfheight = (int) ($bheight / 2);
// -- root id
$pid = check_rootid($pid);
$person = Person::getInstance($pid);
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:familybook.php

示例8: init

 function init()
 {
     global $MEDIA_DIRECTORY, $USE_MEDIA_FIREWALL, $GEDCOM, $pgv_changes;
     $filename = decrypt(safe_GET('filename'));
     $this->mid = safe_GET_xref('mid');
     if ($USE_MEDIA_FIREWALL && empty($filename) && empty($this->mid)) {
         // this section used by mediafirewall.php to determine what media file was requested
         if (isset($_SERVER['REQUEST_URI'])) {
             // NOTE: format of this server variable:
             // Apache: /phpGedView/media/a.jpg
             // IIS:    /phpGedView/mediafirewall.php?404;http://server/phpGedView/media/a.jpg
             $requestedfile = $_SERVER['REQUEST_URI'];
             // urldecode the request
             $requestedfile = rawurldecode($requestedfile);
             // make sure the requested file is in the media directory
             if (strpos($requestedfile, $MEDIA_DIRECTORY) !== false) {
                 // strip off the pgv directory and media directory from the requested url so just the image information is left
                 $filename = substr($requestedfile, strpos($requestedfile, $MEDIA_DIRECTORY) + strlen($MEDIA_DIRECTORY) - 1);
                 // if user requested a thumbnail, lookup permissions based on the original image
                 $filename = str_replace('/thumbs', '', $filename);
             }
         }
     }
     //Checks to see if the File Name ($filename) exists
     if (!empty($filename)) {
         //If the File Name ($filename) is set, then it will call the method to get the Media ID ($this->mid) from the File Name ($filename)
         $this->mid = get_media_id_from_file($filename);
         if (!$this->mid) {
             //This will set the Media ID to be false if the File given doesn't match to anything in the database
             $this->mid = false;
             // create a very basic gedcom record for this file so that the functions of the media object will work
             // this is used by the media firewall when requesting an object that exists in the media firewall directory but not in the gedcom
             $this->mediaobject = new Media("0 @" . "0" . "@ OBJE\n1 FILE " . $filename);
         }
     }
     //checks to see if the Media ID ($this->mid) is set. If the Media ID isn't set then there isn't any information avaliable for that picture the picture doesn't exist.
     if ($this->mid) {
         //This creates a Media Object from the getInstance method of the Media Class. It takes the Media ID ($this->mid) and creates the object.
         $this->mediaobject = Media::getInstance($this->mid);
         //This sets the controller ID to be the Media ID
         $this->pid = $this->mid;
     }
     if (is_null($this->mediaobject)) {
         return false;
     }
     $this->mediaobject->ged_id = PGV_GED_ID;
     // This record is from a file
     //-- perform the desired action
     switch ($this->action) {
         case "addfav":
             $this->addFavorite();
             break;
         case "accept":
             $this->acceptChanges();
             break;
         case "undo":
             $this->mediaobject->undoChange();
             break;
     }
     if ($this->mediaobject->canDisplayDetails()) {
         $this->canedit = PGV_USER_CAN_EDIT;
     }
 }
開發者ID:bitweaver,項目名稱:phpgedview,代碼行數:63,代碼來源:media_ctrl.php

示例9: define

 * 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 Admin
 * @version $Id: editconfig_help.php 6879 2010-01-30 11:35:46Z fisharebest $
 */
define('PGV_SCRIPT_NAME', 'editconfig_help.php');
if (file_exists('./config.php')) {
    require './config.php';
} else {
    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") {
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:editconfig_help.php

示例10: define

* @package PhpGedView
* @subpackage Edit
* @version $Id: autocomplete.php 6996 2010-12-01 11:29:54Z canajun2eh $
*/
define('PGV_SCRIPT_NAME', 'autocomplete.php');
require './config.php';
header("Content-Type: text/plain; charset={$CHARACTER_SET}");
// We have finished writing to $_SESSION, so release the lock
session_write_close();
//-- args
$FILTER = safe_GET('q', PGV_REGEX_UNSAFE);
// we can search on '"><& etc.
$FILTER = UTF8_strtoupper($FILTER);
$OPTION = safe_GET('option');
$FORMAT = safe_GET('fmt');
$FIELD = safe_GET('field');
switch ($FIELD) {
    case 'INDI':
        $data = autocomplete_INDI($FILTER, $OPTION);
        break;
    case 'FAM':
        $data = autocomplete_FAM($FILTER, $OPTION);
        break;
    case 'NOTE':
        $data = autocomplete_NOTE($FILTER);
        break;
    case 'SOUR':
        $data = autocomplete_SOUR($FILTER);
        break;
    case 'SOUR_TITL':
        $data = autocomplete_SOUR($FILTER);
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:autocomplete.php

示例11: define

 *
 * This Page Is Valid XHTML 1.0 Transitional! > 12 September 2005
 *
 * @author PGV Development Team
 * @package PhpGedView
 * @subpackage Admin
 * @version $Id: editgedcoms.php 6879 2010-01-30 11:35:46Z fisharebest $
 */
define('PGV_SCRIPT_NAME', 'editgedcoms.php');
require './config.php';
loadLangFile("pgv_confighelp");
$all_gedcoms = get_all_gedcoms();
asort($all_gedcoms);
$action = safe_GET('action', array('delete', 'setdefault'));
$ged = safe_GET('ged', $all_gedcoms);
$default_ged = safe_GET('default_ged', $all_gedcoms);
/**
 * Check if a gedcom file is downloadable over the internet
 *
 * @author opus27
 * @param string $gedfile gedcom file
 * @return mixed 	$url if file is downloadable, false if not
 */
function check_gedcom_downloadable($gedfile)
{
    global $SERVER_URL, $pgv_lang;
    //$url = $SERVER_URL;
    $url = "http://localhost/";
    if (substr($url, -1, 1) != "/") {
        $url .= "/";
    }
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:editgedcoms.php

示例12: init

 /**
  * Initialization function
  */
 function init()
 {
     global $USE_RIN, $MAX_ALIVE_AGE, $bwidth, $bheight, $pbwidth, $pbheight, $GEDCOM, $GEDCOM_DEFAULT_TAB, $pgv_lang, $PEDIGREE_FULL_DETAILS, $MAX_DESCENDANCY_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS, $show_full;
     $this->sexarray["M"] = $pgv_lang["male"];
     $this->sexarray["F"] = $pgv_lang["female"];
     $this->sexarray["U"] = $pgv_lang["unknown"];
     // Extract parameters from form
     $this->pid = safe_GET_xref('pid');
     $this->show_full = safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS);
     $this->chart_style = safe_GET_integer('chart_style', 0, 3, 0);
     $this->generations = safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS);
     $this->box_width = safe_GET_integer('box_width', 50, 300, 100);
     // This is passed as a global.  A parameter would be better...
     $show_full = $this->show_full;
     if (!isset($this->view)) {
         $this->view = "";
     }
     if (!isset($this->personcount)) {
         $this->personcount = 1;
     }
     $this->Dbwidth *= $this->box_width / 100;
     if (!$this->show_full) {
         $bwidth *= $this->box_width / 150;
     } else {
         $bwidth *= $this->box_width / 100;
     }
     if (!$this->show_full) {
         $bheight = $bheight / 1.5;
     }
     $pbwidth = $bwidth + 12;
     $pbheight = $bheight + 14;
     $this->show_changes = safe_GET('show_changes');
     $this->action = safe_GET('action');
     // Validate form variables
     $this->pid = check_rootid($this->pid);
     if (strlen($this->name) < 30) {
         $this->cellwidth = "420";
     } else {
         $this->cellwidth = strlen($this->name) * 14;
     }
     $this->descPerson = Person::getInstance($this->pid);
     $this->name = $this->descPerson->getFullName();
     //-- if the person is from another gedcom then forward to the correct site
     /*
     if ($this->indi->isRemote()) {
     	header('Location: '.encode_url(decode_url($this->indi->getLinkUrl(), false)));
     	exit;
     }
     */
     if (!$this->isPrintPreview()) {
         $this->visibility = "hidden";
         $this->position = "absolute";
         $this->display = "none";
     }
     //-- perform the desired action
     switch ($this->action) {
         case "addfav":
             $this->addFavorite();
             break;
         case "accept":
             $this->acceptChanges();
             break;
         case "undo":
             $this->desc->undoChange();
             break;
     }
 }
開發者ID:bitweaver,項目名稱:phpgedview,代碼行數:70,代碼來源:descendancy_ctrl.php

示例13: BitGEDCOM

 * 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'];
    }
    print_help_index($help);
} else {
開發者ID:bitweaver,項目名稱:phpgedview,代碼行數:31,代碼來源:help_text.php

示例14: safe_GET

} else {
    $showList = false;
}
// Long lists can be broken down by given name
$falpha = safe_GET('falpha');
// All first names beginning with this letter
$show_all_firstnames = safe_GET('show_all_firstnames', array('no', 'yes'), 'no');
// We can show either a list of surnames or a list of names
$surname_sublist = safe_GET('surname_sublist', array('no', 'yes'));
if (!$surname_sublist) {
    $surname_sublist = safe_COOKIE('surname_sublist', array('no', 'yes'), 'yes');
}
setcookie('surname_sublist', $surname_sublist);
// We can either include or exclude married names.
// We default to exclude.
$show_marnm = safe_GET('show_marnm', array('no', 'yes'));
if (!$show_marnm) {
    $show_marnm = safe_COOKIE('show_marnm_famlist', array('no', 'yes'));
}
if (!$show_marnm) {
    $show_marnm = 'no';
}
setcookie('show_marnm_famlist', $show_marnm);
// Override $SHOW_MARRIED_NAMES for this page
$SHOW_MARRIED_NAMES = $show_marnm == 'yes';
// Fetch a list of the initial letters of all surnames in the database
$initials = get_indilist_salpha($SHOW_MARRIED_NAMES, true, PGV_GED_ID);
// If there are no individuals in the database, do something sensible
if (!$initials) {
    $initials[] = '@';
}
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:famlist.php

示例15: safe_GET

// Validate user parameters
if (!isset($_SESSION['exportConvPath'])) {
    $_SESSION['exportConvPath'] = $MEDIA_DIRECTORY;
}
if (!isset($_SESSION['exportConvSlashes'])) {
    $_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 (!PGV_USER_GEDCOM_ADMIN || !$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();
開發者ID:rathervague,項目名稱:phpgedview,代碼行數:31,代碼來源:downloadgedcom.php


注:本文中的safe_GET函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。