test3
[mirrors/Kyberia-bloodline.git] / trash / testm.inc
CommitLineData
51ff3226 1<?php
2
3function smarty_function_testm($params,&$smarty) {
4
5
6$external_link=$params['external_link'];
7if ($params['listing_amount']=='all')
8$listing_amount='23232323232323323';
9elseif (is_numeric($params['listing_amount']))
10$listing_amount=$params['listing_amount'];
11else $listing_amount=DEFAULT_LISTING_AMOUNT;
12
13if (empty($params['offset'])) $offset=0;
14else $offset=$params['offset'];
15
16global $db,$node;
17if (is_numeric($params['creator_id'])) $creator_id=$params['creator_id'];
18else $creator_id=$node['node_id'];
19if (is_numeric($params['template_id'])) $template_id=$params['template_id'];
20else $template_id=DEFAULT_TEMPLATE;
21
22$user_id=$_SESSION['user_id'];
23
24$q="select parent.node_name as
25parent_name,nodes.* from nodes
26left join nodes as parent on parent.node_id=nodes.node_parent
27where nodes.node_creator='$creator_id' and
28nodes.external_link='$external_link' and
29nodes.node_system_access!='private' order by
30nodes.node_created desc LIMIT $offset,$listing_amount";
31
32$set=$db->query($q);
33while ($set->next()) $pole[]=$set->getRecord();
34$smarty->assign('testm',$pole);
35}
36?>
This page took 0.16883 seconds and 4 git commands to generate.