<?php

$path = (function_exists('iconv')) ? iconv('windows-1251', 'utf-8', $l) : $l;
$path = '/' . preg_replace('#^/+|/+$#i', null, $path) . '/';
$q = $db->query("SELECT * FROM `loads_list` WHERE `name` = '$file' AND `id_user` AND `path` = '" . $db->safesql($path) . "'");
while ($f = $db->get_row($q)) {
    $a = $db->get_row($db->query("SELECT * FROM `user` WHERE `id` = '$f[id_user]' LIMIT 1"));
}
echo "<div class='list-group-item-null list-group-item-grey'>";
echo user($a['id']);

if (!isset($set['data_select']) || $set['data_select'] == '0') {
    $q = $db->super_query("SELECT `time` as time FROM `loads_list` WHERE `name` = '$file' AND `path` = '" . $db->safesql($path) . "'");

    $tim = $q['time'];
    echo " <small style='color: grey;'>" . date::times($tim) . "</small><br />\n";
    unset($tim);
}

if (!isset($set['data_select']) || $set['data_select'] == '1') {
    echo " <small style='color: grey;'>" . date::times(filectime($dir_loads . '/' . $file)) . "</small><br />\n";
}
$q = $db->super_query("SELECT `time_r` as time_r FROM `loads_list` WHERE `name` = '$file' AND `path` = '" . $db->safesql($path) . "'");

$timet = $q['time_r'];

if ($timet) {
    echo "<small style='color: grey;'><i class='fa fa-pencil fa-fw'></i> " . lang('Последнее редактирование') . ": " . date::times($timet) . "</small><br />\n";
}
unset($timet);
echo "</div>";
