2015-12-20 17:50:22 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2016-02-16 14:15:21 +01:00
|
|
|
* PHP Version 7
|
2015-12-20 17:50:22 +01:00
|
|
|
*
|
|
|
|
* PHP script for creating the next / prev page links
|
|
|
|
*
|
|
|
|
* @category Pagination
|
|
|
|
* @package Rbe
|
|
|
|
* @author Marcel Kapfer (mmk2410) <marcelmichaelkapfer@yahoo.co.nz>
|
|
|
|
* @license MIT License
|
|
|
|
* @link http://marcel-kapfer.de/rangitaki
|
|
|
|
*/
|
|
|
|
require_once "BlogListGenerator.php";
|
|
|
|
|
2016-04-22 19:46:46 +02:00
|
|
|
require '../res/php/Config.php';
|
|
|
|
use mmk2410\rbe\config\Config as Config;
|
|
|
|
|
|
|
|
$configParser = new Config('../config.yaml', '../vendor/autoload.php');
|
|
|
|
|
|
|
|
$config = $configParser->getConfig();
|
|
|
|
|
|
|
|
require_once "lang/" . $config["language"] . ".php";
|
|
|
|
|
|
|
|
if ($blog["design"]["pagination"]) {
|
2015-12-20 17:50:22 +01:00
|
|
|
?>
|
|
|
|
<div class="pag_buttons">
|
2016-04-22 19:46:46 +02:00
|
|
|
<?php
|
2015-12-20 17:50:22 +01:00
|
|
|
if ($pag_min > 0) {
|
|
|
|
if (isset($getblog)) {
|
2016-04-22 19:46:46 +02:00
|
|
|
?>
|
2015-12-20 17:50:22 +01:00
|
|
|
<a href="<?php
|
|
|
|
echo "?blog=" . $getblog . "&page=" . ($pagenumber - 1);
|
2015-12-21 15:56:18 +01:00
|
|
|
?>" class="pag_prev button"><?php echo $BLOGLANG["Previous Page"]; ?></a>
|
2016-04-22 19:46:46 +02:00
|
|
|
<?php
|
2015-12-20 17:50:22 +01:00
|
|
|
} else {
|
2016-04-22 19:46:46 +02:00
|
|
|
?>
|
2015-12-20 17:50:22 +01:00
|
|
|
<a href="<?php
|
|
|
|
echo "?page=" . ($pagenumber - 1);
|
2015-12-21 15:56:18 +01:00
|
|
|
?>" class="pag_prev button"><?php echo $BLOGLANG['Previous Page']; ?></a>
|
2016-04-22 19:46:46 +02:00
|
|
|
<?php
|
2015-12-20 17:50:22 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($getblog)) {
|
|
|
|
$pag_blog = $getblog;
|
|
|
|
} else {
|
|
|
|
$pag_blog = "main";
|
|
|
|
}
|
|
|
|
if ($pag_max < BlogListGenerator::getArticleAmount($pag_blog)) {
|
|
|
|
if (isset($getblog)) {
|
2016-04-22 19:46:46 +02:00
|
|
|
?>
|
2015-12-20 17:50:22 +01:00
|
|
|
<a href="<?php
|
|
|
|
echo "?blog=" . $getblog . "&page=" . ($pagenumber + 1);
|
2015-12-21 15:56:18 +01:00
|
|
|
?>" class="pag_next button"><?php echo $BLOGLANG["Next Page"]; ?></a>
|
2016-04-22 19:46:46 +02:00
|
|
|
<?php
|
2015-12-20 17:50:22 +01:00
|
|
|
} else {
|
2016-04-22 19:46:46 +02:00
|
|
|
?>
|
2015-12-20 17:50:22 +01:00
|
|
|
<a href="<?php
|
|
|
|
echo "?page=" . ($pagenumber + 1);
|
2015-12-21 15:56:18 +01:00
|
|
|
?>" class="pag_next button"><?php echo $BLOGLANG["Next Page"];?></a>
|
2016-04-22 19:46:46 +02:00
|
|
|
<?php
|
2015-12-20 17:50:22 +01:00
|
|
|
}
|
|
|
|
}
|
2016-04-22 19:46:46 +02:00
|
|
|
?>
|
2015-12-20 17:50:22 +01:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|