當前位置: 首頁>>代碼示例>>PHP>>正文


PHP notifications::messageTemplateDeadlineReminder方法代碼示例

本文整理匯總了PHP中notifications::messageTemplateDeadlineReminder方法的典型用法代碼示例。如果您正苦於以下問題:PHP notifications::messageTemplateDeadlineReminder方法的具體用法?PHP notifications::messageTemplateDeadlineReminder怎麽用?PHP notifications::messageTemplateDeadlineReminder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在notifications的用法示例。


在下文中一共展示了notifications::messageTemplateDeadlineReminder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: improvement

$q = tep_db_query("SELECT improvements_id FROM improvements WHERE status=4 AND check_date<='{$today}'");
while ($row = tep_db_fetch_array($q)) {
    $i = new improvement($row['improvements_id']);
    $i->updateStatus('4', '5', $username);
}
$logger->write("- Auto move to Checkings Tab");
//$q = tep_db_query("SELECT improvements_id, DATEDIFF(deadline, '$today') AS deadline_diff FROM improvements WHERE status<4 HAVING deadline_diff<=1");
$q = tep_db_query("SELECT improvements_id, DATEDIFF(deadline, '{$today}') AS deadline_diff FROM improvements WHERE status<4 OR status=7 HAVING deadline_diff<=1");
while ($row = tep_db_fetch_array($q)) {
    $i = new improvement($row['improvements_id']);
    $targets = array();
    $targets[] = $i->owner_id;
    if ($i->pic > 0) {
        $targets[] = $i->pic;
    }
    $message = $obj_notifications->messageTemplateDeadlineReminder($username, 'Improvement', $i->id, $row['deadline_diff'], improvement::getTeamCategories($i->team, $i->category), $i->name);
    $obj_notifications->broadcast($targets, $message, $username, 'open=improvement&id=' . $i->id, false, $targets);
}
$logger->write("- Deadline Notifications Sent");
$logger->write("Task 3 - End");
$logger->write("Task 4a (CLEAR OLD NOTIFICATIONS) - Start");
////////////////////////////////////////////////
// CLEAR OLD NOTIFICATIONS OLDER THAN 1 MONTH //
////////////////////////////////////////////////
$max_days = 30;
$date_max = date('Y-m-d 00:00:00', strtotime("-{$max_days} days"));
$q = tep_db_query("DELETE FROM minierp_users_has_notifications WHERE posted_date<='{$date_max}' AND status=0 AND need_feedback=0");
$logger->write("Task 4b (RESET NEW STATUS FOR UNCONFIRMED FEEDBACK) - Start");
/////////////////////////////////////////
// SET BACK UNANSWERED FEEDBACK AS NEW //
/////////////////////////////////////////
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:daily-cleaner.php


注:本文中的notifications::messageTemplateDeadlineReminder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。