3 global $db,$error,$node;
4 $node_id=$node['node_id'];
6 if (($node['node_permission']!='owner') && ($node['node_permission']!='master')) {
7 $error=$error_messages['EVENT_PERMISSION_ERROR'];
11 $ops=explode(";",$_POST['oplist']);
12 $db->query("update node_access set node_permission='' where node_id=$node_id and node_permission='op'");
13 foreach ($ops as $op) {
14 $set=$db->query("select user_id from users where login='$op'");
16 if ($set->getString('user_id')) {
17 $q="update node_access set node_permission='op' 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='op',node_id=$node_id,user_id=".$set->getString('user_id');
24 logger::log('add op',$node_id,'ok',$op);
25 }else { $error .= "$op does not exist..."; }