function get_title() { global $rsc_uri; $title = str_replace('$icon$', get_icon('feed'), $this->disp_params['title']); // fp> TODO: support for different icon sizes and backgrounds (at least black and white; mid grey would be cool also) return $title; }
function build_content($ftp, $dir) { $content_array = array(); $dirs_array = array(); $files_array = array(); $files = ftp_nlist($ftp, $dir); foreach ($files as $filename) { $filename = explode('/', $filename); $filename = $filename[count($filename) - 1]; if ($filename == '.' || $filename == '..') { continue; } $fullname = $filename; if ($dir != '') { $fullname = $dir . '/' . $fullname; } $filename = utf8_encode($filename); if (ftp_size($ftp, $fullname) == -1) { $fullname = utf8_encode($fullname); $dirs_array[] = array('name' => $filename, 'file' => $fullname, 'is_folder' => 'true'); } else { $fullname = utf8_encode($fullname); $files_array[] = array('name' => $filename, 'file' => $fullname, 'icon' => get_icon($filename)); } } usort($dirs_array, 'cmp'); usort($files_array, 'cmp'); $content_array = array_merge($dirs_array, $files_array); return $content_array; }
/** * Display the icon legend */ function display_legend() { if (empty($this->icons)) { return; } // There are some icons to display: echo '<div id="icon_legend">' . T_('Legend') . ': '; // Loop on all map array of filenames for icons to display icons list in the same order: foreach ($this->icons as $icon) { $icon_info = get_icon_info($icon); if (!$icon_info) { continue; } echo '<span class="legend_element">' . get_icon($icon) . ' '; if (isset($icon_info['legend'])) { // Icon has a legend: echo $icon_info['legend'] . ' '; } else { // Icon has no legend so we use the alt: echo $icon_info['alt'] . ' '; } echo '</span>'; } echo '</div>'; }
/** * Display the permissions for the type file */ function display_perm($perm) { if ($perm) { $r = get_icon('file_allowed'); } else { $r = get_icon('file_not_allowed'); } return $r; }
function tagitem_edit_actions($Item) { global $current_User, $edited_ItemTag; // Display the edit icon if current user has the rights: $r = $Item->get_edit_link(array('before' => '', 'after' => ' ', 'text' => get_icon('edit'), 'title' => '#', 'class' => '')); if ($current_User->check_perm('item_post!CURSTATUS', 'edit', false, $Item)) { // Display the unlink icon if current user has the rights: $r .= action_icon(T_('Unlink this tag from post!'), 'unlink', regenerate_url('tag_ID,action,tag_filter', 'tag_ID=' . $edited_ItemTag->ID . '&item_ID=' . $Item->ID . '&action=unlink&' . url_crumb('tag')), NULL, NULL, NULL, array('onclick' => 'return confirm(\'' . format_to_output(sprintf(TS_('Are you sure you want to remove the tag "%s" from "%s"?'), $edited_ItemTag->dget('name'), $Item->dget('title')) . '\');', 'htmlattr'))); } return $r; }
function file_actions($link_ID) { global $current_File, $edited_Item, $current_User; $title = T_('Locate this file!'); $r = $current_File->get_linkedit_link('&fm_mode=link_item&item_ID=' . $edited_Item->ID, get_icon('locate', 'imgtag', array('title' => $title)), $title); if ($current_User->check_perm('item', 'edit', false, $edited_Item)) { // Check that we have permission to edit item: $r .= action_icon(T_('Delete this link!'), 'unlink', regenerate_url('action', 'link_ID=' . $link_ID . '&action=unlink')); } return $r; }
function plugin_results_td_status($plug_status, $plug_ID) { global $admin_Plugins; if ($plug_status == 'enabled') { return get_icon('enabled', 'imgtag', array('title' => T_('The plugin is enabled.'))); } elseif ($plug_status == 'broken') { return get_icon('warning', 'imgtag', array('title' => T_('The plugin is broken.') . (isset($admin_Plugins->plugin_errors[$plug_ID]) && !empty($admin_Plugins->plugin_errors[$plug_ID]['register']) ? ' ' . $admin_Plugins->plugin_errors[$plug_ID]['register'] : ''))); } elseif ($plug_status == 'install') { return get_icon('disabled', 'imgtag', array('title' => T_('The plugin is not installed completely.'))); } else { return get_icon('disabled', 'imgtag', array('title' => T_('The plugin is disabled.'))); } }
function grp_actions(&$row) { global $usedgroups, $Settings, $current_User; $r = ''; if ($current_User->check_perm('users', 'edit', false)) { $r = action_icon(T_('Edit this group...'), 'edit', regenerate_url('ctrl,action', 'ctrl=groups&action=edit&grp_ID=' . $row->grp_ID)); $r .= action_icon(T_('Duplicate this group...'), 'copy', regenerate_url('ctrl,action', 'ctrl=groups&action=new&grp_ID=' . $row->grp_ID)); if ($row->grp_ID != 1 && $row->grp_ID != $Settings->get('newusers_grp_ID') && !in_array($row->grp_ID, $usedgroups)) { // delete $r .= action_icon(T_('Delete this group!'), 'delete', regenerate_url('ctrl,action', 'ctrl=groups&action=delete&grp_ID=' . $row->grp_ID . '&' . url_crumb('group'))); } else { $r .= get_icon('delete', 'noimg'); } } return $r; }
/** * Display the permissions for the type file */ function display_perm($perm) { switch ($perm) { case 'any': $r = get_icon('file_allowed'); break; case 'registered': $r = get_icon('file_allowed_registered'); break; case 'admin': $r = get_icon('file_not_allowed'); break; default: debug_die('Wrong filetype allowed value!'); } return $r; }
/** * Get definitions for editable params * * @see Plugin::GetDefaultSettings() * @param local params like 'for_editing' => true */ function get_param_definitions($params) { global $Blog, $app_version; global $skins_url; if (!($twitter_name = $Blog->get_setting('twitter_username'))) { $twitter_name = ''; } $set1 = array('section_general_start' => array('layout' => 'begin_fieldset', 'label' => T_('General Settings')), 'blog_name' => array('label' => $this->T_('Blog title'), 'note' => $this->T_('Enter image URL to display a logo'), 'defaultvalue' => $Blog->get('name'), 'type' => 'text', 'size' => 50), 'blog_tagline' => array('label' => $this->T_('Blog tagline'), 'defaultvalue' => $Blog->get('tagline'), 'type' => 'text', 'size' => 50), 'section_general_end' => array('layout' => 'end_fieldset'), 'section_colorbox_start' => array('layout' => 'begin_fieldset', 'label' => T_('Colorbox Image Zoom')), 'colorbox' => array('label' => T_('Colorbox Image Zoom'), 'note' => T_('Check to enable javascript zooming on images (using the colorbox script)'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'colorbox_vote_post' => array('label' => T_('Voting on Post Images'), 'note' => T_('Check this to enable AJAX voting buttons in the colorbox zoom view'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'colorbox_vote_post_numbers' => array('label' => T_('Display Votes'), 'note' => T_('Check to display number of likes and dislikes'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'colorbox_vote_comment' => array('label' => T_('Voting on Comment Images'), 'note' => T_('Check this to enable AJAX voting buttons in the colorbox zoom view'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'colorbox_vote_comment_numbers' => array('label' => T_('Display Votes'), 'note' => T_('Check to display number of likes and dislikes'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'colorbox_vote_user' => array('label' => T_('Voting on User Images'), 'note' => T_('Check this to enable AJAX voting buttons in the colorbox zoom view'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'colorbox_vote_user_numbers' => array('label' => T_('Display Votes'), 'note' => T_('Check to display number of likes and dislikes'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'section_colorbox_end' => array('layout' => 'end_fieldset'), 'section_username_start' => array('layout' => 'begin_fieldset', 'label' => T_('Username options')), 'gender_colored' => array('label' => T_('Display gender'), 'note' => T_('Use colored usernames to differentiate men & women.'), 'defaultvalue' => 0, 'type' => 'checkbox'), 'bubbletip' => array('label' => T_('Username bubble tips'), 'note' => T_('Check to enable bubble tips on usernames'), 'defaultvalue' => 0, 'type' => 'checkbox'), 'autocomplete_usernames' => array('label' => T_('Autocomplete usernames'), 'note' => T_('Check to enable auto-completion of usernames entered after a "@" sign in the comment forms'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'section_username_end' => array('layout' => 'end_fieldset')); if (version_compare($app_version, '6.0', '>=')) { // We need this due to 'checklist' fields are available starting with version 6. $set2 = array('section_access_start' => array('layout' => 'begin_fieldset', 'label' => T_('When access is denied or requires login...')), 'access_login_containers' => array('label' => T_('Display on login screen'), 'note' => '', 'type' => 'checklist', 'options' => array(array('header', sprintf(T_('"%s" container'), NT_('Header')), 1), array('page_top', sprintf(T_('"%s" container'), NT_('Page Top')), 1), array('menu', sprintf(T_('"%s" container'), NT_('Menu')), 0), array('sidebar', sprintf(T_('"%s" container'), NT_('Sidebar')), 0), array('sidebar2', sprintf(T_('"%s" container'), NT_('Sidebar 2')), 0), array('footer', sprintf(T_('"%s" container'), NT_('Footer')), 1))), 'section_access_end' => array('layout' => 'end_fieldset')); $set1 = array_merge($set1, $set2); } $set3 = array('2_start' => array('layout' => 'begin_fieldset', 'label' => $this->T_('Layout')), 'skin_color' => array('label' => $this->T_('Skin color'), 'note' => '', 'defaultvalue' => 'green', 'options' => array('green' => $this->T_('Green'), 'blue' => $this->T_('Blue'), 'red' => $this->T_('Red'), 'grey' => $this->T_('Grey')), 'type' => 'select'), 'skin_width' => array('label' => $this->T_('Skin width'), 'note' => '', 'defaultvalue' => 'fixed', 'options' => array('fixed' => $this->T_('Fixed'), 'fluid' => $this->T_('Fluid')), 'type' => 'select'), 'skin_layout' => array('label' => $this->T_('Skin layout'), 'note' => '', 'defaultvalue' => 'col-2-right', 'options' => array('col-1' => $this->T_('1 column'), 'col-2-right' => $this->T_('2 columns: Sidebar to the right'), 'col-2-left' => $this->T_('2 columns: Sidebar to the left'), 'col-3' => $this->T_('3 columns'), 'col-3-right' => $this->T_('3 columns: Sidebars to the right'), 'col-3-left' => $this->T_('3 columns: Sidebars to the left')), 'type' => 'select'), 'skin_font' => array('label' => $this->T_('Skin font'), 'note' => '', 'defaultvalue' => '"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif', 'options' => array('"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif' => 'Segoe UI (Windows Vista/7)', '"Helvetica Neue",Helvetica,Arial,Geneva,"MS Sans Serif",sans-serif' => 'Helvetica/Arial', 'Georgia,"Nimbus Roman No9 L",serif' => 'Georgia (sans serif)', '"Lucida Grande","Lucida Sans","Lucida Sans Unicode","Helvetica Neue",Helvetica,Arial,Verdana,sans-serif' => 'Lucida Grande/Sans (Mac/Windows)'), 'type' => 'select'), '2_end' => array('layout' => 'end_fieldset'), '3_start' => array('layout' => 'begin_fieldset', 'label' => $this->T_('Tabbed widget settings')), 'tabbed_widget' => array('label' => $this->T_('Tabbed widget'), 'note' => $this->T_('Display javascript tabbed widget on the sidebar'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'display_comments' => array('label' => $this->T_('Recent comments'), 'note' => $this->T_('The number of recent comments'), 'defaultvalue' => 6, 'type' => 'integer', 'size' => 3), 'display_archives' => array('label' => $this->T_('Archives'), 'note' => $this->T_('The number of months in archive'), 'defaultvalue' => 12, 'type' => 'integer', 'size' => 3), 'display_tags' => array('label' => $this->T_('Tags'), 'note' => $this->T_('The number of tags'), 'defaultvalue' => 40, 'type' => 'integer', 'size' => 3), '3_end' => array('layout' => 'end_fieldset'), '4_start' => array('layout' => 'begin_fieldset', 'label' => $this->T_('Misc settings')), 'display_related' => array('label' => $this->T_('Related posts'), 'note' => $this->T_('The number of related articles in single post mode'), 'defaultvalue' => 10, 'type' => 'integer', 'size' => 3), 'display_my_tweets' => array('label' => $this->T_('Twitter widget'), 'note' => $this->T_('The number of items in "My latest tweets" widget. Select 0 to disable.'), 'defaultvalue' => 5, 'type' => 'integer', 'size' => 3), '4_end' => array('layout' => 'end_fieldset'), '5_start' => array('layout' => 'begin_fieldset', 'label' => $this->T_('Enable/disable features')), 'fancy_helper' => array('label' => $this->T_('FancyBox Helper'), 'note' => $this->T_('See <a href="' . $skins_url . $this->get_default_name() . '/resources/fancyapps/demo/index.html" target="_blank"> Demo</a> and <a href="' . $skins_url . $this->get_default_name() . '/resources/fancyapps/demo/readme.html" target="_blank">Added Features</a> or visit <a href="http://fancyapps.com/fancybox/" target="_blank">fancyBox</a>'), 'defaultvalue' => 0, 'type' => 'checkbox'), 'post_meta' => array('label' => $this->T_('Post metadata'), 'note' => $this->T_('Display post metadata block in single post mode'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'posts_author_avatar' => array('label' => $this->T_('Author avatar (list)'), 'note' => $this->T_('Display author avatar next to post title in <u>post list mode</u>'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'single_author_avatar' => array('label' => $this->T_('Author avatar (single)'), 'note' => $this->T_('Display author avatar next to post title in <u>single post mode</u>'), 'defaultvalue' => 1, 'type' => 'checkbox'), 'enable_thumbshots' => array('label' => $this->T_('Display thumbshots'), 'note' => $this->T_('Display website previews on external post links.') . ' (Website thumbnails provided by <a href="http://www.thumbshots.ru/en/" target="_blank">Thumbshots.RU</a>)', 'defaultvalue' => 1, 'type' => 'checkbox'), 'display_credits' => array('label' => $this->T_('Display footer credits'), 'note' => $this->T_('You get this skin for free. We do appreciate you giving us credit. <b>Thank you for your support!</b>'), 'defaultvalue' => 1, 'type' => 'checkbox'), '5_end' => array('layout' => 'end_fieldset'), '6_start' => array('layout' => 'begin_fieldset', 'label' => $this->T_('Social buttons')), 'facebook_user' => array('label' => $this->T_('Facebook'), 'note' => $this->T_('Username. Leave empty to hide the button'), 'defaultvalue' => 'b2evolution', 'type' => 'text', 'size' => 40), 'flickr_user' => array('label' => $this->T_('Flickr'), 'note' => $this->T_('Username. Leave empty to hide the button'), 'type' => 'text', 'size' => 40), 'myspace_user' => array('label' => $this->T_('Myspace'), 'note' => $this->T_('Username. Leave empty to hide the button'), 'type' => 'text', 'size' => 40), 'linkedin_user' => array('label' => $this->T_('LinkedIn'), 'note' => $this->T_('Username. Leave empty to hide the button'), 'type' => 'text', 'size' => 40), 'twitter_user' => array('label' => $this->T_('Twitter'), 'note' => $this->T_('Username. Leave empty to hide the button'), 'defaultvalue' => $twitter_name, 'type' => 'text', 'size' => 40), 'youtube_user' => array('label' => $this->T_('Youtube'), 'note' => $this->T_('Username. Leave empty to hide the button'), 'defaultvalue' => '', 'type' => 'text', 'size' => 40)); $set = array_merge($set1, $set3); if (version_compare($app_version, '4') && ($res = $this->check_updates())) { // Check for updates in b2evo v4 and up $set = array('updates' => array('label' => $this->T_('Updates'), 'info' => sprintf('<span style="color:red; font-weight:bold">New version %s is available. %s</span>', $res['version'], get_icon('download') . ' <a href="' . $res['url'] . '" target="_blank">Download now</a>'), 'type' => 'info')) + $set; } return array_merge($set, parent::get_param_definitions($params)); }
} } if (isset($cache_user_contacts_groups[$user_ID])) { // user has groups echo $cache_user_contacts_groups[$user_ID]; } } $Results->cols[] = array('th' => T_('Groups'), 'th_class' => 'shrinkwrap', 'td_class' => 'left nowrap', 'td' => '%contacts_groups( #mct_to_user_ID# )%'); $Results->display($display_params); if (count($Results->rows) > 0) { // Display actions buttons global $module_contacts_list_params; modules_call_method('get_contacts_list_params'); $Form = new Form(get_dispctrl_url('contacts'), 'add_group_contacts'); echo '<div class="form_send_contacts">'; $multi_action_icon = get_icon('multi_action', 'imgtag', array('style' => 'margin:0 2px 0 14px;position:relative;top:-5px;')); $Form->button_input(array('type' => 'button', 'value' => $module_contacts_list_params['title_selected'], 'onclick' => 'location.href=\'' . $module_contacts_list_params['recipients_link'] . '\'', 'id' => 'send_selected_recipients', 'input_prefix' => $multi_action_icon)); echo '</div>'; $Form->switch_layout('none'); $Form->switch_template_parts(array('formstart' => '<div class="form_add_contacts">', 'labelstart' => '<span class="label">', 'labelend' => '</span> <span class="controls">', 'formend' => '</div>')); $Form->begin_form(); $Form->add_crumb('messaging_contacts'); $Form->hidden('users', ''); if (isset($module_contacts_list_params['form_hiddens']) && !empty($module_contacts_list_params['form_hiddens'])) { // Append the hidden input elements from module foreach ($module_contacts_list_params['form_hiddens'] as $hidden_input) { $Form->hidden($hidden_input['name'], $hidden_input['value']); } } $Form->combo_box('group', param('group_combo', 'string', ''), get_contacts_groups_options(param('group', 'string', '-1'), false), $multi_action_icon . T_('Add all selected contacts to this group'), array('new_field_size' => '8')); $Form->buttons(array(array('submit', 'actionArray[add_group]', T_('Add'), 'SaveButton btn-primary btn-sm')));
$intro_Item =& get_featured_Item('front'); // $intro_Item is used below for comments form $Item = $intro_Item; if (!empty($Item)) { // We have a featured/intro post to display: echo '<div class="evo_content_block">'; // Beginning of posts display // ---------------------- ITEM BLOCK INCLUDED HERE ------------------------ skin_include('_item_block.inc.php', array('feature_block' => true, 'content_mode' => 'auto', 'intro_mode' => 'normal', 'item_class' => 'jumbotron evo_content_block evo_post', 'disp_comment_form' => false, 'item_link_type' => 'none')); // ----------------------------END ITEM BLOCK ---------------------------- echo '</div>'; // End of posts display } // --------------------------------- START OF CONTENT HIERARCHY -------------------------------- echo '<h2 class="table_contents">' . T_('Table of contents') . '</h2>'; skin_widget(array('widget' => 'content_hierarchy', 'display_blog_title' => false, 'open_children_levels' => 20, 'class_selected' => '', 'item_before_opened' => get_icon('collapse'), 'item_before_closed' => get_icon('expand'), 'item_before_post' => get_icon('file_message'))); // ---------------------------------- END OF CONTENT HIERARCHY --------------------------------- if (!empty($intro_Item)) { global $c, $ReqURI; $c = 1; // Display comments echo '<div class="evo_content_block">'; // Beginning of posts display // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------ skin_include('_item_feedback.inc.php', array_merge(array('before_section_title' => '<h3 class="evo_comment__list_title">', 'after_section_title' => '</h3>', 'Item' => $intro_Item, 'form_title_text' => T_('Comment form'), 'comments_title_text' => T_('Comments on this chapter'), 'form_comment_redirect_to' => $ReqURI), $Skin->get_template('disp_params'))); // Note: You can customize the default item feedback by copying the generic // /skins/_item_feedback.inc.php file into the current skin folder. // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) --------------------- echo '</div>'; // End of posts display }
} if (get_request('hostid') && !API::Host()->isReadable(array($_REQUEST['hostid']))) { access_deny(); } validate_sort_and_sortorder('name', ZBX_SORT_DOWN); $options = array('groups' => array('real_hosts' => true, 'with_httptests' => true), 'hosts' => array('with_monitored_items' => true, 'with_httptests' => true), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null)); $pageFilter = new CPageFilter($options); $_REQUEST['groupid'] = $pageFilter->groupid; $_REQUEST['hostid'] = $pageFilter->hostid; $displayNodes = is_array(get_current_nodeid()) && $pageFilter->groupid == 0 && $pageFilter->hostid == 0; $r_form = new CForm('get'); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $r_form->addItem(array(_('Group') . SPACE, $pageFilter->getGroupsCB(true))); $r_form->addItem(array(SPACE . _('Host') . SPACE, $pageFilter->getHostsCB(true))); $httpmon_wdgt = new CWidget(); $httpmon_wdgt->addPageHeader(_('STATUS OF WEB MONITORING'), get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']))); $httpmon_wdgt->addHeader(_('Web scenarios'), $r_form); $httpmon_wdgt->addHeaderRowNumber(); // TABLE $table = new CTableInfo(_('No web scenarios found.')); $table->SetHeader(array($displayNodes ? _('Node') : null, $_REQUEST['hostid'] == 0 ? make_sorting_header(_('Host'), 'hostname') : null, make_sorting_header(_('Name'), 'name'), _('Number of steps'), _('Last check'), _('Status'))); $paging = null; if ($pageFilter->hostsSelected) { $options = array('output' => array('httptestid'), 'templated' => false, 'filter' => array('status' => HTTPTEST_STATUS_ACTIVE), 'limit' => $config['search_limit'] + 1); if ($pageFilter->hostid > 0) { $options['hostids'] = $pageFilter->hostid; } elseif ($pageFilter->groupid > 0) { $options['groupids'] = $pageFilter->groupid; } $httpTests = API::HttpTest()->get($options); $paging = getPagingLine($httpTests);
$problemTrigger['description'] = $triggers[$problemTrigger['triggerid']]['description']; } unset($problemTrigger); } unset($serviceSla); $treeData = array(); createServiceMonitoringTree($services, $slaData, $period, $treeData); $tree = new CServiceTree('service_status_tree', $treeData, array('caption' => _('Service'), 'status' => _('Status'), 'reason' => _('Reason'), 'sla' => _('Problem time'), 'sla2' => nbsp(_('SLA') . ' / ' . _('Acceptable SLA')))); if ($tree) { // creates form for choosing a preset interval $r_form = new CForm(); $r_form->setAttribute('class', 'nowrap'); $r_form->setMethod('get'); $r_form->setAttribute('name', 'period_choice'); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $period_combo = new CComboBox('period', $period, 'javascript: submit();'); foreach ($periods as $key => $val) { $period_combo->addItem($key, $val); } $r_form->addItem(array(_('Period') . SPACE, $period_combo)); $srv_wdgt = new CWidget('hat_services', 'service-list service-mon'); $srv_wdgt->addPageHeader(_('IT SERVICES'), get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen']))); $srv_wdgt->addHeader(_('IT services'), $r_form); $srv_wdgt->addItem(BR()); $srv_wdgt->addItem($tree->getHTML()); $srv_wdgt->show(); } else { error(_('Cannot format Tree. Check logic structure in service links.')); } } require_once dirname(__FILE__) . '/include/page_footer.php';
/** * Get a template by name and depth. * * Templates can handle multiple depth levels * * This is a method (and not a member array) to allow dynamic generation and T_() * * @param string Name of the template ('main', 'sub') * @param integer Nesting level (start at 0) * @return array Associative array which defines layout and optionally properties. */ function get_template($name, $depth = 0) { switch ($name) { case 'main': switch ($depth) { case 0: // main level global $app_shortname, $app_version; return array('before' => '<div id="mainmenu"><ul>', 'after' => '</ul></div>', 'beforeEach' => '<li>', 'afterEach' => '</li>', 'beforeEachSel' => '<li class="current">', 'afterEachSel' => '</li>', 'beforeEachSelWithSub' => '<li class="parent">', 'afterEachSelWithSub' => '</li>', '_props' => array()); default: // any sublevel return array('before' => '<ul class="submenu">', 'after' => '</ul>', 'beforeEach' => '<li>', 'afterEach' => '</li>', 'beforeEachSel' => '<li class="current">', 'afterEachSel' => '</li>'); } break; case 'sub': // a payload block with embedded submenu return array('before' => '<div class="pt">' . "\n" . '<ul class="hack">' . "\n<li><!-- Yes, this empty UL is needed! It's a DOUBLE hack for correct CSS display --></li>" . "\n</ul>" . "\n" . '<div class="panelblocktabs">' . "\n" . '<ul class="tabs">', 'after' => "</ul>\n" . '<span style="float:right">$global_icons$</span>' . "</div>\n</div>" . "\n" . '<div class="tabbedpanelblock">', 'empty' => '<div class="panelblock">', 'beforeEach' => '<li>', 'afterEach' => '</li>', 'beforeEachSel' => '<li class="current">', 'afterEachSel' => '</li>', 'end' => '</div>'); case 'block': // an additional payload block, anywhere after the one with the submenu. Used by disp_payload_begin()/disp_payload_end() return array('begin' => '<div class="panelblock">', 'end' => "\n</div>"); case 'CollectionList': // Template for a list of Collections (Blogs) return array('before' => '<div id="coll_list"><ul>', 'after' => '</ul></div>', 'buttons_start' => '', 'buttons_end' => '', 'beforeEach' => '<li>', 'afterEach' => '</li>', 'beforeEachSel' => '<li class="current">', 'afterEachSel' => '</li>', 'select_start' => '<li class="collection_select">', 'select_end' => '</li>'); case 'Results': // Results list: return array('page_url' => '', 'before' => '<div class="results">', 'header_start' => '<div class="results_nav">', 'header_text' => '<strong>' . T_('Pages') . '</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$', 'header_text_single' => '', 'header_end' => '</div>', 'list_start' => '<table class="grouped" cellspacing="0">' . "\n\n", 'head_start' => "<thead>\n", 'head_title' => '<tr><th colspan="$nb_cols$" class="title"><span style="float:right">$global_icons$</span>$title$</th>' . "\n</tr>\n", 'filters_start' => '<tr class="filters"><td colspan="$nb_cols$">', 'filters_end' => '</td></tr>', 'line_start_head' => '<tr>', 'colhead_start' => '<th $class_attrib$>', 'colhead_start_first' => '<th class="firstcol $class$">', 'colhead_start_last' => '<th class="lastcol $class$">', 'colhead_end' => "</th>\n", 'sort_asc_off' => '<img src="../admin/img/grey_arrow_up.gif" alt="A" title="' . T_('Ascending order') . '" height="12" width="11" />', 'sort_asc_on' => '<img src="../admin/img/black_arrow_up.gif" alt="A" title="' . T_('Ascending order') . '" height="12" width="11" />', 'sort_desc_off' => '<img src="../admin/img/grey_arrow_down.gif" alt="D" title="' . T_('Descending order') . '" height="12" width="11" />', 'sort_desc_on' => '<img src="../admin/img/black_arrow_down.gif" alt="D" title="' . T_('Descending order') . '" height="12" width="11" />', 'basic_sort_off' => '', 'basic_sort_asc' => get_icon('ascending'), 'basic_sort_desc' => get_icon('descending'), 'head_end' => "</thead>\n\n", 'tfoot_start' => "<tfoot>\n", 'tfoot_end' => "</tfoot>\n\n", 'body_start' => "<tbody>\n", 'line_start' => '<tr class="even">' . "\n", 'line_start_odd' => '<tr class="odd">' . "\n", 'line_start_last' => '<tr class="even lastline">' . "\n", 'line_start_odd_last' => '<tr class="odd lastline">' . "\n", 'col_start' => '<td $class_attrib$>', 'col_start_first' => '<td class="firstcol $class$">', 'col_start_last' => '<td class="lastcol $class$">', 'col_end' => "</td>\n", 'line_end' => "</tr>\n\n", 'grp_line_start' => '<tr class="group">' . "\n", 'grp_line_start_odd' => '<tr class="odd">' . "\n", 'grp_line_start_last' => '<tr class="lastline">' . "\n", 'grp_line_start_odd_last' => '<tr class="odd lastline">' . "\n", 'grp_col_start' => '<td $class_attrib$ $colspan_attrib$>', 'grp_col_start_first' => '<td class="firstcol $class$" $colspan_attrib$>', 'grp_col_start_last' => '<td class="lastcol $class$" $colspan_attrib$>', 'grp_col_end' => "</td>\n", 'grp_line_end' => "</tr>\n\n", 'body_end' => "</tbody>\n\n", 'total_line_start' => '<tr class="total">' . "\n", 'total_col_start' => '<td $class_attrib$>', 'total_col_start_first' => '<td class="firstcol $class$">', 'total_col_start_last' => '<td class="lastcol $class$">', 'total_col_end' => "</td>\n", 'total_line_end' => "</tr>\n\n", 'list_end' => "</table>\n\n", 'footer_start' => '<div class="results_nav">', 'footer_text' => '<strong>' . T_('Pages') . '</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$', 'footer_text_single' => '', 'footer_text_no_limit' => '', 'prev_text' => T_('Previous'), 'next_text' => T_('Next'), 'no_prev_text' => '', 'no_next_text' => '', 'list_prev_text' => T_('...'), 'list_next_text' => T_('...'), 'list_span' => 11, 'scroll_list_range' => 5, 'footer_end' => "</div>\n\n", 'no_results_start' => '<table class="grouped" cellspacing="0">' . "\n\n" . '<th class="title"><span style="float:right">$global_icons$</span>' . '$title$</th></tr>' . "\n" . '<tr class="lastline"><td class="firstcol lastcol">', 'no_results_end' => '</td></tr>' . '</table>' . "\n\n", 'after' => '</div>', 'sort_type' => 'basic'); case 'blockspan_form': // blockspan Form settings: return array('layout' => 'blockspan', 'formstart' => '', 'title_fmt' => '$title$' . "\n", 'no_title_fmt' => '', 'fieldstart' => '<span class="block" $ID$>', 'labelstart' => '', 'labelend' => "\n", 'labelempty' => '', 'inputstart' => '', 'infostart' => '', 'inputend' => "\n", 'fieldend' => '</span>' . get_icon('pixel') . "\n", 'buttonsstart' => '', 'buttonsend' => "\n", 'formend' => ''); case 'compact_form': case 'Form': // Default Form settings: return array('layout' => 'fieldset', 'formstart' => '', 'title_fmt' => '<span style="float:right">$global_icons$</span><h2>$title$</h2>' . "\n", 'no_title_fmt' => '<span style="float:right">$global_icons$</span>' . "\n", 'fieldset_begin' => '<fieldset $fieldset_attribs$>' . "\n" . '<legend $title_attribs$>$fieldset_title$</legend>' . "\n", 'fieldset_end' => '</fieldset>' . "\n", 'fieldstart' => '<fieldset $ID$>' . "\n", 'labelstart' => '<div class="label">', 'labelend' => "</div>\n", 'labelempty' => '<div class="label"></div>', 'inputstart' => '<div class="input">', 'infostart' => '<div class="info">', 'inputend' => "</div>\n", 'fieldend' => "</fieldset>\n\n", 'buttonsstart' => '<fieldset><div class="input">', 'buttonsend' => "</div></fieldset>\n\n", 'formend' => ''); case 'file_browser': return array('block_start' => '<div class="block_item"> <h3><span style="float:right">$global_icons$</span>$title$</h3>', 'block_end' => '</div>'); case 'block_item': return array('block_start' => '<div class="block_item"> <h3><span style="float:right">$global_icons$</span>$title$</h3>', 'block_end' => '</div>'); case 'side_item': return array('block_start' => '<div class="browse_side_item"> <h3><span style="float:right">$global_icons$</span>$title$</h3>', 'block_end' => '</div>'); default: debug_die('Unknown $name for AdminUI::get_template(): ' . var_export($name, true)); } }
/** * Returns a permalink link to the Item * * Note: If you only want the permalink URL, use {@link Item::get_permanent_url()} * * @param string link text or special value: '#', '#icon#', '#text#', '#title#' '... $title$ ...' * @param string link title * @param string class name */ function get_permanent_link($text = '#', $title = '#', $class = '', $target_blog = '', $post_navigation = '', $nav_target = NULL) { global $current_User, $Blog; switch ($text) { case '#': $text = get_icon('permalink', 'imgtag', array('class' => 'icon')) . T_('Permalink'); break; case '#icon#': $text = get_icon('permalink', 'imgtag', array('class' => 'icon')); break; case '#text#': $text = T_('Permalink'); break; case '#title#': $text = format_to_output($this->title); break; } if ($title == '#') { $title = T_('Permanent link to full entry'); } $blogurl = ''; $permalink_type = ''; if (!empty($Blog) && $this->check_cross_post_nav($target_blog, $Blog->ID)) { $permalink_type = $Blog->get_setting('permalinks'); $blogurl = $Blog->gen_blogurl(); } $url = $this->get_permanent_url($permalink_type, $blogurl); // add navigation param if necessary $url = $this->add_navigation_param($url, $post_navigation, $nav_target); // Display as link $r = '<a href="' . $url . '" title="' . $title . '"'; if (!empty($class)) { $r .= ' class="' . $class . '"'; } $r .= '>' . str_replace('$title$', format_to_output($this->title), $text) . '</a>'; return $r; }
<?php if (!$Item->can_see_comments(true) || $preview) { // If comments are disabled for this post we should close the <table> tag that was opened above for post content // Otherwise this tag will be closed below by 'comment_list_end' echo '</table>'; } ?> <?php $Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs) ?> <?php // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------ skin_include('_item_feedback.inc.php', array('preview_block_start' => '<table id="comment_preview" class="forums_table topics_table single_topic" cellspacing="0" cellpadding="0">', 'preview_start' => '<div class="bText">', 'preview_end' => '</div>', 'preview_block_end' => '</table><br />', 'notification_text' => T_('This is your topic. You are receiving notifications when anyone posts a reply on your topics.'), 'notification_text2' => T_('You will be notified by email when someone posts a reply here.'), 'notification_text3' => T_('Notify me by email when someone posts a reply here.'), 'before_section_title' => '<h4>', 'after_section_title' => '</h4>', 'comment_list_end' => '</table>', 'comment_start' => '<div class="bText">', 'comment_end' => '</div>', 'disp_rating_summary' => false, 'disp_section_title' => false, 'form_title_start' => '', 'form_title_end' => '', 'form_title_text' => '', 'form_comment_text' => T_('Message body'), 'form_submit_text' => T_('Submit'), 'form_params' => array('formstart' => '<table class="forums_table topics_table" cellspacing="0" cellpadding="0"><tr class="table_title"><th colspan="2"><div class="form_title">' . T_('Post a reply') . '</div></th></tr>', 'formend' => '</table>', 'fieldset_begin' => '<tr><td colspan="2">', 'fieldset_end' => '</td></tr>', 'fieldstart' => '<tr>', 'fieldend' => '</tr>', 'labelstart' => '<td><strong>', 'labelend' => '</strong></td>', 'inputstart' => '<td>', 'inputend' => '</td>', 'infostart' => '<td>', 'infoend' => '</td>'), 'comments_disabled_text_member' => T_('You must be a member of this blog to post a reply.'), 'comments_disabled_text_registered' => T_('You must be logged in to post a reply.'), 'comments_disabled_text_validated' => T_('You must activate your account before you can post a reply.'), 'feed_title' => get_icon('feed') . ' ' . T_('RSS feed for replies to this topic'), 'before_comment_error' => '<p class="center" style="font-size:150%"><b>', 'comment_closed_text' => T_('This topic is closed.'), 'after_comment_error' => '</b></p>', 'comment_mode' => param('mode', 'string', ''), 'comment_qc' => param('qc', 'integer', 0), 'comment_qp' => param('qp', 'integer', 0), $dummy_fields['content'] => param($dummy_fields['content'], 'html'), 'disp_nav_top' => false, 'nav_bottom_inside' => true, 'nav_block_start' => '<tr class="panel bottom"><td colspan="2">' . $post_buttons . '<div class="navigation">', 'nav_block_end' => '</div></td></tr>', 'nav_prev_text' => T_('Previous'), 'nav_next_text' => T_('Next'), 'nav_prev_class' => 'prev', 'nav_next_class' => 'next')); // Note: You can customize the default item feedback by copying the generic // /skins/_item_feedback.inc.php file into the current skin folder. // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) --------------------- ?> <?php locale_restore_previous(); // Restore previous locale (Blog locale) ?> <script type="text/javascript"> jQuery( document ).ready( function() { jQuery( '.quote_button' ).click( function() { // Submit a form to save the already entered content console.log( jQuery( this ).attr( 'href' ) );
function ityp_row_default($item_type_ID) { if (ItemType::is_reserved($item_type_ID)) { // It is reserved item type, Don't allow to enable this return ''; } global $current_User, $admin_url, $Blog; if ($Blog->get_setting('default_post_type') == $item_type_ID) { // The item type is default for current collection: $status_icon = get_icon('bullet_black', 'imgtag', array('title' => sprintf(T_('The item type is the default for %s.'), $Blog->get('shortname')))); } else { // The item type is not default: if ($current_User->check_perm('blog_properties', 'edit', false, $Blog->ID)) { // URL to use the item type as default if current user has a permission to edit collection properties: $status_url = $admin_url . '?ctrl=itemtypes&action=default&ityp_ID=' . $item_type_ID . '&blog=' . $Blog->ID . '&' . url_crumb('itemtype'); $status_icon_title = sprintf(T_('Set this item type as the default for %s.'), $Blog->get('shortname')); } else { $status_icon_title = sprintf(T_('The item type is not the default for %s.'), $Blog->get('shortname')); } $status_icon = get_icon('bullet_empty_grey', 'imgtag', array('title' => $status_icon_title)); } if (isset($status_url)) { return '<a href="' . $status_url . '">' . $status_icon . '</a>'; } else { return $status_icon; } }
/** * @param string Title of the container. This gets passed to T_()! * @param string Suffix of legend */ function display_container($container, $legend_suffix = '') { global $Blog; global $Session; $Table = new Table(); $Table->title = '<span class="container_name">' . T_($container) . '</span>' . $legend_suffix; // Table ID - fp> needs to be handled cleanly by Table object $table_id = str_replace(' ', '_', $container); // fp> Using the container name which has special chars is a bad idea. Counter would be better $Table->global_icon(T_('Add a widget...'), 'new', regenerate_url('', 'action=new&container=' . rawurlencode($container)), T_('Add widget') . ' »', 3, 4, array('id' => 'add_new_' . $table_id)); $Table->cols = array(array('th' => T_('En'), 'th_class' => 'shrinkwrap', 'td_class' => 'shrinkwrap'), array('th' => T_('Widget')), array('th' => T_('Type')), array('th' => T_('Move'), 'th_class' => 'shrinkwrap', 'td_class' => 'shrinkwrap'), array('th' => T_('Actions'), 'th_class' => 'shrinkwrap', 'td_class' => 'shrinkwrap')); //enable fadeouts here $Table->display_init(NULL, array('fadeouts' => true)); // add ID for jQuery // TODO: fp> Awfully dirty. This should be handled by the Table object $Table->params['list_start'] = str_replace('<table', '<table id="' . $table_id . '"', $Table->params['list_start']); /* if( $legend_suffix ) { // add jQuery no-drop -- fp> what do we need this one for? $Table->params['head_title'] = str_replace( 'class="grouped"', 'class="grouped no-drop"', $Table->params['head_title'] ); } */ $Table->display_list_start(); // TITLE / COLUMN HEADERS: $Table->display_head(); // BODY START: $Table->display_body_start(); /** * @var WidgetCache */ $WidgetCache =& get_WidgetCache(); $Widget_array =& $WidgetCache->get_by_coll_container($Blog->ID, $container); if (empty($Widget_array)) { // TODO: cleanup $Table->display_line_start(true); $Table->display_col_start(array('colspan' => 5)); echo '<span class="new_widget">' . T_('There is no widget in this container yet.') . '</span>'; $Table->display_col_end(); $Table->display_line_end(); } else { $widget_count = 0; foreach ($Widget_array as $ComponentWidget) { $widget_count++; $enabled = $ComponentWidget->get('enabled'); $fadeout_id = $Session->get('fadeout_id'); if (isset($fadeout_id) && $ComponentWidget->ID == $fadeout_id) { $fadeout = true; $Session->delete('fadeout_id'); } else { $fadeout = false; } $Table->display_line_start(false, $fadeout); $Table->display_col_start(); if ($enabled) { // Indicator for the JS UI: echo '<span class="widget_is_enabled">'; echo get_icon('enabled', 'imgtag', array('title' => T_('The widget is enabled.'))); echo '</span>'; } else { echo get_icon('disabled', 'imgtag', array('title' => T_('The widget is disabled.'))); } $Table->display_col_end(); $Table->display_col_start(); $ComponentWidget->init_display(array()); echo '<a href="' . regenerate_url('blog', 'action=edit&wi_ID=' . $ComponentWidget->ID) . '" class="widget_name">' . $ComponentWidget->get_desc_for_list() . '</a>'; $Table->display_col_end(); // Note: this is totally useless, but we need more cols for the screen to feel "right": $Table->display_col_start(); echo $ComponentWidget->type; $Table->display_col_end(); // Move $Table->display_col_start(); //echo $ComponentWidget->order.' '; if ($widget_count > 1) { echo action_icon(T_('Move up!'), 'move_up', regenerate_url('blog', 'action=move_up&wi_ID=' . $ComponentWidget->ID . '&' . url_crumb('widget'))); } else { echo get_icon('nomove', 'imgtag', array('class' => 'action_icon')); } if ($widget_count < count($Widget_array)) { echo action_icon(T_('Move down!'), 'move_down', regenerate_url('blog', 'action=move_down&wi_ID=' . $ComponentWidget->ID . '&' . url_crumb('widget'))); } else { echo get_icon('nomove', 'imgtag', array('class' => 'action_icon')); } $Table->display_col_end(); // Actions $Table->display_col_start(); if ($enabled) { echo action_icon(T_('Disable this widget!'), 'deactivate', regenerate_url('blog', 'action=toggle&wi_ID=' . $ComponentWidget->ID . '&' . url_crumb('widget'))); } else { echo action_icon(T_('Enable this widget!'), 'activate', regenerate_url('blog', 'action=toggle&wi_ID=' . $ComponentWidget->ID . '&' . url_crumb('widget'))); } echo '<span class="edit_icon_hook">' . action_icon(T_('Edit widget settings!'), 'edit', regenerate_url('blog', 'action=edit&wi_ID=' . $ComponentWidget->ID)) . '</span>'; echo '<span class="delete_icon_hook">' . action_icon(T_('Remove this widget!'), 'delete', regenerate_url('blog', 'action=delete&wi_ID=' . $ComponentWidget->ID . '&' . url_crumb('widget'))) . '</span>'; $Table->display_col_end(); $Table->display_line_end(); } } // BODY END: $Table->display_body_end(); $Table->display_list_end(); }
** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ $widget = (new CWidget())->setTitle(_('Slide shows'))->addItem((new CList())->addClass(ZBX_STYLE_OBJECT_GROUP)->addItem([(new CSpan())->addItem(new CLink(_('All slide shows'), 'slideconf.php')), '/', (new CSpan())->addClass(ZBX_STYLE_SELECTED)->addItem(new CLink($data['screen']['name'], 'slides.php?elementid=' . $data['screen']['slideshowid'] . '&fullscreen=' . $data['fullscreen']))])); // Create header form. $header = (new CForm('get'))->setName('slideHeaderForm'); $controls = (new CList())->addItem(new CComboBox('config', 'slides.php', 'redirect(this.options[this.selectedIndex].value);', ['screens.php' => _('Screens'), 'slides.php' => _('Slide shows')])); $favourite_icon = $this->data['screen'] ? get_icon('favourite', ['fav' => 'web.favorite.screenids', 'elname' => 'slideshowid', 'elid' => $this->data['elementId']]) : (new CIcon(_('Favourites')))->addClass('iconplus'); $refresh_icon = get_icon('screenconf'); if ($this->data['screen']) { $refresh_icon->setMenuPopup(CMenuPopupHelper::getRefresh(WIDGET_SLIDESHOW, 'x' . $this->data['refreshMultiplier'], true, ['elementid' => $this->data['elementId']])); } $header->addVar('fullscreen', $this->data['fullscreen']); if (isset($this->data['isDynamicItems'])) { $controls->addItem([SPACE, _('Group'), SPACE, $this->data['pageFilter']->getGroupsCB()]); $controls->addItem([SPACE, _('Host'), SPACE, $this->data['pageFilter']->getHostsCB()]); } $controls->addItem($data['screen']['editable'] ? (new CButton('edit', _('Edit slide show')))->onClick('redirect("slideconf.php?form=update&slideshowid=' . $data['screen']['slideshowid'] . '")') : null)->addItem($favourite_icon)->addItem($refresh_icon)->addItem(get_icon('fullscreen', ['fullscreen' => $this->data['fullscreen']])); $header->addItem($controls); $widget->setControls($header); $filter = (new CFilter('web.slides.filter.state'))->addNavigator(); $widget->addItem($filter); $widget->addItem((new CDiv((new CDiv())->addClass('preloader')))->setId(WIDGET_SLIDESHOW)); require_once dirname(__FILE__) . '/js/monitoring.slides.js.php'; return $widget;
/** * Display a select field and populate it with a cache object. * * @param string field name * @param string string containing options '<option>...</option>' * @param string field label to be display before the field * @param string "help" note (Should provide something useful, otherwise leave it empty) * @param array Optional params. Additionally to {@link $_common_params} you can use: * - 'label': Field label to be display before the field * - 'class': CSS class for select * @return mixed true (if output) or the generated HTML if not outputting */ function select_input_options($field_name, $field_options, $field_label, $field_note = '', $field_params = array()) { $this->handle_common_params($field_params, $field_name, $field_label, $field_note); $r = $this->begin_field(); if (!empty($field_params['parent'])) { // need to display an arrow to show that this select list options has a preselection from a parent $r .= get_icon('multi_action'); } $field_params['class'] = (empty($field_params['class']) ? '' : $field_params['class'] . ' ') . 'form-control'; $r .= "\n<select" . get_field_attribs_as_string($field_params) . '>' . $field_options . "</select>\n"; $r .= $this->end_field(); if (!empty($field_params['parent'])) { // Set up the dynamic preselection array from the parent to this select list options $r .= "<script type='text/javascript'>\n\t\t\t\t\t\t\t\ttab_dynamicSelects[nb_dynamicSelects] = Array();\n\t\t\t\t\t\t\t\ttab_dynamicSelects[nb_dynamicSelects]['parent'] = '" . $field_params['parent'] . "';\n\t\t\t\t\t\t\t\ttab_dynamicSelects[nb_dynamicSelects]['child'] = '{$field_name}';\n\t\t\t\t\t\t\t\tnb_dynamicSelects++;\n\t\t\t\t\t\t\t</script>"; } return $this->display_or_return($r); }
** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ $this->addJSfile('js/class.pmaster.js'); $dashboard = (new CWidget())->setTitle(_('Dashboard'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(get_icon('dashconf', ['enabled' => $data['filter_enabled']]))->addItem(get_icon('fullscreen', ['fullscreen' => $data['fullscreen']])))); /* * Dashboard grid */ $dashboardGrid = [[], [], []]; $widgetRefreshParams = []; $widgets = [WIDGET_FAVOURITE_GRAPHS => ['id' => 'favouriteGraphs', 'menu_popup' => ['CMenuPopupHelper', 'getFavouriteGraphs'], 'data' => $data['favourite_graphs'], 'header' => _('Favourite graphs'), 'links' => [['name' => _('Graphs'), 'url' => 'charts.php']], 'defaults' => ['col' => 0, 'row' => 0]], WIDGET_FAVOURITE_SCREENS => ['id' => 'favouriteScreens', 'menu_popup' => ['CMenuPopupHelper', 'getFavouriteScreens'], 'data' => $data['favourite_screens'], 'header' => _('Favourite screens'), 'links' => [['name' => _('Screens'), 'url' => 'screens.php'], ['name' => _('Slide shows'), 'url' => 'slides.php']], 'defaults' => ['col' => 0, 'row' => 1]], WIDGET_FAVOURITE_MAPS => ['id' => 'favouriteMaps', 'menu_popup' => ['CMenuPopupHelper', 'getFavouriteMaps'], 'data' => $data['favourite_maps'], 'header' => _('Favourite maps'), 'links' => [['name' => _('Maps'), 'url' => 'zabbix.php?action=map.view']], 'defaults' => ['col' => 0, 'row' => 2]]]; foreach ($widgets as $widgetid => $widget) { $icon = (new CButton(null))->addClass(ZBX_STYLE_BTN_WIDGET_ACTION)->setTitle(_('Action'))->setId($widget['id'])->setMenuPopup(call_user_func($widget['menu_popup'])); $footer = new CList(); foreach ($widget['links'] as $link) { $footer->addItem(new CLink($link['name'], $link['url'])); } $col = CProfile::get('web.dashboard.widget.' . $widgetid . '.col', $widget['defaults']['col']); $row = CProfile::get('web.dashboard.widget.' . $widgetid . '.row', $widget['defaults']['row']); $dashboardGrid[$col][$row] = (new CCollapsibleUiWidget($widgetid, $widget['data']))->setExpanded((bool) CProfile::get('web.dashboard.widget.' . $widgetid . '.state', true))->setHeader($widget['header'], [$icon], true, 'zabbix.php?action=dashboard.widget')->setFooter($footer);
/** * Build teh evobar menu */ function build_evobar_menu() { /** * @var Menu */ global $topleft_Menu, $topright_Menu; global $current_User; global $home_url, $admin_url, $dispatcher, $debug, $seo_page_type, $robots_index; global $Blog, $blog; global $Settings; $perm_admin_normal = $current_User->check_perm('admin', 'normal'); $perm_admin_restricted = $current_User->check_perm('admin', 'restricted'); $entries = NULL; if ($perm_admin_normal) { // Normal Access to Admin: $entries = array('b2evo' => array('text' => '<strong>b2evolution</strong>', 'href' => $home_url), 'dashboard' => array('text' => T_('Dashboard'), 'href' => $admin_url, 'title' => T_('Go to admin dashboard')), 'see' => array('text' => T_('See'), 'href' => $home_url, 'title' => T_('See the home page')), 'write' => array('text' => T_('Write'), 'title' => T_('No blog is currently selected'), 'disabled' => true), 'blog' => array('text' => T_('Blog'), 'title' => T_('No blog is currently selected'), 'disabled' => true), 'tools' => array('text' => T_('More'), 'disabled' => true)); } elseif ($perm_admin_restricted) { // restricted Access to Admin: $entries = array('see' => array('text' => T_('Site'), 'href' => $home_url, 'title' => T_('See the home page'))); if ($current_User->check_perm('blogs', 'create')) { $entries['blog'] = array('text' => T_('Blog'), 'title' => T_('No blog is currently selected'), 'disabled' => true); } $entries['tools'] = array('text' => T_('More'), 'disabled' => true); } if (!empty($Blog)) { // A blog is currently selected: if ($perm_admin_normal) { $entries['dashboard']['href'] = $admin_url . '?blog=' . $Blog->ID; } if ($perm_admin_restricted) { $entries['see']['href'] = $Blog->get('url'); $entries['see']['title'] = T_('See the public view of this blog'); } if ($current_User->check_perm('blog_post_statuses', 'edit', false, $Blog->ID)) { // We have permission to add a post with at least one status: $write_item_url = $Blog->get_write_item_url(); if ($write_item_url) { // write item URL is not empty, so it's sure that user can create new post if (!$perm_admin_normal) { $entries['write'] = array('text' => T_('Write')); } $entries['write']['href'] = $write_item_url; $entries['write']['disabled'] = false; $entries['write']['title'] = T_('Write a new post into this blog'); } } if ($perm_admin_normal) { if (empty($write_item_url)) { // Display restricted message on this blog $entries['write']['title'] = T_('You don\'t have permission to post into this blog'); } // BLOG MENU: $items_url = $admin_url . '?ctrl=items&blog=' . $Blog->ID . '&filter=restore'; $entries['blog']['href'] = $items_url; $entries['blog']['disabled'] = false; $entries['blog']['title'] = T_('Manage this blog'); if ($Blog->get('type') == 'manual') { // Manual Pages $entries['blog']['entries']['manual'] = array('text' => T_('Manual Pages') . '…', 'href' => $items_url . '&tab=manual'); } $entries['blog']['entries']['posts'] = array('text' => T_('Posts') . '…', 'href' => $items_url); // Check if user has permission for published, draft or depreceted comments (any of these) if ($current_User->check_perm('blog_comments', 'edit', false, $Blog->ID)) { // Comments: $entries['blog']['entries']['comments'] = array('text' => T_('Comments') . '…', 'href' => $admin_url . '?ctrl=comments&blog=' . $Blog->ID . '&filter=restore'); } // Chapters / Categories: if ($current_User->check_perm('blog_cats', 'edit', false, $Blog->ID)) { // Either permission for a specific blog or the global permission: $entries['blog']['entries']['chapters'] = array('text' => T_('Categories') . '…', 'href' => $admin_url . '?ctrl=chapters&blog=' . $Blog->ID); } // PLACE HOLDER FOR FILES MODULE: $entries['blog']['entries']['files'] = NULL; // BLOG SETTINGS: if ($current_User->check_perm('blog_properties', 'edit', false, $Blog->ID)) { // We have permission to edit blog properties: $blog_param = '&blog=' . $Blog->ID; if (!empty($entries['blog']['entries'])) { // There are already entries aboce, insert a separator: $entries['blog']['entries'][] = array('separator' => true); } $entries['blog']['entries']['general'] = array('text' => T_('Blog settings'), 'href' => $admin_url . '?ctrl=coll_settings' . $blog_param, 'entries' => array('general' => array('text' => T_('General') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=general' . $blog_param), 'features' => array('text' => T_('Features') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=features' . $blog_param), 'skin' => array('text' => T_('Skin') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=skin' . $blog_param), 'plugin_settings' => array('text' => T_('Plugins') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=plugin_settings' . $blog_param), 'widgets' => array('text' => T_('Widgets') . '…', 'href' => $admin_url . '?ctrl=widgets' . $blog_param), 'urls' => array('text' => T_('URLs') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=urls' . $blog_param), 'seo' => array('text' => T_('SEO') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=seo' . $blog_param), 'advanced' => array('text' => T_('Advanced') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=advanced' . $blog_param))); if ($Blog && $Blog->advanced_perms) { $entries['blog']['entries']['general']['entries']['userperms'] = array('text' => T_('User perms') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=perm' . $blog_param); $entries['blog']['entries']['general']['entries']['groupperms'] = array('text' => T_('Group perms') . '…', 'href' => $admin_url . '?ctrl=coll_settings&tab=permgroup' . $blog_param); } } } } // SYSTEM MENU: if ($perm_admin_restricted) { if ($debug) { $debug_text = 'DEBUG: '; if (!empty($seo_page_type)) { // Set in skin_init() $debug_text = $seo_page_type . ': '; } if ($robots_index === false) { $debug_text .= 'NO INDEX'; } else { $debug_text .= 'do index'; } $entries['tools']['entries']['noindex'] = array('text' => $debug_text, 'disabled' => true); $entries['tools']['entries'][''] = array('separator' => true); } if ($current_User->check_perm('users', 'view')) { // Users: $entries['tools']['disabled'] = false; $entries['tools']['entries']['users'] = array('text' => T_('Users') . '…', 'href' => $admin_url . '?ctrl=users'); } // PLACE HOLDER FOR MESSAGING MODULE: $entries['tools']['entries']['messaging'] = NULL; // PLACE HOLDER FOR FILES MODULE: $entries['tools']['entries']['files'] = NULL; $perm_spam = $current_User->check_perm('spamblacklist', 'view'); $perm_options = $current_User->check_perm('options', 'view'); $perm_emails = $current_User->check_perm('emails', 'view'); $perm_slugs = $current_User->check_perm('slugs', 'view'); $perm_maintenance = $current_User->check_perm('perm_maintenance', 'upgrade'); if ($perm_spam || $perm_options || $perm_slugs || $perm_maintenance) { if ($perm_emails) { $entries['tools']['entries']['email'] = array('text' => T_('Emails'), 'href' => $admin_url . '?ctrl=email', 'entries' => array('blocked' => array('text' => T_('Addresses') . '…', 'href' => $admin_url . '?ctrl=email'), 'sent' => array('text' => T_('Sent') . '…', 'href' => $admin_url . '?ctrl=email&tab=sent'), 'return' => array('text' => T_('Returned') . '…', 'href' => $admin_url . '?ctrl=email&tab=return'), 'settings' => array('text' => T_('Settings') . '…', 'href' => $admin_url . '?ctrl=email&tab=settings'))); } $entries['tools']['disabled'] = false; $entries['tools']['entries']['tools_sep'] = array('separator' => true); if ($perm_options) { $entries['tools']['entries']['status'] = array('text' => T_('System status') . '…', 'href' => $admin_url . '?ctrl=system'); } if ($perm_options) { $entries['tools']['entries']['crontab'] = array('text' => T_('Scheduler') . '…', 'href' => $admin_url . '?ctrl=crontab'); } if ($perm_spam) { $entries['tools']['entries']['antispam'] = array('text' => T_('Antispam'), 'href' => $admin_url . '?ctrl=antispam', 'entries' => array('blacklist' => array('text' => T_('Blacklist') . '…', 'href' => $admin_url . '?ctrl=antispam'))); if ($perm_options) { // If we have access to options, then we add a submenu: $entries['tools']['entries']['antispam']['entries']['ipranges'] = array('text' => T_('IP Ranges') . '…', 'href' => $admin_url . '?ctrl=antispam&tab3=ipranges'); $entries['tools']['entries']['antispam']['entries']['settings'] = array('text' => T_('Settings') . '…', 'href' => $admin_url . '?ctrl=antispam&tab3=settings'); if ($current_User->check_perm('options', 'edit')) { $entries['tools']['entries']['antispam']['entries']['tools'] = array('text' => T_('Tools') . '…', 'href' => $admin_url . '?ctrl=antispam&tab3=tools'); } } } if ($perm_slugs) { $entries['tools']['entries']['slugs'] = array('text' => T_('Slugs') . '…', 'href' => $admin_url . '?ctrl=slugs'); } } if ($perm_options) { // Global settings: $entries['tools']['entries']['general'] = array('text' => T_('General') . '…', 'href' => $admin_url . '?ctrl=gensettings'); $entries['tools']['entries']['regional'] = array('text' => T_('Regional'), 'href' => $admin_url . '?ctrl=regional', 'entries' => array('locales' => array('text' => T_('Locales') . '…', 'href' => $admin_url . '?ctrl=locales'), 'time' => array('text' => T_('Time') . '…', 'href' => $admin_url . '?ctrl=time'), 'countries' => array('text' => T_('Countries') . '…', 'href' => $admin_url . '?ctrl=countries'), 'regions' => array('text' => T_('Regions') . '…', 'href' => $admin_url . '?ctrl=regions'), 'subregions' => array('text' => T_('Sub-regions') . '…', 'href' => $admin_url . '?ctrl=subregions'), 'cities' => array('text' => T_('Cities') . '…', 'href' => $admin_url . '?ctrl=cities'), 'currencies' => array('text' => T_('Currencies') . '…', 'href' => $admin_url . '?ctrl=currencies'))); $entries['tools']['entries']['plugins'] = array('text' => T_('Plugins') . '…', 'href' => $admin_url . '?ctrl=plugins'); $entries['tools']['entries']['remote'] = array('text' => T_('Remote publishing') . '…', 'href' => $admin_url . '?ctrl=remotepublish'); $entries['tools']['entries']['maintenance'] = array('text' => T_('Maintenance'), 'href' => $admin_url . '?ctrl=tools', 'entries' => array('tools' => array('text' => T_('Tools') . '…', 'href' => $admin_url . '?ctrl=tools'), 'import' => array('text' => T_('Import') . '…', 'href' => $admin_url . '?ctrl=tools&tab3=import'), 'test' => array('text' => T_('Testing') . '…', 'href' => $admin_url . '?ctrl=tools&tab3=test'), 'backup' => array('text' => T_('Backup') . '…', 'href' => $admin_url . '?ctrl=backup'), 'upgrade' => array('text' => T_('Check for updates') . '…', 'href' => $admin_url . '?ctrl=upgrade'))); } } global $debug, $debug_jslog; if ($debug || $debug_jslog) { // Show JS log menu if debug is enabled $entries['jslog'] = array('text' => T_('JS log'), 'title' => T_('JS log'), 'class' => 'jslog_switcher'); } if ($entries !== NULL) { $topleft_Menu->add_menu_entries(NULL, $entries); } // --------------------------------------------------------------------------- /* * RIGHT MENU */ global $localtimenow, $is_admin_page; $entries = array('userprefs' => array('text' => $current_User->get_avatar_imgtag('crop-top-15x15', '', 'top') . ' <strong>' . $current_User->get_colored_login() . '</strong>', 'href' => get_user_profile_url(), 'entries' => array('profile' => array('text' => T_('Edit your profile') . '…', 'href' => get_user_profile_url()), 'avatar' => array('text' => T_('Your profile picture') . '…', 'href' => get_user_avatar_url()), 'pwdchange' => array('text' => T_('Change password') . '…', 'href' => get_user_pwdchange_url()), 'userprefs' => array('text' => T_('Preferences') . '…', 'href' => get_user_preferences_url()), 'subs' => array('text' => T_('Notifications') . '…', 'href' => get_user_subs_url()))), 'time' => array('text' => date(locale_shorttimefmt(), $localtimenow), 'disabled' => true, 'class' => 'noborder')); // ADMIN SKINS: if ($is_admin_page) { $admin_skins = get_admin_skins(); if (count($admin_skins) > 1) { // We have several admin skins available: display switcher: $entries['userprefs']['entries']['admskins_sep'] = array('separator' => true); $entries['userprefs']['entries']['admskins'] = array('text' => T_('Admin skin')); $redirect_to = rawurlencode(regenerate_url('', '', '', '&')); foreach ($admin_skins as $admin_skin) { $entries['userprefs']['entries']['admskins']['entries'][$admin_skin] = array('text' => $admin_skin, 'href' => $dispatcher . '?ctrl=users&action=change_admin_skin&new_admin_skin=' . rawurlencode($admin_skin) . '&redirect_to=' . $redirect_to); } } } $entries['userprefs']['entries']['logout_sep'] = array('separator' => true); $entries['userprefs']['entries']['logout'] = array('text' => T_('Logout'), 'href' => get_user_logout_url()); // AB switch: if ($perm_admin_normal) { // User must have permission to access admin... if ($is_admin_page) { if (!empty($Blog)) { $entries['abswitch'] = array('text' => T_('Blog') . ' ' . get_icon('switch-to-blog'), 'href' => $Blog->get('url')); } else { $entries['abswitch'] = array('text' => T_('Home') . ' ' . get_icon('switch-to-blog'), 'href' => $home_url); } } else { $entries['abswitch'] = array('text' => T_('Admin') . ' ' . get_icon('switch-to-admin'), 'href' => $admin_url); } } $topright_Menu->add_menu_entries(NULL, $entries); $topright_Menu->add_menu_entries(NULL, array('logout' => array('text' => T_('Logout') . ' ' . get_icon('close'), 'class' => 'rollover_sprite', 'href' => get_user_logout_url()))); }
<div class="evo_sidebar"> <?php // Display container contents: skin_container(NT_('Sidebar'), array('block_start' => '<div class="evo_side_item $wi_class$">', 'block_end' => '</div>', 'block_title_start' => '<h3>', 'block_title_end' => '</h3>', 'list_start' => '<ul>', 'list_end' => '</ul>', 'item_start' => '<li>', 'item_end' => '</li>', 'group_start' => '<ul>', 'group_end' => '</ul>')); ?> <?php // Please help us promote b2evolution and leave this logo on your blog: powered_by(array('block_start' => '<div class="powered_by">', 'block_end' => '</div>', 'img_url' => '$rsc$img/powered-by-b2evolution-120t.gif', 'img_width' => 120, 'img_height' => 32)); ?> </div> <div class="clear"><?php echo get_icon('pixel'); ?> </div> </div> </div> <?php // ------------------------- BODY FOOTER INCLUDED HERE -------------------------- skin_include('_body_footer.inc.php'); // Note: You can customize the default BODY footer by copying the // _body_footer.inc.php file into the current skin folder. // ------------------------------- END OF FOOTER -------------------------------- ?> <?php
$row->addItem(new CCol(SPACE, getSeverityStyle($i))); } $col = new CTable('', 'blink overview-mon-severities'); $col->addRow($row); // double div necassary for FireFox $col = new CCol(new CDiv(new CDiv($col), 'overview-mon-severities-container')); $hintTable->addRow(array($col, _s('Age less than %s', convertUnitsS($config['blink_period'])))); } $hintTable->addRow(array(new CCol(SPACE), _('No trigger'))); } else { $hintTable->addRow(array(new CCol(SPACE), _('OK or no trigger'))); } $help = new CHelp('web.view.php', 'right'); $help->setHint($hintTable, '', '', true, false); // header right $overviewWidget->addPageHeader(_('OVERVIEW'), array(get_icon('fullscreen', array('fullscreen' => $this->data['fullscreen'])), SPACE, $help)); // header left $styleComboBox = new CComboBox('view_style', $this->data['view_style'], 'submit()'); $styleComboBox->addItem(STYLE_TOP, _('Top')); $styleComboBox->addItem(STYLE_LEFT, _('Left')); $hostLocationForm = new CForm('get'); $hostLocationForm->addVar('groupid', $this->data['groupid']); $hostLocationForm->additem(array(_('Hosts location'), SPACE, $styleComboBox)); $overviewWidget->addHeader($hostLocationForm); if ($config['dropdown_first_entry'] || $this->data['pageFilter']->applicationsSelected || $this->data['pageFilter']->groupsSelected) { if ($this->data['type'] == SHOW_DATA) { $dataTable = getItemsDataOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $this->data['view_style']); } elseif ($this->data['type'] == SHOW_TRIGGERS) { global $page; $dataTable = getTriggersOverview(array_keys($this->data['pageFilter']->hosts), $this->data['pageFilter']->application, $page['file'], $this->data['view_style']); }
function file_actions($link_ID) { /** * @var File */ global $current_File; global $edited_Item, $current_User; $r = ''; if (isset($current_File)) { $title = T_('Locate this file!'); $r = $current_File->get_linkedit_link($edited_Item->ID, get_icon('locate', 'imgtag', array('title' => $title)), $title) . ' '; } if ($current_User->check_perm('item', 'edit', false, $edited_Item)) { // Check that we have permission to edit item: $r .= action_icon(T_('Delete this link!'), 'unlink', regenerate_url('p,itm_ID,action', "link_ID={$link_ID}&action=unlink")); } return $r; }
<div class="evo_post_details_header"> <?php if ($Item->status != 'published') { $Item->format_status(array('template' => '<div class="floatright"><span class="note status_$status$"><span>$status_title$</span></span></div>')); } echo '<div class="action_right">'; // Link for editing $Item->edit_link(array('before' => '', 'after' => '', 'title' => T_('Edit title/description...'))); if (!$Item->is_intro()) { // Permalink: $Item->permanent_link(array('before' => '', 'after' => '', 'text' => '<i class="fa fa-external-link"></i> ' . T_('Permalink'))); } // Link to comments, trackbacks, etc.: $Item->feedback_link(array('type' => 'feedbacks', 'link_before' => '', 'link_after' => '', 'link_text_zero' => get_icon('nocomment'), 'link_text_one' => '1 ' . get_icon('comments'), 'link_text_more' => T_('%d ') . get_icon('comments'), 'link_title' => '#')); echo '</div>'; ?> <h3 class="evo_post_title linked"><?php if (!$Item->is_intro()) { $permalink_title = 'permalink'; } else { $permalink_title = ''; } $Item->title(array('link_type' => $permalink_title)); ?> </h3> <?php if (!$Item->is_intro()) {
echo "<td class='filemantext' style='white-space:nowrap' onmouseover='this.style.cursor=\"hand\";'><a href='".$urlpath."?rootpath=".$dirpath."/".$dirlist[$i]."'>".$dirlist[$i]."</a></td>"; echo "<td align='left' class='filemantext'>".dirsize($dirpath."/".$dirlist[$i])."</td>"; echo "<td align='left' class='filemantext'>Folder</td>"; echo "<td align='left' class='filemantext'>".lastaccess($dirpath."/".$dirlist[$i], "E1")."</td>"; echo "<td align='center' class='filemantext' >".get_perms($dirpath."/".$dirlist[$i])."</td>"; echo "<td align='left' class='filemantext'>"; echo "<a href='".$urlpath."?action=delete&workpath=".$dirpath."&file=".$dirpath."/".$dirlist[$i]."'>$deleteimg</a>"; echo "<a href='".$urlpath."?action=rename&workpath=".$dirpath."&file=".$dirpath."/".$dirlist[$i]."'>$renameimg</a> "; //echo "<a href='".$urlpath."?rootpath=".$dirpath."/".$dirlist[$i]."'>ChDr</a> "; echo "</td></tr>"; } //Get file info and details for ($i=0;$i<Count($filelist);$i++) { echo "<tr>"; $file = $dirpath."/".$filelist[$i]; $icon = get_icon($dirpath."/".$filelist[$i]); echo "<td width='4%' align='center'><img src=$pathtoimages$icon></td>"; echo "<td class='filemantext' style='white-space:nowrap' onmouseover='this.style.cursor=\"hand\";'><a href='".$rootURL."/$filelist[$i]'>".$filelist[$i]."</a></td>"; echo "<td align='left' class='filemantext'>".myfilesize($file)."</td>"; echo "<td align='left' class='filemantext'>".$mimetype->getType($file)."</td>"; echo "<td align='left' class='filemantext'>".lastaccess($file, "E1")."</td>"; echo "<td align='center' class='filemantext' >".get_perms($file)."</td>"; echo "<td align='left' class='filemantext' >"; if (is_viewable_file($file)) echo "<a href='".$rootURL."/".$filelist[$i]."' target='_blank' >$viewimg</a> "; if (is_editable_file($dirpath."/".$filelist[$i])) echo "<a href='".$urlpath."?action=edit&workpath=".$dirpath."&file=".$filelist[$i]."'>$editimg</a> "; echo "<a href='".$urlpath."?action=delete&workpath=".$dirpath."&file=".$dirpath."/".$filelist[$i]."'>$deleteimg</a> "; echo "<a href='".$urlpath."?action=rename&workpath=".$dirpath."&file=".$dirpath."/".$filelist[$i]."'>$renameimg</a> "; echo "<a href='".$urlpath."?action=download&file=".$dirpath."/".$filelist[$i]."'>$downimg</a> "; echo "</tr>";
} // Create result set: $SQL = new SQL(); $SQL->SELECT('T_skins__skin.*, COUNT( DISTINCT( cset_coll_ID ) ) AS nb_blogs'); $SQL->FROM('T_skins__skin LEFT JOIN T_coll_settings ON skin_ID = cset_value AND ( cset_name = "normal_skin_ID" OR cset_name = "mobile_skin_ID" OR cset_name = "tablet_skin_ID" )'); $SQL->GROUP_BY('skin_ID'); $CountSQL = new SQL(); $CountSQL->SELECT('COUNT( * )'); $CountSQL->FROM('T_skins__skin'); $Results = new Results($SQL->get(), 'skin_', '', NULL, $CountSQL->get()); $Results->Cache =& get_SkinCache(); $Results->title = T_('Installed skins') . get_manual_link('installed_skins'); if ($current_User->check_perm('options', 'edit', false)) { // We have permission to modify: $Results->cols[] = array('th' => T_('Name'), 'order' => 'skin_name', 'td' => '<strong><a href="' . regenerate_url('', 'skin_ID=$skin_ID$&action=edit') . '" title="' . TS_('Edit skin properties...') . '">$skin_name$</a></strong>'); } else { // We have NO permission to modify: $Results->cols[] = array('th' => T_('Name'), 'order' => 'skin_name', 'td' => '<strong>$skin_name$</strong>'); } $Results->cols[] = array('th' => T_('Skin type'), 'order' => 'skin_type', 'td_class' => 'center', 'td' => '$skin_type$'); $Results->cols[] = array('th' => T_('Blogs'), 'order' => 'nb_blogs', 'th_class' => 'shrinkwrap', 'td_class' => 'center', 'td' => '~conditional( (#nb_blogs# > 0), #nb_blogs#, \' \' )~'); $Results->cols[] = array('th' => T_('Skin Folder'), 'order' => 'skin_folder', 'td' => '$skin_folder$'); if ($current_User->check_perm('options', 'edit', false)) { // We have permission to modify: $Results->cols[] = array('th' => T_('Actions'), 'th_class' => 'shrinkwrap', 'td_class' => 'shrinkwrap', 'td' => action_icon(TS_('Edit skin properties...'), 'properties', '%regenerate_url( \'\', \'skin_ID=$skin_ID$&action=edit\')%') . action_icon(TS_('Reload containers!'), 'reload', '%regenerate_url( \'\', \'skin_ID=$skin_ID$&action=reload&' . url_crumb('skin') . '\')%') . '~conditional( #nb_blogs# < 1, \'' . action_icon(TS_('Uninstall this skin!'), 'delete', '%regenerate_url( \'\', \'skin_ID=$skin_ID$&action=delete&' . url_crumb('skin') . '\')%') . '\', \'' . get_icon('delete', 'noimg') . '\' )~'); $Results->global_icon(T_('Install new skin...'), 'new', regenerate_url('action,blog', 'action=new'), T_('Install new'), 3, 4); } // $fadeout_array = array( 'skin_ID' => array(6) ); $fadeout_array = NULL; $Results->display(NULL, 'session');
$show_triggers = $_REQUEST['show_triggers']; $show_events = $_REQUEST['show_events']; $show_severity = $_REQUEST['show_severity']; $ack_status = $_REQUEST['ack_status']; // -------------- validate_sort_and_sortorder('lastchange', ZBX_SORT_DOWN); $mute = CProfile::get('web.tr_status.mute', 0); if (isset($audio) && !$mute) { play_sound($audio); } $trigg_wdgt = new CWidget(); $r_form = new CForm(null, 'get'); $r_form->addItem(array(S_GROUP . SPACE, $pageFilter->getGroupsCB(true))); $r_form->addItem(array(SPACE . S_HOST . SPACE, $pageFilter->getHostsCB(true))); $r_form->addVar('fullscreen', $_REQUEST['fullscreen']); $fs_icon = get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])); $trigg_wdgt->addPageHeader(S_STATUS_OF_TRIGGERS_BIG . ' [' . date(S_DATE_FORMAT_YMDHMS) . ']', array($fs_icon)); $numrows = new CDiv(); $numrows->setAttribute('name', 'numrows'); $trigg_wdgt->addHeader(S_TRIGGERS_BIG, $r_form); $trigg_wdgt->addHeader($numrows); /************************* FILTER **************************/ /***********************************************************/ $filterForm = new CFormTable(null, null, 'get'); //,'tr_status.php?filter_set=1','POST',null,'sform'); $filterForm->setAttribute('name', 'zbx_filter'); $filterForm->setAttribute('id', 'zbx_filter'); $filterForm->addVar('fullscreen', $_REQUEST['fullscreen']); $filterForm->addVar('groupid', $_REQUEST['groupid']); $filterForm->addVar('hostid', $_REQUEST['hostid']); $tr_select = new CComboBox('show_triggers', $show_triggers);