Beispiel #1
0
     }
     $smarty->assign("T_MESSAGE_QUEUE_SIZE", $sending_queue_size[0]['count']);
     // This is almost buggy - cannot filter according to recipients count - significant optimization however
     foreach ($sending_queue_msgs as $key => $message) {
         $notification = new EfrontNotification($message);
         if ($notification->notification['recipient'] == "") {
             $sending_queue_msgs[$key]['recipients_count'] = sizeof($notification->getRecipients());
         }
     }
     if (!empty($sending_queue_msgs)) {
         $smarty->assign("T_QUEUE_MSGS", $sending_queue_msgs);
     }
     $smarty->display('administrator.tpl');
     exit;
 }
 $notifications = EfrontNotification::getAllNotifications();
 $events_table = EfrontEvent::getEventTypes(false);
 if (sizeof($notifications) > 0) {
     try {
         foreach ($notifications as $key => $notification) {
             // when
             if (isset($notification['event'])) {
                 $notifications[$key]['is_event'] = 1;
                 if ($notification['send_interval'] > 0) {
                     $days = $notification['send_interval'] / 86400;
                     if ($days < 1.0) {
                         $hours = $days * 24;
                         // The span is used for correct sorting of the table
                         $notifications[$key]['when'] = "<span style='display:none'>{$days}</span>" . $hours . " " . _HOURSAFTEREVENT;
                     } else {
                         $notifications[$key]['when'] = "<span style='display:none'>{$days}</span>" . $days . " " . _DAYSAFTEREVENT;