本文整理汇总了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;
}
示例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;
}