Kyberia v2.0
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_movement.php
1 <?php
2 function smarty_function_get_movement($params,&$smarty) {
3 global $db;
4
5 if (is_numeric($params['user_id'])) {
6 $user_id=$params['user_id'];
7 }
8 if (is_numeric($params['listing_amount'])) {
9 $listing_amount=$params['listing_amount'];
10 }
11 else $listing_amount=DEFAULT_LISTING_AMOUNT;
12 if (is_numeric($params['offset'])) {
13 $offset=$params['offset'];
14 }
15 else $offset=0;
16
17 if ($user_id) {
18 $q="select * from node_access left join nodes on node_access.node_id=nodes.node_id where user_id='$user_id' and nodes.node_system_access='public' order by last_visit desc limit $offset,$listing_amount";
19 $set=$db->query($q);
20 while ($set->next()) {
21 $array[]=$set->getRecord();
22 }
23 $smarty->assign('get_movement',$array);
24 return false;
25 }
26
27 }
28 ?>
This page took 0.237852 seconds and 4 git commands to generate.