function makedownloadbar($o) { global $site, $section, $page, $uploaddir, $uploadurl; if ($o->getField("type") != 'file') { return; } $b = db_get_line("media INNER JOIN slot ON media.FK_site=slot.FK_site", "media_id='" . addslashes($o->getField("longertext")) . "'"); ob_start(); print "\n"; print "\n<div class='downloadbar' style='margin-bottom: 10px'>"; // print "\n\t<table width='100%' cellpadding='0' cellspacing='0'>\n\t<tr>\n\t\t<td>"; if ($o->getField("title")) { print "\n<div style='float: left; '><strong><a href='index.php?{$sid}&action=site&site={$site}&section={$section}&page={$page}&story=" . $o->id . "&detail=" . $o->id . "'>"; print "" . spchars($o->getField("title")) . "</a></strong>\n\t\t\t</div>"; } print printDownloadLink($b); print printMediaPlayer($b); print "\n\t\t\t\t\t<div style='clear: left; font-size: smaller; margin-bottom: 10px; '>"; print printCitation($b); print "\n\t\t\t\t\t</div>"; if ($o->getField("shorttext")) { print "" . stripslashes($o->getField("shorttext")); } print "\n\t<div style='clear: both;'> </div>"; print "</div>\n"; return ob_get_clean(); }
<?php /* $Id$ */ print "<p style='margin: 10px; padding: 5px; font-size: smaller;'>"; $mediaRow = db_get_line("media INNER JOIN slot ON media.FK_site=slot.FK_site", "media_id='" . addslashes($o->getField("longertext")) . "'"); printCitation($mediaRow); print "</p>"; $st = $o->getField("shorttext"); $st = convertTagsToInteralLinks($site, $st); if ($o->getField("texttype") == 'text') { print nl2br($st); } else { print $st; } print "<p>"; printDownloadLink($mediaRow); print "</p>";
} else { print "<a href='{$url}'>"; } print "<img src='{$img_url}' height='{$thumb_size['y']}' width='{$thumb_size['x']}' border='0' alt='thumbnail image for file'/>"; print "</a>"; print "</td>\n"; // print "<td class='td$color' style='vertical-align: top;'>"; // print "$a[media_id]"; // print "</td>\n"; print "<td class='td{$color}' style='text-align: left;'>"; print "<strong>{$a['media_tag']}</strong>"; //----------------------------------------------- // Metdata //----------------------------------------------- print "\n<div>"; printCitation($a); print "</div>"; print <<<END \t\t\t<div \t\t\t\tstyle='cursor: pointer; text-align: right; font-size: 9px;' \t\t\t\tonclick="if (this.nextSibling.style.display!='block') {this.nextSibling.style.display='block'; this.innerHTML='cancel';} else {this.nextSibling.style.display='none'; this.innerHTML='edit'}" \t\t\t>\t END; print "edit</div>"; print "<div style='display: none'>"; print "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; print "\n\t<input type='hidden' name='update_id' value='" . $a['media_id'] . "'/>"; print <<<END \t\t<input type='hidden' name='order' value='{$order}' /> \t\t<input type='hidden' name='all' value='{$all}' /> \t\t<input type='hidden' name='editor' value='{$editor}' />