fba1bac4 |
1 | <?php |
fba1bac4 |
2 | |
b101f04f |
3 | function smarty_function_get_k_neurons($params,&$smarty) { |
4 | |
186fa4a9 |
5 | global $db; |
ea8ec237 |
6 | if (isset($params['offset']) && (is_numeric($params['offset']))) { |
7 | $offset=$params['offset']; |
290d120f |
8 | } else {$offset=20;} |
ea8ec237 |
9 | if (isset($params['listing_amount']) && (is_numeric($params['listing_amount']))) { |
10 | $listing_amount=$params['listing_amount']; |
11 | } else {$listing_amount=DEFAULT_LISTING_AMOUNT;} |
12 | if (isset($_POST['interval']) && (is_numeric($_POST['interval']))) { |
13 | $interval= $_POST['interval']; |
14 | } else {$interval = 1;} |
15 | if (isset($params['vector']) && ($params['vector'])) { |
b101f04f |
16 | $vector=$params['vector']; |
17 | $interval=365; |
ea8ec237 |
18 | } else {$vector="00";} |
fba1bac4 |
19 | |
b101f04f |
20 | |
290d120f |
21 | // XXX other parameters |
22 | $k_array=nodes::getKNeurons($_SESSION['user_id'],$offset); |
b101f04f |
23 | |
fba1bac4 |
24 | |
b101f04f |
25 | $smarty->assign('get_k_neurons',$k_array); |
26 | } |
fba1bac4 |
27 | ?> |