本文整理汇总了PHP中BitBase::verifyIdParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP BitBase::verifyIdParameter方法的具体用法?PHP BitBase::verifyIdParameter怎么用?PHP BitBase::verifyIdParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitBase
的用法示例。
在下文中一共展示了BitBase::verifyIdParameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIdParameter
/**
* getIdParameter Gets an in-bounds, integer hash value it exists, or returns an optional default
*
* @param associativearray $pParamHash Hash of key=>value pairs
* @param string $pHashKey Key used to search for value
* @param string $pDefault Default value to return if not found. NULL if nothing is passed in.
* @access public
* @return TRUE if the input was numeric, FALSE if it wasn't
*/
public static function getIdParameter(&$pParamHash, $pKey, $pDefaultValue = NULL)
{
if (BitBase::verifyIdParameter($pParamHash, $pKey)) {
$ret = $pParamHash[$pKey];
} else {
$ret = $pDefaultValue;
}
return $ret;
}
示例2: array
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id$
//
require 'includes/application_top.php';
$action = BitBase::getParameter($_GET, 'action');
if ($productTypeId = BitBase::verifyIdParameter($_REQUEST, 'ptID')) {
$productTypeHash = $gBitDb->GetRow("SELECT `type_name` FROM " . TABLE_PRODUCT_TYPES . " WHERE `type_id` = ?", array($productTypeId));
}
if (zen_not_null($action)) {
switch ($action) {
case 'layout_save':
// demo active test
if (zen_admin_demo()) {
$_GET['action'] = '';
$messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
zen_redirect(zen_href_link_admin(FILENAME_PRODUCT_TYPE_LAYOUT, 'gID=' . $_GET['gID'] . '&cID=' . $cID));
}
$configuration_value = zen_db_prepare_input($_POST['configuration_value']);
$cID = zen_db_prepare_input($_GET['cID']);
$gBitDb->Execute("update " . TABLE_PRODUCT_TYPE_LAYOUT . "\n\t\t\t\t\t\t\t\t\t\tset `configuration_value` = '" . zen_db_input($configuration_value) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t`last_modified` = " . $gBitDb->qtNOW() . " where configuration_id = '" . (int) $cID . "'");
$configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue
示例3: getDisplayUrlFromHash
/**
* Function that returns link to display a piece of content
* @param pGalleryId id of gallery to link
* @return the url to display the gallery.
*/
public static function getDisplayUrlFromHash(&$pParamHash)
{
$path = NULL;
if (BitBase::verifyIdParameter($pParamHash, 'gallery_id')) {
$ret = FISHEYE_PKG_URL;
global $gBitSystem;
if ($gBitSystem->isFeatureActive('pretty_urls')) {
$ret .= 'gallery' . $path . '/' . $pParamHash['gallery_id'];
} else {
$ret .= 'view.php?gallery_id=' . $pParamHash['gallery_id'];
if (!empty($pHash['path'])) {
$ret .= '&gallery_path=' . $pParamHash['path'];
}
}
} elseif (@BitBase::verifyId($pParamHash['content_id'])) {
$ret = FISHEYE_PKG_URL . 'view.php?content_id=' . $pParamHash['content_id'];
}
return $ret;
}