示例#1
0
/**
 * Get a do-next manager for bookings.
 *
 * @return tempcode	Booking do-next manager.
 */
function booking_do_next()
{
    require_lang('calendar');
    require_code('templates_donext');
    require_code('fields');
    return do_next_manager(get_page_title('BOOKINGS'), comcode_lang_string('DOC_BOOKING'), array(has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_booking') ? array('bookable', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_BOOKABLE')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_booking') ? array('bookable', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_BOOKABLE')) : NULL, has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_booking') ? array('supplement', array('_SELF', array('type' => 'av'), '_SELF'), do_lang('ADD_BOOKABLE_SUPPLEMENT')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_booking') ? array('supplement', array('_SELF', array('type' => 'ev'), '_SELF'), do_lang('EDIT_BOOKABLE_SUPPLEMENT')) : NULL, has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_booking') ? array('blacked', array('_SELF', array('type' => 'ac'), '_SELF'), do_lang('ADD_BOOKABLE_BLACKED')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_booking') ? array('blacked', array('_SELF', array('type' => 'ec'), '_SELF'), do_lang('EDIT_BOOKABLE_BLACKED')) : NULL, has_specific_permission(get_member(), 'submit_highrange_content', 'cms_booking') ? array('booking', array('_SELF', array('type' => 'ab'), '_SELF'), do_lang('ADD_BOOKING')) : NULL, has_specific_permission(get_member(), 'edit_highrange_content', 'cms_booking') ? array('booking', array('_SELF', array('type' => 'eb'), '_SELF'), do_lang('EDIT_BOOKING')) : NULL, has_actual_page_access(get_member(), 'calendar') ? array('calendar', array('calendar', array('type' => 'misc', 'view' => 'month'), '_SEARCH'), do_lang('CALENDAR')) : NULL), do_lang('BOOKINGS'));
}
示例#2
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_lang('menus');
     $also_url = build_url(array('page' => 'cms_chat'), get_module_zone('cms_chat'));
     attach_message(do_lang_tempcode('ALSO_SEE_CMS', escape_html($also_url->evaluate())), 'inform');
     $this->add_one_label = do_lang_tempcode('ADD_CHATROOM');
     $this->edit_this_label = do_lang_tempcode('EDIT_THIS_CHATROOM');
     $this->edit_one_label = do_lang_tempcode('EDIT_CHATROOM');
     require_code('templates_donext');
     return do_next_manager(get_page_title('MANAGE_CHATROOMS'), comcode_lang_string('DOC_CHAT'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_CHATROOM')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_CHATROOM')), array('delete', array('_SELF', array('type' => 'delete_all'), '_SELF'), do_lang('DELETE_ALL_ROOMS'))), do_lang('MANAGE_CHATROOMS'));
 }
示例#3
0
/**
 * Get the tempcode for a do next manager. A do next manager is a series of linked icons that are presented after performing an action. Modules that do not use do-next pages, usually use REFRESH_PAGE's.
 *
 * @param  ID_TEXT		The title of what we are doing (a language string)
 * @param  ?mixed			The language code for the docs of the hook defined do-next manager that we're creating OR tempcode for it (NULL: none)
 * @param  ID_TEXT		The menu 'type' we are doing (filters out any icons that don't match it)
 * @param  ?string		The title to use for the main links (a language string) (NULL: same as title)
 * @return tempcode		The do next manager
 */
function do_next_manager_hooked($title, $text, $type, $main_title = NULL)
{
    $links = array();
    if (is_null($main_title)) {
        $main_title = $title;
    }
    breadcrumb_set_self(do_lang_tempcode($title));
    $hooks = find_all_hooks('systems', 'do_next_menus');
    foreach (array_keys($hooks) as $hook) {
        require_code('hooks/systems/do_next_menus/' . filter_naughty_harsh($hook));
        $object = object_factory('Hook_do_next_menus_' . filter_naughty_harsh($hook), true);
        if (is_null($object)) {
            continue;
        }
        $info = $object->run(true);
        foreach ($info as $i) {
            if (is_null($i)) {
                continue;
            }
            if ($i[0] == $type) {
                array_shift($i);
                $links[] = $i;
            }
        }
    }
    global $M_SORT_KEY;
    $M_SORT_KEY = 2;
    @usort($links, 'multi_sort');
    if (!is_null($text)) {
        if (strpos($text, ' ') === false) {
            $_text = comcode_lang_string($text);
        } else {
            $_text = make_string_tempcode($text);
        }
    } else {
        $_text = new ocp_tempcode();
    }
    return do_next_manager(is_null($text) ? NULL : get_page_title($title), $_text, $links, do_lang($main_title));
}
示例#4
0
 /**
  * The do-next manager for after banner content management.
  *
  * @param  tempcode		The title (output of get_page_title)
  * @param  tempcode		Some description to show, saying what happened
  * @param  ?AUTO_LINK	The ID of whatever was just handled (NULL: N/A)
  * @param  ID_TEXT		The type ID we were working in (NULL: N/A)
  * @return tempcode		The UI
  */
 function _do_next_manager($title, $description, $id, $type)
 {
     require_code('templates_donext');
     breadcrumb_set_self(do_lang_tempcode('DONE'));
     if (is_null($id) && is_null($type)) {
         return do_next_manager($title, $description, NULL, NULL, array('_SELF', array('type' => 'ad'), '_SELF', do_lang_tempcode('ADD_BANNER')), NULL, has_specific_permission(get_member(), 'edit_own_lowrange_content', 'cms_banners') ? array('_SELF', array('type' => 'ed'), '_SELF', do_lang_tempcode('EDIT_BANNER')) : NULL, NULL, NULL, NULL, has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_banners') ? array('_SELF', array('type' => 'ac'), '_SELF', do_lang_tempcode('ADD_BANNER_TYPE')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_banners') ? array('_SELF', array('type' => 'ec'), '_SELF', do_lang_tempcode('EDIT_BANNER_TYPE')) : NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, do_lang_tempcode('BANNER_TYPES'));
     }
     return do_next_manager($title, $description, NULL, NULL, array('_SELF', array('type' => 'ad', 'b_type' => $type), '_SELF', do_lang_tempcode('ADD_BANNER')), is_null($id) || !has_specific_permission(get_member(), 'edit_own_lowrange_content', 'cms_banners') ? NULL : array('_SELF', array('type' => '_ed', 'id' => $id), '_SELF', do_lang_tempcode('EDIT_THIS_BANNER')), has_specific_permission(get_member(), 'edit_own_lowrange_content', 'cms_banners') ? array('_SELF', array('type' => 'ed'), '_SELF', do_lang_tempcode('EDIT_BANNER')) : NULL, is_null($id) ? NULL : array('banners', array('type' => 'view', 'source' => $id), get_module_zone('banners')), array('admin_banners', array('type' => 'misc'), get_module_zone('admin_banners')), NULL, has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_banners') ? array('_SELF', array('type' => 'ac'), '_SELF', do_lang_tempcode('ADD_BANNER_TYPE')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_banners') ? array('_SELF', array('type' => 'ec'), '_SELF', do_lang_tempcode('EDIT_BANNER_TYPE')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_banners') ? array('_SELF', array('type' => '_ec', 'id' => $type), '_SELF') : NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, do_lang_tempcode('BANNER_TYPES'));
 }
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('MULTI_MODERATIONS'), comcode_lang_string('DOC_MULTI_MODERATIONS'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_MULTI_MODERATION')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_MULTI_MODERATION'))), do_lang('MULTI_MODERATIONS'));
 }
示例#6
0
 /**
  * The do-next manager for order module
  * 
  * @return tempcode		The UI
  */
 function misc()
 {
     breadcrumb_set_self(do_lang_tempcode('ORDERS'));
     breadcrumb_set_parents(array(array('_SEARCH:admin_ecommerce:ecom_usage', do_lang_tempcode('ECOMMERCE'))));
     require_code('templates_donext');
     return do_next_manager(get_page_title('ORDERS'), comcode_lang_string('DOC_ECOMMERCE'), array(array('show_orders', array('_SELF', array('type' => 'show_orders'), '_SELF'), do_lang('SHOW_ORDERS')), array('undispatched', array('_SELF', array('type' => 'show_orders', 'filter' => 'undispatched'), '_SELF'), do_lang('UNDISPATCHED_ORDERS'))), do_lang('ORDERS'));
 }
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     breadcrumb_set_parents(array(array('_SEARCH:admin_ocf_join:menu', do_lang_tempcode('MEMBERS'))));
     require_code('templates_donext');
     return do_next_manager(get_page_title('CUSTOM_PROFILE_FIELDS'), comcode_lang_string('DOC_CUSTOM_PROFILE_FIELDS'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_CUSTOM_PROFILE_FIELD')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_CUSTOM_PROFILE_FIELD'))), do_lang('CUSTOM_PROFILE_FIELDS'));
 }
示例#8
0
 /**
  * The do-next manager for after content management.
  *
  * @param  tempcode		The title (output of get_page_title)
  * @param  tempcode		Some description to show, saying what happened
  * @param  ?ID_TEXT		The ID of whatever we are working with (NULL: deleted)
  * @return tempcode		The UI
  */
 function do_next_manager($title, $description, $id)
 {
     $archive_url = NULL;
     if (!is_null($this->archive_entry_point)) {
         list($zone, $attributes, ) = page_link_decode($this->archive_entry_point);
         $page = $attributes['page'];
         unset($attributes['page']);
         $archive_url = array($page, $attributes, $zone, !isset($this->archive_label) ? NULL : do_lang_tempcode($this->archive_label));
     }
     $view_url = NULL;
     if (!is_null($this->view_entry_point)) {
         list($zone, $attributes, ) = page_link_decode(str_replace('_ID', $id, $this->view_entry_point));
         $page = $attributes['page'];
         unset($attributes['page']);
         $view_url = array($page, $attributes, $zone, !isset($this->view_label) ? NULL : $this->view_label);
     }
     breadcrumb_set_self(do_lang_tempcode('DONE'));
     require_code('templates_donext');
     return do_next_manager($title, $description, NULL, NULL, $this->do_next_editing_categories ? NULL : array('_SELF', array('type' => 'a' . $this->type_code), '_SELF', !is_null($this->add_one_label) ? $this->add_one_label : NULL), $this->do_next_editing_categories ? NULL : (is_null($id) || !is_null($this->permissions_require) && !has_specific_permission(get_member(), 'edit_own_' . $this->permissions_require . 'range_content', is_null($this->permission_page_name) ? get_page_name() : $this->permission_page_name) ? NULL : array('_SELF', array('type' => '_e' . $this->type_code, 'id' => $id), '_SELF', !is_null($this->edit_this_label) ? $this->edit_this_label : NULL)), $this->do_next_editing_categories ? NULL : (!is_null($this->permissions_require) && !has_specific_permission(get_member(), 'edit_own_' . $this->permissions_require . 'range_content', is_null($this->permission_page_name) ? get_page_name() : $this->permission_page_name) ? NULL : array('_SELF', array('type' => 'e' . $this->type_code), '_SELF', !is_null($this->edit_one_label) ? $this->edit_one_label : NULL)), $this->do_next_editing_categories ? NULL : is_null($id) ? NULL : $view_url, $archive_url, NULL, !$this->do_next_editing_categories ? NULL : array('_SELF', array('type' => 'a' . $this->type_code), '_SELF', !is_null($this->add_one_cat_label) ? $this->add_one_cat_label : NULL), !$this->do_next_editing_categories ? NULL : (!is_null($this->permissions_require) && !has_specific_permission(get_member(), 'edit_own_' . $this->permissions_require . 'range_content', is_null($this->permission_page_name) ? get_page_name() : $this->permission_page_name) ? NULL : array('_SELF', array('type' => 'e' . $this->type_code), '_SELF', !is_null($this->edit_one_cat_label) ? $this->edit_one_cat_label : NULL)), !$this->do_next_editing_categories ? NULL : (is_null($id) || !is_null($this->permissions_require) && !has_specific_permission(get_member(), 'edit_own_' . $this->permissions_require . 'range_content', is_null($this->permission_page_name) ? get_page_name() : $this->permission_page_name) ? NULL : array('_SELF', array('type' => '_e' . $this->type_code, 'id' => $id), '_SELF', !is_null($this->edit_this_cat_label) ? $this->edit_this_cat_label : NULL)), !$this->do_next_editing_categories ? NULL : $view_url, $this->extra_donext_entries, $this->extra_donext_categories, $this->extra_donext_whatever, $this->extra_donext_whatever_title, NULL, $this->entries_title, $this->categories_title);
 }
示例#9
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     require_lang('ocdeadpeople');
     return do_next_manager(get_page_title('OCDEADPEOPLE_TITLE'), comcode_lang_string('DOC_OCDEADPEOPLE'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_DISEASE')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_DISEASE'))), do_lang('OCDEADPEOPLE_TITLE'));
 }
示例#10
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('MANAGE_AWARDS'), comcode_lang_string('DOC_AWARDS'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_AWARD_TYPE')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_AWARD_TYPE'))), do_lang('MANAGE_AWARDS'));
 }
示例#11
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/statistics';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_statistics';
     require_code('templates_donext');
     $test = $GLOBALS['SITE_DB']->query_value('ip_country', 'COUNT(*)');
     $actions = array(array('statistics', array('_SELF', array('type' => 'overview'), '_SELF'), do_lang('OVERVIEW_STATISTICS'), 'DESCRIPTION_OVERVIEW_STATISTICS'), array('page_views', array('_SELF', array('type' => 'page'), '_SELF'), do_lang('PAGES_STATISTICS'), 'DOC_PAGE_STATISTICS'), array('users_online', array('_SELF', array('type' => 'users_online'), '_SELF'), do_lang('USERS_ONLINE_STATISTICS'), 'DOC_USERS_ONLINE_STATISTICS'), array('submits', array('_SELF', array('type' => 'submission_rates'), '_SELF'), do_lang('SUBMISSION_STATISTICS'), 'DOC_SUBMISSION_STATISTICS'), array('load_times', array('_SELF', array('type' => 'load_times'), '_SELF'), do_lang('LOAD_TIMES'), 'DOC_LOAD_TIMES'), array('top_referrers', array('_SELF', array('type' => 'referrers'), '_SELF'), do_lang('TOP_REFERRERS'), 'DOC_TOP_REFERRERS'), array('top_keywords', array('_SELF', array('type' => 'keywords'), '_SELF'), do_lang('TOP_SEARCH_KEYWORDS'), 'DOC_TOP_SEARCH_KEYWORDS'));
     $hooks = find_all_hooks('modules', 'admin_stats');
     foreach (array_keys($hooks) as $hook) {
         require_code('hooks/modules/admin_stats/' . filter_naughty_harsh($hook));
         $ob = object_factory('Hook_admin_stats_' . filter_naughty_harsh($hook), true);
         if (is_null($ob)) {
             continue;
         }
         $info = $ob->info();
         if (!is_null($info)) {
             $actions = array_merge($actions, array($info[1]));
         }
     }
     if ($test == 0) {
         $actions[] = array('geolocate', array('_SELF', array('type' => 'install_data'), '_SELF'), do_lang('INSTALL_GEOLOCATION_DATA'), 'DOC_INSTALL_GEOLOCATION_DATA');
     }
     $actions[] = array('clear_stats', array('_SELF', array('type' => 'clear'), '_SELF'), do_lang('CLEAR_STATISTICS'), do_lang_tempcode('DESCRIPTION_CLEAR_STATISTICS'));
     return do_next_manager(get_page_title('SITE_STATISTICS'), comcode_lang_string('DOC_STATISTICS'), $actions, do_lang('SITE_STATISTICS'));
 }
示例#12
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     require_lang('workflows');
     return do_next_manager(get_page_title('MANAGE_WORKFLOWS'), comcode_to_tempcode(do_lang('DOC_WORKFLOWS'), NULL, true), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_WORKFLOW')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_WORKFLOW'))), do_lang('MANAGE_WORKFLOWS'));
 }
示例#13
0
 /**
  * The do-next manager for after author content management.
  *
  * @param  tempcode		The title (output of get_page_title)
  * @param  tempcode		Some description to show, saying what happened
  * @param  ?SHORT_TEXT	The author we were working with (NULL: not working with one)
  * @return tempcode		The UI
  */
 function do_next_manager($title, $description, $author = NULL)
 {
     breadcrumb_set_self(do_lang_tempcode('DONE'));
     require_code('templates_donext');
     return do_next_manager($title, $description, NULL, NULL, has_specific_permission(get_member(), 'edit_midrange_content', 'cms_authors') ? array('_SELF', array('type' => '_ad', 'author' => ''), '_SELF') : NULL, is_null($author) ? NULL : array('_SELF', array('type' => '_ad', 'author' => $author), '_SELF'), has_specific_permission(get_member(), 'edit_midrange_content', 'cms_authors') ? array('_SELF', array('type' => 'ed'), '_SELF') : NULL, is_null($author) ? NULL : array('authors', array('type' => 'misc', 'id' => $author), get_module_zone('authors')), NULL, NULL, NULL, NULL, NULL, NULL, array(has_specific_permission(get_member(), 'delete_midrange_content', 'cms_authors') ? array('merge', array('_SELF', array('type' => 'ed'), '_SELF')) : NULL));
 }
示例#14
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('MANAGE_IOTDS'), comcode_lang_string('DOC_IOTDS'), array(has_specific_permission(get_member(), 'submit_midrange_content', 'cms_iotds') ? array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_IOTD')) : NULL, has_specific_permission(get_member(), 'edit_own_midrange_content', 'cms_iotds') ? array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_OR_CHOOSE_IOTD')) : NULL), do_lang('MANAGE_IOTDS'));
 }
示例#15
0
 /**
  * The actualiser for adding a member.
  *
  * @return tempcode		The UI
  */
 function step2()
 {
     $title = get_page_title('ADD_MEMBER');
     // Read in data
     $username = trim(post_param('username'));
     $password = trim(post_param('password'));
     /*	$password_confirm=trim(post_param('password_confirm'));
     		if ($password!=$password_confirm) warn_exit(make_string_tempcode(escape_html(do_lang('PASSWORD_MISMATCH'))));*/
     $email_address = trim(post_param('email_address', ''));
     $dob_day = post_param_integer('dob_day', NULL);
     $dob_month = post_param_integer('dob_month', NULL);
     $dob_year = post_param_integer('dob_year', NULL);
     $reveal_age = post_param_integer('reveal_age', 0);
     $timezone = post_param('timezone', get_site_timezone());
     $language = post_param('language', get_site_default_lang());
     $allow_emails = post_param_integer('allow_emails', 0);
     $allow_emails_from_staff = post_param_integer('allow_emails_from_staff', 0);
     $custom_fields = ocf_get_all_custom_fields_match(ocf_get_all_default_groups(true));
     $actual_custom_fields = ocf_read_in_custom_fields($custom_fields);
     $validated = post_param_integer('validated', 0);
     $primary_group = has_specific_permission(get_member(), 'assume_any_member') ? post_param_integer('primary_group') : NULL;
     $theme = post_param('theme', '');
     $views_signatures = post_param_integer('views_signatures', 0);
     $preview_posts = post_param_integer('preview_posts', 0);
     $auto_monitor_contrib_content = post_param_integer('auto_monitor_contrib_content', 0);
     $pt_allow = array_key_exists('pt_allow', $_POST) ? implode(',', $_POST['pt_allow']) : '';
     $tmp_groups = $GLOBALS['OCF_DRIVER']->get_usergroup_list(true, true);
     $all_pt_allow = '';
     foreach (array_keys($tmp_groups) as $key) {
         if ($key != db_get_first_id()) {
             if ($all_pt_allow != '') {
                 $all_pt_allow .= ',';
             }
             $all_pt_allow .= strval($key);
         }
     }
     if ($pt_allow == $all_pt_allow) {
         $pt_allow = '*';
     }
     $pt_rules_text = post_param('pt_rules_text', '');
     breadcrumb_set_parents(array(array('_SEARCH:admin_ocf_join:menu', do_lang_tempcode('MEMBERS')), array('_SELF:_SELF:misc', do_lang_tempcode('ADD_MEMBER'))));
     breadcrumb_set_self(do_lang_tempcode('DETAILS'));
     // Add member
     $id = ocf_make_member($username, $password, $email_address, NULL, $dob_day, $dob_month, $dob_year, $actual_custom_fields, $timezone, $primary_group, $validated, time(), NULL, '', NULL, '', 0, $preview_posts, $reveal_age, '', '', '', $views_signatures, $auto_monitor_contrib_content, $language, $allow_emails, $allow_emails_from_staff, '', '', '', true, '', '', post_param_integer('zone_wide', 0), NULL, NULL, post_param_integer('highlighted_name', 0), $pt_allow, $pt_rules_text);
     // Secondary groups
     if (array_key_exists('secondary_groups', $_POST)) {
         require_code('ocf_groups_action2');
         $members_groups = array();
         $group_count = $GLOBALS['FORUM_DB']->query_value('f_groups', 'COUNT(*)');
         $groups = list_to_map('id', $GLOBALS['FORUM_DB']->query_select('f_groups', array('*'), $group_count > 200 ? array('g_is_private_club' => 0) : NULL));
         foreach ($_POST['secondary_groups'] as $group_id) {
             $group = $groups[intval($group_id)];
             if ($group['g_hidden'] == 1 && !in_array($group['id'], $members_groups) && !has_specific_permission(get_member(), 'see_hidden_groups')) {
                 continue;
             }
             if (in_array($group['id'], $members_groups) || has_specific_permission(get_member(), 'assume_any_member') || $group['g_open_membership'] == 1) {
                 ocf_add_member_to_group($id, $group['id']);
             }
         }
     }
     $special_links = array();
     if (addon_installed('galleries')) {
         require_lang('galleries');
         $special_links[] = array('galleries', array('cms_galleries', array('type' => 'gimp', 'id' => $id), get_module_zone('cms_galleries')), do_lang('ADD_GALLERY'));
     }
     require_code('templates_donext');
     return do_next_manager($title, do_lang_tempcode('SUCCESS'), NULL, NULL, array('_SELF', array('type' => 'misc'), '_SELF'), NULL, NULL, array('members', array('type' => 'view', 'id' => $id), get_module_zone('members')), array('members', array('type' => 'misc'), get_module_zone('members'), do_lang_tempcode('MEMBERS')), NULL, NULL, NULL, NULL, NULL, $special_links, NULL, NULL, NULL, NULL, do_lang_tempcode('MEMBERS'));
 }
示例#16
0
 /**
  * The do-next manager for after download content management.
  *
  * @param  tempcode			The title (output of get_page_title)
  * @param  tempcode			Some description to show, saying what happened
  * @param  ID_TEXT			The theme that was just handled
  * @param  ?LANGUAGE_NAME  The language we were working in (NULL: autodetect) (blank: autodetect)
  * @param  ID_TEXT			Code to determine what kind of links to show
  * @param  ID_TEXT			ID of file that an edit link should load (blank: N/A)
  * @return tempcode			The UI
  */
 function do_next_manager($title, $description, $theme, $lang, $type, $file)
 {
     breadcrumb_set_self(do_lang_tempcode('DONE'));
     if (is_null($lang)) {
         $lang = '';
     }
     switch ($type) {
         case 'css':
             $add_one = NULL;
             $edit_this = array('_SELF', array('type' => 'edit_css', 'file' => str_replace('/css/', '/css_custom/', $file), 'theme' => $theme), '_SELF');
             $edit_one = array('_SELF', array('type' => 'choose_css', 'theme' => $theme), '_SELF');
             $section_title = do_lang_tempcode('CSS');
             break;
         case 'templates':
             $add_one = NULL;
             $edit_this = array('_SELF', array('type' => '_edit_templates', 'f0file' => file_exists(get_custom_file_base() . '/' . str_replace('/templates/', '/templates_custom/', $file)) ? str_replace('/templates/', '/templates_custom/', $file) : $file, 'theme' => $theme), '_SELF');
             $edit_one = array('_SELF', array('type' => 'edit_templates', 'theme' => $theme), '_SELF');
             $section_title = do_lang_tempcode('TEMPLATES');
             break;
         case 'image':
             $add_one = array('_SELF', array('type' => 'add_image', 'theme' => $theme, 'lang' => $lang), '_SELF');
             $edit_this = array('_SELF', array('type' => 'edit_image', 'id' => $file, 'theme' => $theme, 'lang' => $lang), '_SELF');
             $edit_one = array('_SELF', array('type' => 'manage_images', 'theme' => $theme, 'lang' => $lang), '_SELF');
             $section_title = do_lang_tempcode('THEME_IMAGES');
             break;
         default:
             $add_one = NULL;
             $edit_this = NULL;
             $edit_one = NULL;
             $section_title = NULL;
             break;
     }
     require_code('templates_donext');
     return do_next_manager($title, $description, NULL, NULL, $add_one, $edit_this, $edit_one, NULL, NULL, NULL, NULL, NULL, NULL, NULL, array(), array(), array(array('add_one', array('_SELF', array('type' => 'add_theme'), '_SELF'), do_lang_tempcode('ADD_THEME')), is_null($theme) ? NULL : array('edit_this', array('_SELF', array('type' => 'edit_theme', 'theme' => $theme), '_SELF'), do_lang_tempcode('EDIT_THEME')), is_null($theme) ? NULL : array('edit_css', array('_SELF', array('type' => 'choose_css', 'theme' => $theme), '_SELF')), is_null($theme) ? NULL : array('edit_templates', array('_SELF', array('type' => 'edit_templates', 'theme' => $theme), '_SELF')), is_null($theme) ? NULL : array('manage_images', array('_SELF', array('type' => 'manage_images', 'theme' => $theme, 'lang' => $lang), '_SELF')), array('manage_themes', array('_SELF', array('type' => 'misc'), '_SELF'))), do_lang('THEMES'), NULL, $section_title);
 }
示例#17
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     if (has_actual_page_access(get_member(), 'admin_quiz')) {
         $also_url = build_url(array('page' => 'admin_quiz'), get_module_zone('admin_quiz'));
         attach_message(do_lang_tempcode('menus:ALSO_SEE_ADMIN', escape_html($also_url->evaluate())), 'inform');
     }
     require_code('templates_donext');
     require_code('fields');
     return do_next_manager(get_page_title('MANAGE_QUIZZES'), comcode_lang_string('DOC_QUIZZES'), array_merge(array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_QUIZ')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_QUIZ'))), manage_custom_fields_donext_link('quiz')), do_lang('MANAGE_QUIZZES'));
 }
示例#18
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/zones';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_structure';
     require_code('templates_donext');
     return do_next_manager(get_page_title('ZONES'), comcode_lang_string('DOC_ZONES'), array(array('add_one', array('_SELF', array('type' => 'add'), '_SELF'), do_lang('ADD_ZONE')), array('edit_one', array('_SELF', array('type' => 'edit'), '_SELF'), do_lang('EDIT_ZONE'))), do_lang('ZONES'));
 }
示例#19
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('CUSTOM_COMCODE'), comcode_lang_string('DOC_CUSTOM_COMCODE'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_CUSTOM_COMCODE_TAG')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_CUSTOM_COMCODE_TAG'))), do_lang('CUSTOM_COMCODE'));
 }
示例#20
0
 /**
  * The do-next manager for after news content management.
  *
  * @param  tempcode		The title (output of get_page_title)
  * @param  tempcode		Some description to show, saying what happened
  * @param  ?AUTO_LINK	The ID of whatever was just handled (NULL: N/A)
  * @return tempcode		The UI
  */
 function do_next_manager($title, $description, $id = NULL)
 {
     breadcrumb_set_self(do_lang_tempcode('DONE'));
     $cat = $this->donext_type;
     require_code('templates_donext');
     return do_next_manager($title, $description, NULL, NULL, array('_SELF', array('type' => 'ad', 'cat' => $cat), '_SELF'), is_null($id) || !has_specific_permission(get_member(), 'edit_own_midrange_content', 'cms_news', array('news', $cat)) ? NULL : array('_SELF', array('type' => '_ed', 'id' => $id), '_SELF'), has_specific_permission(get_member(), 'edit_own_midrange_content', 'cms_news') ? array('_SELF', array('type' => 'ed'), '_SELF') : NULL, is_null($id) ? NULL : array('news', array('type' => 'view', 'id' => $id, 'blog' => 1), get_module_zone('news')), array('news', array('type' => 'misc', 'blog' => 1), get_module_zone('news')), NULL, has_specific_permission(get_member(), 'submit_cat_midrange_content', 'cms_news') ? array('cms_news', array('type' => 'ac'), '_SELF') : NULL, has_specific_permission(get_member(), 'edit_own_cat_midrange_content', 'cms_news') ? array('cms_news', array('type' => 'ec'), '_SELF') : NULL, is_null($cat) ? NULL : has_specific_permission(get_member(), 'edit_own_cat_midrange_content', 'cms_news') ? array('cms_news', array('type' => '_ec', 'id' => $cat), '_SELF') : NULL, NULL);
 }
示例#21
0
 /**
  * The actualiser for deleting a message.
  *
  * @return tempcode	The UI.
  */
 function _chat_delete_message()
 {
     $title = get_page_title('DELETE_MESSAGE');
     $message_id = get_param_integer('id');
     $rows = $GLOBALS['SITE_DB']->query_select('chat_messages', array('the_message', 'room_id'), array('id' => $message_id));
     if (!array_key_exists(0, $rows)) {
         return warn_screen($title, do_lang_tempcode('MISSING_RESOURCE'));
     }
     $myrow = $rows[0];
     $message = $myrow['the_message'];
     $room_id = $myrow['room_id'];
     check_chatroom_access($room_id);
     $room_details = $GLOBALS['SITE_DB']->query_select('chat_rooms', array('*'), array('id' => $room_id), '', 1);
     if (!array_key_exists(0, $room_details)) {
         warn_exit(do_lang_tempcode('MISSING_RESOURCE'));
     }
     $row = $room_details[0];
     $has_mod_access = has_specific_permission(get_member(), 'edit_lowrange_content', 'cms_chat', array('chat', $room_id)) || $row['room_owner'] == get_member() && has_specific_permission(get_member(), 'moderate_my_private_rooms');
     if (!$has_mod_access) {
         access_denied('SPECIFIC_PERMISSION', 'edit_lowrange_content');
     }
     $GLOBALS['SITE_DB']->query_delete('chat_messages', array('id' => $message_id), '', 1);
     decache('side_shoutbox');
     $message2 = get_translated_tempcode($message);
     delete_lang($message);
     log_it('DELETE_MESSAGE', strval($message_id), $message2->evaluate());
     breadcrumb_set_parents(array(array('_SELF:_SELF:misc', do_lang_tempcode('CHOOSE')), array('_SELF:_SELF:room:id=' . strval($room_id), do_lang_tempcode('CHAT_MOD_PANEL'))));
     require_code('templates_donext');
     return do_next_manager($title, do_lang_tempcode('SUCCESS'), NULL, NULL, NULL, NULL, array('_SELF', array('type' => 'room', 'id' => $room_id), '_SELF'), NULL, array('_SELF', array(), '_SELF'), NULL, NULL, NULL, NULL, NULL, array(has_actual_page_access(get_member(), 'admin_chat') ? array('chatrooms', array('admin_chat', array('type' => 'misc'), get_module_zone('admin_chat')), do_lang('SETUP')) : NULL));
 }
示例#22
0
 /**
  * The do-next manager for before content management. This is intended for exceptional users who cannot use the site-tree editor
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/sitetreeeditor';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_structure';
     require_code('templates_donext');
     return do_next_manager(get_page_title('PAGES'), comcode_lang_string('DOC_PAGES'), array(array('comcode_page_edit', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('COMCODE_PAGE_EDIT')), array('delete', array('_SELF', array('type' => 'delete'), '_SELF'), do_lang('DELETE_PAGES')), array('move', array('_SELF', array('type' => 'move'), '_SELF'), do_lang('MOVE_PAGES'))), do_lang('PAGES'));
 }
示例#23
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('MANAGE_NEWSLETTER'), comcode_lang_string('DOC_NEWSLETTER'), array_merge(array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_NEWSLETTER')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_NEWSLETTER'))), $this->extra_donext_entries), do_lang('MANAGE_NEWSLETTER'));
 }
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     if (!cron_installed()) {
         attach_message(do_lang_tempcode('CRON_NEEDED_TO_WORK', escape_html(brand_base_url() . '/docs' . strval(ocp_version()) . '/pg/tut_configuration')), 'warn');
     }
     require_code('templates_donext');
     return do_next_manager(get_page_title('WELCOME_EMAILS'), comcode_lang_string('DOC_WELCOME_EMAILS'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_WELCOME_EMAIL')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_WELCOME_EMAIL'))), do_lang('WELCOME_EMAILS'));
 }
示例#25
0
 /**
  * The do-next manager for before setup management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_lang('quiz');
     require_lang('menus');
     $also_url = build_url(array('page' => 'cms_quiz'), get_module_zone('cms_quiz'));
     attach_message(do_lang_tempcode('ALSO_SEE_CMS', escape_html($also_url->evaluate())), 'inform');
     require_code('templates_donext');
     return do_next_manager(get_page_title('MANAGE_QUIZZES'), comcode_lang_string('DOC_QUIZZES'), array(array('findwinners', array('_SELF', array('type' => 'find_winner'), '_SELF'), do_lang('FIND_WINNERS')), array('survey_results', array('_SELF', array('type' => 'survey_results'), '_SELF'), do_lang('SURVEY_RESULTS')), array('export', array('_SELF', array('type' => 'export'), '_SELF'), do_lang('EXPORT_QUIZ'))), do_lang('MANAGE_QUIZZES'));
 }
示例#26
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     require_lang('ocgifts');
     return do_next_manager(get_page_title('OCGIFTS_TITLE'), comcode_lang_string('DOC_OCGIFTS'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_GIFT')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_GIFT'))), do_lang('OCGIFTS_TITLE'));
 }
示例#27
0
 /**
  * The do-next manager for before invoice management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     breadcrumb_set_self(do_lang_tempcode('INVOICES'));
     breadcrumb_set_parents(array(array('_SEARCH:admin_ecommerce:ecom_usage', do_lang_tempcode('ECOMMERCE'))));
     require_code('templates_donext');
     return do_next_manager(get_page_title('INVOICES'), comcode_lang_string('DOC_ECOMMERCE'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('CREATE_INVOICE')), array('securitylog', array('_SELF', array('type' => 'outstanding'), '_SELF'), do_lang('OUTSTANDING_INVOICES')), array('edit_one', array('_SELF', array('type' => 'undelivered'), '_SELF'), do_lang('UNDELIVERED_INVOICES'))), do_lang('INVOICES'));
 }
示例#28
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('FLAGRANT_TEXT'), comcode_lang_string('DOC_FLAGRANT'), array(array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_FLAGRANT')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('FLAGRANT_MANAGE'))), do_lang('FLAGRANT_TEXT'));
 }
示例#29
0
 /**
  * The do-next manager for before content management.
  *
  * @return tempcode		The UI
  */
 function misc()
 {
     require_code('templates_donext');
     return do_next_manager(get_page_title('EMOTICONS'), comcode_lang_string('DOC_EMOTICONS'), array(array('emoticons', array('_SELF', array('type' => 'import'), '_SELF'), do_lang('IMPORT_EMOTICONS')), array('add_one', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_EMOTICON')), array('edit_one', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_EMOTICON'))), do_lang('EMOTICONS'));
 }
示例#30
0
 /**
  * UI for a theme wizard step (actualisation).
  *
  * @return tempcode		The UI
  */
 function step4()
 {
     // Add theme
     $source_theme = post_param('source_theme');
     $algorithm = post_param('algorithm');
     $seed = post_param('seed');
     $themename = post_param('themename');
     $use = post_param_integer('use_on_all', 0) == 1;
     $dark = post_param_integer('dark');
     $inherit_css = post_param_integer('inherit_css');
     if (function_exists('set_time_limit')) {
         @set_time_limit(0);
     }
     breadcrumb_set_parents(array(array('_SELF:_SELF:misc', do_lang_tempcode('THEMEWIZARD'))));
     require_code('type_validation');
     if (!is_alphanumeric($themename, true) || strlen($themename) > 40) {
         warn_exit(do_lang_tempcode('BAD_CODENAME'));
     }
     make_theme($themename, $source_theme, $algorithm, $seed, $use, $dark == 1, $inherit_css == 1);
     $myfile = @fopen(get_custom_file_base() . '/themes/' . filter_naughty($themename) . '/theme.ini', 'wt') or intelligent_write_error(get_custom_file_base() . '/themes/' . filter_naughty($themename) . '/theme.ini');
     fwrite($myfile, 'title=' . $themename . chr(10));
     fwrite($myfile, 'description=' . do_lang('NA') . chr(10));
     fwrite($myfile, 'seed=' . $seed . chr(10));
     if (fwrite($myfile, 'author=' . $GLOBALS['FORUM_DRIVER']->get_username(get_member()) . chr(10)) == 0) {
         warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));
     }
     fclose($myfile);
     sync_file('themes/' . filter_naughty($themename) . '/theme.ini');
     // We're done
     $title = get_page_title('_THEMEWIZARD', true, array(integer_format(4), integer_format(4)));
     $message = do_lang_tempcode('THEMEWIZARD_4_DESCRIBE', escape_html('#' . $seed), escape_html($themename));
     require_code('templates_donext');
     return do_next_manager($title, $message, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, array(), array(), array(array('edit_this', array('admin_themes', array('type' => 'edit_theme', 'theme' => $themename), get_module_zone('admin_themes'))), array('edit_css', array('admin_themes', array('type' => 'choose_css', 'theme' => $themename), get_module_zone('admin_themes'))), array('edit_templates', array('admin_themes', array('type' => 'edit_templates', 'theme' => $themename), get_module_zone('admin_themes'))), array('manage_images', array('admin_themes', array('type' => 'manage_images', 'theme' => $themename), get_module_zone('admin_themes'))), array('manage_themes', array('admin_themes', array('type' => 'misc'), get_module_zone('admin_themes')))), do_lang('THEME'));
 }