Вход Регистрация
Файл: www-1/navigation.php
Строк: 582
<?php
class gift {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=all')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }





class 
forum {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=view')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this -> link = '?'.$_SERVER['QUERY_STRING'];
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }



class 
forum2 {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this -> link = '../forum.php?'.$_SERVER['QUERY_STRING'];
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }







class 
list_fight {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=all')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }





class 
helmet {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=helmet')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }










class 
forest {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=forest')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }







class 
news {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=news')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }









class 
adm_bot {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=bots_loc')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }










class 
mail_in {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=in')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }











class 
mail_out {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=out')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }







class 
friends {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=out')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }












class 
navigation_armor_shop {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=w')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this->link = $link;
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }












class 
books {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=show')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this -> link = '?'.$_SERVER['QUERY_STRING'];
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }










class 
a {
public function 
__construct($input,$on_page,$print_str = false, $order = 'asc', $link = '?a=show')
{if(
is_array($input))
    {  
$this->rfile=array_values($input);
        
$this->all_files = count($this->rfile);
        
$this->rfile = $order == 'asc' ? $this->rfile : array_reverse($this->rfile);}
    else
    {
$this->all_files = $input; }
    
$this -> link = '?'.$_SERVER['QUERY_STRING'];
    
$this->on_page = $on_page < 1 ? 1 : $on_page;
    
$this->str = $print_str === true ? 'Стр. ' : '';
    
$this->order = $order;
    
$this->all_pages = ceil($this->all_files / $this->on_page);
    
$this->page = !isset($_GET['p']) || $_GET['p'] <= 0 ? 1 : abs(intval($_GET['p']));
    
$this->page = $this->page > $this->all_pages ? $this->all_pages : $this->page;
    
$this->page = isset($_GET['last']) ? $this->all_pages : $this->page;    
    
$this->start = ($this->page * $this->on_page) - 1;
    
$this->start = $this->start > $this->all_files  ? $this->all_files : $this->start;
    
$this->end   = ($this->page * $this->on_page)- $this->on_page;
    
$this->last_three_page = $this->all_pages - 2; }
public function 
back_forward_links() {
    if(
$this->page <= 1)
    { 
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>'; }
    elseif(
$this->page >= $this->all_pages)
{
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a>';}else{
        
$this->this_links = '<a href="'.$this->link.'&amp;p='.($this->page-1).'">'.$this->lt.'Назад</a> | <a href="'.$this->link.'&amp;p='.($this->page+1).'">Вперед'.$this->gt.'</a>';}
    return 
$this->this_links;}
function 
limit() { return (($this->page*$this->on_page)-$this->on_page).' ,'.$this->on_page;}    }
?>
Онлайн: 1
Реклама