cc29ea54f105101911e56143f1a12b63ae63f262
3 # XXX remove constants and move to backend
4 function smarty_function_get_last($params,&$smarty) {
6 if ($params['listing_amount']=='all') $listing_amount='-1';
7 else $listing_amount=addslashes($params['listing_amount']);
8 if (empty($params['offset'])) $offset=0;
9 else $offset=addslashes($params['offset']);
13 if ($node['node_id']==23) {
14 $interval=" nodes.node_created>NOW()-INTERVAL 65 HOUR and";
15 $params['vector']="00";
19 $vector=$node['node_vector'];
20 $interval=" nodes.node_created>NOW()-INTERVAL 42 DAY and";
23 $node_id=$node['node_id'];
24 $user_id=$_SESSION['user_id'];
25 $q="select parent.node_name as parent_name,users.*,nodes.* from nodes
26 left join nodes as parent on parent.node_id=nodes.node_parent
27 left join users on users.user_id=nodes.node_creator where $interval
28 nodes.node_vector like '$vector%' and
29 nodes.node_system_access!='private' order by nodes.node_id desc LIMIT $offset,$listing_amount ";
32 while ($set->next()) $pole[]=$set->getRecord();
33 $smarty->assign('get_last',$pole);
This page took 0.265317 seconds and 3 git commands to generate.