X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Fsmarty%2Fnode_methodz%2Ffunction.get_movement_params.php;h=5f57d230d67fb38dc3d4ae085318075f6a401c0a;hb=38927c4d48865f73d1b965f1a07c76efe4339a9a;hp=7cc3fc2dfa0689d6bf5aa0f11b7436b9a9f1b6ec;hpb=202c37b7ea3edb43a2e45b769aab089effb009f6;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php b/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php index 7cc3fc2..5f57d23 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php @@ -1,45 +1,44 @@ assign('listing_amount',$listing_amount); + $smarty->assign('listing_amount',$listing_amount); - if (isset($_POST['get_children_offset']) && - (is_numeric($_POST['get_children_offset']))) { - $offset=$_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 - if ($_POST['get_children_move']=='<') { - $offset=$offset-$listing_amount; - if ($offset<0) $offset=0; - } - elseif ($_POST['get_children_move']=='>') { - - $offset=$offset+$listing_amount; - } - - elseif ($_POST['get_children_move']=='>>') { - $offset=$children_count-$listing_amount; - if ($offset<0) $offset=0; - } + //movement forward and backward + if ($_POST['get_children_move']=='<') { + $offset=$offset-$listing_amount; + if ($offset<0) $offset=0; + } - elseif ($_POST['get_children_move']=='<<') { - $offset=0; - } + elseif ($_POST['get_children_move']=='>') { + $offset=$offset+$listing_amount; + } + elseif ($_POST['get_children_move']=='>>') { + $offset=$children_count-$listing_amount; + if ($offset<0) $offset=0; + } + elseif ($_POST['get_children_move']=='<<') { + $offset=0; } - else $offset=0; - $smarty->assign('offset',$offset); } + + else $offset=0; + $smarty->assign('offset',$offset); + +} ?>