function smarty_function_get_movement_params($params,&$smarty) {
$children_count=$params['children_count'];
- if (is_numeric($_POST['listing_amount'])) $listing_amount=$_POST['listing_amount'];
- elseif (!empty($_SESSION['listing_amount'])) $listing_amount=$_SESSION['listing_amount'];
- else $listing_amount=DEFAULT_LISTING_AMOUNT;
+ if (isset($_POST['listing_amount']) &&
+ (is_numeric($_POST['listing_amount']))) {
+ $listing_amount=$_POST['listing_amount'];
+ } elseif (!empty($_SESSION['listing_amount'])) {
+ $listing_amount=$_SESSION['listing_amount'];
+ } else $listing_amount=DEFAULT_LISTING_AMOUNT;
$smarty->assign('listing_amount',$listing_amount);
- if (is_numeric($_POST['get_children_offset'])) {
+ if (isset($_POST['get_children_offset']) &&
+ (is_numeric($_POST['get_children_offset']))) {
$offset=$_POST['get_children_offset'];
//movement forward and backward
$smarty->assign('offset',$offset);
}
-?>
\ No newline at end of file
+?>