3 function smarty_function_get_movement_params($params,&$smarty) {
4 $children_count=$params['children_count'];
6 if (isset($_POST['listing_amount']) &&
7 (is_numeric($_POST['listing_amount']))) {
8 $listing_amount=$_POST['listing_amount'];
9 } elseif (!empty($_SESSION['listing_amount'])) {
10 $listing_amount=$_SESSION['listing_amount'];
11 } else $listing_amount=DEFAULT_LISTING_AMOUNT
;
13 $smarty->assign('listing_amount',$listing_amount);
15 if (isset($_POST['get_children_offset']) &&
16 (is_numeric($_POST['get_children_offset']))) {
17 $offset=$_POST['get_children_offset'];
19 //movement forward and backward
20 if ($_POST['get_children_move']=='<') {
21 $offset=$offset-$listing_amount;
22 if ($offset<0) $offset=0;
24 elseif ($_POST['get_children_move']=='>') {
26 $offset=$offset+
$listing_amount;
29 elseif ($_POST['get_children_move']=='>>') {
30 $offset=$children_count-$listing_amount;
31 if ($offset<0) $offset=0;
34 elseif ($_POST['get_children_move']=='<<') {
42 $smarty->assign('offset',$offset);
This page took 0.827758 seconds and 5 git commands to generate.