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


PHP VTCacheUtils::lookupReport_ScheduledInfo方法代码示例

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


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

示例1: getReportScheduleInfo

 public function getReportScheduleInfo()
 {
     $adb = PearDatabase::getInstance();
     if (!empty($this->id)) {
         $cachedInfo = VTCacheUtils::lookupReport_ScheduledInfo($this->user->id, $this->id);
         if ($cachedInfo == false) {
             $result = $adb->pquery('SELECT * FROM  its4you_reports4you_scheduled_reports WHERE reportid=?', array($this->id));
             if ($adb->num_rows($result) > 0) {
                 $reportScheduleInfo = $adb->raw_query_result_rowdata($result, 0);
                 $scheduledInterval = !empty($reportScheduleInfo['schedule']) ? Zend_Json::decode($reportScheduleInfo['schedule']) : array();
                 $scheduledRecipients = !empty($reportScheduleInfo['recipients']) ? Zend_Json::decode($reportScheduleInfo['recipients']) : array();
                 VTCacheUtils::updateReport_ScheduledInfo($this->user->id, $this->id, true, $reportScheduleInfo['format'], $scheduledInterval, $scheduledRecipients, $reportScheduleInfo['next_trigger_time']);
                 $cachedInfo = VTCacheUtils::lookupReport_ScheduledInfo($this->user->id, $this->id);
             }
         }
         if ($cachedInfo) {
             $this->isScheduled = $cachedInfo['isScheduled'];
             $this->scheduledFormat = $cachedInfo['scheduledFormat'];
             $this->scheduledInterval = $cachedInfo['scheduledInterval'];
             $this->scheduledRecipients = $cachedInfo['scheduledRecipients'];
             $this->scheduledTime = $cachedInfo['scheduledTime'];
             return true;
         }
     } else {
         $this->isScheduled = isset($_REQUEST['isReportScheduled']) && $_REQUEST['isReportScheduled'] != '' ? $_REQUEST['isReportScheduled'] : '';
         $this->scheduledFormat = isset($_REQUEST['scheduledReportFormat']) && $_REQUEST['scheduledReportFormat'] != '' ? $_REQUEST['scheduledReportFormat'] : '';
         $this->scheduledInterval = isset($_REQUEST['scheduledTypeSelectedStr']) && $_REQUEST['scheduledTypeSelectedStr'] != '' ? Zend_Json::decode($_REQUEST['scheduledIntervalJson']) : array();
         $this->scheduledRecipients = isset($_REQUEST['selectedRecipientsStr']) && $_REQUEST['selectedRecipientsStr'] != '' ? Zend_Json::decode($_REQUEST['selectedRecipientsStr']) : array();
         return true;
     }
     // ITS4YOU-END
     return false;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:33,代码来源:ScheduledReports4You.php

示例2: getReportScheduleInfo

 public function getReportScheduleInfo()
 {
     $adb = PearDatabase::getInstance();
     if (!empty($this->id)) {
         $cachedInfo = VTCacheUtils::lookupReport_ScheduledInfo($this->user->id, $this->id);
         if ($cachedInfo == false) {
             $result = $adb->pquery('SELECT * FROM vtiger_scheduled_reports WHERE reportid=?', array($this->id));
             if ($adb->num_rows($result) > 0) {
                 $reportScheduleInfo = $adb->raw_query_result_rowdata($result, 0);
                 $scheduledInterval = !empty($reportScheduleInfo['schedule']) ? Zend_Json::decode($reportScheduleInfo['schedule']) : array();
                 $scheduledRecipients = !empty($reportScheduleInfo['recipients']) ? Zend_Json::decode($reportScheduleInfo['recipients']) : array();
                 VTCacheUtils::updateReport_ScheduledInfo($this->user->id, $this->id, true, $reportScheduleInfo['format'], $scheduledInterval, $scheduledRecipients, $reportScheduleInfo['next_trigger_time']);
                 $cachedInfo = VTCacheUtils::lookupReport_ScheduledInfo($this->user->id, $this->id);
             }
         }
         if ($cachedInfo) {
             $this->isScheduled = $cachedInfo['isScheduled'];
             $this->scheduledFormat = $cachedInfo['scheduledFormat'];
             $this->scheduledInterval = $cachedInfo['scheduledInterval'];
             $this->scheduledRecipients = $cachedInfo['scheduledRecipients'];
             $this->scheduledTime = $cachedInfo['scheduledTime'];
             return true;
         }
     }
     return false;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:26,代码来源:ScheduledReports.php


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