3 function smarty_function_get_movement_params($params,&$smarty) {
5 if (isset($_POST['listing_amount']) &&
6 (is_numeric($_POST['listing_amount']))) {
7 $listing_amount=$_POST['listing_amount'];
8 } elseif (!empty($_SESSION['listing_amount'])) {
9 $listing_amount=$_SESSION['listing_amount'];
10 } else $listing_amount=DEFAULT_LISTING_AMOUNT
;
12 $smarty->assign('listing_amount',$listing_amount);
14 if (isset($_POST['get_children_offset']) &&
15 (is_numeric($_POST['get_children_offset']))) {
16 $offset=$_POST['get_children_offset'];
18 //movement forward and backward
19 if ($_POST['get_children_move']=='<') {
20 $offset=$offset-$listing_amount;
21 if ($offset<0) $offset=0;
24 elseif ($_POST['get_children_move']=='>') {
25 $offset=$offset+
$listing_amount;
28 elseif ($_POST['get_children_move']=='>>') {
29 $offset=$children_count-$listing_amount;
30 if ($offset<0) $offset=0;
33 elseif ($_POST['get_children_move']=='<<') {
41 $smarty->assign('offset',$offset);
This page took 0.930119 seconds and 4 git commands to generate.