$bulletins = $oo->children($id); // randomise the array // shuffle($bulletins); foreach ($bulletins as $b) { // style title and author $title = strtoupper($b['name1']); $author = $b['deck']; $caption = $author . ": " . $title; // get cover image $all_media = $oo->media($b['id']); $j = 0; while ($all_media[$j]['type'] == "pdf") { $j++; } // get cover image url $m_url = m_url($all_media[$j]); // build bulletin url $b_url = $issue_url . "/" . $b['url']; // display bulletin and caption ?> <div class="thumbsContainer issue<?php echo $i; ?> "> <a href="<?php echo $b_url; ?> "> <div class="coverContainer"><?php // G-e-s-t-a-l-t exception if ($b['id'] == $gestalt_id and !$is_mobile) {
<?php // namespace stuff use Michelf\Markdown; $r = $oo->get($uu->id); $body = Markdown::defaultTransform($r['body']); $deck = $r['deck']; $cover = $oo->media($r['id'])[0]; if ($cover) { $cover_img = m_url($cover); } // only show back button on internal references $internal = substr($_SERVER['HTTP_REFERER'], 0, strlen($host)) === $host; $back_url = "javascript:self.history.back();"; ?> <div class="mainContainer"> <div class="wordsContainer body"><?php echo nl2br($deck); if ($cover) { ?> <img src="<?php echo $cover_img; ?> "><?php } echo $body; if ($showsubscribe) { require_once "views/subscribe.php"; } if ($internal && !$showsubscribe) { ?>
<? // id for parent annual report object $annual_reports_id = 2; // ids of annual reports $reports = $oo->children($annual_reports_id); // media arrays of annual report covers $report_urls = array(); $cover_urls = array(); // get / output covers if($is_report) { $cover_url = m_url($oo->media($uu->id)[0]); ?><div id="reports-alt" onmouseover="show_reports();" onmouseout="hide_reports();"> <div class="report-container select"> <a href="<? echo $host.$uu->urls(); ?>"> <img class="report-img" src="<? echo $cover_url; ?>"> </a> </div><? ?></div><? } ?></div>
$media_urls = []; $media_captions = []; $media_dims = []; if ($media[0]) { ?><div id="img-pinboard"><? $b_arr = process_event($item['body']); for($i = 0; $i < count($b_arr); $i++) { if($media[$i]) { ?><div class="img-container"><? $ii = $i; foreach($media as $m) { $url = m_url($m); $media_urls[] = $url; $media_captions[] = $m['caption']; // fix relative urls $relative_url = "media/" . m_pad($m['id']).".".$m['type']; $size = getimagesize($relative_url); $wide_tall = (($size[0] >= $size[1]) ? wide : tall); $media_dims[] = $wide_tall; // random sizing $padding = rand(0, 10); $margin = rand(0, 20); $width = rand(2, 5)*10; $float = (rand(0, 1) == 0) ? 'left' : 'right'; $style = "width: " . $width . "%; float: " . $float . "; padding: " . $padding ."px; margin: " . $margin ."px;";
echo $j; ?> " width="100%" controls loop class="fullscreen"> <source src="<?php echo m_url($media[$j]); ?> " type="video/mp4"> </video> </div><?php } else { ?> <div class="img-container"><img id="img-<?php echo $j; ?> " class="fullscreen" src="<?php echo m_url($media[$j]); ?> "></div><?php } $j++; } } ?> </div><?php if ($i % 2 == 1) { ?> </div><?php } } ?> </section>
$issue = 0; } $r = $oo->get($uu->id); $title = strtoupper($r['name1']); $author = $r['deck']; $body = $r['body']; $gestalt_id = 77066; // get media stuff $fields = array("*"); $tables = array("media"); $where = array("object = '" . $r['id'] . "'", "active = '1'"); $order = array("type"); $limit = 3; $media_all = $oo->get_all($fields, $tables, $where, $order, $limit); $media_all = array_reverse($media_all); $cover_img = m_url($media_all[1]); $pdf = $media_all[0]; $source_name = m_pad($pdf['id']); if ($pdf['caption']) { $display_name = $pdf['caption']; } else { $display_name = $source_name; } $display_name = htmlspecialchars($display_name, ENT_QUOTES); // video exception for issue 8 $video = false; if (count($media_all) > 2) { $video = $media_all[2]; $vid_caption = $video['caption']; } ?>