/** * Issue browser warnings for non-supported browsers. * Uses the {@link $browser_warning_in_header} option to determine where to * show the warning. Only display is * {@link PAGE_TEMPLATE_OPTIONS::$check_browser} is true. * @param PAGE_TEMPLATE_OPTIONS $options * @param boolean $in_header True is rendering in the header. * @access private */ protected function _handle_browser_warnings($options, $in_header) { if (!($in_header ^ $this->browser_warning_in_header) && $options->check_browser && !$this->browser_supported()) { include_once 'webcore/util/options.php'; $opt_ignore_warning = new STORED_OPTION($this->page, "ignore_browser_warning"); if (!$opt_ignore_warning->value()) { $res = $this->page->resources(); echo $this->page->get_begin_message('info', 'div'); if ($options->browser_url) { $browser_url = $res->resolve_file($options->browser_url); ?> <p>Your browser may have trouble rendering this page. See <a href="<?php echo $browser_url; ?> ">supported browsers</a> for more information.</p> <?php } else { ?> <p>Your browser may have trouble rendering this page. To avoid any issues, please use <a href="http://opera.com">Opera</a> <a href="http://google.com/chrome">Chrome</a>, <a href="http://getfirefox.com">FireFox</a>, <a href="http://apple.com/safari">Safari</a> or any other modern, standards-compliant browser.</p> <?php } $url = $opt_ignore_warning->setter_url_as_html(!$opt_ignore_warning->value()); ?> <p> <input id="ignore_browser_warning" type="checkbox" value="<?php echo $opt_ignore_warning->value(); ?> " onclick="window.location='<?php echo $url; ?> '"> <label for="ignore_browser_warning">Do not show this message again.</label> </p> <?php echo $this->page->get_end_message('div'); } } }
$form->process_existing($folder); if ($form->committed()) { $App->return_to_referer($folder->home_page()); } $Page->title->add_object($folder); $Page->title->subject = $subscriber_query->size() . ' subscribers'; $Page->location->add_folder_link($folder); $Page->location->append($Page->title->subject, '', '{icons}buttons/subscriptions'); $Page->start_display(); $folders = $folder_query->tree(); ?> <div class="top-box"> <div class="button-content"> <?php include_once 'webcore/util/options.php'; $option = new STORED_OPTION($App, 'show_security_tree'); $show_tree = $option->value(); $opt_link = $option->setter_url_as_html(!$show_tree); if (!$show_tree) { $icon = '{icons}buttons/show_list'; $caption = 'Show folders'; } else { $icon = '{icons}buttons/close'; $caption = 'Hide folders'; } ?> <a href="<?php echo $opt_link; ?> " class="button"><?php echo $Page->get_icon_with_text($icon, Sixteen_px, $caption);
$App->set_search_text(read_var('search_text')); $entry_info = $entry->type_info(); /** @var $location_renderer LOCATION_RENDERER */ $location_renderer = $entry->handler_for(Handler_location); $location_renderer->add_to_page_as_text($Page, $entry); /** @var $navigator OBJECT_NAVIGATOR */ $navigator = $entry->handler_for(Handler_navigator); $navigator->set_query($entry_query); $navigator->set_selected($id); $show_entry_list = false; $show_links = false; $opt_link = ''; $has_multiple_entries = $navigator->size() > 1; if ($has_multiple_entries) { include_once 'webcore/util/options.php'; $option = new STORED_OPTION($App, "show_{$entry_info->id}_list"); $show_entry_list = $option->value(); $opt_link = $option->setter_url_as_html(!$show_entry_list); $show_links = $navigator->size() > 1 && $show_entry_list; } $Page->start_display(); ?> <div class="top-box"> <?php if ($has_multiple_entries) { echo '<div class="object-navigator">'; if ($show_links) { ?> <div class="links"> <?php echo $navigator->list_near_selected();
$entry_type_info: TYPE_INFO */ $folder_query = $App->login->folder_query(); /** @var $folder FOLDER */ $folder = $folder_query->object_at_id(read_var('id')); if (!isset($folder)) { $Env->redirect_local('select_folder.php?page_name=' . urlencode($Env->url(Url_part_name | Url_part_ext))); } else { if ($App->login->is_allowed(Privilege_set_entry, Privilege_create, $folder)) { $class_name = $App->final_class_name('ENTRY_FORM', 'webcore/forms/object_in_folder_form.php', $entry_type_info->id); /** @var $form ENTRY_FORM */ $form = new $class_name($folder); $entry = $folder->new_object($entry_type_info->id); include_once 'webcore/util/options.php'; $opt_stay_on_page = new STORED_OPTION($App, "stay_on_{$entry_type_info->id}_page"); $opt_stay_on_page->add_argument('id', $folder->id); $form->process_new($entry); if ($form->committed()) { if ($form->is_field('quick_save') && $form->value_for('quick_save')) { $Env->redirect_local($entry_type_info->edit_page . '?id=' . $entry->id); } else { if ($opt_stay_on_page->value()) { $url = new URL($folder->home_page()); $url->replace_name_and_extension($Env->url(Url_part_file_name)); $url->add_argument('last_id', $entry->id); $Env->redirect_local($url->as_text()); } else { $Env->redirect_local($entry->home_page()); } }
$security = $folder->security_definition(); $security->load_all_permissions(); $Page->title->add_object($folder); $Page->title->subject = 'Permissions'; $Page->location->add_folder_link($folder); $Page->location->append("Permissions", '', '{icons}buttons/security'); $Page->start_display(); $defined = $folder->defines_security(); $parent = $folder->parent_folder(); $formatter = new PERMISSIONS_FORMATTER($App); $privilege_groups = $formatter->content_privilege_groups(); include_once 'webcore/util/options.php'; $tree_option = new STORED_OPTION($App, 'show_security_tree'); $show_tree = $tree_option->value(); $tree_opt_link = $tree_option->setter_url_as_html(!$show_tree); $details_option = new STORED_OPTION($App, 'show_full_permissions'); $show_details = $details_option->value(); $details_opt_link = $details_option->setter_url_as_html(!$show_details); $menu = $App->make_menu(); if ($defined) { if ($App->login->is_allowed(Privilege_set_user, Privilege_view)) { $menu->append('Add user...', 'create_folder_user_permissions.php?id=' . $folder->id, '{icons}buttons/add'); } if ($App->login->is_allowed(Privilege_set_group, Privilege_view)) { $menu->append('Add group...', 'create_folder_group_permissions.php?id=' . $folder->id, '{icons}buttons/add'); } } if ($folder->defines_security()) { $menu->append('Delete...', 'create_folder_permissions.php?id=' . $folder->id, '{icons}buttons/delete'); } else { $menu->append('Define permissions...', 'create_folder_permissions.php?id=' . $folder->id, '{icons}buttons/create');