Esempio n. 1
0
 public static function manage_addnotify($type, $from_num = 0, $langvar = array())
 {
     global $_G;
     $notifyusers = dunserialize($_G['setting']['notifyusers']);
     $notifytypes = explode(',', $_G['setting']['adminnotifytypes']);
     $notifytypes = array_flip($notifytypes);
     $notearr = array('from_id' => 1, 'from_idtype' => $type, 'from_num' => $from_num);
     if ($langvar) {
         $langkey = $langvar['langkey'];
         $notearr = array_merge($notearr, $langvar);
     } else {
         $langkey = 'manage_' . $type;
     }
     foreach ($notifyusers as $uid => $user) {
         if ($user['types'][$notifytypes[$type]]) {
             helper_notification::notification_add($uid, $type, $langkey, $notearr, 1);
         }
     }
 }
Esempio n. 2
0
function notification_add($touid, $type, $note, $notevars = array(), $system = 0)
{
    return helper_notification::notification_add($touid, $type, $note, $notevars, $system);
}