3 function silencelist() {
4 global $db,$error,$node;
5 $node_id=$node['node_id'];
6 $silence=explode(";",$_POST['silence']);
8 if ($node['node_permission']!=('owner' || 'master' || 'op')) {
9 $error=$error_messages['EVENT_PERMISSION_ERROR'];
12 $db->query("update node_access set node_permission='' where node_id=$node_id and node_permission='silence'");
13 foreach ($silence as $sil) {
14 $set=$db->query("select user_id from users where login='$sil'");
16 if ($set->getString('user_id')) {
17 $q="update node_access set node_permission='silence' where node_id=$node_id and user_id='".$set->getString('user_id')."'";
18 $changed=$db->update($q);
20 $q="insert into node_access set node_permission='silence',node_id=$node_id,user_id=".$set->getString('user_id');
23 logger::log('add silence',$node_id,'ok',$sil);
25 else { $error .= "$sil does not exist..."; }