当前位置: 首页>>代码示例>>PHP>>正文


PHP make_jumpbox函数代码示例

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


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

示例1: main

 function main($id, $mode)
 {
     global $config, $db, $user, $table_prefix, $auth, $template, $phpbb_root_path, $phpEx;
     define('TABLE_PREFIX', $table_prefix);
     require_once 'class_ulogin.php';
     $uLogin = new uLogin($db);
     if ($config['require_activation'] == USER_ACTIVATION_DISABLE) {
         trigger_error('UCP_REGISTER_DISABLE');
     }
     if (!($user_id = $uLogin->auth())) {
         $user_id = $uLogin->register();
     }
     if ($user_id) {
         $session = $user->session_create($user_id, 0, 1);
     }
     if (!$session) {
         page_header($user->lang['LOGIN'], false);
         $template->set_filenames(array('body' => 'login_body.html'));
         make_jumpbox(append_sid("{$phpbb_root_path}viewforum.{$phpEx}"));
         page_footer();
         exit;
     }
     $redirect = request_var('redirect', "{$phpbb_root_path}index.{$phpEx}");
     $message = $user->lang['LOGIN_REDIRECT'];
     $l_redirect = $redirect === "{$phpbb_root_path}index.{$phpEx}" || $redirect === "index.{$phpEx}" ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE'];
     $redirect = reapply_sid($redirect);
     if (defined('IN_CHECK_BAN') && $session['user_row']['user_type'] != USER_FOUNDER) {
         return false;
     }
     $redirect = meta_refresh(3, $redirect);
     trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
 }
开发者ID:mike-a-b,项目名称:crossfit,代码行数:32,代码来源:ulogin_register.php

示例2: handle

 public function handle()
 {
     $title = $this->display();
     $this->template->assign_vars(array('L_FAQ_TITLE' => $title, 'S_IN_FAQ' => true));
     make_jumpbox(append_sid("{$this->root_path}viewforum.{$this->php_ext}"));
     return $this->helper->render('faq_body.html', $title);
 }
开发者ID:MrAdder,项目名称:phpbb,代码行数:7,代码来源:controller.php

示例3: oauth_show_register

function oauth_show_register($oauth_info, $nickname_repeat = false, $nickname_too_short = false)
{
    global $phpEx, $template;
    if (session_id() == '') {
        session_start();
    }
    $_SESSION['oauth_info'] = $oauth_info;
    $template->assign_vars(array('S_OAUTH_REG_ACTION' => './oauth.' . $phpEx . '?mode=register', 'EMAIL' => $oauth_info->email, 'USERNAME' => $oauth_info->name, 'USERNAME_EXISTS' => $nickname_repeat, 'USERNAME_TOO_SHORT' => $nickname_too_short));
    page_header($user->lang['LOGIN'], false);
    $template->set_filenames(array('body' => 'oauth_register.html'));
    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.{$phpEx}"));
    page_footer();
}
开发者ID:zanpen2000,项目名称:nginx-wps-community,代码行数:13,代码来源:oauth.php

示例4: login_box


//.........这里部分代码省略.........
        } else {
            $password = request_var('password', '', true);
        }
        $username = request_var('username', '', true);
        $autologin = !empty($_POST['autologin']) ? true : false;
        $viewonline = !empty($_POST['viewonline']) ? 0 : 1;
        $admin = $admin ? 1 : 0;
        $viewonline = $admin ? $user->data['session_viewonline'] : $viewonline;
        // Check if the supplied username is equal to the one stored within the database if re-authenticating
        if ($admin && utf8_clean_string($username) != utf8_clean_string($user->data['username'])) {
            // We log the attempt to use a different username...
            add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
            trigger_error('NO_AUTH_ADMIN_USER_DIFFER');
        }
        // If authentication is successful we redirect user to previous page
        $result = $auth->login($username, $password, $autologin, $viewonline, $admin);
        // If admin authentication and login, we will log if it was a success or not...
        // We also break the operation on the first non-success login - it could be argued that the user already knows
        if ($admin) {
            if ($result['status'] == LOGIN_SUCCESS) {
                add_log('admin', 'LOG_ADMIN_AUTH_SUCCESS');
            } else {
                // Only log the failed attempt if a real user tried to.
                // anonymous/inactive users are never able to go to the ACP even if they have the relevant permissions
                if ($user->data['is_registered']) {
                    add_log('admin', 'LOG_ADMIN_AUTH_FAIL');
                }
            }
        }
        // The result parameter is always an array, holding the relevant information...
        if ($result['status'] == LOGIN_SUCCESS) {
            $redirect = request_var('redirect', "{$phpbb_root_path}index.{$phpEx}");
            $message = $l_success ? $l_success : $user->lang['LOGIN_REDIRECT'];
            $l_redirect = $admin ? $user->lang['PROCEED_TO_ACP'] : ($redirect === "{$phpbb_root_path}index.{$phpEx}" || $redirect === "index.{$phpEx}" ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);
            // append/replace SID (may change during the session for AOL users)
            $redirect = reapply_sid($redirect);
            // Special case... the user is effectively banned, but we allow founders to login
            if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER) {
                return;
            }
            $redirect = meta_refresh(3, $redirect);
            trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
        }
        // Something failed, determine what...
        if ($result['status'] == LOGIN_BREAK) {
            trigger_error($result['error_msg']);
        }
        // Special cases... determine
        switch ($result['status']) {
            case LOGIN_ERROR_ATTEMPTS:
                // Show confirm image
                $sql = 'DELETE FROM ' . CONFIRM_TABLE . "\n\t\t\t\t\tWHERE session_id = '" . $db->sql_escape($user->session_id) . "'\n\t\t\t\t\t\tAND confirm_type = " . CONFIRM_LOGIN;
                $db->sql_query($sql);
                // Generate code
                $code = gen_rand_string(mt_rand(5, 8));
                $confirm_id = md5(unique_id($user->ip));
                $seed = hexdec(substr(unique_id(), 4, 10));
                // compute $seed % 0x7fffffff
                $seed -= 0x7fffffff * floor($seed / 0x7fffffff);
                $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array('confirm_id' => (string) $confirm_id, 'session_id' => (string) $user->session_id, 'confirm_type' => (int) CONFIRM_LOGIN, 'code' => (string) $code, 'seed' => (int) $seed));
                $db->sql_query($sql);
                $template->assign_vars(array('S_CONFIRM_CODE' => true, 'CONFIRM_ID' => $confirm_id, 'CONFIRM_IMAGE' => '<img src="' . append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=confirm&amp;id=' . $confirm_id . '&amp;type=' . CONFIRM_LOGIN) . '" alt="" title="" />', 'L_LOGIN_CONFIRM_EXPLAIN' => sprintf($user->lang['LOGIN_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>')));
                $err = $user->lang[$result['error_msg']];
                break;
            case LOGIN_ERROR_PASSWORD_CONVERT:
                $err = sprintf($user->lang[$result['error_msg']], $config['email_enable'] ? '<a href="' . append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=sendpassword') . '">' : '', $config['email_enable'] ? '</a>' : '', $config['board_contact'] ? '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">' : '', $config['board_contact'] ? '</a>' : '');
                break;
                // Username, password, etc...
            // Username, password, etc...
            default:
                $err = $user->lang[$result['error_msg']];
                // Assign admin contact to some error messages
                if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD') {
                    $err = !$config['board_contact'] ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
                }
                break;
        }
    }
    if (!$redirect) {
        // We just use what the session code determined...
        // If we are not within the admin directory we use the page dir...
        $redirect = '';
        if (!$admin) {
            $redirect .= $user->page['page_dir'] ? $user->page['page_dir'] . '/' : '';
        }
        $redirect .= $user->page['page_name'] . ($user->page['query_string'] ? '?' . htmlspecialchars($user->page['query_string']) : '');
    }
    // Assign credential for username/password pair
    $credential = $admin ? md5(unique_id()) : false;
    $s_hidden_fields = array('redirect' => $redirect, 'sid' => $user->session_id);
    if ($admin) {
        $s_hidden_fields['credential'] = $credential;
    }
    $s_hidden_fields = build_hidden_fields($s_hidden_fields);
    $template->assign_vars(array('LOGIN_ERROR' => $err, 'LOGIN_EXPLAIN' => $l_explain, 'U_SEND_PASSWORD' => $config['email_enable'] ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=sendpassword') : '', 'U_RESEND_ACTIVATION' => $config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable'] ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=resend_act') : '', 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=privacy'), 'S_DISPLAY_FULL_LOGIN' => $s_display ? true : false, 'S_LOGIN_ACTION' => !$admin ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=login') : append_sid("index.{$phpEx}", false, true, $user->session_id), 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ADMIN_AUTH' => $admin, 'USERNAME' => $admin ? $user->data['username'] : '', 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => $admin ? 'password_' . $credential : 'password'));
    page_header($user->lang['LOGIN'], false);
    $template->set_filenames(array('body' => 'login_body.html'));
    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.{$phpEx}"));
    page_footer();
}
开发者ID:Phatboy82,项目名称:phpbbgarage,代码行数:101,代码来源:functions.php

示例5: mcp_front_view


//.........这里部分代码省略.........
            $sql = 'SELECT COUNT(r.report_id) AS total
				FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
				WHERE r.post_id = p.post_id
					AND r.pm_id = 0
					AND r.report_closed = 0
					AND ' . $db->sql_in_set('p.forum_id', $forum_list);
            /**
             * Alter sql query to count the number of reported posts
             *
             * @event core.mcp_front_reports_count_query_before
             * @var	int		sql				The query string used to get the number of reports that exist
             * @var	array	forum_list		List of forums that contain the posts
             * @since 3.1.5-RC1
             */
            $vars = array('sql', 'forum_list');
            extract($phpbb_dispatcher->trigger_event('core.mcp_front_reports_count_query_before', compact($vars)));
            $result = $db->sql_query($sql);
            $total = (int) $db->sql_fetchfield('total');
            $db->sql_freeresult($result);
            if ($total) {
                $sql_ary = array('SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, p.post_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array(REPORTS_TABLE => 'r', REPORTS_REASONS_TABLE => 'rr', TOPICS_TABLE => 't', USERS_TABLE => array('u', 'u2'), POSTS_TABLE => 'p'), 'LEFT_JOIN' => array(array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 'f.forum_id = p.forum_id')), 'WHERE' => 'r.post_id = p.post_id
						AND r.pm_id = 0
						AND r.report_closed = 0
						AND r.reason_id = rr.reason_id
						AND p.topic_id = t.topic_id
						AND r.user_id = u.user_id
						AND p.poster_id = u2.user_id
						AND ' . $db->sql_in_set('p.forum_id', $forum_list), 'ORDER_BY' => 'p.post_time DESC, p.post_id DESC');
                /**
                 * Alter sql query to get latest reported posts
                 *
                 * @event core.mcp_front_reports_listing_query_before
                 * @var	int		sql_ary						Associative array with the query to be executed
                 * @var	array	forum_list					List of forums that contain the posts
                 * @since 3.1.0-RC3
                 */
                $vars = array('sql_ary', 'forum_list');
                extract($phpbb_dispatcher->trigger_event('core.mcp_front_reports_listing_query_before', compact($vars)));
                $sql = $db->sql_build_query('SELECT', $sql_ary);
                $result = $db->sql_query_limit($sql, 5);
                while ($row = $db->sql_fetchrow($result)) {
                    $template->assign_block_vars('report', array('U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id'] . "&amp;i=reports&amp;mode=report_details"), 'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'f=' . $row['forum_id'] . "&amp;i={$id}&amp;mode=forum_view"), 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id'] . "&amp;i={$id}&amp;mode=topic_view"), 'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $row['forum_id']), 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']), 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['author_name'], $row['author_colour']), 'AUTHOR' => get_username_string('username', $row['author_id'], $row['author_name'], $row['author_colour']), 'AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']), 'U_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']), 'FORUM_NAME' => $row['forum_name'], 'TOPIC_TITLE' => $row['topic_title'], 'SUBJECT' => $row['post_subject'] ? $row['post_subject'] : $user->lang['NO_SUBJECT'], 'REPORT_TIME' => $user->format_date($row['report_time']), 'POST_TIME' => $user->format_date($row['post_time']), 'ATTACH_ICON_IMG' => $auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment'] ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : ''));
                }
                $db->sql_freeresult($result);
            }
            $template->assign_vars(array('L_REPORTS_TOTAL' => $user->lang('REPORTS_TOTAL', (int) $total), 'S_HAS_REPORTS' => $total != 0));
        }
    }
    // Latest 5 reported PMs
    if ($module->loaded('pm_reports') && $auth->acl_get('m_pm_report')) {
        $template->assign_var('S_SHOW_PM_REPORTS', true);
        $user->add_lang(array('ucp'));
        $sql = 'SELECT COUNT(r.report_id) AS total
			FROM ' . REPORTS_TABLE . ' r, ' . PRIVMSGS_TABLE . ' p
			WHERE r.post_id = 0
				AND r.pm_id = p.msg_id
				AND r.report_closed = 0';
        $result = $db->sql_query($sql);
        $total = (int) $db->sql_fetchfield('total');
        $db->sql_freeresult($result);
        if ($total) {
            include $phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx;
            $sql_ary = array('SELECT' => 'r.report_id, r.report_time, p.msg_id, p.message_subject, p.message_time, p.to_address, p.bcc_address, p.message_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id', 'FROM' => array(REPORTS_TABLE => 'r', REPORTS_REASONS_TABLE => 'rr', USERS_TABLE => array('u', 'u2'), PRIVMSGS_TABLE => 'p'), 'WHERE' => 'r.pm_id = p.msg_id
					AND r.post_id = 0
					AND r.report_closed = 0
					AND r.reason_id = rr.reason_id
					AND r.user_id = u.user_id
					AND p.author_id = u2.user_id', 'ORDER_BY' => 'p.message_time DESC');
            $sql = $db->sql_build_query('SELECT', $sql_ary);
            $result = $db->sql_query_limit($sql, 5);
            $pm_by_id = $pm_list = array();
            while ($row = $db->sql_fetchrow($result)) {
                $pm_by_id[(int) $row['msg_id']] = $row;
                $pm_list[] = (int) $row['msg_id'];
            }
            $db->sql_freeresult($result);
            $address_list = get_recipient_strings($pm_by_id);
            foreach ($pm_list as $message_id) {
                $row = $pm_by_id[$message_id];
                $template->assign_block_vars('pm_report', array('U_PM_DETAILS' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'r=' . $row['report_id'] . "&amp;i=pm_reports&amp;mode=pm_report_details"), 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'PM_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['author_name'], $row['author_colour']), 'PM_AUTHOR' => get_username_string('username', $row['author_id'], $row['author_name'], $row['author_colour']), 'PM_AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']), 'U_PM_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']), 'PM_SUBJECT' => $row['message_subject'], 'REPORT_TIME' => $user->format_date($row['report_time']), 'PM_TIME' => $user->format_date($row['message_time']), 'RECIPIENTS' => implode(', ', $address_list[$row['msg_id']]), 'ATTACH_ICON_IMG' => $auth->acl_get('u_download') && $row['message_attachment'] ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : ''));
            }
        }
        $template->assign_vars(array('L_PM_REPORTS_TOTAL' => $user->lang('PM_REPORTS_TOTAL', (int) $total), 'S_HAS_PM_REPORTS' => $total != 0));
    }
    // Latest 5 logs
    if ($module->loaded('logs')) {
        $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
        if (!empty($forum_list)) {
            $log_count = false;
            $log = array();
            view_log('mod', $log, $log_count, 5, 0, $forum_list);
            foreach ($log as $row) {
                $template->assign_block_vars('log', array('USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'TIME' => $user->format_date($row['time']), 'ACTION' => $row['action'], 'U_VIEW_TOPIC' => !empty($row['viewtopic']) ? $row['viewtopic'] : '', 'U_VIEWLOGS' => !empty($row['viewlogs']) ? $row['viewlogs'] : ''));
            }
        }
        $template->assign_vars(array('S_SHOW_LOGS' => !empty($forum_list) ? true : false, 'S_HAS_LOGS' => !empty($log) ? true : false));
    }
    $template->assign_var('S_MCP_ACTION', append_sid("{$phpbb_root_path}mcp.{$phpEx}"));
    make_jumpbox(append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=main&amp;mode=forum_view'), 0, false, 'm_', true);
}
开发者ID:mysteriou,项目名称:educafacile.com,代码行数:101,代码来源:mcp_front.php

示例6: asort

        } else {
            $topic_last_read = $userdata['user_lastvisit'];
        }
    }
    if (count($tracking_topics) >= 150 && empty($tracking_topics[$topic_id])) {
        asort($tracking_topics);
        unset($tracking_topics[key($tracking_topics)]);
    }
    $tracking_topics[$topic_id] = time();
    setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
//
// Load templates
//
$template->set_filenames(array('body' => 'viewtopic_body.tpl'));
make_jumpbox('viewforum.' . $phpEx, $forum_id);
//
// Output page header
//
$page_title = $lang['View_topic'] . ' - ' . $topic_title;
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
//
// User authorisation levels output
//
$s_auth_can = ($is_auth['auth_post'] ? $lang['Rules_post_can'] : $lang['Rules_post_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_reply'] ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_edit'] ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_delete'] ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_vote'] ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot']) . '<br />';
$topic_mod = '';
if ($is_auth['auth_mod']) {
开发者ID:almacbe,项目名称:phpbb-with-favpal-mod,代码行数:31,代码来源:viewtopic.php

示例7: array

            $sql_array = array('SELECT' => 'c.*, i.*', 'FROM' => array(GALLERY_COMMENTS_TABLE => 'c'), 'LEFT_JOIN' => array(array('FROM' => array(GALLERY_IMAGES_TABLE => 'i'), 'ON' => 'c.comment_image_id = i.image_id')), 'WHERE' => $sql_where, 'ORDER_BY' => $sql_order);
            $sql = $db->sql_build_query('SELECT', $sql_array);
            $result = $db->sql_query($sql);
            while ($commentrow = $db->sql_fetchrow($result)) {
                $image_id = $commentrow['image_id'];
                $album_id = $commentrow['image_album_id'];
                $template->assign_block_vars('commentrow', array('U_COMMENT' => phpbb_gallery_url::append_sid('image_page', "album_id={$album_id}&amp;image_id={$image_id}") . '#' . $commentrow['comment_id'], 'COMMENT_ID' => $commentrow['comment_id'], 'TIME' => $user->format_date($commentrow['comment_time']), 'TEXT' => generate_text_for_display($commentrow['comment'], $commentrow['comment_uid'], $commentrow['comment_bitfield'], 7), 'U_DELETE' => phpbb_gallery::$auth->acl_check('m_comments', $album_id) || phpbb_gallery::$auth->acl_check('c_delete', $album_id) && $commentrow['comment_user_id'] == $user->data['user_id'] && $user->data['is_registered'] ? phpbb_gallery_url::append_sid('posting', "album_id={$album_id}&amp;image_id={$image_id}&amp;mode=comment&amp;submode=delete&amp;comment_id=" . $commentrow['comment_id']) : '', 'U_EDIT' => phpbb_gallery::$auth->acl_check('m_comments', $album_id) || phpbb_gallery::$auth->acl_check('c_edit', $album_id) && $commentrow['comment_user_id'] == $user->data['user_id'] && $user->data['is_registered'] ? phpbb_gallery_url::append_sid('posting', "album_id={$album_id}&amp;image_id={$image_id}&amp;mode=comment&amp;submode=edit&amp;comment_id=" . $commentrow['comment_id']) : '', 'U_INFO' => $auth->acl_get('a_') ? phpbb_gallery_url::append_sid('mcp', 'mode=whois&amp;ip=' . $commentrow['comment_user_ip']) : '', 'UC_THUMBNAIL' => phpbb_gallery_image::generate_link('thumbnail', phpbb_gallery_config::get('link_thumbnail'), $commentrow['image_id'], $commentrow['image_name'], $commentrow['image_album_id']), 'UC_IMAGE_NAME' => phpbb_gallery_image::generate_link('image_name', phpbb_gallery_config::get('link_image_name'), $commentrow['image_id'], $commentrow['image_name'], $commentrow['image_album_id']), 'IMAGE_AUTHOR' => get_username_string('full', $commentrow['image_user_id'], $commentrow['image_username'], $commentrow['image_user_colour']), 'IMAGE_TIME' => $user->format_date($commentrow['image_time']), 'POST_AUTHOR_FULL' => get_username_string('full', $commentrow['comment_user_id'], $commentrow['comment_username'], $commentrow['comment_user_colour']), 'POST_AUTHOR_COLOUR' => get_username_string('colour', $commentrow['comment_user_id'], $commentrow['comment_username'], $commentrow['comment_user_colour']), 'POST_AUTHOR' => get_username_string('username', $commentrow['comment_user_id'], $commentrow['comment_username'], $commentrow['comment_user_colour']), 'U_POST_AUTHOR' => get_username_string('profile', $commentrow['comment_user_id'], $commentrow['comment_username'], $commentrow['comment_user_colour'])));
            }
            $db->sql_freeresult($result);
            $template->assign_vars(array('DELETE_IMG' => $user->img('icon_post_delete', 'DELETE_COMMENT'), 'EDIT_IMG' => $user->img('icon_post_edit', 'EDIT_COMMENT'), 'INFO_IMG' => $user->img('icon_post_info', 'IP'), 'MINI_POST_IMG' => $user->img('icon_post_target_unread', 'COMMENT'), 'PROFILE_IMG' => $user->img('icon_user_profile', 'READ_PROFILE')));
        }
    }
    unset($rowset);
    page_header($l_search_title ? $l_search_title : $user->lang['SEARCH']);
    $template->set_filenames(array('body' => 'gallery/search_results.html'));
    make_jumpbox(phpbb_gallery_url::append_sid('phpbb', 'viewforum'));
    page_footer();
}
$s_albums = phpbb_gallery_album::get_albumbox(false, false, false, 'i_view');
if (!$s_albums) {
    trigger_error('NO_SEARCH');
}
// Prevent undefined variable on build_hidden_fields()
$s_hidden_fields = array('e' => 0);
if ($_SID) {
    $s_hidden_fields['sid'] = $_SID;
}
if (!empty($_EXTRA_URL)) {
    foreach ($_EXTRA_URL as $url_param) {
        $url_param = explode('=', $url_param, 2);
        $s_hidden_fields[$url_param[0]] = $url_param[1];
开发者ID:phpbbgallery,项目名称:phpbb-gallery,代码行数:31,代码来源:search.php

示例8: mcp_forum_view

/**
* MCP Forum View
*/
function mcp_forum_view($id, $mode, $action, $forum_info)
{
    global $template, $db, $user, $auth, $cache, $module;
    global $phpEx, $phpbb_root_path, $config;
    global $request, $phpbb_dispatcher, $phpbb_container;
    $user->add_lang(array('viewtopic', 'viewforum'));
    include_once $phpbb_root_path . 'includes/functions_display.' . $phpEx;
    // merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action
    $merge_select = $action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics' ? true : false;
    $forum_id = $forum_info['forum_id'];
    $start = $request->variable('start', 0);
    $topic_id_list = $request->variable('topic_id_list', array(0));
    $post_id_list = $request->variable('post_id_list', array(0));
    $source_topic_ids = array($request->variable('t', 0));
    $to_topic_id = $request->variable('to_topic_id', 0);
    $url_extra = '';
    $url_extra .= $forum_id ? "&amp;f={$forum_id}" : '';
    $url_extra .= $GLOBALS['topic_id'] ? '&amp;t=' . $GLOBALS['topic_id'] : '';
    $url_extra .= $GLOBALS['post_id'] ? '&amp;p=' . $GLOBALS['post_id'] : '';
    $url_extra .= $GLOBALS['user_id'] ? '&amp;u=' . $GLOBALS['user_id'] : '';
    $url = append_sid("{$phpbb_root_path}mcp.{$phpEx}?{$url_extra}");
    // Resync Topics
    switch ($action) {
        case 'resync':
            $topic_ids = $request->variable('topic_id_list', array(0));
            mcp_resync_topics($topic_ids);
            break;
        case 'merge_topics':
            $source_topic_ids = $topic_id_list;
        case 'merge_topic':
            if ($to_topic_id) {
                merge_topics($forum_id, $source_topic_ids, $to_topic_id);
            }
            break;
    }
    /**
     * Get some data in order to execute other actions.
     *
     * @event core.mcp_forum_view_before
     * @var	string	action				The action
     * @var	array	forum_info			Array with forum infos
     * @var	int		start				Start value
     * @var	array	topic_id_list		Array of topics ids
     * @var	array	post_id_list		Array of posts ids
     * @var	array	source_topic_ids	Array of source topics ids
     * @var	int		to_topic_id			Array of destination topics ids
     * @since 3.1.6-RC1
     */
    $vars = array('action', 'forum_info', 'start', 'topic_id_list', 'post_id_list', 'source_topic_ids', 'to_topic_id');
    extract($phpbb_dispatcher->trigger_event('core.mcp_forum_view_before', compact($vars)));
    /* @var $pagination \phpbb\pagination */
    $pagination = $phpbb_container->get('pagination');
    $selected_ids = '';
    if (sizeof($post_id_list) && $action != 'merge_topics') {
        foreach ($post_id_list as $num => $post_id) {
            $selected_ids .= '&amp;post_id_list[' . $num . ']=' . $post_id;
        }
    } else {
        if (sizeof($topic_id_list) && $action == 'merge_topics') {
            foreach ($topic_id_list as $num => $topic_id) {
                $selected_ids .= '&amp;topic_id_list[' . $num . ']=' . $topic_id;
            }
        }
    }
    make_jumpbox($url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}" . ($merge_select ? $selected_ids : ''), $forum_id, false, 'm_', true);
    $topics_per_page = $forum_info['forum_topics_per_page'] ? $forum_info['forum_topics_per_page'] : $config['topics_per_page'];
    $sort_days = $total = 0;
    $sort_key = $sort_dir = '';
    $sort_by_sql = $sort_order_sql = array();
    phpbb_mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
    $forum_topics = $total == -1 ? $forum_info['forum_topics_approved'] : $total;
    $limit_time_sql = $sort_days ? 'AND t.topic_last_post_time >= ' . (time() - $sort_days * 86400) : '';
    $base_url = $url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}&amp;sd={$sort_dir}&amp;sk={$sort_key}&amp;st={$sort_days}" . ($merge_select ? $selected_ids : '');
    $pagination->generate_template_pagination($base_url, 'pagination', 'start', $forum_topics, $topics_per_page, $start);
    $template->assign_vars(array('ACTION' => $action, 'FORUM_NAME' => $forum_info['forum_name'], 'FORUM_DESCRIPTION' => generate_text_for_display($forum_info['forum_desc'], $forum_info['forum_desc_uid'], $forum_info['forum_desc_bitfield'], $forum_info['forum_desc_options']), 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'), 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), 'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id), 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id), 'S_CAN_RESTORE' => $auth->acl_get('m_approve', $forum_id), 'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id), 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id), 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id), 'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id), 'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id), 'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id), 'S_MERGE_SELECT' => $merge_select ? true : false, 'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', 'f_announce_global', $forum_id), 'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id), 'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id), 'S_CAN_MAKE_ANNOUNCE_GLOBAL' => $auth->acl_get('f_announce_global', $forum_id), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $forum_id), 'U_VIEW_FORUM_LOGS' => $auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs') ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=logs&amp;mode=forum_logs&amp;f=' . $forum_id) : '', 'S_MCP_ACTION' => $url . "&amp;i={$id}&amp;forum_action={$action}&amp;mode={$mode}&amp;start={$start}" . ($merge_select ? $selected_ids : ''), 'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $forum_topics)));
    // Grab icons
    $icons = $cache->obtain_icons();
    $topic_rows = array();
    if ($config['load_db_lastread']) {
        $read_tracking_join = ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')';
        $read_tracking_select = ', tt.mark_time';
    } else {
        $read_tracking_join = $read_tracking_select = '';
    }
    /* @var $phpbb_content_visibility \phpbb\content_visibility */
    $phpbb_content_visibility = $phpbb_container->get('content.visibility');
    $sql = 'SELECT t.topic_id
		FROM ' . TOPICS_TABLE . ' t
		WHERE t.forum_id = ' . $forum_id . '
			AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . "\n\t\t\t{$limit_time_sql}\n\t\tORDER BY t.topic_type DESC, {$sort_order_sql}";
    /**
     * Modify SQL query before MCP forum view topic list is queried
     *
     * @event core.mcp_view_forum_modify_sql
     * @var	string	sql			SQL query for forum view topic list
     * @var	int	forum_id	ID of the forum
     * @var	string  limit_time_sql		SQL query part for limit time
//.........这里部分代码省略.........
开发者ID:bruninoit,项目名称:phpbb,代码行数:101,代码来源:mcp_forum.php

示例9: make_jumpbox

    $db->sql_return_on_error(false);
    if ($result) {
        if (!($row = $db->sql_fetchrow($result))) {
            $sql = "INSERT INTO " . PROFILE_VIEW_TABLE . "\n\t\t\t(user_id, viewername, viewer_id, view_stamp, counter)\n\t\t\tVALUES ('" . $db->sql_escape($target_user) . "', '" . $db->sql_escape($viewer) . "', '" . $db->sql_escape($viewer_id) . "', '" . $db->sql_escape($current_time) . "', '1')";
        }
        $db->sql_query($sql);
        $count = $row['counter'] + 1;
        $sql = "UPDATE " . PROFILE_VIEW_TABLE . "\n\t\t\t\tSET view_stamp = '{$current_time}', counter = '{$count}'\n\t\t\t\tWHERE user_id = " . $target_user . "\n\t\t\t\tAND viewer_id = " . $viewer_id;
        $db->sql_query($sql);
    }
}
// Mighty Gorgon - Multiple Ranks - BEGIN
@(include_once IP_ROOT_PATH . 'includes/functions_users.' . PHP_EXT);
$ranks_array = $cache->obtain_ranks(false);
// Mighty Gorgon - Multiple Ranks - END
make_jumpbox(CMS_PAGE_VIEWFORUM);
//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$memberdays = max(1, round((time() - $regdate) / 86400));
$posts_per_day = $profiledata['user_posts'] / $memberdays;
// Get the users percentage of total posts
if ($profiledata['user_posts'] != 0) {
    $total_posts = $config['max_posts'];
    $percentage = $total_posts ? min(100, $profiledata['user_posts'] / $total_posts * 100) : 0;
} else {
    $percentage = 0;
}
// Mighty Gorgon - Thanks Received - BEGIN
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:usercp_viewprofile.php

示例10: asort

        } else {
            $topic_last_read = $userdata['user_lastvisit'];
        }
    }
    if (count($tracking_topics) >= 150 && empty($tracking_topics[$topic_id])) {
        asort($tracking_topics);
        unset($tracking_topics[key($tracking_topics)]);
    }
    $tracking_topics[$topic_id] = time();
    setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
//
// Load templates
//
$template->set_filenames(array('body' => 'viewtopic_body.tpl'));
make_jumpbox('viewforum.php', $forum_id);
//
// Output page header
//
$page_title = $lang['View_topic'] . ' - ' . $topic_title;
include $phpbb_root_path . 'includes/page_header.php';
//
// User authorisation levels output
//
$s_auth_can = ($is_auth['auth_post'] ? $lang['Rules_post_can'] : $lang['Rules_post_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_reply'] ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_edit'] ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_delete'] ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot']) . '<br />';
$s_auth_can .= ($is_auth['auth_vote'] ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot']) . '<br />';
$topic_mod = '';
if ($is_auth['auth_mod']) {
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:viewtopic.php

示例11: array

            $posterarr = array('poster_uid' => 0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => '');
        }
        $posticon = $eachpost->icon();
        if (isset($posticon) && $posticon != '') {
            $post_image = '<a name="' . $eachpost->postid() . '"><img src="' . XOOPS_URL . '/images/subject/' . htmlspecialchars($eachpost->icon()) . '" alt="" /></a>';
        } else {
            $post_image = '<a name="' . $eachpost->postid() . '"><img src="' . XOOPS_URL . '/images/icons/no_posticon.gif" alt="" /></a>';
        }
        $xoopsTpl->append('topic_posts', array_merge($posterarr, array('post_id' => $eachpost->postid(), 'post_parent_id' => $eachpost->parent(), 'post_date' => formatTimestamp($eachpost->posttime(), 'm'), 'post_poster_ip' => $eachpost->posterip(), 'post_image' => $post_image, 'post_title' => $eachpost->subject(), 'post_text' => $post_text)));
        unset($eachposter);
    }
    if ($total_posts > $forumdata['posts_per_page']) {
        include XOOPS_ROOT_PATH . '/class/pagenav.php';
        $nav = new XoopsPageNav($total_posts, $forumdata['posts_per_page'], $start, "start", 'topic_id=' . $topic_id . '&amp;forum=' . $forum . '&amp;viewmode=' . $viewmode . '&amp;order=' . $order);
        $xoopsTpl->assign('forum_page_nav', $nav->renderNav(4));
    } else {
        $xoopsTpl->assign('forum_page_nav', '');
    }
}
// create jump box
$xoopsTpl->assign(array('forum_jumpbox' => make_jumpbox($forum), 'lang_forum_index' => sprintf(_MD_FORUMINDEX, $xoopsConfig['sitename']), 'lang_from' => _MD_FROM, 'lang_joined' => _MD_JOINED, 'lang_posts' => _MD_POSTS, 'lang_poster' => _MD_POSTER, 'lang_thread' => _MD_THREAD, 'lang_edit' => _EDIT, 'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_postedon' => _MD_POSTEDON));
// Read in cookie of 'lastread' times
$topic_lastread = newbb_get_topics_viewed();
// if cookie is not set for this topic, update view count and set cookie
if (empty($topic_lastread[$topic_id])) {
    $sql = 'UPDATE ' . $xoopsDB->prefix('bb_topics') . ' SET topic_views = topic_views + 1 WHERE topic_id =' . $topic_id;
    $xoopsDB->queryF($sql);
}
// Update cookie
newbb_add_topics_viewed($topic_lastread, $topic_id, time(), $bbCookie['path'], $bbCookie['domain'], $bbCookie['secure']);
include XOOPS_ROOT_PATH . '/footer.php';
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:viewtopic.php

示例12: main


//.........这里部分代码省略.........
                $sql_array = array('SELECT' => 'u.*', 'FROM' => array($this->users_table => 'u'), 'ORDER_BY' => $order_by);
                if ($top) {
                    $total_users = $top;
                    $start = 0;
                    $page_title = $this->user->lang['REPUT_TOPLIST'];
                } else {
                    $top = $this->config['topics_per_page'];
                }
                if ($sortparam) {
                    $sql_array['FROM'] = array($this->thanks_table => 't');
                    $sql_array['SELECT'] .= ', count(t.' . $sortparam . '_id) as count_thanks';
                    $sql_array['LEFT_JOIN'][] = array('FROM' => array($this->users_table => 'u'), 'ON' => 't.' . $sortparam . '_id = u.user_id');
                    $sql_array['GROUP_BY'] = 't.' . $sortparam . '_id';
                }
                $where[] = $rows[0];
                for ($i = 1, $end = sizeof($rows); $i < $end; ++$i) {
                    $where[] = $rows[$i];
                }
                $sql_array['WHERE'] = $this->db->sql_in_set('u.user_id', $where);
                $sql = $this->db->sql_build_query('SELECT', $sql_array);
                $result = $this->db->sql_query_limit($sql, $top, $start);
                if (!($row = $this->db->sql_fetchrow($result))) {
                    trigger_error('NO_USER');
                } else {
                    $sql = 'SELECT session_user_id, MAX(session_time) AS session_time
						FROM ' . SESSIONS_TABLE . '
						WHERE session_time >= ' . (time() - $this->config['session_length']) . '
							AND ' . $this->db->sql_in_set('session_user_id', $where) . '
						GROUP BY session_user_id';
                    $result_sessions = $this->db->sql_query($sql);
                    $session_times = array();
                    while ($session = $this->db->sql_fetchrow($result_sessions)) {
                        $session_times[$session['session_user_id']] = $session['session_time'];
                    }
                    $this->db->sql_freeresult($result_sessions);
                    $user_list = array();
                    $id_cache = array();
                    do {
                        $row['session_time'] = !empty($session_times[$session['user_id']]) ? $session_times[$session['user_id']] : 0;
                        $row['last_visit'] = !empty($session['session_time']) ? $session['session_time'] : $session['user_lastvisit'];
                        $user_list[] = (int) $row['user_id'];
                        $id_cache[$row['user_id']] = $row;
                    } while ($row = $this->db->sql_fetchrow($result));
                    $this->db->sql_freeresult($result);
                    // Load custom profile fields
                    if ($this->config['load_cpf_memberlist']) {
                        $cp_row = $this->profilefields_manager->generate_profile_fields_template_headlines('field_show_on_ml');
                        foreach ($cp_row as $profile_field) {
                            $this->template->assign_block_vars('custom_fields', $profile_field);
                        }
                        // Grab all profile fields from users in id cache for later use - similar to the poster cache
                        $profile_fields_cache = $this->profilefields_manager->grab_profile_fields_data($user_list);
                        // Filter the fields we don't want to show
                        foreach ($profile_fields_cache as $user_id => $user_profile_fields) {
                            foreach ($user_profile_fields as $field_ident => $profile_field) {
                                if (!$profile_field['data']['field_show_on_ml']) {
                                    unset($profile_fields_cache[$user_id][$field_ident]);
                                }
                            }
                        }
                    }
                    //do
                    for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i) {
                        $user_id = $user_list[$i];
                        $row = $id_cache[$user_id];
                        $last_visit = $row['user_lastvisit'];
                        $rank_title = $rank_img = $rank_img_src = '';
                        include_once $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
                        get_user_rank($row['user_rank'], $user_id == ANONYMOUS ? false : $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
                        $sthanks = true;
                        // Custom Profile Fields
                        $cp_row = array();
                        if ($this->config['load_cpf_memberlist']) {
                            $cp_row = isset($profile_fields_cache[$user_id]) ? $this->profilefields_manager->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
                        }
                        $memberrow = array_merge(phpbb_show_profile($row), array('ROW_NUMBER' => $row_number + ($start + 1), 'RANK_TITLE' => $rank_title, 'RANK_IMG' => $rank_img, 'RANK_IMG_SRC' => $rank_img_src, 'GIVENS' => !isset($givens[$user_id]) ? 0 : $givens[$user_id], 'RECEIVED' => !isset($reseved[$user_id]) ? 0 : $reseved[$user_id], 'JOINED' => $this->user->format_date($row['user_regdate']), 'VISITED' => empty($last_visit) ? ' - ' : $this->user->format_date($last_visit), 'POSTS' => $row['user_posts'] ? $row['user_posts'] : 0, 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'U_SEARCH_USER' => $this->auth->acl_get('u_search') ? append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author_id={$user_id}&amp;sr=posts") : '', 'U_SEARCH_USER_GIVENS' => $this->auth->acl_get('u_search') ? $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller_user', array('mode' => 'givens', 'author_id' => $user_id, 'give' => 'true', 'tslash' => '')) : '', 'U_SEARCH_USER_RECEIVED' => $this->auth->acl_get('u_search') ? $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller_user', array('mode' => 'givens', 'author_id' => $user_id, 'give' => 'false', 'tslash' => '')) : '', 'L_VIEWING_PROFILE' => sprintf($this->user->lang['VIEWING_PROFILE'], $row['username']), 'VISITED' => empty($last_visit) ? ' - ' : $this->user->format_date($last_visit), 'S_CUSTOM_FIELDS' => isset($cp_row['row']) && sizeof($cp_row['row']) ? true : false));
                        if (isset($cp_row['row']) && sizeof($cp_row['row'])) {
                            $memberrow = array_merge($memberrow, $cp_row['row']);
                        }
                        $this->template->assign_block_vars('memberrow', $memberrow);
                        if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow'])) {
                            foreach ($cp_row['blockrow'] as $field_data) {
                                $this->template->assign_block_vars('memberrow.custom_fields', $field_data);
                            }
                        }
                        $row_number++;
                    }
                    $this->pagination->generate_template_pagination($pagination_url, 'pagination', 'start', $total_users, $this->config['topics_per_page'], $start);
                    $this->template->assign_vars(array('PAGE_NUMBER' => $this->pagination->on_page($total_users, $this->config['topics_per_page'], $start), 'U_SORT_POSTS' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'd', 'sd' => $sort_key == 'd' && $sort_dir == 'a' ? 'd' : 'a', 'tslash' => '')), 'U_SORT_USERNAME' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'a', 'sd' => $sort_key == 'a' && $sort_dir == 'a' ? 'd' : 'a', 'tslash' => '')), 'U_SORT_FROM' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'b', 'sd' => $sort_key == 'b' && $sort_dir == 'a' ? 'd' : 'a', 'tslash' => '')), 'U_SORT_JOINED' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'c', 'sd' => $sort_key == 'c' && $sort_dir == 'a' ? 'd' : 'a', 'tslash' => '')), 'U_SORT_THANKS_R' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'e', 'sd' => $sort_key == 'e' && $sort_dir == 'd' ? 'a' : 'd', 'tslash' => '')), 'U_SORT_THANKS_G' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'f', 'sd' => $sort_key == 'f' && $sort_dir == 'd' ? 'a' : 'd', 'tslash' => '')), 'U_SORT_ACTIVE' => $this->auth->acl_get('u_viewonline') ? $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('mode' => $mode, 'sk' => 'l', 'sd' => $sort_key == 'l' && $sort_dir == 'a' ? 'd' : 'a', 'tslash' => '')) : ''));
                }
                break;
        }
        // Output the page
        $this->template->assign_vars(array('TOTAL_USERS' => $this->user->lang('LIST_USERS', $total_users), 'U_THANKS' => $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('tslash' => '')), 'S_THANKS' => $sthanks));
        page_header($page_title);
        $this->template->set_filenames(array('body' => $template_html));
        make_jumpbox(append_sid("{$this->phpbb_root_path}viewforum.{$this->php_ext}"));
        page_footer();
        return new Response($this->template->return_display('body'), 200);
    }
开发者ID:Chklang,项目名称:thanks_for_posts,代码行数:101,代码来源:thankslist.php

示例13: mcp_forum_view

/**
* MCP Forum View
*/
function mcp_forum_view($id, $mode, $action, $forum_info)
{
    global $template, $db, $user, $auth, $cache, $module;
    global $phpEx, $phpbb_root_path, $config;
    $user->add_lang(array('viewtopic', 'viewforum'));
    include_once $phpbb_root_path . 'includes/functions_display.' . $phpEx;
    // merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action
    $merge_select = $action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics' ? true : false;
    if ($merge_select) {
        // Fixes a "bug" that makes forum_view use the same ordering as topic_view
        unset($_POST['sk'], $_POST['sd'], $_REQUEST['sk'], $_REQUEST['sd']);
    }
    $forum_id = $forum_info['forum_id'];
    $start = request_var('start', 0);
    $topic_id_list = request_var('topic_id_list', array(0));
    $post_id_list = request_var('post_id_list', array(0));
    $source_topic_ids = array(request_var('t', 0));
    $to_topic_id = request_var('to_topic_id', 0);
    $url_extra = '';
    $url_extra .= $forum_id ? "&amp;f={$forum_id}" : '';
    $url_extra .= $GLOBALS['topic_id'] ? '&amp;t=' . $GLOBALS['topic_id'] : '';
    $url_extra .= $GLOBALS['post_id'] ? '&amp;p=' . $GLOBALS['post_id'] : '';
    $url_extra .= $GLOBALS['user_id'] ? '&amp;u=' . $GLOBALS['user_id'] : '';
    $url = append_sid("{$phpbb_root_path}mcp.{$phpEx}?{$url_extra}");
    // Resync Topics
    switch ($action) {
        case 'resync':
            $topic_ids = request_var('topic_id_list', array(0));
            mcp_resync_topics($topic_ids);
            break;
        case 'merge_topics':
            $source_topic_ids = $topic_id_list;
        case 'merge_topic':
            if ($to_topic_id) {
                merge_topics($forum_id, $source_topic_ids, $to_topic_id);
            }
            break;
    }
    $selected_ids = '';
    if (sizeof($post_id_list) && $action != 'merge_topics') {
        foreach ($post_id_list as $num => $post_id) {
            $selected_ids .= '&amp;post_id_list[' . $num . ']=' . $post_id;
        }
    } else {
        if (sizeof($topic_id_list) && $action == 'merge_topics') {
            foreach ($topic_id_list as $num => $topic_id) {
                $selected_ids .= '&amp;topic_id_list[' . $num . ']=' . $topic_id;
            }
        }
    }
    make_jumpbox($url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}" . ($merge_select ? $selected_ids : ''), $forum_id, false, 'm_', true);
    $topics_per_page = $forum_info['forum_topics_per_page'] ? $forum_info['forum_topics_per_page'] : $config['topics_per_page'];
    $sort_days = $total = 0;
    $sort_key = $sort_dir = '';
    $sort_by_sql = $sort_order_sql = array();
    mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
    $forum_topics = $total == -1 ? $forum_info['forum_topics'] : $total;
    $limit_time_sql = $sort_days ? 'AND t.topic_last_post_time >= ' . (time() - $sort_days * 86400) : '';
    $template->assign_vars(array('ACTION' => $action, 'FORUM_NAME' => $forum_info['forum_name'], 'FORUM_DESCRIPTION' => generate_text_for_display($forum_info['forum_desc'], $forum_info['forum_desc_uid'], $forum_info['forum_desc_bitfield'], $forum_info['forum_desc_options']), 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'), 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), 'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id), 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id), 'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id), 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id), 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id), 'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id), 'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id), 'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id), 'S_MERGE_SELECT' => $merge_select ? true : false, 'S_CAN_MAKE_NORMAL' => $auth->acl_gets('f_sticky', 'f_announce', $forum_id), 'S_CAN_MAKE_STICKY' => $auth->acl_get('f_sticky', $forum_id), 'S_CAN_MAKE_ANNOUNCE' => $auth->acl_get('f_announce', $forum_id), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $forum_id), 'U_VIEW_FORUM_LOGS' => $auth->acl_gets('a_', 'm_', $forum_id) && $module->loaded('logs') ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=logs&amp;mode=forum_logs&amp;f=' . $forum_id) : '', 'S_MCP_ACTION' => $url . "&amp;i={$id}&amp;forum_action={$action}&amp;mode={$mode}&amp;start={$start}" . ($merge_select ? $selected_ids : ''), 'PAGINATION' => generate_pagination($url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}&amp;sd={$sort_dir}&amp;sk={$sort_key}&amp;st={$sort_days}" . ($merge_select ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start), 'TOTAL_TOPICS' => $forum_topics == 1 ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $forum_topics)));
    // Grab icons
    $icons = $cache->obtain_icons();
    $topic_rows = array();
    if ($config['load_db_lastread']) {
        $read_tracking_join = ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')';
        $read_tracking_select = ', tt.mark_time';
    } else {
        $read_tracking_join = $read_tracking_select = '';
    }
    $sql = "SELECT t.topic_id\n\t\tFROM " . TOPICS_TABLE . " t\n\t\tWHERE t.forum_id IN({$forum_id}, 0)\n\t\t\t" . ($auth->acl_get('m_approve', $forum_id) ? '' : 'AND t.topic_approved = 1') . "\n\t\t\t{$limit_time_sql}\n\t\tORDER BY t.topic_type DESC, {$sort_order_sql}";
    $result = $db->sql_query_limit($sql, $topics_per_page, $start);
    $topic_list = $topic_tracking_info = array();
    while ($row = $db->sql_fetchrow($result)) {
        $topic_list[] = $row['topic_id'];
    }
    $db->sql_freeresult($result);
    $sql = "SELECT t.*{$read_tracking_select}\n\t\tFROM " . TOPICS_TABLE . " t {$read_tracking_join}\n\t\tWHERE " . $db->sql_in_set('t.topic_id', $topic_list, false, true);
    $result = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($result)) {
        $topic_rows[$row['topic_id']] = $row;
    }
    $db->sql_freeresult($result);
    // If there is more than one page, but we have no topic list, then the start parameter is... erm... out of sync
    if (!sizeof($topic_list) && $forum_topics && $start > 0) {
        redirect($url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}");
    }
    // Get topic tracking info
    if (sizeof($topic_list)) {
        if ($config['load_db_lastread']) {
            $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']), array());
        } else {
            $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, array());
        }
    }
    foreach ($topic_list as $topic_id) {
        $topic_title = '';
        $row =& $topic_rows[$topic_id];
        $replies = $auth->acl_get('m_approve', $forum_id) ? $row['topic_replies_real'] : $row['topic_replies'];
//.........这里部分代码省略.........
开发者ID:jverkoey,项目名称:Three20-Scope,代码行数:101,代码来源:mcp_forum.php

示例14: mcp_forum_view

/**
* MCP Forum View
*/
function mcp_forum_view($id, $mode, $action, $forum_info)
{
    global $template, $db, $user, $auth, $cache;
    global $phpEx, $phpbb_root_path, $config;
    $url = append_sid("{$phpbb_root_path}mcp.{$phpEx}?" . extra_url());
    if ($action == 'merge_select') {
        // Fixes a "bug" that makes forum_view use the same ordering as topic_view
        unset($_POST['sk'], $_POST['sd'], $_REQUEST['sk'], $_REQUEST['sd']);
    }
    $forum_id = $forum_info['forum_id'];
    $start = request_var('start', 0);
    $topic_id_list = request_var('topic_id_list', array(0));
    $post_id_list = request_var('post_id_list', array(0));
    $topic_id = request_var('t', 0);
    // Resync Topics
    if ($action == 'resync') {
        $topic_ids = request_var('topic_id_list', array(0));
        mcp_resync_topics($topic_ids);
    }
    $selected_ids = '';
    if (sizeof($post_id_list)) {
        foreach ($post_id_list as $num => $post_id) {
            $selected_ids .= '&amp;post_id_list[' . $num . ']=' . $post_id;
        }
    }
    make_jumpbox($url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}", $forum_id . ($action == 'merge_select' ? $selected_ids : ''), false, 'm_');
    $topics_per_page = $forum_info['forum_topics_per_page'] ? $forum_info['forum_topics_per_page'] : $config['topics_per_page'];
    $sort_days = $total = 0;
    $sort_key = $sort_dir = '';
    $sort_by_sql = $sort_order_sql = array();
    mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
    $forum_topics = $total == -1 ? $forum_info['forum_topics'] : $total;
    $limit_time_sql = $sort_days ? 'AND t.topic_last_post_time >= ' . (time() - $sort_days * 86400) : '';
    $template->assign_vars(array('FORUM_NAME' => $forum_info['forum_name'], 'FORUM_DESCRIPTION' => generate_text_for_display($forum_info['forum_desc'], $forum_info['forum_desc_uid'], $forum_info['forum_desc_bitfield']), 'REPORTED_IMG' => $user->img('icon_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $user->img('icon_unapproved', 'TOPIC_UNAPPROVED'), 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id), 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id), 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id), 'S_CAN_LOCK' => $auth->acl_get('m_lock', $forum_id), 'S_CAN_SYNC' => $auth->acl_get('m_', $forum_id), 'S_CAN_APPROVE' => $auth->acl_get('m_approve', $forum_id), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $forum_id), 'U_VIEW_FORUM_LOGS' => $auth->acl_gets('a_', 'm_', $forum_id) ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=logs&amp;mode=forum_logs&amp;f=' . $forum_id) : '', 'S_MCP_ACTION' => $url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}&amp;start={$start}" . ($action == 'merge_select' ? $selected_ids : ''), 'PAGINATION' => generate_pagination($url . "&amp;i={$id}&amp;action={$action}&amp;mode={$mode}" . ($action == 'merge_select' ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start), 'TOTAL' => $forum_topics));
    // Grab icons
    $icons = array();
    $cache->obtain_icons($icons);
    $topic_rows = array();
    $sql = 'SELECT t.*
		FROM ' . TOPICS_TABLE . " t\n\t\tWHERE (t.forum_id = {$forum_id} OR t.forum_id = 0)\n\t\t\t" . ($auth->acl_get('m_approve', $forum_id) ? '' : 'AND t.topic_approved = 1') . "\n\t\t\t{$limit_time_sql}\n\t\tORDER BY t.topic_type DESC, {$sort_order_sql}";
    $result = $db->sql_query_limit($sql, $topics_per_page, $start);
    while ($row = $db->sql_fetchrow($result)) {
        $topic_rows[] = $row;
    }
    $db->sql_freeresult($result);
    foreach ($topic_rows as $row) {
        $topic_title = '';
        if ($row['topic_status'] == ITEM_LOCKED) {
            $folder_img = 'folder_locked';
            $folder_alt = 'VIEW_TOPIC_LOCKED';
        } else {
            if ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) {
                $folder_img = 'folder_announce';
                $folder_alt = 'VIEW_TOPIC_ANNOUNCEMENT';
            } else {
                if ($row['topic_type'] == POST_STICKY) {
                    $folder_img = 'folder_sticky';
                    $folder_alt = 'VIEW_TOPIC_STICKY';
                } else {
                    if ($row['topic_status'] == ITEM_MOVED) {
                        $folder_img = 'folder_moved';
                        $folder_alt = 'VIEW_TOPIC_MOVED';
                    } else {
                        $folder_img = 'folder';
                        $folder_alt = 'NO_NEW_POSTS';
                    }
                }
            }
        }
        if ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) {
            $topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT'] . ' ';
        } else {
            if ($row['topic_type'] == POST_STICKY) {
                $topic_type = $user->lang['VIEW_TOPIC_STICKY'] . ' ';
            } else {
                if ($row['topic_status'] == ITEM_MOVED) {
                    $topic_type = $user->lang['VIEW_TOPIC_MOVED'] . ' ';
                } else {
                    $topic_type = '';
                }
            }
        }
        if (intval($row['poll_start'])) {
            $topic_type .= $user->lang['VIEW_TOPIC_POLL'] . ' ';
        }
        $topic_title = censor_text($row['topic_title']);
        $topic_unapproved = !$row['topic_approved'] && $auth->acl_gets('m_approve', $row['forum_id']) ? true : false;
        $posts_unapproved = $row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_gets('m_approve', $row['forum_id']) ? true : false;
        $u_mcp_queue = $topic_unapproved || $posts_unapproved ? $url . '&amp;i=queue&amp;mode=' . ($topic_unapproved ? 'approve_details' : 'unapproved_posts') . '&amp;t=' . $row['topic_id'] : '';
        $template->assign_block_vars('topicrow', array('U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", "i={$id}&amp;f={$forum_id}&amp;t={$row['topic_id']}&amp;mode=topic_view"), 'S_SELECT_TOPIC' => $action == 'merge_select' && $row['topic_id'] != $topic_id ? true : false, 'U_SELECT_TOPIC' => $url . "&amp;i={$id}&amp;mode=topic_view&amp;action=merge&amp;to_topic_id=" . $row['topic_id'] . $selected_ids, 'U_MCP_QUEUE' => $u_mcp_queue, 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=main&amp;mode=topic_view&amp;t=' . $row['topic_id'] . '&amp;action=reports'), 'ATTACH_ICON_IMG' => $auth->acl_gets('f_download', 'u_download', $row['forum_id']) && $row['topic_attachment'] ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_ICON_IMG' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['img'] : '', 'TOPIC_ICON_IMG_WIDTH' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['width'] : '', 'TOPIC_ICON_IMG_HEIGHT' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['height'] : '', 'UNAPPROVED_IMG' => $topic_unapproved || $posts_unapproved ? $user->img('icon_unapproved', $topic_unapproved ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '', 'TOPIC_TYPE' => $topic_type, 'TOPIC_TITLE' => $topic_title, 'REPLIES' => $auth->acl_get('m_approve', $row['forum_id']) ? $row['topic_replies_real'] : $row['topic_replies'], 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'TOPIC_ID' => $row['topic_id'], 'S_TOPIC_CHECKED' => $topic_id_list && in_array($row['topic_id'], $topic_id_list) ? 'checked="checked" ' : '', 'S_TOPIC_REPORTED' => !empty($row['topic_reported']) && $auth->acl_gets('m_report', $row['forum_id']) ? true : false, 'S_TOPIC_UNAPPROVED' => $topic_unapproved, 'S_POSTS_UNAPPROVED' => $posts_unapproved));
    }
    unset($topic_rows);
}
开发者ID:yunsite,项目名称:gloryroad,代码行数:96,代码来源:mcp_forum.php

示例15: page_header

		));
	}
}
// now I have the urge to wash my hands :(


// We overwrite $_REQUEST['f'] if there is no forum specified
// to be able to display the correct online list.
// One downside is that the user currently viewing this topic/post is not taken into account.
if (empty($_REQUEST['f']))
{
	$_REQUEST['f'] = $forum_id;
}

// We need to do the same with the topic_id. See #53025.
if (empty($_REQUEST['t']) && !empty($topic_id))
{
	$_REQUEST['t'] = $topic_id;
}

// Output the page
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);

$template->set_filenames(array(
	'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);

page_footer();

?>
开发者ID:gonzo1247,项目名称:hitman_roa,代码行数:31,代码来源:viewtopic.php


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