private function DetailFile($file) { $file_extension = pathinfo($file); $endf = $file_extension['extension']; $realpath = explode(ROOT, iconv("windows-1251", "utf-8", $file)); $realpath = HOME . $realpath[1]; if ($endf == "jpg" || $endf == "jpeg" || $endf == "gif" || $endf == "png") { //echo $realpath[1]; $result = ' <li class="list_img"> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . $realpath . '" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } else { if ($endf == "html" || $endf == "tpl") { $result = ' <li> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . HOME . 'admin/systems/template/img/file_html.png" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } else { if ($endf == "css") { $result = ' <li> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . HOME . 'admin/systems/template/img/file_css.png" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } else { if ($endf == "docx") { $result = ' <li> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . HOME . 'admin/systems/template/img/file_docx.png" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } else { if ($endf == "txt") { $result = ' <li> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . HOME . 'admin/systems/template/img/file_txt.png" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } else { if ($endf == "rar" || $endf == "zip") { $result = ' <li> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . HOME . 'admin/systems/template/img/file_rar.png" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } else { $result = ' <li> <div class="list_hide"> <a href="' . $realpath . '" target="_blank"><img src="' . HOME . 'admin/systems/template/img/file_other.png" alt=""></a> <a href="' . $file . '" class="apps_delete_file"></a> </div> <a href="' . $realpath . '" target="_blank" class="apps_filename">' . iconv("windows-1251", "utf-8", basename($file)) . '<span class="apps_files_info">' . Systems::formati_baitov(filesize($file)) . '</span></a> </li>'; } } } } } } return $result; }