2 function smarty_function_get_k_neurons($params,&$smarty) {
5 if (is_numeric($params['offset'])) $offset=$params['offset'];
7 if (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount'];
8 else $listing_amount=DEFAULT_LISTING_AMOUNT
;
9 if (!is_numeric($_POST['interval'])) $interval=1;
10 else $interval = $_POST['interval'];
11 if ($params['vector']) {
12 $vector=$params['vector'];
19 $q="select nodes.*,parent.node_name as parent_name,users.login as creator
20 from nodes left join nodes as parent on nodes.node_parent=parent.node_id
21 left join users on users.user_id=nodes.node_creator where nodes.node_created>now()-interval $interval day
22 and nodes.node_vector like '$vector%' and nodes.k>0 and nodes.node_system_access!='private' order by nodes.k desc limit $offset,$listing_amount";
25 while ($set->next()) {
26 $k_array[]=$set->getRecord();
29 $smarty->assign('get_k',$k_array);
This page took 0.50179 seconds and 5 git commands to generate.