时间:2021-07-21人气:-
[php] view plain copypublic static function notification_add($touid, $type, $note, $notevars = array(), $system = 0, $category = -1) { global $_G; if(!($tospace = getuserbyuid($touid))) { return false; } space_merge($tospace, 'field_home'); $filter = empty($tospace['privacy']['filter_note'])?array():array_keys($tospace['privacy']['filter_note']); if($filter && (in_array($type.'|0', $filter) || in_array($type.'|'.$_G['uid'], $filter))) { return false; } if($category == -1) { $category = 0; $categoryname = ''; if($type == 'follow' || $type == 'follower') { switch ($type) { case 'follow' : $category = 5; break; case 'follower' : $category = 6; break; } $categoryname = $type; } else { foreach($_G['notice_structure'] as $key => $val) { if(in_array($type, $val)) { switch ($key) { case 'mypost' : $category = 1; break; case 'interactive' : $category = 2; break; case 'system' : $category = 3; break; case 'manage'爱站库温馨提示:如果你正在寻找优秀的discuz模板,那你可以到爱站库的 discuz模板 频道看看,相信一定有你喜欢的!