3 function executorlist() {
4 global $db,$error,$node;
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 $executors=array_map('mysql_real_escape_string', $executors);
13 $db->query("update node_access set node_permission='' where
14 node_id=$node_id and node_permission='exec'");
15 foreach ($executors as $execitpr) {
16 $set=$db->query("select user_id from users where login='$executor'");
18 if ($set->getString('user_id')) {
19 $q="update node_access set node_permission='exec' where node_id=$node_id and
20 user_id='".$set->getString('user_id')."'";
21 $changed=$db->update($q);
23 $q="insert into node_access set
24 node_permission='exec',node_id=$node_id,user_id=".$set->getString('user_id');
26 $logger::log('add exec',$node_id,'ok',$executor);
30 else { $error .= "$executor does not exist..."; }