• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_moderators函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_moderators函数的典型用法代码示例。如果您正苦于以下问题:PHP get_moderators函数的具体用法?PHP get_moderators怎么用?PHP get_moderators使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_moderators函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: display_forums


//.........这里部分代码省略.........
                    $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
                }
            }
        }
    }
    $db->sql_freeresult($result);
    // Handle marking posts
    if ($mark_read == 'forums' || $mark_read == 'all') {
        $redirect = build_url(array('mark', 'hash'));
        $token = request_var('hash', '');
        if (check_link_hash($token, 'global')) {
            if ($mark_read == 'all') {
                markread('all');
                $message = sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>');
            } else {
                // Add 0 to forums array to mark global announcements correctly
                $forum_ids[] = 0;
                markread('topics', $forum_ids);
                $message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
            }
            meta_refresh(3, $redirect);
            trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
        } else {
            $message = sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
            meta_refresh(3, $redirect);
            trigger_error($message);
        }
    }
    // Grab moderators ... if necessary
    if ($display_moderators) {
        if ($return_moderators) {
            $forum_ids_moderator[] = $root_data['forum_id'];
        }
        get_moderators($forum_moderators, $forum_ids_moderator);
    }
    // Used to tell whatever we have to create a dummy category or not.
    $last_catless = true;
    foreach ($forum_rows as $row) {
        // Empty category
        if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT) {
            $template->assign_block_vars('forumrow', array('S_IS_CAT' => true, 'FORUM_ID' => $row['forum_id'], 'FORUM_NAME' => $row['forum_name'], 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), 'FORUM_FOLDER_IMG' => '', 'FORUM_FOLDER_IMG_SRC' => '', 'FORUM_IMAGE' => $row['forum_image'] ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '', 'FORUM_IMAGE_SRC' => $row['forum_image'] ? $phpbb_root_path . $row['forum_image'] : '', 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $row['forum_id'])));
            continue;
        }
        $visible_forums++;
        $forum_id = $row['forum_id'];
        $forum_unread = isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id] ? true : false;
        // Mark the first visible forum on index as unread if there's any unread global announcement
        if ($ga_unread && !empty($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0]) {
            $forum_unread = true;
        }
        $folder_image = $folder_alt = $l_subforums = '';
        $subforums_list = array();
        // Generate list of subforums if we need to
        if (isset($subforums[$forum_id])) {
            foreach ($subforums[$forum_id] as $subforum_id => $subforum_row) {
                $subforum_unread = isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id] ? true : false;
                if (!$subforum_unread && !empty($subforum_row['children'])) {
                    foreach ($subforum_row['children'] as $child_id) {
                        if (isset($forum_tracking_info[$child_id]) && $subforums[$forum_id][$child_id]['orig_forum_last_post_time'] > $forum_tracking_info[$child_id]) {
                            // Once we found an unread child forum, we can drop out of this loop
                            $subforum_unread = true;
                            break;
                        }
                    }
                }
                if ($subforum_row['display'] && $subforum_row['name']) {
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:67,代码来源:functions_display.php


示例2: generate_forum_nav

    return;
}
// Build navigation links
generate_forum_nav($forum_data);
// Forum Rules
if ($auth->acl_get('f_read', $forum_id)) {
    generate_forum_rules($forum_data);
}
// Do we have subforums?
$active_forum_ary = $moderators = array();
if ($forum_data['left_id'] != $forum_data['right_id'] - 1) {
    list($active_forum_ary, $moderators) = display_forums($forum_data, $config['load_moderators'], $config['load_moderators']);
} else {
    $template->assign_var('S_HAS_SUBFORUM', false);
    if ($config['load_moderators']) {
        get_moderators($moderators, $forum_id);
    }
}
/* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
// Dump out the page header and load viewforum template
$topics_count = $phpbb_content_visibility->get_count('forum_topics', $forum_data, $forum_id);
$start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);
page_header($forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : ''), true, $forum_id);
$template->set_filenames(array('body' => 'viewforum_body.html'));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.{$phpEx}"), $forum_id);
$template->assign_vars(array('U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", "f={$forum_id}" . ($start == 0 ? '' : "&amp;start={$start}"))));
// Not postable forum or showing active topics?
if (!($forum_data['forum_type'] == FORUM_POST || $forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS && $forum_data['forum_type'] == FORUM_CAT)) {
    page_footer();
}
开发者ID:ZerGabriel,项目名称:phpbb,代码行数:31,代码来源:viewforum.php


示例3: display_forums


//.........这里部分代码省略.........
            if ($row['forum_type'] != FORUM_LINK) {
                $forum_rows[$parent_id]['forum_posts'] += $row['forum_posts'];
            }
            if (isset($forum_rows[$parent_id]) && $row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time']) {
                $forum_rows[$parent_id]['forum_last_post_id'] = $row['forum_last_post_id'];
                $forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
                $forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
                $forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
                $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
            } else {
                $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
            }
        }
        if (!$_CLASS['core_user']->is_user || !$config['load_db_lastread']) {
            $forum_id36 = base_convert($forum_id, 10, 36);
            $row['mark_time'] = isset($tracking_topics[$forum_id36][0]) ? (int) base_convert($tracking_topics[$forum_id36][0], 36, 10) : 0;
        }
        if ($row['mark_time'] < $row['forum_last_post_time']) {
            $forum_unread[$parent_id] = true;
        }
    }
    $_CLASS['core_db']->free_result($result);
    // Handle marking posts
    if ($mark_read == 'forums') {
        markread('mark', $forum_id_ary);
        $redirect = generate_link('Forums');
        $_CLASS['core_display']->meta_refresh(3, $redirect);
        $message = strpos($redirect, 'viewforum') !== false ? 'RETURN_FORUM' : 'RETURN_INDEX';
        $message = $_CLASS['core_user']->lang['FORUMS_MARKED'] . '<br /><br />' . sprintf($_CLASS['core_user']->lang[$message], '<a href="' . $redirect . '">', '</a> ');
        trigger_error($message);
    }
    // Grab moderators ... if necessary
    if ($display_moderators) {
        $forum_moderators = get_moderators($forum_ids);
    }
    // Loop through the forums
    $root_id = $root_data['forum_id'];
    foreach ($forum_rows as $row) {
        if ($row['parent_id'] == $root_id && !$row['parent_id']) {
            if ($row['forum_type'] == FORUM_CAT) {
                $hold = $row;
                continue;
            } else {
                unset($hold);
            }
        } else {
            if (!empty($hold)) {
                $_CLASS['core_template']->assign_vars_array('forumrow', array('S_IS_CAT' => TRUE, 'FORUM_ID' => $hold['forum_id'], 'FORUM_NAME' => $hold['forum_name'], 'FORUM_DESC' => $hold['forum_desc'], 'U_VIEWFORUM' => generate_link('Forums&amp;file=viewforum&amp;f=' . $hold['forum_id'])));
                unset($hold);
            }
        }
        $visible_forums++;
        $forum_id = $row['forum_id'];
        $subforums_list = $l_subforums = '';
        // Generate list of subforums if we need to
        if (isset($subforums[$forum_id])) {
            if ($subforums[$forum_id]['display']) {
                $links = array();
                foreach ($subforums[$forum_id]['name'] as $subforum_id => $subforum_name) {
                    if (!empty($subforum_name)) {
                        $links[] = '<a href="' . generate_link('Forums&amp;file=viewforum&amp;f=' . $subforum_id) . '">' . $subforum_name . '</a>';
                    }
                }
                if (!empty($links)) {
                    $subforums_list = implode(', ', $links);
                    $l_subforums = count($subforums[$forum_id]) == 1 ? $_CLASS['core_user']->lang['SUBFORUM'] . ': ' : $_CLASS['core_user']->lang['SUBFORUMS'] . ': ';
开发者ID:BackupTheBerlios,项目名称:viperals-svn,代码行数:67,代码来源:functions_display.php


示例4: display_forums


//.........这里部分代码省略.........
                    $forum_rows[$parent_id]['forum_posts'] += $row['forum_posts'];
                }
                if ($row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time']) {
                    $forum_rows[$parent_id]['forum_last_post_id'] = $row['forum_last_post_id'];
                    $forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
                    $forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
                    $forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
                    $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
                } else {
                    $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
                }
            }
        }
    }
    $db->sql_freeresult($result);
    // Handle marking posts
    if ($mark_read == 'forums' || $mark_read == 'all') {
        $redirect = build_url('mark');
        if ($mark_read == 'all') {
            markread('all');
            $message = sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>');
        } else {
            markread('topics', $forum_ids);
            $message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
        }
        meta_refresh(3, $redirect);
        trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
    }
    // Grab moderators ... if necessary
    if ($display_moderators) {
        if ($return_moderators) {
            $forum_ids_moderator[] = $root_data['forum_id'];
        }
        get_moderators($forum_moderators, $forum_ids_moderator);
    }
    foreach ($forum_rows as $row) {
        // Empty category
        if (!$row['parent_id'] && $row['forum_type'] == FORUM_CAT) {
            $template->assign_block_vars('forumrow', array('S_IS_CAT' => true, 'FORUM_ID' => $row['forum_id'], 'FORUM_NAME' => $row['forum_name'], 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield']), 'FORUM_FOLDER_IMG' => $row['forum_image'] ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '', 'FORUM_FOLDER_IMG_SRC' => $row['forum_image'] ? $phpbb_root_path . $row['forum_image'] : '', 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $row['forum_id'])));
            continue;
        }
        $visible_forums++;
        $forum_id = $row['forum_id'];
        $forum_unread = isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id] ? true : false;
        $folder_image = $folder_alt = $subforums_list = $l_subforums = '';
        // Generate list of subforums if we need to
        if (isset($subforums[$forum_id])) {
            foreach ($subforums[$forum_id] as $subforum_id => $subforum_row) {
                // Update unread information if needed
                if (!$forum_unread) {
                    $forum_unread = isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id] ? true : false;
                }
                if ($subforum_row['display'] && $subforum_row['name']) {
                    $subforums_list .= $subforums_list == '' ? '' : ', ';
                    $subforums_list .= '<a href="' . append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $subforum_id) . '">' . $subforum_row['name'] . '</a>';
                } else {
                    unset($subforums[$forum_id][$subforum_id]);
                }
            }
            $l_subforums = sizeof($subforums[$forum_id]) == 1 ? $user->lang['SUBFORUM'] . ': ' : $user->lang['SUBFORUMS'] . ': ';
            $folder_image = $forum_unread ? 'sub_forum_new' : 'sub_forum';
        } else {
            switch ($row['forum_type']) {
                case FORUM_POST:
                    $folder_image = $forum_unread ? 'forum_new' : 'forum';
                    break;
开发者ID:yunsite,项目名称:gloryroad,代码行数:67,代码来源:functions_display.php


示例5: clean

         if (!$i) {
             $output .= clean('Subforums') . $delims[1];
         } else {
             $output .= $delims[1];
         }
         $output .= clean($forum['FORUM_NAME']) . $delims[1];
         $output .= clean(sprintf($strings[0], $forum['LAST_POSTER'], $forum['LAST_POST_TIME'])) . $delims[1];
         if ($forum['POSTS'] > 0 && $forum['TOPICS'] > 0) {
             $output .= clean(sprintf($strings[1], $forum['POSTS'], $forum['POSTS'] != 1 ? 's' : '', $forum['TOPICS'], $forum['TOPICS'] != 1 ? 's' : ''));
         } else {
             $output .= clean($strings[2]);
         }
     }
 } else {
     $template->assign_var('S_HAS_SUBFORUM', false);
     get_moderators($moderators, $id);
 }
 // Not postable forum or showing active topics?
 if (!($forum_data['forum_type'] == FORUM_POST || $forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS && $forum_data['forum_type'] == FORUM_CAT)) {
     if ($debug) {
         page_footer();
     } else {
         exit;
     }
 }
 // Ok, if someone has only list-access, we only display the forum list.
 // We also make this circumstance available to the template in case we want to display a notice. ;)
 if (!$auth->acl_get('f_read', $id)) {
     if ($debug) {
         $template->assign_vars(array('S_NO_READ_ACCESS' => true, 'S_AUTOLOGIN_ENABLED' => $config['allow_autologin'] ? true : false, 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=login') . '&amp;redirect=' . urlencode(str_replace('&amp;', '&', build_url()))));
         page_footer();
开发者ID:planetangel,项目名称:Planet-Angel-Website,代码行数:31,代码来源:touchbb.php


示例6: implode

$attachment_data = $message_parser->attachment_data;
$filename_data = $message_parser->filename_data;
$post_text = $message_parser->message;
if (sizeof($poll_options) && $poll_title) {
    $message_parser->message = $poll_title;
    $message_parser->bbcode_uid = $bbcode_uid;
    $message_parser->decode_message();
    $poll_title = $message_parser->message;
    $message_parser->message = implode("\n", $poll_options);
    $message_parser->decode_message();
    $poll_options = explode("\n", $message_parser->message);
}
unset($message_parser);
// MAIN POSTING PAGE BEGINS HERE
// Forum moderators?
$moderators = get_moderators($forum_id);
// Generate smiley listing
generate_smilies('inline', $forum_id);
// Generate inline attachment select box
posting_gen_inline_attachments($attachment_data);
// Do show topic type selection only in first post.
$topic_type_toggle = false;
if ($mode == 'post' || $mode == 'edit' && $post_id == $topic_first_post_id) {
    $topic_type_toggle = posting_gen_topic_types($forum_id, $posting_data['topic_type']);
}
$s_topic_icons = false;
if ($enable_icons) {
    $s_topic_icons = posting_gen_topic_icons($mode, $icon_id);
}
$html_checked = isset($enable_html) ? !$enable_html : ($config['allow_html'] ? !$_CLASS['core_user']->user_data_get('html') : 1);
$bbcode_checked = isset($enable_bbcode) ? !$enable_bbcode : ($config['allow_bbcode'] ? !$_CLASS['core_user']->user_data_get('bbcode') : 1);
开发者ID:BackupTheBerlios,项目名称:viperals-svn,代码行数:31,代码来源:posting.php


示例7: display_forums


//.........这里部分代码省略.........
         * @var	array	row				The data of the forum
         * @since 3.1.0-a1
         */
        $vars = array('forum_rows', 'subforums', 'branch_root_id', 'parent_id', 'row');
        extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_forum_rows', compact($vars)));
    }
    $db->sql_freeresult($result);
    // Handle marking posts
    if ($mark_read == 'forums') {
        $redirect = build_url(array('mark', 'hash', 'mark_time'));
        $token = $request->variable('hash', '');
        if (check_link_hash($token, 'global')) {
            markread('topics', $forum_ids, false, $request->variable('mark_time', 0));
            $message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
            meta_refresh(3, $redirect);
            if ($request->is_ajax()) {
                // Tell the ajax script what language vars and URL need to be replaced
                $data = array('NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'], 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'], 'U_MARK_FORUMS' => $user->data['is_registered'] || $config['load_anon_lastread'] ? append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '', 'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']);
                $json_response = new \phpbb\json_response();
                $json_response->send($data);
            }
            trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
        } else {
            $message = sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
            meta_refresh(3, $redirect);
            trigger_error($message);
        }
    }
    // Grab moderators ... if necessary
    if ($display_moderators) {
        if ($return_moderators) {
            $forum_ids_moderator[] = $root_data['forum_id'];
        }
        get_moderators($forum_moderators, $forum_ids_moderator);
    }
    /**
     * Event to perform additional actions before the forum list is being generated
     *
     * @event core.display_forums_before
     * @var	array	active_forum_ary	Array with forum data to display active topics
     * @var	bool	display_moderators	Flag indicating if we display forum moderators
     * @var	array	forum_moderators	Array with forum moderators list
     * @var	array	forum_rows			Data array of all forums we display
     * @var	bool	return_moderators	Flag indicating if moderators list should be returned
     * @var	array	root_data			Array with the root forum data
     * @since 3.1.4-RC1
     */
    $vars = array('active_forum_ary', 'display_moderators', 'forum_moderators', 'forum_rows', 'return_moderators', 'root_data');
    extract($phpbb_dispatcher->trigger_event('core.display_forums_before', compact($vars)));
    // Used to tell whatever we have to create a dummy category or not.
    $last_catless = true;
    foreach ($forum_rows as $row) {
        // Category
        if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT) {
            // Do not display categories without any forums to display
            if (!isset($valid_categories[$row['forum_id']])) {
                continue;
            }
            $cat_row = array('S_IS_CAT' => true, 'FORUM_ID' => $row['forum_id'], 'FORUM_NAME' => $row['forum_name'], 'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']), 'FORUM_FOLDER_IMG' => '', 'FORUM_FOLDER_IMG_SRC' => '', 'FORUM_IMAGE' => $row['forum_image'] ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '', 'FORUM_IMAGE_SRC' => $row['forum_image'] ? $phpbb_root_path . $row['forum_image'] : '', 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $row['forum_id']));
            /**
             * Modify the template data block of the 'category'
             *
             * This event is triggered once per 'category'
             *
             * @event core.display_forums_modify_category_template_vars
             * @var	array	cat_row			Template data of the 'category'
开发者ID:hgchen,项目名称:phpbb,代码行数:67,代码来源:functions_display.php


示例8: htmlspecialchars

} else {
    $xoopsTpl->assign('viewer_can_post', false);
    if ($show_reg == 1) {
        $xoopsTpl->assign('forum_post_or_register', '<a href="' . XOOPS_URL . '/user.php?xoops_redirect=' . htmlspecialchars($xoopsRequestUri) . '">' . _MD_REGTOPOST . '</a>');
    } else {
        $xoopsTpl->assign('forum_post_or_register', "");
    }
}
$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX, $xoopsConfig['sitename']));
$xoopsTpl->assign('forum_image_folder', $bbImage['folder_topic']);
$myts =& MyTextSanitizer::getInstance();
$xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name']));
$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
$forum_moderators = "";
$count = 0;
$moderators = get_moderators($forum);
foreach ($moderators as $mods) {
    foreach ($mods as $mod_id => $mod_name) {
        if ($count > 0) {
            $forum_moderators .= ", ";
        }
        $forum_moderators .= '<a href="' . XOOPS_URL . '/userinfo.php?uid=' . $mod_id . '">' . $myts->makeTboxData4Show($mod_name) . '</a>';
        $count = 1;
    }
}
$xoopsTpl->assign('forum_moderators', $forum_moderators);
$sel_sort_array = array("t.topic_title" => _MD_TOPICTITLE, "t.topic_replies" => _MD_NUMBERREPLIES, "u.uname" => _MD_TOPICPOSTER, "t.topic_views" => _MD_VIEWS, "p.post_time" => _MD_LASTPOSTTIME);
if (!isset($_GET['sortname']) || !in_array($_GET['sortname'], array_keys($sel_sort_array))) {
    $sortname = "p.post_time";
} else {
    $sortname = $_GET['sortname'];
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:viewforum.php


示例9: display_forums


//.........这里部分代码省略.........
            if ($row['forum_type'] != FORUM_LINK) {
                $forum_rows[$parent_id]['forum_posts'] += $row['forum_posts'];
            }
            if (isset($forum_rows[$parent_id]) && $row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time']) {
                $forum_rows[$parent_id]['forum_last_post_id'] = $row['forum_last_post_id'];
                $forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
                $forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
                $forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
                $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
            } else {
                $forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
            }
        }
        if (!isset($row['mark_time'])) {
            $row['mark_time'] = 0;
        }
        $mark_time_forum = $board_config['load_db_lastread'] ? $row['mark_time'] : (isset($tracking_topics[$forum_id][0]) ? base_convert($tracking_topics[$forum_id][0], 36, 10) + $board_config['board_startdate'] : 0);
        if ($mark_time_forum < $row['forum_last_post_time'] && $user->data['user_id'] != ANONYMOUS) {
            $forum_unread[$parent_id] = true;
        }
    }
    $db->sql_freeresult($result);
    // Handle marking posts
    if ($mark_read == 'forums') {
        markread('mark', $forum_id_ary);
        $redirect = !empty($_SERVER['REQUEST_URI']) ? preg_replace('#^(.*?)&(amp;)?mark=.*$#', '\\1', htmlspecialchars($_SERVER['REQUEST_URI'])) : append_sid("index.{$phpEx}");
        meta_refresh(3, $redirect);
        $message = strstr($redirect, 'viewforum') ? 'RETURN_FORUM' : 'RETURN_INDEX';
        $message = $user->lang['FORUMS_MARKED'] . '<br /><br />' . sprintf($user->lang[$message], '<a href="' . $redirect . '">', '</a> ');
        trigger_error($message);
    }
    // Grab moderators ... if necessary
    if ($display_moderators) {
        get_moderators($forum_moderators, $forum_ids);
    }
    // Loop through the forums
    $root_id = $root_data['forum_id'];
    foreach ($forum_rows as $row) {
        if ($row['parent_id'] == $root_id && !$row['parent_id']) {
            if ($row['forum_type'] == FORUM_CAT) {
                $hold = $row;
                continue;
            } else {
                unset($hold);
            }
        } else {
            if (!empty($hold)) {
                $template->assign_block_vars('forumrow', array('S_IS_CAT' => TRUE, 'FORUM_ID' => $hold['forum_id'], 'FORUM_NAME' => $hold['forum_name'], 'FORUM_DESC' => $hold['forum_desc'], 'U_VIEWFORUM' => append_sid("viewforum.{$phpEx}?f=" . $hold['forum_id'])));
                unset($hold);
            }
        }
        $visible_forums++;
        $forum_id = $row['forum_id'];
        // Generate list of subforums if we need to
        if (isset($subforums[$forum_id])) {
            if ($subforums[$forum_id]['display']) {
                $alist = array();
                foreach ($subforums[$forum_id]['name'] as $sub_forum_id => $subforum_name) {
                    if (!empty($subforum_name)) {
                        $alist[$sub_forum_id] = $subforum_name;
                    }
                }
                if (sizeof($alist)) {
                    $links = array();
                    foreach ($alist as $subforum_id => $subforum_name) {
                        $links[] = '<a href="' . append_sid('viewforum.' . $phpEx . '?f=' . $subforum_id) . '">' . $subforum_name . '</a>';
开发者ID:BackupTheBerlios,项目名称:phpbbsfp,代码行数:67,代码来源:functions_subforums.php


示例10: get_sended_video

        <input type="text" size="32" readonly value="<?php 
echo get_sended_video();
?>
">
    </td>
</tr>
<tr>
    <td><?php 
echo _('To');
?>
:</td>
    <td>
    <select name="to_usr">
        <option>- - - - - - - - - - - - - 
        <?php 
echo get_moderators();
?>
    </select>
    <input type="hidden" name="id" value="<?php 
echo @$_GET['id'];
?>
">
    </td>
</tr>
<tr>
    <td valign="top"><?php 
echo _('Comment');
?>
:</td>
    <td>
        <textarea name="comment" cols="30" rows="8"></textarea>
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:send_to.php


示例11: get_moderators

             // no forums, so put empty values
             $categories[$i]['forums']['forum_lastpost_time'][] = "";
             $categories[$i]['forums']['forum_lastpost_icon'][] = "";
             $categories[$i]['forums']['forum_lastpost_user'][] = "";
             if ($forum_row['forum_type'] == 1) {
                 $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum'];
             } else {
                 $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum'];
             }
         }
         $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id'];
         $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']);
         $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']);
         $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics'];
         $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts'];
         $all_moderators = get_moderators($forum_row['forum_id']);
         $count = 0;
         $forum_moderators = '';
         foreach ($all_moderators as $mods) {
             foreach ($mods as $mod_id => $mod_name) {
                 if ($count > 0) {
                     $forum_moderators .= ', ';
                 }
                 $forum_moderators .= '<a href="' . XOOPS_URL . '/userinfo.php?uid=' . $mod_id . '">' . $myts->makeTboxData4Show($mod_name) . '</a>';
                 $count = 1;
             }
         }
         $categories[$i]['forums']['forum_moderators'][] = $forum_moderators;
     }
 }
 $xoopsTpl->append("categories", $categories[$i]);
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:index.php



注:本文中的get_moderators函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_module函数代码示例发布时间:2022-05-15
下一篇:
PHP get_model_attribute函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap