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