Added rudimentary transport support to get_threaded_children
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / executelist.inc
CommitLineData
51ff3226 1<?php
2function executelist() {
fd15ea3a 3 global $db,$error,$node;
51ff3226 4 $node_id=$node['node_id'];
5 $silence=explode(";",$_POST['execute']);
6 if (($node['node_permission']!='owner') && ($node['node_permission']!='master')) {
7 $error=$error_messages['EVENT_PERMISSION_ERROR'];
8 return false;
9 }
10 $db->query("update node_access set node_permission='' where node_id=$node_id and node_permission='execute'");
11 foreach ($silence as $sil) {
12 $set=$db->query("select user_id from users where login='$sil'");
13 $set->next();
14 if ($set->getString('user_id')) {
15 $q="update node_access set node_permission='execute' where node_id=$node_id and user_id='".$set->getString('user_id')."'";
16 $changed=$db->update($q);
17 if (!$changed) {
18 $q="insert into node_access set node_permission='execute',node_id=$node_id,user_id=".$set->getString('user_id');
19 $db->query($q);
20 }
fd15ea3a 21 logger::log('add execute',$node_id,'ok',$execute);
51ff3226 22 }else { $error .= "$execute does not exist..."; }
23 }
24}
e23557a6 25?>
This page took 0.813783 seconds and 4 git commands to generate.