Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class Spintax
  15. {
  16. public function process($text)
  17. {
  18. return preg_replace_callback('/\\{(((?>[^\\{\\}]+)|(?R))*)\\}/x', [$this, 'replace'], $text);
  19. }
  20.  
  21. public function replace($text)
  22. {
  23. $text = $this->process($text[1]);
  24. $parts = explode('|', $text);
  25. return $parts[array_rand($parts)];
  26. }
  27. }
  28.  
  29. class CSSPagination
  30. {
  31. private $totalrows;
  32. private $rowsperpage;
  33. private $website;
  34. private $separate;
  35. private $page;
  36.  
  37. public function __construct($totalrows, $rowsperpage, $website, $separate = '&')
  38. {
  39. $this->totalrows = $totalrows;
  40. $this->website = $website;
  41. $this->rowsperpage = $rowsperpage;
  42. $this->separate = $separate;
  43. }
  44.  
  45. public function setPage($page)
  46. {
  47. if (!$page) {
  48. $this->page = 1;
  49. }
  50. else {
  51. $this->page = $page;
  52. }
  53. }
  54.  
  55. public function getLimit()
  56. {
  57. return ($this->page - 1) * $this->rowsperpage;
  58. }
  59.  
  60. private function getLastPage()
  61. {
  62. return ceil($this->totalrows / $this->rowsperpage);
  63. }
  64.  
  65. public function showPage()
  66. {
  67. $pagination = '';
  68. $lpm1 = $this->getLastPage() - 1;
  69. $page = $this->page;
  70. $prev = $this->page - 1;
  71. $next = $this->page + 1;
  72. $pagination .= '<ul class="pagination justify-content-center pagination-lg">';
  73.  
  74. if (1 < $this->getLastPage()) {
  75. if (1 < $page) {
  76. }
  77.  
  78. if ($this->getLastPage() < 9) {
  79. for ($counter = 1; $counter <= $this->getLastPage(); $counter++) {
  80. if ($counter == $page) {
  81. $pagination .= ' <li class="page-item active"><a class="page-link" rel="nofollow" href="#">' . $counter . '</a></li>';
  82. continue;
  83. }
  84.  
  85. $pagination .= '<li class="page-item"><a rel="nofollow\\" class="page-link" href=' . $this->website . $this->separate . 'page=' . $counter . '>' . $counter . '</a></li>';
  86. }
  87. }
  88. else if (9 <= $this->getLastPage()) {
  89. if ($page < 4) {
  90. for ($counter = 1; $counter < 6; $counter++) {
  91. if ($counter == $page) {
  92. $pagination .= '<li class="page-item active"><a rel="nofollow" class="page-link" href="#">' . $counter . '</a></li>';
  93. continue;
  94. }
  95.  
  96. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $counter . '">' . $counter . '</a></li>';
  97. }
  98.  
  99. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $lpm1 . '">' . $lpm1 . '</a></li>';
  100. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $this->getLastPage() . '">' . $this->getLastPage() . '</a></li>';
  101. }
  102. else if (($page < ($this->getLastPage() - 3)) && (1 < $page)) {
  103. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=1">1</a></li>';
  104. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=2">2</a></li>';
  105.  
  106. for ($counter = $page - 1; $counter <= $page + 1; $counter++) {
  107. if ($counter == $page) {
  108. $pagination .= '<li class="page-item active"><a rel="nofollow" class="page-link" href="#">' . $counter . '</a></li>';
  109. continue;
  110. }
  111.  
  112. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $counter . '">' . $counter . '</a></li>';
  113. }
  114.  
  115. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="#">...</a></li>';
  116. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $lpm1 . '">' . $lpm1 . '</a></li>';
  117. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $this->getLastPage() . '">' . $this->getLastPage() . '</a></li>';
  118. }
  119. else {
  120. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=1">1</a></li>';
  121. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=2">2</a></li>';
  122. $pagination .= '<li class=\'page-item\'><a rel="nofollow" class="page-link" href=\'#\'>...</a></li>';
  123.  
  124. for ($counter = $this->getLastPage() - 4; $counter <= $this->getLastPage(); $counter++) {
  125. if ($counter == $page) {
  126. $pagination .= '<li class="page-item active"><a rel="nofollow" class="page-link" href="#">' . $counter . '</a></li>';
  127. continue;
  128. }
  129.  
  130. $pagination .= '<li class="page-item"><a rel="nofollow" class="page-link" href="' . $this->website . $this->separate . 'page=' . $counter . '">' . $counter . '</a>';
  131. }
  132. }
  133. }
  134.  
  135. if ($page < ($counter - 1)) {
  136. }
  137. }
  138.  
  139. $pagination .= '</ul>' . "\n";
  140. return $pagination;
  141. }
  142. }
  143.  
  144. class Sitemap_Pagination
  145. {
  146. private $totalrows;
  147. private $rowsperpage;
  148. private $website;
  149. private $totalpages;
  150. private $page;
  151.  
  152. public function __construct($totalrows, $rowsperpage, $website, $totalpages)
  153. {
  154. $this->totalrows = $totalrows;
  155. .................................................................................
  156. ...............................................
  157. ......................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement