big commit
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_nodes_by_external_link.php
CommitLineData
b42b2bf9
H
1<?
2function smarty_function_get_nodes_by_external_link($params,&$smarty) {
3
4if ($params['orderby']=='desc') $orderby="desc"; else $orderby="asc";
5// echo 'xxxxxxxxxxxxxxxx';
6$external_link=$params['external_link'];
7if ($params['listing_amount']=='all')
8$listing_amount='232323';
9else $listing_amount=$params['listing_amount'];
10
11if (empty($params['offset'])) $offset=0;
12else $offset=$params['offset'];
13
14global $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);
19while ($set->next()) $pole[]=$set->getRecord();
20$smarty->assign('get_nodes_by_external_link',$pole);
21}
22?>
This page took 0.231904 seconds and 4 git commands to generate.