$db_slideshows = DBselect('SELECT s.slideshowid,s.name' . ' FROM slideshows s' . whereDbNode('s.slideshowid')); while ($slideshow = DBfetch($db_slideshows)) { if (slideshow_accessible($slideshow['slideshowid'], PERM_READ)) { $data['slideshows'][$slideshow['slideshowid']] = $slideshow; } } order_result($data['slideshows'], 'name'); // get element id $data['elementid'] = get_request('elementid', CProfile::get('web.slides.elementid', null)); CProfile::update('web.slides.elementid', $data['elementid'], PROFILE_TYPE_ID); if (!isset($data['slideshows'][$data['elementid']])) { $slideshow = reset($data['slideshows']); $data['elementid'] = $slideshow['slideshowid']; } // get screen $data['screen'] = empty($data['elementid']) ? array() : get_slideshow($data['elementid'], 0); if (!empty($data['screen'])) { // get groups and hosts if (check_dynamic_items($data['elementid'], 1)) { $data['isDynamicItems'] = true; $data['pageFilter'] = new CPageFilter(array('groups' => array('monitored_hosts' => true, 'with_items' => true), 'hosts' => array('monitored_hosts' => true, 'with_items' => true, 'DDFirstLabel' => _('Default')), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null))); } // get element $data['element'] = get_slideshow_by_slideshowid($data['elementid']); if ($data['screen']['delay'] > 0) { $data['element']['delay'] = $data['screen']['delay']; } show_messages(); // js menu $data['menu'] = array(); $data['submenu'] = array();
$refresh_icon = new CDiv(SPACE, 'iconmenu'); $refresh_icon->addAction('onclick', 'javascript: create_page_menu(event,"hat_slides");'); $refresh_icon->setAttribute('title', S_MENU); if (isset($elementid)) { $effectiveperiod = navigation_bar_calc(); if (2 != $_REQUEST['fullscreen']) { $stime = time() - 31536000; // ~1year $bstime = time() - $effectiveperiod; if (isset($_REQUEST['stime'])) { $bstime = $_REQUEST['stime']; $bstime = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4)); } zbx_add_post_js('onload_update_scroll("iframe",0,' . $effectiveperiod . ',' . $stime . ',0,' . $bstime . ');'); } $element = get_slideshow($elementid, 0, $effectiveperiod); } else { $element = new CSpan(S_LOADING_P, 'textcolorstyles'); } $slides_wdgt->addHeader($text, array($icon, $refresh_icon, $fs_icon)); $slides_wdgt->addHeader($slide_name, $form); $slides_wdgt->additem($element); $tab->addRow($slides_wdgt, 'center'); $tab->show(); $scroll_div = new CDiv(); $scroll_div->setAttribute('id', 'scroll_cntnr'); $scroll_div->setAttribute('style', 'border: 0px #CC0000 solid; height: 25px; width: 800px;'); $scroll_div->show(); /* $img = new CImg('images/general/tree/zero.gif','space','20','20'); $elements = array($img,BR());
* Template Name: Entropy Rising Homepage * Andrew Clayton * Version 2.0 * 11-16-2014 */ ?> <?php get_header('er'); global $er; ?> <div id="content" role="main"> <div id="showcase-container"> <?php get_slideshow('er-slideshow'); ?> <div id="er-home-stats" class="widget showcase-widget"> <header class="widget-header"><h3 class="widget-title">About Entropy Rising</h3></header> <div class="instructions"> <ul class="er-status-list"> <li class="er-status"><i class="fa fa-flag fa-fw"></i>Alliance:<span class="status-aldmeri">Aldmeri Dominion</span></li> <li class="er-status"><i class="fa fa-globe fa-fw"></i>Region/Platform:<span>North America - PC</span></li> <li class="er-status"><i class="fa fa-gears fa-fw"></i>Playstyle:<span>Hardcore PvE/PvP</span></li> <li class="er-status"><i class="fa fa-users fa-fw"></i>Members:<span><?php echo $er->group->total_member_count; ?> </span></li> <li class="er-status"><i class="fa fa-plus fa-fw"></i>Recruitment:
* Apocrypha Theme Homepage Template * Andrew Clayton * Version 2.0 * 9-20-2014 */ ?> <?php get_header(); ?> <div id="content" role="main"> <div id="showcase-container"> <?php get_slideshow(); ?> <?php apoc_recent_discussion(); ?> </div> <div id="posts"> <?php if (homepage_have_posts()) { while (have_posts()) { the_post(); ?> <?php apoc_single_post(); ?>
$slideshows[$slideshow['slideshowid']] = $slideshow; } } order_result($slideshows, 'name'); if (empty($slideshows)) { $slides_wdgt->addPageHeader(S_SLIDESHOWS_BIG, $formHeader); $slides_wdgt->addItem(BR()); $slides_wdgt->addItem(new CTableInfo(S_NO_SLIDESHOWS_DEFINED)); $slides_wdgt->show(); } else { if (!isset($slideshows[$elementid])) { $slideshow = reset($slideshows); $elementid = $slideshow['slideshowid']; } $effectiveperiod = navigation_bar_calc('web.slides', $elementid, true); $screen = get_slideshow($elementid, 0); // PAGE HEADER {{{ if ($screen) { $icon = get_icon('favourite', array('fav' => 'web.favorite.screenids', 'elname' => 'slideshowid', 'elid' => $elementid)); } else { $icon = new CIcon(S_FAVOURITES, 'iconplus'); } $fs_icon = get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])); $refresh_icon = new CIcon(S_MENU, 'iconmenu'); if ($screen) { $refresh_icon->addAction('onclick', 'javascript: create_page_menu(event,"hat_slides");'); } $slides_wdgt->addPageHeader(S_SLIDESHOWS_BIG, array($formHeader, SPACE, $icon, $refresh_icon, $fs_icon)); // }}} PAGE HEADER // HEADER {{{ $form = new CForm(null, 'get');
while ($slideshow = DBfetch($db_slideshows)) { if (slideshow_accessible($slideshow['slideshowid'], PERM_READ_ONLY)) { $data['slideshows'][$slideshow['slideshowid']] = $slideshow; } } order_result($data['slideshows'], 'name'); // get element id $data['elementid'] = get_request('elementid', CProfile::get('web.slides.elementid', null)); $data['fullscreen'] = get_request('fullscreen', null); CProfile::update('web.slides.elementid', $data['elementid'], PROFILE_TYPE_ID); if (!isset($data['slideshows'][$data['elementid']])) { $slideshow = reset($data['slideshows']); $data['elementid'] = $slideshow['slideshowid']; } // get screen $data['screen'] = !empty($data['elementid']) ? get_slideshow($data['elementid'], 0) : array(); if (!empty($data['screen'])) { // get groups and hosts if (check_dynamic_items($data['elementid'], 1)) { $data['hostid'] = get_request('hostid', 0); $options = array('allow_all_hosts', 'monitored_hosts', 'with_items'); if (!$ZBX_WITH_ALL_NODES) { array_push($options, 'only_current_node'); } $params = array(); foreach ($options as $option) { $params[$option] = 1; } $data['page_groups'] = get_viewed_groups(PERM_READ_ONLY, $params); $data['page_hosts'] = get_viewed_hosts(PERM_READ_ONLY, $data['page_groups']['selected'], $params); validate_group_with_host($data['page_groups'], $data['page_hosts']);
<?php /** * Template Name: Homepage * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages and that * other "pages" on your WordPress site will use a different template. * * @package WordPress * @subpackage Brooklyn_Tri * @since Brooklyn Tri 1.0 */ get_header(); $slides = get_slideshow(); if (!empty($slides)) { ?> <div class="cycle-gallery"> <div class="mask"> <div class="slideset"> <?php for ($i = 1; $i <= count($slides); $i++) { ?> <section class="slide right"> <div class="slide-holder"> <?php echo wp_get_attachment_image($slides[$i]['postId'], 'full'); ?> <div class="caption">