3 function smarty_function_get_movement_params($params,&$smarty) {
4 $children_count=$params['children_count'];
6 if (is_numeric($_POST['listing_amount'])) $listing_amount=$_POST['listing_amount'];
7 elseif (!empty($_SESSION['listing_amount'])) $listing_amount=$_SESSION['listing_amount'];
8 else $listing_amount=DEFAULT_LISTING_AMOUNT
;
10 $smarty->assign('listing_amount',$listing_amount);
12 if (is_numeric($_POST['get_children_offset'])) {
13 $offset=$_POST['get_children_offset'];
15 //movement forward and backward
16 if ($_POST['get_children_move']=='<') {
17 $offset=$offset-$listing_amount;
18 if ($offset<0) $offset=0;
20 elseif ($_POST['get_children_move']=='>') {
22 $offset=$offset+
$listing_amount;
25 elseif ($_POST['get_children_move']=='>>') {
26 $offset=$children_count-$listing_amount;
27 if ($offset<0) $offset=0;
30 elseif ($_POST['get_children_move']=='<<') {
38 $smarty->assign('offset',$offset);
This page took 0.272065 seconds and 4 git commands to generate.