3 function executorlist() {
4 global $db,$error,$node,$logger;
5 $node_id=$node['node_id'];
6 if ($node['node_permission']!='owner') {
7 $error=$error_messages['EVENT_PERMISSION_ERROR'];
11 $executors=explode(";",$_POST['executorlist']);
12 $db->query("update node_access set node_permission='' where
13 node_id=$node_id and node_permission='exec'");
14 foreach ($executors as $execitpr) {
15 $set=$db->query("select user_id from users where login='$executor'");
17 if ($set->getString('user_id')) {
18 $q="update node_access set node_permission='exec' where node_id=$node_id and
19 user_id='".$set->getString('user_id')."'";
20 $changed=$db->update($q);
22 $q="insert into node_access set
23 node_permission='exec',node_id=$node_id,user_id=".$set->getString('user_id');
25 $logger->log('add exec',$node_id,'ok',$executor);
29 else { $error .= "$executor does not exist..."; }