diff --git a/admin/script/furatalog.lib.php b/admin/script/furatalog.lib.php index 4ecffd9..85509ed 100644 --- a/admin/script/furatalog.lib.php +++ b/admin/script/furatalog.lib.php @@ -236,12 +236,14 @@ class furatalogLib { } function printScriptSec() { + $returnContent = ""; + $currentpage = (isset($_GET["p"]) ? $_GET["p"] : 1); $search=isset($_GET["s"]) ? "&s=" . $_GET["s"] : ""; $nextpage=isset($_GET["p"]) ? $_GET["p"] : 1; $prevpage=isset($_GET["p"]) ? $_GET["p"] : 1; - echo " + $returnContent .= " "; + + return $returnContent; } function printItemLists($section) { - echo "
"; + $returnContent = ""; + + $returnContent .= "
"; $page = isset($_GET["p"]) ? $_GET["p"] : 1; - $this->printItemList($section, $page); - echo "
"; + $returnContent .= $this->printItemList($section, $page); + $returnContent .= "
"; - echo "
"; + $returnContent .= "
"; $page = isset($_GET["p"]) ? ((int)$_GET["p"] + 1) : 2; - $this->printItemList($section, $page); - echo "
"; + $returnContent .= $this->printItemList($section, $page); + $returnContent .= "
"; if (isset($_GET["p"]) && ((int)$_GET["p"]) >= 2) { - echo "
"; + $returnContent .= "
"; $page = isset($_GET["p"]) ? ((int)$_GET["p"] - 1) : 0; - $this->printItemList($section, $page); - echo "
"; + $returnContent .= $this->printItemList($section, $page); + $returnContent .= "
"; } + + return $returnContent; } private function printItemList($section, $page) { + $returnContent = ""; + $items = $this->getItems($section, $page); foreach ($items as $item) { @@ -287,7 +297,7 @@ class furatalogLib { $plattform = "https://jinxxy.com/icon.png"; } - echo "
+ $returnContent .= "
@@ -304,13 +314,17 @@ class furatalogLib {
"; } + + return $returnContent; } public function printNsfwCheck() { + $returnContent = ""; + if ($this->fs->issetSessionData("nsfw") && $this->fs->getSessionData("nsfw") == true) { - echo ''; + $returnContent .= ''; } else if ($this->fs->issetSessionData("nsfw") && $this->fs->getSessionData("nsfw") == false) { - echo ''; + $returnContent .= ''; } else { // Base URL $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; @@ -327,7 +341,7 @@ class furatalogLib { $url .= '?' . $newParam; } - echo ' + $returnContent .= '
Do you want to see NSFW content?
@@ -337,9 +351,13 @@ class furatalogLib {
'; } + + return $returnContent; } public function printPagerNumbers() { + $returnContent = ""; + $currentpage = (isset($_GET["p"]) ? $_GET["p"] : 1); $currentMaxPages = $this->maxpages; $search=isset($_GET["s"]) ? "&s=" . $_GET["s"] : ""; @@ -347,8 +365,8 @@ class furatalogLib { $before = ""; if (!($currentpage <= 1)) { - echo "<<"; - echo "<"; + $returnContent .= "<<"; + $returnContent .= "<"; } for ($i = $currentpage-1; ($i > 0 && $i > ($currentpage-3)); $i--) { @@ -356,18 +374,20 @@ class furatalogLib { $before = "" . $i . "" . $before; } - echo $before; + $returnContent .= $before; - echo "" . $currentpage . ""; + $returnContent .= "" . $currentpage . ""; for ($i = $currentpage+1; ($i <= $currentMaxPages && $i < ($currentpage+3)); $i++) { if ($currentMaxPages == $currentpage) return; - echo "" . $i . ""; + $returnContent .= "" . $i . ""; } if (!($currentpage >= $currentMaxPages)) { - echo ">"; - echo ">>"; + $returnContent .= ">"; + $returnContent .= ">>"; } + + return $returnContent; } } \ No newline at end of file