Файл: anifun.ru/hentai.php
Строк: 81
<?
############################################
## By Holopsicon
## https://psgame.net
############################################
include_once("files/dop.php");
?>
<div class="block_w">
<b>AniFun</b></br>
<span>Добавляй в закладки!</span>
</div>
<div class="block_search mb15">
<form action="/search/hentai/" method="post">
<table cellpadding="0" cellspacing="0">
<td style="width:1px;">
<button class="button_search" type="submit"><span class="material-icons">search</span></button>
</td>
<td>
<input class="input_search" placeholder="Введите название хентая..." type="text" name="search" value="" autocomplete="off">
</td>
</table>
</form>
</div>
<?
include_once("files/GeoData/op_pm.php");
if ($pirat==pirat){
?><div class="block"><a class="create" href="/adc.php?mod=cr_cat_hentai">Добавить категорию</a></div><?
}
$num = 12;
$page = $_GET['page'];
$result = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM `hentai` ");
$posts = $result;
$total = intval(($posts - 1) / $num) + 1;
$page = intval($page);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $num - $num;
if (!empty($result)) {
?><div class="video_content"><?
$res = DB::$dbs->query("SELECT `name`,`id`,`preview`,`views` FROM `hentai` ORDER by `id` DESC LIMIT $start,$num");
while($array = $res -> fetch()) {
###
$filename = "/var/www/bop217/data/www/anifun.ru/preview/hentai/".$array[preview]."";
if (file_exists($filename)) {
$img_t="$array[preview]";
}else{
$img_t="no_hentai.png";
}
?>
<div class="block_video">
<div class="video">
<a href="/xepisode/<?=$array['id']?>/">
<img src="/preview/hentai/<?=$array['preview']?>">
<b><?=$array['name']?></b>
</a>
<div class="video_rat"><span class="material-icons">visibility</span> <?=$array['views']?></div>
</div>
</div>
<?
}
?></div><?
###вывод страниц
if ($page != 1) $pervpage = '<a href=/hentai/><strong>В начало</strong></a>';
if ($page != $total) $nextpage = '<a href=/hentai/' .$total. '/><strong>В конец</strong></a>';
if($page - 2 > 0) $page2left = '<a href=/hentai/'. ($page - 2) .'/><strong>'. ($page - 2) .'</strong></a>';
if($page - 1 > 0) $page1left = '<a href=/hentai/'. ($page - 1) .'/><strong>'. ($page - 1) .'</strong></a>';
if($page + 2 <= $total) $page2right = '<a href=/hentai/'. ($page + 2) .'/><strong>'. ($page + 2) .'</strong></a>';
if($page + 1 <= $total) $page1right = '<a href=/hentai/'. ($page + 1) .'/><strong>'. ($page + 1) .'</strong></a>';
?><div class="block_nav"><?
echo $pervpage.$page1left.'<b>'.$page.'</b>'.$page1right.$nextpage;
?></div><?
}else{
?><div class="no_hentai"><span class="material-icons">error_outline</span> Хентай еще не добавлен</div><?
}
include_once("files/d_one.php");
?>