Hierarchy fixup
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / smarty / node_methodz / function.get_tiamat.php
diff --git a/wwwroot/inc/smarty/node_methodz/function.get_tiamat.php b/wwwroot/inc/smarty/node_methodz/function.get_tiamat.php
new file mode 100644 (file)
index 0000000..d1f8c2a
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+
+       function smarty_function_get_tiamat($params,&$smarty) {
+               global $db, $error, $node;
+
+                if ($params['listing_amount']=='all') $listing_amount='23232323232323323';
+                elseif (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount'];
+                else $listing_amount=DEFAULT_LISTING_AMOUNT;
+
+                if (is_numeric($params['offset'])) $offset=$params['offset'];
+               elseif (is_numeric($_POST['offset'])) $offset=$_POST['offset'];
+               else $offset=0;
+
+
+
+               if (is_numeric($params['node_id'])) {
+                       $node_id=$params['node_id'];
+                       $where=" and node_id = '$node_id'";
+               }
+
+               elseif ($params['all']) {}
+
+               elseif ($params['node_vector']) {
+                       $vector=$node['node_vector'];
+                       $where=" and node_vector like '$vector%'";
+               }
+
+               else {
+                       $node_id=$node['node_id'];
+                       $where=" and node_id = '$node_id'";
+
+               }
+               $q="select users.login,tiamat.* from tiamat left join users on tiamat.node_destructor=users.user_id where node_system_access!='private'  $where  order by update_performed desc limit $offset , $listing_amount";
+               echo $q;
+               $result=$db->query($q);
+               while ($result->next()) {
+                       $array=$result->getRecord();
+                       $get_tiamat[]=$array;
+
+
+               }
+               $smarty->assign('get_tiamat',$get_tiamat);
+
+}
+
+?>
\ No newline at end of file
This page took 0.111276 seconds and 4 git commands to generate.