diff --git a/inc/class.page.php b/inc/class.page.php --- a/inc/class.page.php +++ b/inc/class.page.php @@ -276,29 +276,30 @@ class page $hidden = 'hidden'; $numsaved = count($session['saved']); - $count = 0; + $count = $numsaved; $output = ''; - foreach($session['saved'] as $key => $name) { - if($count == $numsaved - 4) { - $hidden = ''; - } - else { + foreach($session['saved'] as $key => $name) + { + if($count <= 4) + $hidden = ''; + $output = '

' . PHP_EOL - . ' #' . $key . ":" - . htmlentities($name) - . ' edit' - . ' delete' - . '

' . PHP_EOL - . '

' . PHP_EOL . $output; - } - $count++; + . ' #' . $key . ":" + . htmlentities($name) + . ' edit' + . ' delete' + . '

' . PHP_EOL + . '

' . PHP_EOL . $output; + + $count --; } - echo $output; + echo $output; + if ($numsaved > 4) echo '
Less...
' . PHP_EOL - . '
More...
' . PHP_EOL - . '' . PHP_EOL; - } + . '
More...
' . PHP_EOL; + echo '' . PHP_EOL; + } } /**