Файл: 3020.ru/_modules/sz/search/index.php
Строк: 110
<?php
# author penny wise
# telegram @the_penny_wise
require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
$title = domain.'- Поиск - Зона Обмена. 18+, видео и другое на '.domain.' /'.domain.' / ';
$description = $title;
$generator = $title;
$url = '/files/search/';
if (isset($_POST['cfms'])) {
$word = system::check($_POST['word']);
$_SESSION['word'] = $word;
}
$s_word = system::check($_SESSION['word']);
$id = system::check($_GET['id']);
$stt = system::check($_GET['stt']);
$page = system::check($_GET['page']);
require_once ( head );
echo '
<div class="mains">
<div class="lc_br wbg font0 relative oh" id="header_path">
<a href="/" style="font-size:0;">
<img src="'.ico.'home.png" alt="'.domain.'">
</a>
<span class="lc_brw">
<a href="/sz/" style="font-size:0;">
<img src="'.ico.'sep.png" alt="" class="lc_br_sep">
<span class="lc_br_text">Зона обмена</span>
</a>
<span class="lc_brw">
<img src="'.ico.'sep.png" alt="" class="lc_br_sep">
<span class="lc_br_text">Поиск</span>
</span>
</span>
</div>
<div class="wrapper block">
<form method="post" action="">
<div>
<table class="table__wrap search-wrap input-txt_grid">
<tbody><tr>
<td class="input-txt_grid_input">
<div class="input-txt_wrapper_search relative">
<input type="text" class="input-txt" name="word" value="'.($s_word != null ? $s_word:'').'" maxlength="64">
</div>
</td>
<td class="input-txt_grid_sep">
</td>
<td class="input-txt_grid_btn">
<input type="submit" class="search__btn" value="Найти" name="cfms">
</td>
</tr> </tbody></table>
</form>
</div>
</div>';
if ($s_word != null && $id == null && $stt == null):
$cache = json_decode(cache::get_sz_file_search($s_word));
echo '<div class="wrapper"><div class ="block"><b>Поиск: «<span class="service_item">'.$s_word.'</span>»</b></div>';
foreach ($cache as $data):
if ($data->id != null):
$arr_t = array('','Фото и картинки','Видео','Игры','Программы','Творчество обитателей','Анимации (Gif)','Аудио','Музыка','Темы','Книги ','Статьи, документы','Флэш','Прочее');
$arr_i = array('','photos','videos','games','app','creation','gif','audio','music','themes','books','article','files','other');
$ico = str_replace($arr_t,$arr_i,$data->name);
$ico = stripslashes(trim($ico));
echo '<a class="link -full darkblue c-darkblue" href="?id='.$data->id.'&stt='.$data->session.'">
<img src="'.ico.''.$ico.'.png" class="m">
<span class="m">'.$data->name.'</span>
<span class="m">(<span class=" grey c-grey">'.$data->cn.'</span>)</span>
</a>';
endif;
endforeach;
echo '</div>';
endif;
if($id != null && $stt != null):
$dir = '?Slist='.$id.'&stt='.$stt.'&word='.$s_word.''.($page != null ? '&P='.$page:'').'';
$cache = json_decode(cache::get_sz_file_search_all($dir));
echo '<div class="wrapper">
<a href="/files/search/" class="link darkblue return full_link">
<img src="'.ico.'arr_back.png" alt="" width="6px" height="10px" class="m"> Назад </a>
</div><div class="wrapper">';
foreach ($cache as $data):
if ($data->url_file != null):
$img = ($config['donar'] == 1 ? '/img/'.base64_encode($data->img_file).'':$data->img_file);
echo '
<div class="block oh bord-botm">
<div class="left font0 padd_right p80">
<span class="pr">
<img src="'.$img.'">
</span></div>
<a href="/so/'.$data->type_file.'/'.$data->url_file.'">
<img src="'.ico.''.$data->format_file.'.png" alt="" class="m p16">
<b class="m break-word darkblue break-word">'.$data->name_file.'</b>
<b class="break-word lgrey3 m break-word">.'.$data->format_file.'</b>
</a>
<div class="pad_t_a black break-word"> '.$data->msg_file.'
<span class="right"> <span class="grey">'.$data->size_file.'</span> </span>
</div>
</div>
';
endif;
endforeach;
echo '</div>';
if($cache[0]->cn != null)page::all('?id='.$id.'&stt='.$stt,$page,$cache[0]->cn);
endif;
echo'
<div class="lc_br wbg font0 relative oh" style=" border-top: 1px solid #c0d0de;">
<a href="/" style="font-size:0;">
<img src="'.ico.'home.png" alt="'.domain.'">
</a>
<span class="lc_brw">
<a href="/sz/" style="font-size:0;">
<img src="'.ico.'sep.png" alt="" class="lc_br_sep">
<span class="lc_br_text">Зона обмена</span>
</a>
<span class="lc_brw">
<img src="'.ico.'sep.png" alt="" class="lc_br_sep">
<span class="lc_br_text">Поиск</span>
</span>
</span>
</div>
';
require_once ( foot ) ;
?>