本文整理匯總了PHP中VTCacheUtils::updateReport_ScheduledInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP VTCacheUtils::updateReport_ScheduledInfo方法的具體用法?PHP VTCacheUtils::updateReport_ScheduledInfo怎麽用?PHP VTCacheUtils::updateReport_ScheduledInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類VTCacheUtils
的用法示例。
在下文中一共展示了VTCacheUtils::updateReport_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;
}