Файл: vsime.com/comm/inc/multi_select_foot.php
Строк: 40
<?
if (isset($_SESSION["files_comm_multi_select_$comm[id]"]) && ($ank['id']==$user['id'] && isset($user) || $uinc['access']=='adm'))
{
echo "<div class='mod_grad'>n";
echo "<input type='hidden' name='mdp' value='$mdp'>n";
echo "<input type='submit' name='multi_select_submited' value='Выбрать' /> <a href='?act=files&id=$comm[id]&dir=$dir[id]&files_comm_multi_select_$comm[id]=cancel&page=$page&mdp=$mdp'>Отмена</a>n";
echo "</div>n";
echo "</form>n";
if ($count_files_comm_multi_select > 0)
{
echo "<div class='list_dr'>";
echo "Выбрано ".sklon_text($count_files_comm_multi_select, array('файл', 'файла', 'файлов')).":<br />n";
$count = 0;
foreach ($_SESSION["files_comm_multi_select_$comm[id]"] as $key => $value)
{
$file = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_comm` WHERE (`type` = 'file' OR `type` = 'foto') AND `id` = '$value' AND `id_comm` = '$comm[id]'"));
if ($file['type']=='file')
{
$file_user = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files` WHERE `id` = '$file[id_file]'"));
$file_user['link'] = "/files/?file=$file_user[id]";
} elseif ($file['type']=='foto') {
$file_user = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `foto` WHERE `id` = '$file[id_file]'"));
$file_user['link'] = "/fotos/?foto=$file_user[id]";
}
echo "<a href='$file_user[link]'".title_link('Открыть файл').">n";
if (is_file(H.'/i/file_type/'.$file_user['ras'].'.png'))echo "<img src='/i/file_type/$file_user[ras].png' alt='$file_user[ras]' /> n";
else echo "<img src='/i/file_type/file.png' alt='file' /> n";
echo hsc($file_user['name']).".".hsc($file_user['ras'])."</a> <a href='?act=files&id=$comm[id]&dir=$dir[id]&files_comm_multi_select_$comm[id]=full_list&page=$page&delete=$file[id]&mdp=$mdp'>$config[code_delete]</a><br />";
$count ++;
if($count >= 5)break;
}
if ($count_files_comm_multi_select > 5)echo "<a href='?act=files&id=$comm[id]&dir=$dir[id]&files_comm_multi_select_$comm[id]=full_list&page=$page'>Полный список »</a>n";
echo ($count_files_comm_multi_select > 0?"<span class='right'><a href='?act=files&id=$comm[id]&dir=$dir[id]&files_comm_multi_select_$comm[id]=delete&page=$page'>Удалить файлы</a> | <a href='?act=files&id=$comm[id]&dir=$dir[id]&files_comm_multi_select_$comm[id]=drop&page=$page&mdp=$mdp'>Очистить список</a></span>":null);
echo "<div class='clear'></div>n";
echo "</div>";
}
}
?>