<?php

$path = (function_exists('iconv')) ? iconv('windows-1251', 'utf-8', $l) : $l;
$path = '/' . preg_replace('#^/+|/+$#i', null, $path) . '/';
$q = mysql_query("SELECT * FROM `loads_list` WHERE `name` = '$file' AND `id_user` AND `path` = '" . mysql_real_escape_string($path) . "'");
while ($f = mysql_fetch_array($q)) {
    $a = mysql_fetch_array(mysql_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') {
    $tim = mysql_result(mysql_query("SELECT `time` FROM `loads_list` WHERE (`name` = '$file' AND `path` = '" . mysql_real_escape_string($path) . "')"), 0);
    echo " <small style='color: grey;'>" . date::times($tim) . "</small><br />\n";
}
if (!isset($set['data_select']) || $set['data_select'] == '1') {
    echo " <small style='color: grey;'>" . date::times(filectime($dir_loads . '/' . $file)) . "</small><br />\n";
}
$timet = mysql_result(mysql_query("SELECT `time_r` FROM `loads_list` WHERE (`name` = '$file' AND `path` = '" . mysql_real_escape_string($path) . "')"), 0);
if ($timet) {
    echo "<small style='color: grey;'><i class='fa fa-pencil fa-fw'></i> " . lang('Последнее редактирование') . ": " . date::times($timet) . "</small><br />\n";
}
echo "</div>";
