当前位置: 首页>>代码示例>>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;未经允许,请勿转载。