Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_nodes_by_external_link.php
1 <?
2 function smarty_function_get_nodes_by_external_link($params,&$smarty) {
3
4 if ($params['orderby']=='desc') $orderby="desc"; else $orderby="asc";
5 // echo 'xxxxxxxxxxxxxxxx';
6 $external_link=$params['external_link'];
7 if ($params['listing_amount']=='all')
8 $listing_amount='232323';
9 else $listing_amount=$params['listing_amount'];
10
11 if (empty($params['offset'])) $offset=0;
12 else $offset=$params['offset'];
13
14 global $db,$node;
15
16 $q="select users.*,nodes.* from nodes left join users on users.user_id=nodes.node_creator where external_link = '$external_link' order by node_id $orderby LIMIT $offset,$listing_amount";
17
18 $set=$db->query($q);
19 while ($set->next()) $pole[]=$set->getRecord();
20 $smarty->assign('get_nodes_by_external_link',$pole);
21 }
22 ?>
This page took 0.316642 seconds and 4 git commands to generate.