当前位置: 首页>>代码示例>>PHP>>正文


PHP BitBase::verifyId方法代码示例

本文整理汇总了PHP中BitBase::verifyId方法的典型用法代码示例。如果您正苦于以下问题:PHP BitBase::verifyId方法的具体用法?PHP BitBase::verifyId怎么用?PHP BitBase::verifyId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BitBase的用法示例。


在下文中一共展示了BitBase::verifyId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: storePayment

 function storePayment(&$pParamHash)
 {
     $this->StartTrans();
     if ($this->verifyPayment($pParamHash)) {
         if (@BitBase::verifyId($pParamHash['commissions_payments_id'])) {
             $this->mDb->associateUpdate(TABLE_COMMISSIONS_PAYMENTS, $pParamHash['payment_store'], array('commissions_payments_id' => $pParamHash['commissions_payments_id']));
         } else {
             $pParamHash['commissions_payments_id'] = $this->mDb->GenID('com_commissions_payments_id_seq');
             $pParamHash['payment_store']['commissions_payments_id'] = $pParamHash['commissions_payments_id'];
             $this->mDb->associateInsert(TABLE_COMMISSIONS_PAYMENTS, $pParamHash['payment_store']);
         }
         switch ($pParamHash['payment_store']['payment_method']) {
             case 'storecredit':
                 if ($this->mDb->getAssoc("SELECT * FROM " . TABLE_COUPON_GV_CUSTOMER . " WHERE `customer_id`=?", array($pParamHash['payment_store']['payee_user_id']))) {
                     $this->mDb->query("UPDATE " . TABLE_COUPON_GV_CUSTOMER . " SET `amount`=`amount`+? WHERE `customer_id`=?", array($pParamHash['payment_store']['payment_amount'], $pParamHash['payment_store']['payee_user_id']));
                 } else {
                     $this->mDb->query("INSERT INTO " . TABLE_COUPON_GV_CUSTOMER . " (`amount`,`customer_id`) VALUES (?,?)", array($pParamHash['payment_store']['payment_amount'], $pParamHash['payment_store']['payee_user_id']));
                 }
                 break;
             default:
                 break;
         }
         $this->CompleteTrans();
     } else {
         $this->mDb->RollbackTrans();
     }
     return count($this->mErrors) == 0;
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:28,代码来源:CommerceCommissionBase.php

示例2: attachment_filter_expunge

/**
 * attachment_filter_expunge 
 * 
 * @param string $pString 
 * @param array $pFilterHash 
 * @access public
 * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure
 */
function attachment_filter_expunge($pString, &$pFilterHash)
{
    global $gBitSystem;
    if (@BitBase::verifyId($pFilterHash['content_id'])) {
        $gBitSystem->mDb->query("DELETE FROM `" . BIT_DB_PREFIX . "liberty_attachment_usage` WHERE `content_id` = ?", array($pFilterHash['content_id']));
    }
}
开发者ID:kailIII,项目名称:liberty,代码行数:15,代码来源:filter.attachment.php

示例3: load

 function load($pGmapId = NULL)
 {
     global $gBitSystem;
     if (!empty($this->mOverlaySetId) || !empty($this->mContentId)) {
         $lookupColumn = !empty($this->mOverlaySetId) ? 'set_id' : 'content_id';
         $bindVars = array();
         $selectSql = '';
         $joinSql = '';
         $whereSql = '';
         array_push($bindVars, $lookupId = @BitBase::verifyId($this->mOverlaySetId) ? $this->mOverlaySetId : $this->mContentId);
         if (!empty($pGmapId) && is_numeric($pGmapId) && $this->mOverlaySetType != NULL) {
             $selectSql = ", osk.*";
             $joinSql = "LEFT JOIN `" . BIT_DB_PREFIX . "gmaps_sets_keychain` osk ON ( osk.`set_id` = os.`set_id` )";
             $whereSql = "AND osk.`gmap_id` = ? AND osk.`set_type` = ?";
             $bindVars = array_merge($bindVars, array($pGmapId, $this->mOverlaySetType));
         }
         $this->getServicesSql('content_load_sql_function', $selectSql, $joinSql, $whereSql, $bindVars);
         $query = "select os.*, lc.*,\n\t\t\t\t\t  uue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\t\t  uuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name {$selectSql}\n\t\t\t\t\t  FROM `" . BIT_DB_PREFIX . $this->mOverlaySetTable . "` os\n\t\t\t\t\t\tINNER JOIN `" . BIT_DB_PREFIX . "liberty_content` lc ON (lc.`content_id` = os.`content_id`) {$joinSql}\n\t\t\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uue ON (uue.`user_id` = lc.`modifier_user_id`)\n\t\t\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uuc ON (uuc.`user_id` = lc.`user_id`)\n\t\t\t\t\t  WHERE os.`{$lookupColumn}`=? {$whereSql}";
         $result = $this->mDb->query($query, $bindVars);
         if ($result && $result->numRows()) {
             $this->mInfo = $result->fields;
             $this->mInfo['gmap_id'] = $pGmapId;
             $this->mOverlaySetId = $result->fields['set_id'];
             $this->mContentId = $result->fields['content_id'];
         }
     }
     return count($this->mInfo);
 }
开发者ID:bitweaver,项目名称:gmap,代码行数:28,代码来源:BitGmapOverlaySetBase.php

示例4: load

 /**
  * Load an IRList content Item
  *
  * (Describe IRList object here )
  */
 function load($pContentId = NULL)
 {
     if ($pContentId) {
         $this->mContentId = (int) $pContentId;
     }
     if (@$this->verifyId($this->mIRId) || @$this->verifyId($this->mContentId)) {
         $lookupColumn = @$this->verifyId($this->mIRId) ? 'ir_id' : 'content_id';
         $bindVars = array();
         $selectSql = '';
         $joinSql = '';
         $whereSql = '';
         array_push($bindVars, $lookupId = @BitBase::verifyId($this->mIRId) ? $this->mIRId : $this->mContentId);
         $this->getServicesSql('content_load_sql_function', $selectSql, $joinSql, $whereSql, $bindVars);
         $query = "select ir.*, lc.*,\r\n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\r\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name,\r\n\t\t\t\tuux.`login` AS closed_user, uuc.`real_name` AS closed_real_name\r\n\t\t\t\t{$selectSql}\r\n\t\t\t\tFROM `" . BIT_DB_PREFIX . "irlist_secondary` ir\r\n\t\t\t\tINNER JOIN `" . BIT_DB_PREFIX . "liberty_content` lc ON ( lc.`content_id` = ir.`content_id` ) {$joinSql}\r\n\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uue ON (uue.`user_id` = lc.`modifier_user_id`)\r\n\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uuc ON (uuc.`user_id` = lc.`user_id`)\r\n\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uux ON (uux.`user_id` = ir.`closed_user_id`)\r\n\t\t\t\tWHERE ir.`{$lookupColumn}`=? {$whereSql}";
         $result = $this->mDb->query($query, $bindVars);
         if ($result && $result->numRows()) {
             $this->mInfo = $result->fields;
             $this->mContentId = (int) $result->fields['content_id'];
             $this->mIRId = (int) $result->fields['ir_id'];
             $this->mIRName = $result->fields['title'];
             $this->mInfo['creator'] = isset($result->fields['creator_real_name']) ? $result->fields['creator_real_name'] : $result->fields['creator_user'];
             $this->mInfo['editor'] = isset($result->fields['modifier_real_name']) ? $result->fields['modifier_real_name'] : $result->fields['modifier_user'];
             $this->mInfo['display_url'] = $this->getDisplayUrl();
         }
     }
     LibertyContent::load();
     return;
 }
开发者ID:bitweaver,项目名称:irlist,代码行数:33,代码来源:IRList.php

示例5: data_toc

/**
 * Load Function
 */
function data_toc($pData, $pParams)
{
    include_once LIBERTY_PKG_PATH . 'LibertyStructure.php';
    global $gStructure, $gContent, $gBitSmarty;
    if (is_object($gStructure) && $gStructure->isValid()) {
        $struct =& $gStructure;
    } elseif (@BitBase::verifyId($pParams['structure_id'])) {
        $struct = new LibertyStructure($pParams['structure_id']);
        $struct->load();
    } elseif (is_object($gContent)) {
        $structures = $gContent->getStructures();
        // We take the first structure. not good, but works for now - spiderr
        if (!empty($structures[0])) {
            require_once LIBERTY_PKG_PATH . 'LibertyStructure.php';
            $struct = new LibertyStructure($structures[0]['structure_id']);
            $struct->load();
        }
    }
    $repl = ' ';
    if (!empty($struct) && is_object($struct) && $struct->isValid()) {
        if (@BitBase::verifyId($structure_id)) {
            $get_structure = $structure_id;
        } else {
            $get_structure = $struct->mStructureId;
        }
        $tree = $struct->getSubTree($get_structure, !empty($pParams['display']) && $pParams['display'] == 'full_toc');
        $gBitSmarty->assign("subtree", $tree);
        $repl = $gBitSmarty->fetch("bitpackage:liberty/plugins/data_toc.tpl");
    }
    return $repl;
}
开发者ID:kailIII,项目名称:liberty,代码行数:34,代码来源:data.toc.php

示例6: smarty_function_captcha

/**
 * smarty_function_captcha
 */
function smarty_function_captcha($pParams, &$gBitSmarty)
{
    global $gBitSystem, $gBitUser;
    if (!empty($pParams['force']) || empty($_SESSION['captcha_verified']) && !$gBitUser->hasPermission('p_users_bypass_captcha')) {
        $pParams['size'] = !empty($pParams['size']) ? $pParams['size'] : '5';
        $pParams['variant'] = !empty($pParams['variant']) ? $pParams['variant'] : 'condensed';
        if (!empty($pParams['errors'])) {
            $gBitSmarty->assign('errors', $pParams['errors']);
        }
        if ($gBitSystem->isFeatureActive('liberty_use_captcha_freecap')) {
            $pParams['source'] = UTIL_PKG_URL . "freecap/freecap.php";
        } else {
            $getString = 'size=' . $pParams['size'];
            if (@BitBase::verifyId($pParams['width'])) {
                $getString .= '&width=' . $pParams['width'];
            }
            if (@BitBase::verifyId($pParams['height'])) {
                $getString .= '&height=' . $pParams['height'];
            }
            $pParams['source'] = USERS_PKG_URL . "captcha_image.php?{$getString}";
        }
        $gBitSmarty->assign('params', $pParams);
        print $gBitSmarty->fetch("bitpackage:kernel/captcha.tpl");
    }
}
开发者ID:kailIII,项目名称:themes,代码行数:28,代码来源:function.captcha.php

示例7: load

 /**
  * Load the data from the database
  * @param pParamHash be sure to pass by reference in case we need to make modifcations to the hash
  **/
 function load()
 {
     if ($this->verifyId($this->mBitForumTopicId) || $this->verifyId($this->mContentId)) {
         // LibertyContent::load()assumes you have joined already, and will not execute any sql!
         // This is a significant performance optimization
         $lookupColumn = $this->verifyId($this->mBitForumTopicId) ? 'bitforum_topic_id' : 'content_id';
         $bindVars = array();
         $selectSql = $joinSql = $whereSql = '';
         array_push($bindVars, $lookupId = @BitBase::verifyId($this->mBitForumTopicId) ? $this->mBitForumTopicId : $this->mContentId);
         $this->getServicesSql('content_load_sql_function', $selectSql, $joinSql, $whereSql, $bindVars);
         $query = "SELECT bft.*, lc.*, uue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name, uuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name {$selectSql} \n\t\t\tFROM `" . BIT_DB_PREFIX . "bitforums_topics` bft \n\t\t\t\tINNER JOIN `" . BIT_DB_PREFIX . "liberty_content` lc ON( lc.`content_id` = bft.`content_id` ) {$joinSql}\n\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uue ON( uue.`user_id` = lc.`modifier_user_id` )\n\t\t\t\tLEFT JOIN `" . BIT_DB_PREFIX . "users_users` uuc ON( uuc.`user_id` = lc.`user_id` )\n\t\t\tWHERE bft.`{$lookupColumn}`=? {$whereSql}";
         $result = $this->mDb->query($query, $bindVars);
         if ($result && $result->numRows()) {
             $this->mInfo = $result->fields;
             $this->mContentId = $result->fields['content_id'];
             $this->mBitForumTopicId = $result->fields['bitforum_topic_id'];
             $this->mInfo['creator'] = isset($result->fields['creator_real_name']) ? $result->fields['creator_real_name'] : $result->fields['creator_user'];
             $this->mInfo['editor'] = isset($result->fields['modifier_real_name']) ? $result->fields['modifier_real_name'] : $result->fields['modifier_user'];
             $this->mInfo['display_url'] = $this->getDisplayUrl();
             $this->mInfo['parsed_data'] = $this->parseData();
             LibertyAttachable::load();
         }
     }
     return count($this->mInfo);
 }
开发者ID:bitweaver,项目名称:forums,代码行数:29,代码来源:BitForumTopic.php

示例8: expunge

 /**
  * expunge 
  * 
  * @param numeric $pContentId 
  * @access public
  * @return ADO result set on success, FALSE on failure
  */
 function expunge($pContentId)
 {
     if (@BitBase::verifyId($pContentId)) {
         $query = "DELETE FROM `" . BIT_DB_PREFIX . "semaphore` WHERE `content_id` = ?";
         $this->mDb->query($query, array($pContentId));
     }
 }
开发者ID:bitweaver,项目名称:semaphore,代码行数:14,代码来源:Semaphore.php

示例9: expunge

 /**
  * Delete entry(ies) from liberty_content_role_map table with content_id.
  * 
  * @param object $pContent 
  */
 function expunge($ContentId = NULL)
 {
     $ret = FALSE;
     if (@BitBase::verifyId($ContentId)) {
         $this->mDb->query("DELETE FROM `" . BIT_DB_PREFIX . "liberty_content_role_map` WHERE `content_id`=?", array($ContentId));
     }
     return $ret;
 }
开发者ID:bitweaver,项目名称:protector,代码行数:13,代码来源:LibertyProtector.php

示例10: existing_files_store

function existing_files_store(&$pStoreRow)
{
    global $gBitSystem, $gContent;
    if (@BitBase::verifyId($gContent->mContentId)) {
        // Update the attachments content_id
        $query = "UPDATE `" . BIT_DB_PREFIX . "liberty_attachments` SET " . "content_id = ? WHERE attachment_id = ?";
        $result = $gContent->mDb->query($query, array($gContent->mContentId, $pStoreRow['attachment_id']));
    }
    return TRUE;
}
开发者ID:kailIII,项目名称:liberty,代码行数:10,代码来源:storage.existing.php

示例11: getProductObject

 function getProductObject($pProductsMixed)
 {
     $productsId = zen_get_prid($pProductsMixed);
     if (BitBase::verifyId($productsId)) {
         if (!isset($this->mProductObjects[$productsId])) {
             if ($this->mProductObjects[$productsId] = bc_get_commerce_product($productsId)) {
                 $ret =& $this->mProductObjects[$productsId];
             }
         }
     }
     return $this->mProductObjects[$productsId];
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:12,代码来源:CommerceOrderBase.php

示例12: mime_pbase_store

/**
 * Store the data in the database
 * 
 * @param array $pStoreRow File data needed to store details in the database - sanitised and generated in the verify function
 * @access public
 * @return TRUE on success, FALSE on failure - $pStoreRow[errors] will contain reason
 */
function mime_pbase_store(&$pStoreRow)
{
    global $gBitSystem;
    $ret = FALSE;
    if (@BitBase::verifyId($pStoreRow['pbase_id'])) {
        // add the data into liberty_attachments to make this file available as attachment
        $storeHash = array("attachment_id" => $pStoreRow['attachment_id'], "content_id" => $pStoreRow['content_id'], "attachment_plugin_guid" => PLUGIN_MIME_GUID_PBASE, "foreign_id" => $pStoreRow['pbase_id'], "user_id" => $pStoreRow['user_id']);
        $gBitSystem->mDb->associateInsert(BIT_DB_PREFIX . "liberty_attachments", $storeHash);
        $ret = TRUE;
    } else {
        $pStoreRow['errors']['pbase_id'] = "No valid PBase ID given.";
    }
    return $ret;
}
开发者ID:kailIII,项目名称:liberty,代码行数:21,代码来源:mime.pbase.php

示例13: mime_flash_store_preferences

/**
 * mime_flash_store_preferences 
 * 
 * @param array $pFileHash Flash information
 * @access public
 * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure
 */
function mime_flash_store_preferences(&$pFileHash)
{
    $ret = FALSE;
    if (@BitBase::verifyId($pFileHash['attachment_id'])) {
        list($pFileHash['preferences']['width'], $pFileHash['preferences']['height'], $type, $attr) = getimagesize(STORAGE_PKG_PATH . $pFileHash['upload']['dest_branch'] . $pFileHash['upload']['name']);
        // store width of video
        if (!empty($pFileHash['preferences']['width'])) {
            LibertyMime::storeAttachmentPreference($pFileHash['attachment_id'], 'width', $pFileHash['preferences']['width']);
        }
        // store height of video
        if (!empty($pFileHash['preferences']['height'])) {
            LibertyMime::storeAttachmentPreference($pFileHash['attachment_id'], 'height', $pFileHash['preferences']['height']);
        }
        $ret = TRUE;
    }
    return $ret;
}
开发者ID:kailIII,项目名称:liberty,代码行数:24,代码来源:mime.flash.php

示例14: getProductHistory

 function getProductHistory($pListHash)
 {
     $whereSql = '';
     $bindVars = array();
     if (@BitBase::verifyId($pListHash['products_id'])) {
         $whereSql = 'cop.`products_id`=?';
         $bindVars[] = $pListHash['products_id'];
     }
     if (@BitBase::verifyId($pListHash['user_id'])) {
         $whereSql = 'lc.`user_id`=?';
         $bindVars[] = $pListHash['user_id'];
     }
     if ($whereSql) {
         $sql = "SELECT cop.`orders_products_id` AS `hash_key`, co.*, cop.*," . $this->mDb->SQLDate('Y-m-d H:i', 'co.`date_purchased`') . " AS `purchase_time` \n\t\t\t\t\tFROM " . TABLE_ORDERS . " co \n\t\t\t\t\t\tINNER JOIN " . TABLE_ORDERS_PRODUCTS . " cop ON(co.`orders_id`=cop.`orders_id`)\n\t\t\t\t\t\tLEFT OUTER JOIN " . TABLE_PRODUCTS . " cp ON(cp.`products_id`=cop.`products_id`)\n\t\t\t\t\t\tLEFT OUTER JOIN `" . BIT_DB_PREFIX . "liberty_content` lc ON(lc.`content_id`=cp.`content_id`)\n\t\t\t\t\tWHERE {$whereSql}\n\t\t\t\t\tORDER BY co.`orders_id` DESC";
         $ret = $this->mDb->getAssoc($sql, $bindVars);
     }
     return $ret;
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:18,代码来源:CommerceOrderManager.php

示例15: getLibertyObject

 /**
  * Given a content_id, this will return and object of the proper type
  *
  * @param integer content_id of the object to be returned
  * @param string optional content_type_guid of pConId. This will save a select if you happen to have this info. If not, this method will look it up for you.
  * @param call load on the content. Defaults to true.
  * @returns object of the appropriate content type class
  */
 public static function getLibertyObject($pContentId, $pContentGuid = NULL, $pLoadContent = TRUE)
 {
     $ret = NULL;
     global $gLibertySystem, $gBitUser, $gBitSystem;
     if (BitBase::verifyId($pContentId)) {
         // remove non integer bits from structure_id and content_id requests
         // can happen with period's at the end of url's that are email'ed around
         $pContentId = preg_replace('/[\\D]/', '', $pContentId);
         if (empty($pContentGuid)) {
             $pContentGuid = $gLibertySystem->mDb->getOne("SELECT `content_type_guid` FROM `" . BIT_DB_PREFIX . "liberty_content` WHERE `content_id`=?", array($pContentId));
         }
         if (!empty($pContentGuid) && isset($gLibertySystem->mContentTypes[$pContentGuid]) && ($typeClass = $gLibertySystem->getContentClassName($pContentGuid))) {
             $creator = new $typeClass();
             $ret = $creator->getNewObject($typeClass, $pContentId, $pLoadContent);
         }
     }
     return $ret;
 }
开发者ID:kailIII,项目名称:liberty,代码行数:26,代码来源:LibertyBase.php


注:本文中的BitBase::verifyId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。