' . $str . '
';
unset($str);
}
}
###############Список файлов и папок###############
if (!$d['all']) {
$out .= '';
} else {
$row = '
';
}
if ($v['dir']) {
//Кол-во новых файлов в папке
if ($setup['day_new'] && $v['count']) {
$new_all = '
+' . $v['count'] . '';
} else {
$new_all = '';
}
//Иконка к папке
if (file_exists($v['v'] . 'folder.png')) {
$ico = '
';
} else {
$ico = '
';
}
//Собсвенно вывод
$out .= $row . $ico . '
' . htmlspecialchars($v['name'], ENT_NOQUOTES) . ' (' . $v['dir_count'] . ')' . $new_all;
// описания
if ($setup['desc'] && file_exists($setup['opath'] . $screen . '.txt')) {
$out .= '
' . iconv_substr(trim(file_get_contents($setup['opath'] . $screen . '.txt')), 0, $setup['desc']);
}
$out .= '
';
} else {
$prev_pic = str_replace('/', '--', iconv_substr($screen, 1));
$ext = strtolower(pathinfo($v['v'], PATHINFO_EXTENSION));
$pre = '';
//Предосмотр
if ($prew) {
if ($setup['screen_change'] && ($ext == 'gif' || $ext == 'jpeg' || $ext == 'jpg' || $ext == 'png' || $ext == 'bmp')) {
if (file_exists($setup['picpath'] . '/' . $prev_pic . '.gif')) {
$pre .= '
';
} else {
$pre .= '
';
}
} else if ($setup['screen_change'] && ($ext == 'avi' || $ext == '3gp' || $ext == 'mp4' || $ext == 'flv') && extension_loaded('ffmpeg')) {
$wh = explode('*', $setup['prev_size']);
if (file_exists($setup['ffmpegpath'] . '/' . htmlspecialchars($prev_pic) . '_frame_' . $setup['ffmpeg_frame'] . '.gif')) {
$pre .= '
';
} else {
$pre .= '
';
}
} else if ($setup['screen_change'] && ($ext == 'thm' || $ext == 'nth' || $ext == 'utz' || $ext == 'sdt' || $ext == 'scs')) {
if (file_exists($setup['tpath'] . '/' . $prev_pic . '.gif')) {
$pre .= '
';
} else if ($setup['swf_change'] && file_exists($setup['tpath'] . '/' . $prev_pic . '.gif.swf')) {
$pre .= '
';
} else if (!file_exists($setup['tpath'] . '/' . $prev_pic . '.gif.swf')) {
$pre .= '
';
}
} else if ($setup['swf_change'] && $ext == 'swf') {
$pre .= '
';
}
}
//Новизна файла
if (($v['timeupload'] + $dn) >= $_SERVER['REQUEST_TIME'] && $setup['day_new']) {
$new_info = '
' . $_SESSION['language']['new'] . '';
} else {
$new_info = '';
}
//Красивый размер
$v['size'] = '(' . size($v['size']) . ')';
if ($setup['screen_change']) {
$th_gif = file_exists($setup['spath'] . $screen . '.thumb.gif');
$th_jpg = file_exists($setup['spath'] . $screen . '.thumb.jpg');
if (file_exists($setup['spath'] . $screen . '.gif') && !$th_gif) {
img_resize($setup['spath'] . $screen . '.gif', $setup['spath'] . $screen . '.thumb.gif', 0, 0, $setup['marker']);
} else if (file_exists($setup['spath'] . $screen . '.jpg') && !$th_gif) {
img_resize($setup['spath'] . $screen . '.jpg', $setup['spath'] . $screen . '.thumb.gif', 0, 0, $setup['marker']);
}
if ($th_gif) {
$pre .= '
';
} else if ($th_jpg) {
$pre .= '
';
}
}
if ($pre) {
$pre .= '
';
}
//Иконка к файлу
if (!$pre && $setup['jar_change'] && ($ext == 'jar' && $ext != 'apk')) {
if (file_exists($setup['ipath'] . '/' . $prev_pic . '.png')) {
$ico = '
';
} elseif (jar_ico($v['v'], $setup['ipath'] . '/' . $prev_pic . '.png')) {
$ico = '
';
}
}elseif (!$pre && $setup['apk_change'] && ($ext == 'apk' && $ext != 'jar')) {
if (file_exists($setup['apkpath'] . '/' . $prev_pic . '.png')) {
$ico = '
';
} elseif (apk_ico($v['v'], $setup['apkpath'] . '/' . $prev_pic . '.png')) {
$ico = '
';
}
}elseif (!$pre && file_exists('ext/' . $ext . '.png')) {
$ico = '
';
}elseif(!$pre && !file_exists('ext/' . $ext . '.png')) {
$ico = '
';
}elseif($pre && file_exists('ext/' . $ext . '.png')){
$ico = '';
}
if ($setup['desc'] && file_exists($setup['opath'] . $screen . '.txt')) {
$desc .= '
' . iconv_substr(trim(file_get_contents($setup['opath'] . $screen . '.txt')), 0, $setup['desc']);
}
//Собственно вывод
$out .= $row . $pre . $ico . '
' . htmlspecialchars($v['name'], ENT_NOQUOTES) . ' ' . $v['size'] . $info . $new_info . $desc . '
';
}
}
###############Постраничная навигация########
if ($pages > 1 && $limit != '') {
$out .= '