本文整理汇总了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 //
/////////////////////////////////////////