moved old events to trash
[mirrors/Kyberia-bloodline.git] / trash / testm.inc
diff --git a/trash/testm.inc b/trash/testm.inc
new file mode 100644 (file)
index 0000000..742c462
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+function smarty_function_testm($params,&$smarty) {
+
+
+$external_link=$params['external_link'];
+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 (empty($params['offset'])) $offset=0;
+else $offset=$params['offset'];
+
+global $db,$node;
+if (is_numeric($params['creator_id'])) $creator_id=$params['creator_id'];
+else $creator_id=$node['node_id'];
+if (is_numeric($params['template_id'])) $template_id=$params['template_id'];
+else $template_id=DEFAULT_TEMPLATE;
+
+$user_id=$_SESSION['user_id'];
+
+$q="select parent.node_name as
+parent_name,nodes.* from nodes
+left  join nodes as parent on parent.node_id=nodes.node_parent
+where nodes.node_creator='$creator_id'  and
+nodes.external_link='$external_link' and
+nodes.node_system_access!='private' order by
+nodes.node_created desc LIMIT $offset,$listing_amount";
+
+$set=$db->query($q);
+while ($set->next()) $pole[]=$set->getRecord();
+$smarty->assign('testm',$pole);
+}
+?>
\ No newline at end of file
This page took 0.112296 seconds and 4 git commands to generate.