diff --git a/README b/README index 6b4e32c..8bc01f9 100644 --- a/README +++ b/README @@ -1,8 +1,10 @@ -PHPCSV Guestbook version 0.92 +PHPCSV Guestbook version 0.93 Simple php guestbook with csv file data storage. -PHPCSV Guestbook 0.92 requires PHP 5.0 or higher version. +Working example: https://zlaxyi.soundragon.su/gb + +PHPCSV Guestbook 0.93 requires PHP 5.0 or higher version. Installation: @@ -19,4 +21,4 @@ Using: If you have uploaded files to a subfolder "/guestbook" of your webserver, then http://yourserver.domain/guestbook/ will open a guestbook. Following the link http://yourserver.domain/guestbook/administration.php will open the administration panel. -For changing appearance you can edit page.php like simple html (for example: add css tags). +For changing appearance you can edit page.php like simple html (for example: add css tags). \ No newline at end of file diff --git a/administration.php b/administration.php index 53cf422..3b2f6d1 100644 --- a/administration.php +++ b/administration.php @@ -1,6 +1,6 @@ 0)&&(count($Entries)>$GBpagination)) { + $Entries=array_reverse($Entries); + if ($_GET['page']) switch ($_GET['page']) { + case $Titles[First]: + $CurrentPage=0; + break; + case $Titles[Last]: + $CurrentPage=intdiv(count($Entries),$GBpagination); + break; + case "$Titles[Previous]": + $CurrentPage=$_SESSION['currentpage']-1; + break; + case "$Titles[Next]": + $CurrentPage=$_SESSION['currentpage']+1; + break; + default: + $CurrentPage=$_GET['page']-1; + } + else $CurrentPage=0; + for ($e = ($GBpagination*$CurrentPage); $e < ($GBpagination*($CurrentPage+1)); $e++) { + if ($e>=count($Entries)) break; + echo "