Вход Регистрация
Файл: demotivators.php
Строк: 91
<?php
include_once '../sys/inc/start.php';
include_once 
'../sys/inc/compress.php';
include_once 
'../sys/inc/sess.php';
include_once 
'../sys/inc/home.php';
include_once 
'../sys/inc/settings.php';
include_once 
'../sys/inc/db_connect.php';
include_once 
'../sys/inc/ipua.php';
include_once 
'../sys/inc/fnc.php';
include_once 
'../sys/inc/user.php';
$set['title']='Демотиваторы';
include_once 
'../sys/inc/thead.php';
title();
aut();
$npage= round($_GET["page"]);
$demotivators = file_get_contents('http://funyline.ru/demotivators/count.php');
$demotivators = round($demotivators);
if (
$npage<1) $npage=1;
$p = 7;
if (
$npage == null) $npage = 1;
$first   = $demotivators - ($p * ($npage - 1));
$second  = $demotivators - ($p * $npage) + 1;
if (
$second < 1) {$second = 1;}
$npages  = (int)($demotivators / $p);
if (
$demotivators % $p != null) $npages=$npages +1;
if (
$npage>$npages)$npage=$npages;


for (
$i = $first; $i >= $second; $i--) {
$ii = $i;
$ii++;

echo 
"<center><img src='http://funyline.ru/demotivators/mobile/".$i.".jpg' alt='Загрузка...'></center>";
echo 
'<a href="http://funyline.ru/demotivators/original/'.$i.'.jpg">Скачать оригинал</a><br/>';
echo 
'<a href="http://funyline.ru/demotivators/mobile/'.$i.'.jpg">Для мобильного</a><hr>';
}

echo
'Стр: ';
if (
$npage!=1)echo " <a href="demotivators.php?page=1">1</a>";else echo "1";
for (
$ot=-3; $ot<=3; $ot++){
if (
$npage+$ot>1 && $npage+$ot<$npages){
if (
$ot==-3 && $npage+$ot>2)echo " ..";
if (
$ot!=0)echo " <a href="demotivators.php?page=".($npage+$ot)."">".($npage+$ot)."</a>";else echo " ".($npage+$ot)."";
if (
$ot==3 && $npage+$ot<$npages-1)echo " ..";}}
if (
$npage!=$npages)echo " <a href="demotivators.php?page=$npages">$npages</a>"; elseif ($npages>1)echo " $npages";
echo 
'<br/>';
include_once 
'../sys/inc/tfoot.php';
?>
Онлайн: 0
Реклама