= 1073741824) return round($size / 1073741824, 2) . ' GB'; if($size >= 1048576) return round($size / 1048576, 2) . ' MB'; if($size >= 1024) return round($size / 1024, 2) . ' KB'; return $size . ' B'; } /* ================= FILE ICON ================= */ function fileIcon($ext){ $videos = ['mp4','mkv','avi','mov','webm']; $images = ['jpg','jpeg','png','gif','webp']; $archives = ['zip','rar','7z']; $audio = ['mp3','wav','ogg']; if(in_array($ext, $videos)) return 'fa-file-video'; if(in_array($ext, $images)) return 'fa-file-image'; if(in_array($ext, $archives)) return 'fa-file-zipper'; if(in_array($ext, $audio)) return 'fa-file-audio'; return 'fa-file'; } /* ================= FILE TYPE COLOR ================= */ function accentColor($ext){ $videos = ['mp4','mkv','avi','mov','webm']; $images = ['jpg','jpeg','png','gif','webp']; $archives = ['zip','rar','7z']; $audio = ['mp3','wav','ogg']; if(in_array($ext, $videos)) return '#7c3aed'; if(in_array($ext, $images)) return '#059669'; if(in_array($ext, $archives)) return '#d97706'; if(in_array($ext, $audio)) return '#db2777'; return '#2563eb'; } $accent = accentColor($fileExt); ?> <?php echo htmlspecialchars($fileName); ?> — SabiShares
Secure File Server
<?php echo htmlspecialchars($fileName); ?>
Download
This file is hosted on the SabiShares file server. Only download files from sources you trust.
Link copied to clipboard