Kyberia v2.0
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_node_commanders.php
diff --git a/inc/smarty/node_methodz/function.get_node_commanders.php b/inc/smarty/node_methodz/function.get_node_commanders.php
new file mode 100644 (file)
index 0000000..51c66ec
--- /dev/null
@@ -0,0 +1,18 @@
+<?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('masters',$commanders['master']);
+       $smarty->assign('ops',$commanders['op']);
+       $smarty->assign('access',$commanders['access']);
+       $smarty->assign('bans',$commanders['ban']);
+       $smarty->assign('silence',$commanders['silence']);
+}
+
+?>
This page took 0.106729 seconds and 4 git commands to generate.