<?php

if (is_file(H . "loads/inc/opis/$ras.php")) {
    include H . "loads/inc/opis/$ras.php";
} else {
    echo 'Размер: ' . size_file($size) . "<br />\n";
    echo 'Загружен: ' . date::times(filectime($dir_loads . '/' . $dirlist[$i])) . "<br />\n";
}

$l2 = $l;
if (function_exists('iconv')) {
    $l2 = iconv('windows-1251', 'utf-8', $l2);
}
$jfile = preg_replace('#\.jad$#i', '.jar', $dirlist[$i]);
$size = filesize($dir_loads . '/' . $jfile);
if (function_exists('iconv')) {
    $jfile = iconv('windows-1251', 'utf-8', $jfile);
}

$path = (function_exists('iconv')) ? iconv('windows-1251', 'utf-8', $l) : $l;
$path = '/' . preg_replace('#^/+|/+$#i', null, $path) . '/';
$loads = $db->get_row($db->query("SELECT * FROM `loads_list` WHERE `name` = '$jfile' AND `size` = '$size' AND `path` = '" . $db->safesql($path) . "' LIMIT 1"));
if ($loads == NULL) {
    $db->query("INSERT INTO `loads_list` (`name`, `size`,  `path`, `time`) values('" . $db->safesql($jfile) . "', '$size', '" . $db->safesql($path) . "', '" . filectime($dir_loads . '/' . $dirlist[$i]) . "')");
}
