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


PHP URL::refresh方法代码示例

本文整理汇总了PHP中URL::refresh方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::refresh方法的具体用法?PHP URL::refresh怎么用?PHP URL::refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在URL的用法示例。


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

示例1: session_pagestart

 *	 it under the terms of the GNU General Public License as published by
 *	 the Free Software Foundation; either version 2 of the License, or
 *	 (at your option) any later version.
 *
 ***************************************************************************/
if (!defined('CPG_NUKE')) {
    exit;
}
require_once 'modules/' . $module_name . '/nukebb.php';
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// Start of program proper
//
if (isset($_GET['mode']) || isset($_POST['mode'])) {
    $mode = isset($_GET['mode']) ? $_GET['mode'] : $_POST['mode'];
    if ($mode == 'viewprofile') {
        $username = isset($_GET[POST_USERS_URL]) ? $_GET[POST_USERS_URL] : $_POST[POST_USERS_URL];
        URL::refresh(URL::index('Your_Account&profile=' . $username), 0);
    } else {
        if ($mode == 'email') {
            require_once 'includes/phpBB/usercp_email.php';
        }
    }
} else {
    URL::refresh(URL::index(), 0);
}
exit;
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:profile.php

示例2: sprintf

            $is_watching_topic = TRUE;
            if ($row['notify_status']) {
                $sql_priority = SQL_LAYER == 'mysql' ? 'LOW_PRIORITY' : '';
                $sql = "UPDATE {$sql_priority} " . TOPICS_WATCH_TABLE . "\n\t\t\t\t\tSET notify_status = 0\n\t\t\t\t\tWHERE topic_id = {$topic_id}\n\t\t\t\t\t\tAND user_id = " . $userdata['user_id'];
                $result = $db->sql_query($sql);
            }
        }
    } else {
        if (isset($_GET['watch'])) {
            if ($_GET['watch'] == 'topic') {
                $is_watching_topic = TRUE;
                $sql_priority = SQL_LAYER == "mysql" ? "LOW_PRIORITY" : '';
                $sql = "INSERT {$sql_priority} INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)\n\t\t\t\t\tVALUES (" . $userdata['user_id'] . ", {$topic_id}, 0)";
                $result = $db->sql_query($sql);
            }
            URL::refresh(URL::index("&file=viewtopic&" . POST_TOPIC_URL . "={$topic_id}&start={$start}"));
            $message = $lang['You_are_watching'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . URL::index("&amp;file=viewtopic&amp;" . POST_TOPIC_URL . "={$topic_id}&amp;start={$start}") . '">', '</a>');
            message_die(GENERAL_MESSAGE, $message);
        }
    }
} else {
    if (isset($_GET['unwatch'])) {
        if ($_GET['unwatch'] == 'topic') {
            URL::redirect(URL::index('Your_Account'), true);
        }
    }
}
# Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
# then get it's value, find the number of topics with dates newer than it (to properly
# handle pagination) and alter the main query
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:viewtopic.php

示例3: url_refresh

function url_refresh($url = '', $time = 3)
{
    depricated_warning();
    URL::refresh($url, $time);
}
开发者ID:cbsistem,项目名称:nexos,代码行数:5,代码来源:linking.php

示例4: emailer

         //
         $result = $db->sql_query("SELECT group_name FROM " . GROUPS_TABLE . " WHERE group_id = {$group_id}");
         $group_name_row = $db->sql_fetchrow($result);
         $group_name = $group_name_row['group_name'];
         require_once "includes/phpBB/emailer.php";
         $emailer = new emailer();
         $emailer->from($board_config['board_email']);
         $emailer->replyto($board_config['board_email']);
         $emailer->use_template('group_added', $row['user_lang']);
         $emailer->email_address($row['user_email']);
         $emailer->set_subject($lang['Group_added']);
         $emailer->assign_vars(array('SITENAME' => $board_config['sitename'], 'GROUP_NAME' => $group_name, 'EMAIL_SIG' => !empty($board_config['board_email_sig']) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_GROUPCP' => URL::index('&' . POST_GROUPS_URL . "={$group_id}", true, true)));
         $emailer->send();
         $emailer->reset();
     } else {
         URL::refresh(URL::index("&" . POST_GROUPS_URL . "={$group_id}"));
         $message = $lang['User_is_member_group'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . URL::index("&amp;" . POST_GROUPS_URL . "={$group_id}") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . URL::index() . '">', '</a>');
         message_die(GENERAL_MESSAGE, $message);
     }
 } else {
     if ((isset($_POST['approve']) || isset($_POST['deny'])) && isset($_POST['pending_members']) || isset($_POST['remove']) && isset($_POST['members'])) {
         $members = isset($_POST['approve']) || isset($_POST['deny']) ? $_POST['pending_members'] : $_POST['members'];
         $sql_in = '';
         for ($i = 0; $i < count($members); $i++) {
             $sql_in .= ($sql_in != '' ? ', ' : '') . intval($members[$i]);
         }
         if (isset($_POST['approve'])) {
             $sql = "UPDATE " . USER_GROUP_TABLE . "\n\t\t\t\t\t\t\tSET user_pending = 0\n\t\t\t\t\t\t\tWHERE user_id IN ({$sql_in})\n\t\t\t\t\t\t\t\tAND group_id = {$group_id}";
             $sql_select = "SELECT user_email\n\t\t\t\t\t\t\tFROM " . USERS_TABLE . "\n\t\t\t\t\t\t\tWHERE user_id IN ({$sql_in})";
         } else {
             if (isset($_POST['deny']) || isset($_POST['remove'])) {
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:index.php

示例5: session_pagestart

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
$viewcat = !empty($_GET[POST_CAT_URL]) ? $_GET[POST_CAT_URL] : -1;
//
// Handle marking posts
//
if (isset($_GET['mark']) || isset($_POST['mark'])) {
    $mark_read = isset($_POST['mark']) ? $_POST['mark'] : $_GET['mark'];
    if ($mark_read == 'forums') {
        if (is_user()) {
            $CPG_SESS[$module_name]['track_all'] = time();
        }
        URL::refresh(URL::index());
        $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . URL::index() . '">', '</a> ');
        message_die(GENERAL_MESSAGE, $message);
    }
}
//
// End handle marking posts
//
//
// If you don't use these stats on your index you may want to consider removing them
//
$l_total_post_s = $total_posts = 0;
//
// Start page proper
//
$category_rows = BoardCache::categories();
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:index.php

示例6: cpg_die

        $type = "image/gif";
    } else {
        if ($ext == "png") {
            $type = "image/png";
        } else {
            $type = "image/jpeg";
        }
    }
    if (!$mail->AddEmbeddedImage($image, "the-image", "ecard.{$ext}", "base64", $type)) {
        cpg_die(_ERROR, $mail->ErrorInfo, __FILE__, __LINE__);
    }
    if (!$mail->Send()) {
        cpg_die(_ERROR, $mail->ErrorInfo, __FILE__, __LINE__);
        //cpg_die(_ERROR, SEND_FAILED, __FILE__, __LINE__);
    }
    URL::refresh(URL::index("&file=displayimage&album={$album}&pos={$pos}"));
    pageheader(E_TITLE);
    msg_box(INFO, SEND_SUCCESS, CONTINU, URL::index("&file=displayimage&album={$album}&pos={$pos}"));
    pagefooter();
}
pageheader(E_TITLE);
starttable("100%");
echo '
<form method="post" name="post" action="' . URL::index("&amp;file=ecard&amp;album={$album}&amp;pid={$pid}&amp;pos={$pos}") . '" enctype="multipart/form-data" accept-charset="utf-8">
<tr>
	<td colspan="3" class="tableh1"><h2>' . E_TITLE . '</h2></td>
</tr><tr>
	<td class="tableh2" colspan="2"><b>' . FROM . '</b></td>
	<td rowspan="6" align="center" valign="top" class="tableb">
		<img src="' . $thumb_pic_url . '" alt="" vspace="8" border="0" class="image" /><br />
	</td>
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:ecard.php

示例7: unset

         $status = $db->sql_query($sql);
         unset($_SESSION['CPG_USER']);
         if ($to_userinfo['user_notify_pm'] && !empty($to_userinfo['user_email']) && $to_userinfo['user_active']) {
             require_once 'includes/phpBB/emailer.php';
             $emailer = new emailer();
             $emailer->from($MAIN_CFG['global']['notify_from']);
             $emailer->replyto($MAIN_CFG['global']['notify_email']);
             $emailer->use_template('privmsg_notify', $to_userinfo['user_lang']);
             $emailer->email_address($to_userinfo['user_email']);
             $emailer->set_subject($lang['Notification_subject']);
             $emailer->assign_vars(array('USERNAME' => $to_username, 'SITENAME' => $MAIN_CFG['global']['sitename'], 'EMAIL_SIG' => !empty($MAIN_CFG['private_messages']['email_sig']) ? str_replace('<br />', "\n", "-- \n" . $MAIN_CFG['private_messages']['email_sig']) : '', 'U_INBOX' => URL::index('&amp;folder=inbox', true, true)));
             $emailer->send();
             $emailer->reset();
         }
     }
     URL::refresh(URL::index('&folder=inbox'));
     $msg = $lang['Message_sent'] . '<br /><br />' . sprintf($lang['Click_return_inbox'], '<a href="' . URL::index('&amp;folder=inbox') . '">', '</a> ') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . $mainindex . '">', '</a>');
     cpg_error($msg);
 } else {
     if ($preview || $refresh || $error) {
         //
         // If we're previewing or refreshing then obtain the data
         // passed to the script, process it a little, do some checks
         // where neccessary, etc.
         //
         $to_username = isset($_POST['username']) ? trim(strip_tags($_POST['username'])) : '';
         $privmsg_subject = isset($_POST['subject']) ? trim(strip_tags($_POST['subject'])) : '';
         $privmsg_message = isset($_POST['message']) ? trim($_POST['message']) : '';
         $privmsg_message = preg_replace('#<textarea>#si', '&lt;textarea&gt;', $privmsg_message);
         //
         // Do mode specific things
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:index.php

示例8: sprintf

                if ($forum_auth_fields[$i] == 'auth_vote') {
                    if ($_POST['auth_vote'] == AUTH_ALL) {
                        $value = AUTH_REG;
                    }
                }
                $sql .= ($sql != '' ? ', ' : '') . $forum_auth_fields[$i] . ' = ' . $value;
            }
            $sql = "UPDATE " . FORUMS_TABLE . " SET {$sql} WHERE forum_id = {$forum_id}";
        }
        if ($sql != '') {
            $db->sql_query($sql);
        }
        $forum_sql = '';
        $adv = 0;
    }
    URL::refresh(URL::admin('&do=forumauth&' . POST_FORUM_URL . '=' . $forum_id));
    $message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'], '<a href="' . URL::admin('&amp;do=forumauth') . '">', "</a>");
    message_die(GENERAL_MESSAGE, $message);
    return;
}
// End of submit
//
// Get required information, either all forums if
// no id was specified or just the requsted if it
// was
//
$sql = "SELECT f.*\n\tFROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c\n\tWHERE c.cat_id = f.cat_id\n\t{$forum_sql}\n\tORDER BY c.cat_order ASC, f.forum_order ASC";
$result = $db->sql_query($sql);
$forum_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
if (empty($forum_id)) {
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:admin_forumauth.php

示例9: delete_post

function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
{
    global $board_config, $lang, $db, $phpbb_root_path;
    global $userdata;
    if ($mode != 'poll_delete') {
        include "includes/phpBB/functions_search.php";
        $db->sql_query("DELETE FROM " . POSTS_TABLE . " WHERE post_id = {$post_id}");
        $db->sql_query("DELETE FROM " . POSTS_TEXT_TABLE . " WHERE post_id = {$post_id}");
        if ($post_data['last_post']) {
            if ($post_data['first_post']) {
                $forum_update_sql .= ', forum_topics = forum_topics - 1';
                $sql = "DELETE FROM " . TOPICS_TABLE . "\n\t\t\t\t   WHERE topic_id = {$topic_id} OR topic_moved_id = {$topic_id}";
                $db->sql_query($sql);
                $db->sql_query("DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = {$topic_id}");
            }
        }
        remove_search_post($post_id);
    }
    if ($mode == 'poll_delete' || $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] && $post_data['has_poll'] && $post_data['edit_poll']) {
        $db->sql_query("DELETE FROM " . VOTE_DESC_TABLE . " WHERE topic_id = {$topic_id}");
        $db->sql_query("DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = {$poll_id}");
        $db->sql_query("DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id = {$poll_id}");
    }
    if ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) {
        URL::refresh(URL::index("&file=viewforum&" . POST_FORUM_URL . "={$forum_id}"));
        $message = $lang['Deleted'];
    } else {
        URL::refresh(URL::index("&file=viewtopic&" . POST_TOPIC_URL . "={$topic_id}"));
        $message = ($mode == 'poll_delete' ? $lang['Poll_delete'] : $lang['Deleted']) . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . URL::index("&amp;file=viewtopic&amp;" . POST_TOPIC_URL . "={$topic_id}") . '">', '</a>');
    }
    $message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . URL::index("&amp;file=viewforum&amp;" . POST_FORUM_URL . "={$forum_id}") . '">', '</a>');
    return;
}
开发者ID:cbsistem,项目名称:nexos,代码行数:33,代码来源:functions_post.php

示例10: sprintf

    $message = !$is_auth['auth_view'] ? $lang['Forum_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
    message_die(GENERAL_MESSAGE, $message);
    //cpg_error($message, GENERAL_MESSAGE);
}
//
// End of auth check
//
//
// Handle marking posts
//
if (isset($_GET['mark']) || isset($_POST['mark'])) {
    $mark_read = isset($_POST['mark']) ? $_POST['mark'] : $_GET['mark'];
    if ($mark_read == 'topics') {
        if (is_user()) {
            $CPG_SESS[$module_name]['track_forums'][$forum_id] = time();
            URL::refresh(URL::index("&file=viewforum&" . POST_FORUM_URL . "={$forum_id}"));
        }
        $message = $lang['Topics_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . URL::index("&amp;file=viewforum&amp;" . POST_FORUM_URL . "={$forum_id}") . '">', '</a> ');
        message_die(GENERAL_MESSAGE, $message);
        //cpg_error($message, GENERAL_MESSAGE);
    }
}
//
// End handle marking posts
//
$tracking_topics = isset($CPG_SESS[$module_name]['track_topics']) ? $CPG_SESS[$module_name]['track_topics'] : array();
$tracking_forums = isset($CPG_SESS[$module_name]['track_forums']) ? $CPG_SESS[$module_name]['track_forums'] : array();
//
// Do the forum Prune
//
if ($is_auth['auth_mod'] && $board_config['prune_enable']) {
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:viewforum.php


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