echo '<a href="' . html::escapeURL($page_url) . '&id=' . $id . '&size=o">' . __('original') . '</a>'; echo '</p>'; if (isset($file->media_thumb[$thumb_size])) { echo '<p><img src="' . $file->media_thumb[$thumb_size] . '" alt="" /></p>'; } elseif ($thumb_size == 'o') { $S = getimagesize($file->file); $class = $S[1] > 500 ? ' class="overheight"' : ''; unset($S); echo '<p id="media-original-image"' . $class . '><img src="' . $file->file_url . '" alt="" /></p>'; } } if ($file->type == 'audio/mpeg3') { echo oktMedia::mp3player($file->file_url, 'index.php?pf=player_mp3.swf'); } if ($file->type == 'video/x-flv' || $file->type == 'video/mp4' || $file->type == 'video/x-m4v') { echo oktMedia::flvplayer($file->file_url, 'index.php?pf=player_flv.swf'); } echo '<h3>' . __('Media details') . '</h3>' . '<ul>' . '<li><strong>' . __('File owner:') . '</strong> ' . $file->media_user . '</li>' . '<li><strong>' . __('File type:') . '</strong> ' . $file->type . '</li>' . '<li><strong>' . __('File size:') . '</strong> ' . util::l10nFileSize($file->size) . '</li>' . '<li><strong>' . __('File URL:') . '</strong> <a href="' . $file->file_url . '">' . $file->file_url . '</a></li>' . '</ul>'; if ($file->type == 'image/jpeg') { echo '<h3>' . __('Image details') . '</h3>'; if (count($file->media_meta) == 0) { echo '<p>' . __('No detail') . '</p>'; } else { echo '<ul>'; foreach ($file->media_meta as $k => $v) { if ((string) $v) { echo '<li><strong>' . $k . ':</strong> ' . html::escapeHTML($v) . '</li>'; } } echo '</ul>'; }
function mediaItemLine($f, $i) { global $okt, $page_url, $popup; $fname = $f->basename; if ($f->d) { $link = html::escapeURL($page_url) . '&d=' . html::sanitizeURL($f->relname); if ($f->parent) { $fname = '..'; } } else { $link = 'module.php?m=media_manager&action=item&id=' . $f->media_id . '&popup=' . $popup; } $class = 'media-item media-col-' . $i % 2; $res = '<div class="' . $class . '"><a class="media-icon media-link" href="' . $link . '">' . '<img src="' . $f->media_icon . '" alt="" /></a>' . '<ul>' . '<li><a class="media-link" href="' . $link . '">' . $fname . '</a></li>'; if (!$f->d) { $res .= '<li>' . $f->media_title . '</li>' . '<li>' . $f->media_dtstr . ' - ' . util::l10nFileSize($f->size) . ' - ' . '<a href="' . $f->file_url . '">' . __('c_c_action_open') . '</a>' . '</li>'; } $res .= '<li class="media-action"> '; if ($popup && !$f->d) { $res .= '<a href="' . $link . '"><img src="' . OKT_PUBLIC_URL . '/img/ico/plus.png" alt="' . __('Insert this file') . '" ' . 'title="' . __('Insert this file') . '" /></a> '; } if ($f->del) { $res .= '<a href="' . html::escapeURL($page_url) . '&d=' . rawurlencode($GLOBALS['d']) . '&remove=' . rawurlencode($f->basename) . '" class="icon delete">' . __('c_c_action_delete') . '</a>'; } $res .= '</li>'; if ($f->type == 'audio/mpeg3') { $res .= '<li>' . oktMedia::mp3player($f->file_url, 'index.php?pf=player_mp3.swf') . '</li>'; } $res .= '</ul></div>'; return $res; }