'primary', 'video'=>'danger', 'audio'=>'warning', 'document'=>'info', 'archive'=>'success', 'other'=>'secondary');
$type_labels = array('image'=>lang('admin_attach_type_image'), 'video'=>lang('admin_attach_type_video'), 'audio'=>lang('admin_attach_type_audio'), 'document'=>lang('admin_attach_type_document'), 'archive'=>lang('admin_attach_type_archive'), 'other'=>lang('admin_attach_type_other'));
foreach($stats['type_stats'] as $type => $count) {
$pct = $stats['total'] > 0 ? round($count / $stats['total'] * 100, 1) : 0;
$color = isset($type_colors[$type]) ? $type_colors[$type] : 'secondary';
$label = isset($type_labels[$type]) ? $type_labels[$type] : $type;
if($count == 0) continue;
?>