function printDownloadLink($mediaRow) { global $site, $section, $page, $uploaddir, $uploadurl, $cfg; $filename = urldecode($mediaRow[media_tag]); $filetype = ereg(".mp3", $filename); /* print $filename; */ $dir = $mediaRow[slot_name]; $size = $mediaRow[media_size]; $fileurl = "{$uploadurl}/{$dir}/{$filename}"; $filepath = "{$uploaddir}/{$dir}/{$filename}"; $filesize = convertfilesize($size); //print "\n\t\t\t<table width='100%' cellpadding='0' cellspacing='0' style='margin: 0px; border: 0px;'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='leftmargin' align='left'>\n\t\t\t\t\t\t<a href='$fileurl' target='new_window'>\n\t\t\t\t\t\t\t<img src='downarrow.gif' border='0' width='15' height='15' align='middle' alt='Download Arrow' />\n\t\t\t\t\t\t\t $filename\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='right' style='padding-right: 10px;'><b>$filesize</b></td>\n\t\t\t\t</tr>\n\t\t\t</table>"; $downloadlink = "\n\t\t\t<div style=' float: right; text-align: right;'>"; $downloadlink .= "<span style='font-size: smaller;'>{$filename}</span><br />"; $downloadlink .= "<a href='{$fileurl}' target='new_window'><img src='downarrow.gif' border='0' width='15' height='15' align='top' alt='Download Arrow' /></a> <a href='{$fileurl}' target='new_window'>Download</a>"; $downloadlink .= " <span style='font-size: smaller;'>({$filesize})</span></div>"; return $downloadlink; }
if ($order == 'user_uname desc') { print " ∨"; } print "</a></th>"; ?> <th> </th> </tr> <?php $color = 0; $today = date(Ymd); $yesterday = date(Ymd) - 1; if (db_num_rows($r)) { while ($a = db_fetch_assoc($r)) { $a[media_tag] = urldecode($a[media_tag]); $a[media_size] = convertfilesize($a[media_size]); $url = $uploadurl . "/" . $a[slot_name] . "/" . rawurlencode($a[media_tag]); if ($a[media_type] == 'image') { $img_path = $uploaddir . "/" . $a[slot_name] . "/" . $a[media_tag]; $img_url = $url; } else { $img_path = "images/file.gif"; $img_url = $img_path; } if (file_exists($img_path)) { $thumb_size = get_sizes($img_path, '50'); $img_size = get_size($img_path); } else { $img_url = "images/nofile.gif"; $thumb_size = get_sizes($img_path); $img_size = get_size($img_path);