function loop($data, $parent) { if (isset($data[$parent])) { // jika ada anak dari menu maka tampilkan /* setiap menu ditampilkan dengan tag <ul> dan apabila nilai $parent bukan 0 maka sembunyikan element * karena bukan merupakan menu utama melainkan sub menu */ $str = '<ul parent="' . $parent . '" style="display:' . ($parent > 0 ? 'none' : '') . '">'; foreach ($data[$parent] as $value) { /* variable $child akan bernilai sebuah string apabila ada sub menu dari masing-masing menu utama * dan akan bernilai negatif apabila tidak ada sub menu */ if ($value->TglBaca == "0000-00-00 00:00:00") { $statusbaca = "<font color=\"#CC0000\"> Belum dibaca. </font>"; } else { $statusbaca = "Telah dibaca pada " . ViewDateTimeFormat($value->TglBaca) . "."; } $child = loop($data, $value->IdDisposisi); $str .= '<table><tr><td><li>'; /* beri tanda sebuah folder dengan warna yang mencolok apabila terdapat sub menu di bawah menu utama * dan beri juga event javascript untuk membuka sub menu di dalamnya */ $str .= $child ? '<a href="javascript:openTree(' . $value->IdDisposisi . ')"><img src="images/icons/folderclose2.jpg" id="img' . $value->IdDisposisi . '" border="0"></a>' : '<img src="images/icons/folderclose1.jpg">'; $str .= '<a href="' . $value->url . '"></a> => ' . GetNama($value->IdPenerima) . ' pada ' . ViewDateTimeFormat($value->TglDisposisi) . ' </td></tr><tr><td><font color=#E238EC>Instruksi/Berita : ' . $value->Instruksi . ' </font></td></tr><tr><td><font color=#0000FF>Tanggapan : ' . $value->Tanggapan . '</font></td></tr><tr><td> Status : ' . $statusbaca . ' </td></tr></table></li>'; if ($child) { $str .= $child; } } $str .= '</ul>'; return $str; } else { return false; } }
/** * Get an array of all leaves (or all non-leaves) of an item in order to * display them with BookReader. * * Difference with the default method is that multiple views and missing * pages are added when needed, so the parity remains clean. * * @param boolean $invert * * @return array * Array of files or nulls. */ protected function _get_list_of_leaves($invert = false) { if (empty($this->_item)) { return; } if (is_null($this->_leaves)) { $this->_leaves = array(); $this->_nonleaves = array(); $supportedFormats = array('jpeg' => 'JPEG Joint Photographic Experts Group JFIF format', 'jpg' => 'Joint Photographic Experts Group JFIF format', 'png' => 'Portable Network Graphics', 'gif' => 'Graphics Interchange Format', 'tif' => 'Tagged Image File Format', 'tiff' => 'Tagged Image File Format'); // Set the regular expression to match selected/supported formats. $supportedFormatRegex = '/\\.(' . implode('|', array_keys($supportedFormats)) . ')$/i'; // Retrieve image files from the item. set_loop_records('files', $this->_item->getFiles()); foreach (loop('files') as $file) { if ($file->hasThumbnail() && preg_match($supportedFormatRegex, $file->filename)) { $this->_leaves[] = $file; } else { $this->_nonleaves[] = $file; } } // Sorting by original filename or keep attachment order. if (get_option('bookreader_sorting_mode')) { $this->sortFilesByOriginalName($this->_leaves); $this->sortFilesByOriginalName($this->_nonleaves); } // Insert missing pages and multiple views. $this->_leaves = $this->_complete_list_of_leaves(); // Reset keys, because the important is to get files by order. $this->_leaves = array_values($this->_leaves); $this->_nonleaves = array_values($this->_nonleaves); } return $invert ? $this->_nonleaves : $this->_leaves; }
function loop($equipments, $projectId, $ul) { foreach ($equipments as $equipment) { $component = $equipment->component; $project = $component->project; if ($projectId != $component->projectId) { $projectId = $component->projectId; if ($project->hide) { $style = ""; } else { $style = "style='display:none'"; } echo "{$ul}<li class='p{$projectId}' {$style}><span class='folder'>" . $project->identifier . " " . $project->name . "</span>"; $ul = "</ul></li>"; echo "<ul>"; } $childs = $equipment->equipments; echo "<li><span class='equipment'>" . CHtml::link($component->identifier . $equipment->identifier, array('view', 'id' => $equipment->id)) . " - " . CHtml::encode($equipment->description) . "</span>"; if ($childs) { echo "<ul>"; loop($childs, $projectId, $ul); echo "</ul>"; } else { echo "</li>"; } } }
function loop($equipments, $projectId, $ul) { foreach ($equipments as $equipment) { $component = $equipment->component; $project = $component->project; if ($projectId != $component->projectId) { $projectId = $component->projectId; if ($project->hide) { $style = ""; } else { $style = "style='display:none'"; } echo "{$ul}<li class='p{$projectId}' {$style}><span class='project' title='Project'>" . $project->identifier . " " . $project->name . "</span>"; $ul = "</ul></li>"; echo "<ul>"; } $childs = $equipment->equipments; if ($equipment->status == 1) { echo "<li><span class='equipment'>" . CHtml::link($component->identifier . $equipment->identifier, array('view', 'id' => $equipment->id), array('onclick' => 'mostra_loading_screen()')) . " - " . CHtml::encode($equipment->description) . "</span>"; } else { echo "<li><span class='equipment'>" . CHtml::link($component->identifier . $equipment->identifier, array('view', 'id' => $equipment->id), array('onclick' => 'mostra_loading_screen()')) . " - <b class=green >" . CHtml::encode($equipment->description) . "</b></span>"; } if ($childs) { echo "<ul>"; loop($childs, $projectId, $ul); echo "</ul>"; } else { echo "</li>"; } } }
function loop($a, &$b) { echo '* '; if ($a <= $b) { return; } loop($a--, ++$b); }
function get_first_collection_images() { if (metadata('collection', 'total_items') > 0) { /* find child items */ $collectionId = metadata('collection', 'id'); $childArray = get_child_collections($collectionId); $thumbnailCount = 0; $childCount = 0; while ($thumbnailCount <= 3) { $childID = $childArray[$childCount]['id']; set_current_record('collection', get_record_by_id('collection', $childID)); while (loop('items') and $thumbnailCount <= 3) { echo item_thumbnail(); $thumbnailCount++; } $childCount++; } } else { while (loop('items', 4)) { echo item_thumbnail(); } return $html; } }
$browseHeadings[__('Item')] = null; $browseHeadings[__('Contributor')] = 'contributor'; if ($allowToManage) { $browseHeadings[__('Publication Status')] = null; } else { $browseHeadings[__('Publication Status')] = null; } $browseHeadings[__('Date Added')] = 'added'; echo browse_sort_links($browseHeadings, array('link_tag' => 'th scope="col"', 'list_tag' => '')); ?> </tr> </thead> <tbody id="types-table-body"> <?php $key = 0; foreach (loop('contribution_contributed_items') as $contributedItem) { $item = $contributedItem->Item; $contributor = $contributedItem->Contributor; if ($contributor->id) { $contributorUrl = url('contribution/contributors/show/id/' . $contributor->id); } if ($item->public) { $status = 'approved'; if ($allowToManage) { $statusText = __('Public (click to put in review)'); } else { $statusText = __('Public'); } } else { if ($contributedItem->public) { $status = 'proposed';
</h2> <div id="description" class="element"> <div class="element-text"><?php echo metadata('collection', array('Dublin Core', 'Description')); ?> </div> </div><!-- end description --> <div id="collection-items span12"> <ul class="thumbnails"> <?php $collection_items = get_records('Item', array('collection' => $collection['id'], 'sort_field' => 'Scripto,Weight', 'sort_dir' => 'a'), 999); set_loop_records('items', $collection_items); foreach (loop('items') as $item) { set_current_record('item', $item); if (metadata($item, 'has thumbnail')) { ?> <li> <div id="col-images" class="thumbnail right-caption span4"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title')), 'class' => 'span2'))); ?> <div class="caption"> <?php echo link_to_item(metadata($item, array('Dublin Core', 'Title'), array('snippet' => 60)), array('class' => 'permalink')); ?> <br /><br /> <div id="col-progress"> <?php
{ if ($actual < $range['low']) { $next = rand($range['low'], $range['high']); } else { $next = $actual + rand(-1, 1); } if ($next < $range['low']) { $next = $range['low'] + 1; } if ($next > $range['high']) { $next = $range['high'] - 1; } return $next; } function loop($units) { printf("Loop every %ss\n", SLEEP_SECONDS); $serial = getSerialConnection(); while (true) { foreach ($units as &$unit) { $unit['actual'] = get_next_value($unit['actual'], $unit['range']); print "Sending {$unit['actual']} .. "; $value = chr($unit['actual']); $serial->sendMessage($value); print "OK\n"; usleep(SLEEP_SECONDS * 1000000); } } } loop($units);
<th><?php echo __('Item Number'); ?> </th> <th><?php echo __('Collection'); ?> </th> </tr> </thead> <tbody> <?php $filter = new Zend_Filter_Word_CamelCaseToDash(); ?> <?php foreach (loop('search_texts') as $searchText) { ?> <?php $record = get_record_by_id($searchText['record_type'], $searchText['record_id']); ?> <?php $recordType = $searchText['record_type']; ?> <?php set_current_record($recordType, $record); ?> <tr class="<?php echo strtolower($filter->filter($recordType)); ?> ">
* The public browse view for Timelines. */ $head = array('bodyclass' => 'timelines primary', 'title' => html_escape(__('Browse Timelines'))); echo head($head); ?> <div class="timelines"> <h1><?php echo __('Browse Timelines'); ?> </h1> <?php if ($total_results) { ?> <?php foreach (loop('Neatline_Time_Timelines') as $timeline) { ?> <div class="timeline"> <h2><?php echo link_to($timeline, 'show', $timeline->title); ?> </h2> <?php echo snippet_by_word_count(metadata($timeline, 'description'), '10'); ?> </div> <?php } ?> <div class="pagination"> <?php
/** * Create collection folders if needed. * * @return void. */ protected function _createCollectionFolders() { if (get_option('archive_repertory_collection_convert') != 'None') { $collections = get_records('Collection', array(), 0); $collectionNames = unserialize(get_option('archive_repertory_collection_names')); set_loop_records('collections', $collections); foreach (loop('collections') as $collection) { $result = $this->_createArchiveFolders($collectionNames[$collection->id]); } } }
function scrape($source) { //while ook in aparte functie gieten voor hergebruik google of bing of specifieke site loop($source); }
<h1><?php echo __('Escolha o seu mapa ou roteiro'); ?> </h1> <?php if (nl_exhibitsHaveBeenCreated()) { ?> <div class="pagination"><?php echo pagination_links(); ?> </div> <?php foreach (loop('NeatlineExhibit') as $e) { ?> <h2 style="font-weight:300;"> <?php echo nl_getExhibitLink($e, 'fullscreen', nl_getExhibitField('title'), array('class' => 'neatline'), true); ?> </h2> <h3 style="font-weight:300;"> <?php $description = truncateText(nl_getExhibitField('narrative'), 100); ?> <?php echo $description; ?> </h3> <?php
<table class="full"> <thead> <tr> <?php echo browse_sort_links(array(__('Title') => 'title', __('Slug') => 'slug', __('Last Modified') => 'updated'), array('link_tag' => 'th scope="col"', 'list_tag' => '')); ?> </tr> </thead> <tbody> <?php foreach (loop('simple_pages_pages') as $simplePage) { ?> <tr> <td> <span class="title"> <a href="<?php echo html_escape(record_url('simple_pages_page')); ?> "> <?php echo metadata('simple_pages_page', 'title'); ?> </a> <?php if (!metadata('simple_pages_page', 'is_published')) { ?> (<?php echo __('Private'); ?> ) <?php
?> <? foreach($categories as $cat): ?> <?php if (intval($cat['parent_id']) > 0) { $cat['id'] = intval($cat['id']); if ($cat['id'] != 0) { // p($cat['id']); $params = array(); //$params['display']= 'games_list_single_item.php'; $params['selected_categories'] = array($cat['id']); $params['items_per_page'] = 6; $if_posts = get_posts($params); $count = count($if_posts); if (!empty($if_posts) and $count > 0) { ?> <h1>Newest games from <? print $cat['taxonomy_value'] ?></h1> <div class="top_games"> <? loop($if_posts, 'games_list_single_item.php', 'the_post') ; ?> <a class="mw_btn_s right" href="<? print get_category_url($cat['id']); ?>"><span>See all <? print get_category_items_count($cat['id']); ?> games</span></a> </div> <?php } } } ?> <? endforeach; ?>
public function append($args) { ?> <?php if (get_option('jwplayer_external_control')) { ?> <?php if (metadata('item', array('Streaming Video', 'Segment Start'))) { ?> <div id="vid_player"> <div id="jwplayer_plugin">Player failed to load... </div> <div id="vidcontrols"> <ul class="vidControlsLayout" style="width='<?php echo get_option("jwplayer_width_public"); ?> '"> <li id="start_img"><img src="<?php echo img('pause.png'); ?> " title="Start/Stop" class="btnPlay"/></li> <li id="playback-display"><span class="current">0:00:00</span></li> <li class="progressBar"></li> <li id="slider-display"><span class="duration">0:00:00</span> </li> <li id="vol_img"><img class="muted" src="<?php echo img('volume_speaker.png'); ?> " /></a></li> <li class="volumeBar"></li> </ul> </div> <script type="text/javascript"> var is_play = true; var startTime= calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> "); var endTime = calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> "); jwplayer("jwplayer_plugin").setup({ playlist: [{ sources: [ <?php if (get_option('jwplayer_hls_streaming')) { ?> { file: '<?php echo metadata('item', array("Streaming Video", "HLS Streaming Directory")); echo metadata('item', array("Streaming Video", "HLS Video Filename")); ?> ' }, <?php } ?> <?php if (get_option('jwplayer_flash_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "Video Streaming URL")); echo metadata("item", array("Streaming Video", "Video Type")); echo metadata('item', array("Streaming Video", "Video Filename")); ?> '} , <?php } ?> <?php if (get_option('jwplayer_http_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "HTTP Streaming Directory")); echo metadata("item", array("Streaming Video", "HTTP Video Filename")); ?> '}, <?php } ?> ] } ], <?php if (get_option('jwplayer_flash_primary')) { ?> primary: "flash", <?php } ?> autostart: false, controls: false, width: "100%", height: "<?php echo get_option('jwplayer_height_public'); ?> ", } ); jwplayer("jwplayer_plugin").onReady(function(){ jQuery('.current').text(getFormattedTimeString(startTime)); jQuery('.duration').text(getFormattedTimeString(endTime)); jwplayer("jwplayer_plugin").seek(startTime); <?php if (get_option('jwplayer_autostart') == 0) { ?> jwplayer("jwplayer_plugin").pause(); <?php } ?> } ); jQuery( ".progressBar" ).slider( { min: startTime, max: endTime, range: "max", slide: function(event, ui) { jwplayer().seek(ui.value); }, change: function(event,ui){ if (jwplayer().getPosition() > endTime){ jwplayer().seek(startTime); } } }); jQuery( ".volumeBar" ).slider( { min: 0, max: 100, range: "max", slide: function(event, ui) { jwplayer().setVolume(ui.value); }, change: function(event,ui){ jwplayer().setVolume(ui.value); } }); jwplayer("jwplayer_plugin").onTime(function(event){ jQuery(".progressBar").slider("value", jwplayer("jwplayer_plugin").getPosition()); jQuery('.current').text(getFormattedTimeString(jwplayer("jwplayer_plugin").getPosition())); }); jwplayer("jwplayer_plugin").onPlay(function(){ jQuery('.btnPlay').attr("src","<?php echo img('pause.png'); ?> "); }); jwplayer("jwplayer_plugin").onPause(function(){ jQuery('.btnPlay').attr("src","<?php echo img('play.png'); ?> "); }); jwplayer("jwplayer_plugin").onMute(function(event){ if (event.mute){ jQuery('.muted').attr("src","<?php echo img('volume_speaker_mute.png'); ?> "); }else{ jQuery('.muted').attr("src","<?php echo img('volume_speaker.png'); ?> "); } } ); jwplayer("jwplayer_plugin").onVolume(function(event){ if (event.volume <= 0 ){ jQuery('.muted').attr("src","<?php echo img('volume_speaker_mute.png'); ?> "); }else{ jQuery('.muted').attr("src","<?php echo img('volume_speaker.png'); ?> "); } } ); jQuery('.btnPlay').on('click', function() { if (jwplayer().getPosition() > endTime){ jwplayer().seek(startTime); } jwplayer().play(); return false; }); jQuery('.btnStop').on('click', function() { jwplayer().stop(); jwplayer().seek(startTime); jQuery(".progressBar").slider("value", jwplayer().getPosition()); jQuery('.current').text(getFormattedTimeString(jwplayer().getPosition())); return false; }); jQuery('.muted').click(function() { jwplayer().setMute(); return false; }); jQuery('#vid_player')[0].onmouseover = (function() { var onmousestop = function() { jQuery('#vidcontrols').css('display', 'none'); }, thread; return function() { jQuery('#vidcontrols').css('display', 'block'); clearTimeout(thread); thread = setTimeout(onmousestop, 3000); }; })(); jQuery('#vid_player')[0].onmousedown = (function() { var moveend = function() { jQuery('#vidcontrols').css('display', 'none'); }, thread; return function() { jQuery('#vidcontrols').css('display', 'block'); clearTimeout(thread); thread = setTimeout(moveend, 3000); }; })(); </script> </div> <?php } ?> <?php } else { //use jwplayer control ?> <?php if ($bText = metadata('item', array('Streaming Video', 'Segment Start'))) { ?> <div id="vid_player" style="width:100%; margin:0 auto;"> <div id="jwplayer_plugin" style="margin:0 auto;">Player failed to load... </div> </div> <?php } ?> <script type="text/javascript"> var is_play = true; var startTime= calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> "); var endTime = calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> "); jwplayer("jwplayer_plugin").setup({ playlist: [{ sources: [ <?php if (get_option('jwplayer_hls_streaming')) { ?> { file: '<?php echo metadata('item', array("Streaming Video", "HLS Streaming Directory")); echo metadata('item', array("Streaming Video", "HLS Video Filename")); ?> ' }, <?php } ?> <?php if (get_option('jwplayer_flash_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "Video Streaming URL")); echo metadata("item", array("Streaming Video", "Video Type")); echo metadata('item', array("Streaming Video", "Video Filename")); ?> '} , <?php } ?> <?php if (get_option('jwplayer_http_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "HTTP Streaming Directory")); echo metadata("item", array("Streaming Video", "HTTP Video Filename")); ?> '}, <?php } ?> ] } ], <?php if (get_option('jwplayer_flash_primary')) { ?> primary: "flash", <?php } ?> autostart: false, width: "95%", height: <?php echo get_option('jwplayer_height_public'); ?> } ); jwplayer("jwplayer_plugin").onReady(function(){ jwplayer("jwplayer_plugin").seek(startTime); <?php if (get_option('jwplayer_autostart') == 0) { ?> jwplayer("jwplayer_plugin").pause(); <?php } ?> } ); <?php } ?> </script> <?php if (get_option('jwplayer_display_current')) { ?> <?php $orig_item = get_current_record('item'); $orig_video = metadata("item", array("Streaming Video", "Video Filename")); ?> <?php $items = get_records('item', array('collection' => metadata('item', 'collection id'), 'sort_field' => 'Streaming Video,Segment Start'), null); ?> <?php set_loop_records('items', $items); if (has_loop_records('items')) { $items = get_loop_records('items'); } ?> <?php foreach (loop('items') as $item) { ?> <?php if (metadata('item', array('Streaming Video', 'Segment Type')) == 'Scene' && metadata('item', array('Streaming Video', 'Video Filename')) == $orig_video) { ?> <div class="scene" id="<?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> " title="<?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> " style="display:none;"> <h2>Current video segment:</h2> <h3><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title'))); ?> </h3> <div style="overflow:auto; max-height:150px;"> <p> <?php echo metadata('item', array('Dublin Core', 'Description')); ?> </p> </div> <p>Segment: <?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> -- <?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> </p> </div> <!-- end of loop div for display --> <?php } ?> <?php } ?> <hr style="color:lt-gray;"/> <?php set_current_record('item', $orig_item); ?> <script type="text/javascript"> function getElementsByClass(searchClass, domNode, tagName) { if (domNode == null) { domNode = document; } if (tagName == null) { tagName = '*'; } var el = new Array(); var tags = domNode.getElementsByTagName(tagName); var tcl = " "+searchClass+" "; for (i=0,j=0; i<tags.length; i++) { var test = " " + tags[i].className + " "; if (test.indexOf(tcl) != -1) { el[j++] = tags[i]; } } return el; } jwplayer("jwplayer_plugin").onTime(function(event){ var ctime = "0:00:00"; var scenes; var sel; var i = 0; ctime = getTimeString(jwplayer("jwplayer_plugin").getPosition()); scenes = getElementsByClass("scene"); for (i; i < scenes.length; i++) { sel = scenes[i]; if (sel.getAttribute('id') <= ctime && sel.getAttribute('title') >= ctime) { sel.style.display = 'block'; } else { sel.style.display = 'none'; } } } ); </script> <?php } ?> <?php }
return branch(null, thunk($n), thunk(false), null) !== $n; }, 'until1' => function ($n) { $x = $n % 8; return until(function ($args) use($x) { list($m, $arr) = $args; return [$m === $x, [$m + 1, snoc($m, $arr)]]; }, [0, []]) !== [$x + 1, upto($x + 1)]; }, 'trampoline1' => function ($n) { $x = $n % 8; return trampoline(y(function ($f, $m, $n, $_) { return $m < $n ? [false, $f($m + 1, $n)] : [true, $m]; }, 0, $x)) !== $x; }, 'loop1' => function ($x) { $n = $x % 8; $lhs = loop(function ($x, $m) use($n) { return [$m >= $n, snoc($m, $x)]; }, []); $rhs = upto($n + 1); return $lhs === $rhs ? 0 : dump(get_defined_vars()); }, 'y1' => function ($x) { $n = $x % 4; return y(function ($f, $m) use($n) { return $m === $n ? $m : $f($m + 1); }, 0) !== $n; }, 'stream_take1' => function ($x) { $n = $x % 8; $lhs = upto($n); $rhs = stream_take($n, y(function ($f, $n, $_) { return [$n, $f($n + 1)]; }, 0)); return $lhs === $rhs ? 0 : dump(get_defined_vars());
echo browse_sort_links(array('Title' => 'Dublin Core,Title'), array('')); ?> </div> <div class="col-sm-3"> <?php echo browse_sort_links(array('Creator' => 'Dublin Core,Contributor'), array('')); ?> </div> <div class="col-sm-4"> Description </div> </div> </div> <?php foreach (loop('collections') as $collection) { ?> <div class="collection"> <div class="row"> <div class="col-sm-2"> <?php if ($collectionImage = record_image('collection', 'square_thumbnail')) { ?> <?php echo link_to_collection($collectionImage, array('class' => 'image')); ?> <?php } ?> </div> <div class="col-sm-3">
/** * Performs any reinitializing necessary after forking. */ function reInit() { loop()->reInit(); }
<?php function loop(Traversable $traversable) { foreach ($traversable as $k => $v) { echo "{$k} => {$v}\n"; } } $primos = explode(" ", "1 2 3 5 7 11 13 17 19"); // loop($primos); // does not work loop(new ArrayIterator($primos)); // works
<?php $pageTitle = __('Browse Collections'); echo head(array('title' => $pageTitle, 'bodyid' => 'collections', 'bodyclass' => 'browse')); ?> <h1><?php echo $pageTitle; ?> </h1> <?php echo pagination_links(); ?> <?php foreach (loop('collections') as $current_collection) { ?> <div class="collection"> <div class="collection_image"> <?php $items = get_records("Item", array("collection" => $current_collection)); $images = array(); $thumbnails = array(); foreach ($items as $item) { foreach ($item->Files as $file) { if ($file->hasThumbnail()) { array_push($images, metadata($file, 'uri')); array_push($thumbnails, metadata($file, 'square_thumbnail_uri')); }
?> </p> </div> <?php } ?> </div> <?php set_exhibit_pages_for_loop_by_exhibit(); if (has_loop_records('exhibit_page')) { ?> <nav id="exhibit-pages"> <ul> <?php foreach (loop('exhibit_page') as $exhibitPage) { ?> <?php echo exhibit_builder_page_summary($exhibitPage); ?> <?php } ?> </ul> </nav> <?php } ?> <?php echo foot();
<?php get_header(); ?> <?php // This runs the WordPress loop and pulls in the content // See content.php and functions/loop.php loop($type = 'blog'); ?> <?php get_footer();
</div> </div><!-- end collectors --> <?php } ?> <?php echo fire_plugin_hook('public_collections_show', array('view' => $this, 'collection' => $collection)); ?> </div> <div id="secondary"> <div id="collection-items"> <?php $collectionItems = get_records('item', array('collection' => $collectionId), 3); ?> <?php foreach (loop('items', $collectionItems) as $item) { ?> <h3><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title')), array('class' => 'permalink'), 'show', $item); ?> </h3> <?php if (metadata($item, 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title'))))); ?> </div>
$browseHeadings[__('Skipped rows')] = 'skipped_row_count'; $browseHeadings[__('Imported records')] = null; $browseHeadings[__('Updated records')] = 'updated_record_count'; $browseHeadings[__('Skipped records')] = 'skipped_record_count'; $browseHeadings[__('Status')] = 'status'; $browseHeadings[__('Action')] = null; echo browse_sort_links($browseHeadings, array('link_tag' => 'th scope="col"', 'list_tag' => '')); ?> </tr> </thead> <tbody> <?php $key = 0; ?> <?php foreach (loop('CsvImport_Import') as $csvImport) { ?> <tr class="<?php if (++$key % 2 == 1) { echo 'odd'; } else { echo 'even'; } ?> "> <td> <?php $importDate = html_escape(format_date($csvImport->added, Zend_Date::DATETIME_SHORT)); $logs = get_db()->getTable('CsvImport_Log')->findByImportId($csvImport->id); if (empty($logs)) { echo $importDate;
<thead> <tr> <?php $sortLinks = array(__('Title') => 'Dublin Core,Title', __('Contributors') => null, __('Date Added') => 'added', __('Total Number of Items') => null); ?> <?php echo browse_sort_links($sortLinks, array('link_tag' => 'th scope="col"', 'list_tag' => '')); ?> </tr> </thead> <tbody> <?php $key = 0; ?> <?php foreach (loop('Collection') as $collection) { ?> <tr class="collection<?php if (++$key % 2 == 1) { echo ' odd'; } else { echo ' even'; } ?> "> <td class="title<?php if ($collection->featured) { echo ' featured'; } ?> ">
<?php loop(); function loop() { for ($i = 0; $i < 10; $i++) { skipOdd($i); } } function skipOdd($i) { if ($i % 2 == 0) { echo "{$i}\n"; } else { continue 1; } }
$title = __('Browse Exhibits'); echo head(array('title' => $title, 'bodyclass' => 'exhibits browse')); ?> <!-- Inicio do container--> <div class="container"> <div class="row rowcolor"> <div class="col-md-12" id="topo"></div> <?php if (count($exhibits) > 0) { ?> <div class="item"> <?php $exhibitCount = 0; ?> <?php foreach (loop('exhibit') as $exhibit) { if ($exhibitCount == 0) { echo '<div class="row">'; } if ($exhibitCount % 4 == 0) { echo '</div><div class="row">'; } ?> <div class="col-md-3" id="circle"> <center> <?php if ($exhibitImage = record_image($exhibit, 'square_thumbnail', array('class' => 'img-circle imgi'))) { ?> <div style="width: 170px; height: 170px"><?php echo exhibit_builder_link_to_exhibit($exhibit, $exhibitImage, array('class' => 'image')); ?>
?> </a></p> <?php } else { ?> <table class="full"> <thead> <tr> <?php echo browse_sort_links(array(__('Catalog Name') => 'catalog_name', __('Display') => 'display'), array('link_tag' => 'th scope="col"', 'list_tag' => '')); ?> </tr> </thead> <tbody> <?php foreach (loop('catalog_search_searches') as $catalogSearch) { ?> <tr> <td> <span class="title"> <a href="<?php echo html_escape(record_url('catalog_search_search')); ?> "> <?php echo metadata('catalog_search_search', 'catalog_name'); ?> </a> </span> <ul class="action-links group"> <li><a class="edit" href="<?php