2 function smarty_function_get_k_filtred_nodes($params,&$smarty) {
6 $user_id = $_SESSION['user_id'];
8 $q="select src from neurons where synapse_creator='$user_id' and dst='$node_id'";
11 while ($set->next()) {
12 $k_filtred_nodes_array[0][]=$set->getRecord();
17 if (is_numeric($params['offset'])) $offset=$params['offset'];
19 if (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount'];
20 else $listing_amount=DEFAULT_LISTING_AMOUNT
;
21 if (!is_numeric($_POST['interval'])) $interval=1;
22 else $interval = $_POST['interval'];
23 if ($params['vector']) {
24 $vector=$params['vector'];
29 $q="select node_content.node_content,nodes.*,parent.node_name as parent_name,users.login as creator
30 from nodes left join node_content on node_content.node_id=nodes.node_id left join nodes as parent on nodes.node_parent=parent.node_id
31 left join users on users.user_id=nodes.node_creator where nodes.node_created>now()-interval $interval day
32 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";
35 while ($set->next()) {
36 $k_filtred_nodes_array[1][]=$set->getRecord();
39 $smarty->assign('get_k_filtred_nodes',$k_filtred_nodes_array);
This page took 0.779909 seconds and 4 git commands to generate.