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


PHP OA::getConfigOption方法代码示例

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


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

示例1:

    if (!empty($GLOBALS[$k])) {
        $aAuditData[$key]['context'] = $GLOBALS[$k];
    }
}
// Assign vars to template
$oTpl->assign('showAdvertisers', $showAdvertisers);
$oTpl->assign('showPublishers', $showPublishers);
if ($showAdvertisers) {
    $oTpl->assign('aAdvertiser', $aAdvertiser);
    $oTpl->assign('aCampaign', $aCampaign);
}
if ($showPublishers) {
    $oTpl->assign('aPublisher', $aPublisher);
    $oTpl->assign('aZone', $aZone);
}
$oTpl->assign('aAuditEnabled', OA::getConfigOption('audit', 'enabled', false));
$oTpl->assign('aAuditData', $aAuditData);
$oTpl->assign('aPeriodPreset', $aPeriodPreset);
$oTpl->assign('context', $context);
$oTpl->assign('advertiserId', $advertiserId);
$oTpl->assign('campaignId', $campaignId);
$oTpl->assign('publisherId', $publisherId);
$oTpl->assign('zoneId', $zoneId);
$oTpl->assign('urlParam', $urlParam);
$oTpl->assign('listorder', $listorder);
$oTpl->assign('orderdirection', $orderdirection);
$oTpl->assign('setPerPage', $setPerPage);
$oTpl->assign('pager', $pager);
$oTpl->assign('daySpan', $daySpan);
// Display page
$oTpl->display();
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:31,代码来源:userlog-index.php

示例2: deleteUnverifiedUsers

 /**
  * Deletes users who are not linked with any sso account, never logged
  * in and their account was created before deleteUnverifiedUsersAfter days.
  * Where deleteUnverifiedUsersAfter is defined in config in
  * "authentication" section.
  *
  * @return boolean
  */
 function deleteUnverifiedUsers($deleteOlderThanSeconds = null)
 {
     if (empty($deleteOlderThanSeconds)) {
         // by default 28 days
         $deleteOlderThanSeconds = OA::getConfigOption('authentication', 'deleteUnverifiedUsersAfter', 2419200);
     }
     $monthAgo = new Date();
     $monthAgo->subtractSeconds($deleteOlderThanSeconds);
     $this->whereAdd('date_created < \'' . $this->formatDate($monthAgo) . '\'');
     $this->whereAdd('sso_user_id IS NULL');
     $this->whereAdd('date_last_login IS NULL');
     return $this->delete(DB_DATAOBJECT_WHEREADD_ONLY);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:21,代码来源:Users.php

示例3: audit

 /**
  * Enter description here...
  *
  * @param integer $actionid One of the following:
  *                              - 1 for INSERT
  *                              - 2 for UPDATE
  *                              - 3 for DELETE
  * @param unknown_type $oDataObject
  * @param unknown_type $parentid
  * @return unknown
  */
 function audit($actionid, $oDataObject = null, $parentid = null)
 {
     if (OA::getConfigOption('audit', 'enabled', false)) {
         if ($this->_auditEnabled()) {
             if (is_null($this->doAudit)) {
                 $this->doAudit = $this->factory('audit');
             }
             $this->doAudit->actionid = $actionid;
             $this->doAudit->context = $this->getTableWithoutPrefix();
             $this->doAudit->contextid = $this->_getContextId();
             $this->doAudit->parentid = $parentid;
             $this->doAudit->username = OA_Permission::getUsername();
             $this->doAudit->userid = OA_Permission::getUserId();
             if (!isset($this->doAudit->usertype)) {
                 $this->doAudit->usertype = 0;
             }
             // Set the account IDs that need to be used in auditing
             // this type of entity record
             $aAccountIds = $this->getOwningAccountIds();
             // Set the primary account ID
             if (isset($aAccountIds[OA_ACCOUNT_MANAGER])) {
                 $this->doAudit->account_id = $aAccountIds[OA_ACCOUNT_MANAGER];
             } else {
                 $this->doAudit->account_id = $aAccountIds[OA_ACCOUNT_ADMIN];
             }
             // Set the advertiser account ID, if required
             if (isset($aAccountIds[OA_ACCOUNT_ADVERTISER])) {
                 $this->doAudit->advertiser_account_id = $aAccountIds[OA_ACCOUNT_ADVERTISER];
             }
             // Set the trafficker account ID, if required
             if (isset($aAccountIds[OA_ACCOUNT_TRAFFICKER])) {
                 $this->doAudit->website_account_id = $aAccountIds[OA_ACCOUNT_TRAFFICKER];
             }
             // Prepare a generic array of data to be stored in the audit record
             $aAuditFields = $this->_prepAuditArray($actionid, $oDataObject);
             // Individual objects can customise this data (add, remove, format...)
             $this->_buildAuditArray($actionid, $aAuditFields);
             // Do not audit if nothing has changed
             if (count($aAuditFields)) {
                 // Serialise the data
                 $this->doAudit->details = serialize($aAuditFields);
                 $this->doAudit->updated = OA::getNowUTC();
                 // Finally, insert the audit record
                 $id = $this->doAudit->insert();
                 // Perform post-audit actions
                 $this->_postAuditTrigger($actionid, $oDataObject, $id);
                 return $id;
             }
         }
     }
     return false;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:63,代码来源:DB_DataObjectCommon.php


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