Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_children_by_external_link.php
CommitLineData
e586807d 1<?php
b42b2bf9
H
2function smarty_function_get_children_by_external_link($params,&$smarty) {
3 global $db,$node;
e586807d 4
b42b2bf9
H
5 if ($params['orderby']=='desc') $orderby="desc";
6 $external_link=$params['external_link'];
e586807d 7
b42b2bf9
H
8 if ($params['listing_amount']=='all') $listing_amount='23232323232323323';
9 else $listing_amount=$params['listing_amount'];
e586807d 10
b42b2bf9
H
11 if (empty($params['offset'])) $offset=0;
12 else $offset=$params['offset'];
e586807d 13
b42b2bf9
H
14 if (empty($params['orderby_type'])) $orderby_type = 'node_created';
15 else $orderby_type = $params['orderby_type'];
e586807d 16
b42b2bf9
H
17 // if (!$params['parent_id']) {
18 $parent_id=$node['node_id'];
19 // }
20 // else $parent_id=$params['parent_id'];
e586807d 21
b42b2bf9 22 $user_id=$_SESSION['user_id'];
e586807d 23
b42b2bf9 24 $q="select users.*,nodes.* from nodes left
e586807d 25join users on users.user_id=nodes.node_creator where node_parent='$parent_id'
b42b2bf9 26and external_link='$external_link' order by $orderby_type $orderby LIMIT $offset,$listing_amount";
e586807d 27
b42b2bf9
H
28 $set=$db->query($q);
29 while ($set->next()) $pole[]=$set->getRecord();
30 $smarty->assign('get_children_by_external_link',$pole);
31}
32?>
This page took 0.186776 seconds and 4 git commands to generate.