Hierarchy fixup
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / smarty / node_methodz / function.get_node_commanders.php
diff --git a/wwwroot/inc/smarty/node_methodz/function.get_node_commanders.php b/wwwroot/inc/smarty/node_methodz/function.get_node_commanders.php
new file mode 100644 (file)
index 0000000..a64e7b5
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+function smarty_function_get_node_commanders($brawco,&$smarty) {
+       global $db,$node;
+       $node_id=$node['node_id'];
+       $set=$db->query("select node_permission,users.login from node_access left join users on node_access.user_id=users.user_id where node_id='$node_id' and node_permission!='' order by node_permission");
+
+       while ($set->next()) {
+               $commanders[$set->getString('node_permission')].=$set->getString('login').";";
+       }
+
+       $smarty->assign('get_node_commanders',$commanders);
+       $smarty->assign('masters',$commanders['master']);
+       $smarty->assign('ops',$commanders['op']);
+       $smarty->assign('access',$commanders['access']);
+       $smarty->assign('bans',$commanders['ban']);
+       $smarty->assign('silence',$commanders['silence']);
+       $smarty->assign('execute',$commanders['execute']);
+
+}
+
+?>
+
This page took 0.101151 seconds and 4 git commands to generate.