コード例 #1
0
ファイル: BitBase.php プロジェクト: bitweaver/kernel
 /**
  * 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
0
ファイル: product_types.php プロジェクト: bitweaver/commerce
// |                                                                      |
// | 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
0
ファイル: FisheyeGallery.php プロジェクト: bitweaver/fisheye
 /**
  * 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;
 }