本文整理汇总了PHP中get_request_uri函数的典型用法代码示例。如果您正苦于以下问题:PHP get_request_uri函数的具体用法?PHP get_request_uri怎么用?PHP get_request_uri使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_request_uri函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_path_info
function get_path_info()
{
if (isset($_SERVER['PATH_INFO']) && !empty($_SERVER['PATH_INFO'])) {
return $_SERVER['PATH_INFO'];
} else {
return urldecode(get_slashed_argument(get_request_uri(), 'backends/download.php'));
}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:url.lib.php
示例2: redirectToI18nUrl
static function redirectToI18nUrl()
{
$uri = get_request_uri();
$pos = strpos($uri, "/" . get_sub_root() . get_language());
if ($pos === false || $pos !== false && $pos != 0) {
$uri = get_request_uri(false);
$uri = preg_replace('/\\/' . str_replace('/', '\\/', get_sub_root()) . '/', get_language() . '/', $uri, 1);
HTML::forward($uri);
}
}
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:10,代码来源:HTML.class.php
示例3: html_guest_error
function html_guest_error()
{
$frame_top_target = html_get_top_frame_name();
$webtag = get_webtag();
forum_check_webtag_available($webtag);
$final_uri = sprintf("logon.php?webtag=%s&final_uri=%s", $webtag, rawurlencode(get_request_uri(true, false)));
$available_popup_files_preg = implode("|^", array_map('preg_quote_callback', get_available_popup_files()));
$available_support_pages_preg = implode("|^", array_map('preg_quote_callback', get_available_support_files()));
if (preg_match("/^{$available_popup_files_preg}/", $final_uri) > 0) {
html_draw_error(gettext("Sorry, you need to be logged in to use this feature."), null, 'post', array('close_popup' => gettext("Close")));
} else {
if (preg_match("/^{$available_support_pages_preg}/", $final_uri) > 0) {
html_draw_error(gettext("Sorry, you need to be logged in to use this feature."));
} else {
html_draw_error(gettext("Sorry, you need to be logged in to use this feature."), html_get_forum_file_path('logout.php'), 'post', array('submit' => gettext("Login now"), 'register' => gettext("Register")), array('final_uri' => $final_uri), $frame_top_target);
}
}
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:18,代码来源:html.inc.php
示例4: gettext
}
} else {
echo " <td class=\"postbody\" align=\"left\" width=\"200\">", gettext("Unknown"), "</td>\n";
}
if (isset($visitor['REFERER']) && strlen(trim($visitor['REFERER'])) > 0) {
$visitor['REFERER_FULL'] = $visitor['REFERER'];
if (!($visitor['REFERER'] = split_url($visitor['REFERER']))) {
if (mb_strlen($visitor['REFERER_FULL']) > 25) {
$visitor['REFERER'] = mb_substr($visitor['REFERER_FULL'], 0, 25);
$visitor['REFERER'] .= "…";
}
}
if (referer_is_banned($visitor['REFERER'])) {
echo " <td class=\"posthead\" align=\"left\" style=\"white-space: nowrap\"> <a href=\"admin_banned.php?webtag={$webtag}&unban_referer=", rawurlencode($visitor['REFERER_FULL']), "&ret=", rawurlencode(get_request_uri(true, false)), "\" title=\"{$visitor['REFERER_FULL']}\">{$visitor['REFERER']}</a> <a href=\"{$visitor['REFERER_FULL']}\" target=\"_blank\"><img src=\"", html_style_image('link.png'), "\" border=\"0\" align=\"top\" alt=\"", gettext("External Link"), "\" title=\"", gettext("External Link"), "\" /></a> (", gettext("Banned"), ")</td>\n";
} else {
echo " <td class=\"posthead\" align=\"left\" style=\"white-space: nowrap\"> <a href=\"admin_banned.php?webtag={$webtag}&ban_referer=", rawurlencode($visitor['REFERER_FULL']), "&ret=", rawurlencode(get_request_uri(true, false)), "\" title=\"{$visitor['REFERER_FULL']}\">{$visitor['REFERER']}</a> <a href=\"{$visitor['REFERER_FULL']}\" target=\"_blank\"><img src=\"", html_style_image('link.png'), "\" border=\"0\" align=\"top\" alt=\"", gettext("External Link"), "\" title=\"", gettext("External Link"), "\" /></a></td>\n";
}
} else {
echo " <td class=\"posthead\" align=\"left\" style=\"white-space: nowrap\"> ", gettext("Unknown"), "</td>\n";
}
echo " </tr>\n";
}
}
echo " <tr>\n";
echo " <td align=\"left\" class=\"postbody\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin_visitor_log.php
示例5: forum_check_password
function forum_check_password($forum_fid)
{
if (!is_numeric($forum_fid)) {
return false;
}
$webtag = get_webtag();
if (!($forum_passhash = forum_get_password($forum_fid))) {
return true;
}
$forum_passhash_check = session::get_value("{$webtag}_PASSWORD");
if (isset($_POST['forum_password']) && strlen($_POST['forum_password']) > 0) {
$forum_passhash_check = md5($_POST['forum_password']);
}
if ($forum_passhash == $forum_passhash_check) {
session::set_value("{$webtag}_PASSWORD", $forum_passhash_check);
return true;
}
html_draw_top(sprintf("title=%s", gettext("Password Protected Forum")));
echo "<h1>", gettext("Password Protected Forum"), "</h1>\n";
if (session::get_value("{$webtag}_PASSWORD")) {
html_display_error_msg(gettext("The username or password you supplied is not valid."), '550', 'center');
}
if ($password_protected_message = forum_get_setting('password_protected_message')) {
echo fix_html($password_protected_message);
} else {
html_display_warning_msg(gettext("This forum is password protected. To gain access enter the password below."), '400', 'center');
}
echo "<br />\n";
echo "<div align=\"center\">\n";
echo " <form accept-charset=\"utf-8\" method=\"post\" action=\"", get_request_uri(), "\" target=\"_self\" autocomplete=\"off\">\n";
if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) {
echo form_input_hidden_array($_POST);
}
echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\" width=\"400\">\n";
echo " <tr>\n";
echo " <td class=\"posthead\" align=\"center\">\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Enter Password"), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table class=\"posthead\" width=\"90%\">\n";
echo " <tr>\n";
echo " <td align=\"left\">", gettext("Password"), ":</td>\n";
echo " <td align=\"left\">", form_input_password('forum_password', '', 40, false, ''), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\" colspan=\"2\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\">", form_submit("logon", gettext("Logon")), " ", form_submit("cancel", gettext("Cancel")), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0) || session::check_perm(USER_PERM_FORUM_TOOLS, 0)) {
html_display_warning_msg(gettext("If you want to change some settings on your forum click the Admin link in the navigation bar above."), '400', 'center');
}
echo " </form>\n";
echo "</div>\n";
html_draw_bottom();
exit;
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:74,代码来源:forum.inc.php
示例6: rawurlencode
echo " <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&ban_referer=", rawurlencode($user['SESSION_REFERER_FULL']), "&ret=", rawurlencode(get_request_uri(true, false)), "\" title=\"{$user['SESSION_REFERER_FULL']}\">{$user['SESSION_REFERER']}</a> <a href=\"{$user['SESSION_REFERER_FULL']}\" target=\"_blank\"><img src=\"", html_style_image('link.png'), "\" border=\"0\" align=\"top\" alt=\"", gettext("External Link"), "\" title=\"", gettext("External Link"), "\" /></a></td>\n";
echo " </tr>\n";
}
} else {
echo " <tr>\n";
echo " <td align=\"left\" width=\"150\">", gettext("Session Referer"), "</td>\n";
echo " <td align=\"left\">", gettext("Unknown"), "</td>\n";
echo " </tr>\n";
}
echo " <tr>\n";
echo " <td align=\"left\" width=\"150\">", gettext("Last IP Address"), ":</td>\n";
if (ip_is_banned($user['IPADDRESS'])) {
echo " <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&unban_ipaddress={$user['IPADDRESS']}&ret=", rawurlencode(get_request_uri(true, false)), "\" target=\"_self\">{$user['IPADDRESS']}</a> (", gettext("Banned"), ")</td>\n";
} else {
if (strlen(trim($user['IPADDRESS'])) > 0) {
echo " <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&ban_ipaddress={$user['IPADDRESS']}&ret=", rawurlencode(get_request_uri(true, false)), "\" target=\"_self\">{$user['IPADDRESS']}</a></td>\n";
} else {
echo " <td align=\"left\">", gettext("Unknown"), "</td>\n";
}
}
echo " </tr>\n";
}
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin_user.php
示例7: light_html_display_msg
light_html_display_msg(gettext("Successfully created user account"), gettext("Your user account has been created successfully! Click the continue button below to login"), 'index.php', 'get', array('continue' => gettext("Continue")), array('final_uri' => $final_uri));
light_html_draw_bottom();
exit;
}
} else {
$error_msg_array[] = gettext("Error creating user record");
$valid = false;
}
}
}
light_html_draw_top(array('title' => gettext('User Registration'), 'js' => array('js/register.js')));
light_navigation_bar();
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
light_html_display_error_array($error_msg_array);
}
echo "<form accept-charset=\"utf-8\" name=\"form_register\" action=\"", get_request_uri(), "\" method=\"post\" target=\"_self\">\n";
echo " ", form_csrf_token_field(), "\n";
echo "<div class=\"register\">\n";
echo "<h3>", gettext("Register"), "</h3>\n";
echo "<div class=\"register_inner\">\n";
if (isset($user_agree_rules) && $user_agree_rules == 'Y') {
echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo " ", form_input_hidden('user_agree_rules', htmlentities_array($user_agree_rules)), "\n";
echo " <div class=\"register_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", null, 20, 15) . "</div>\n";
echo " <div class=\"register_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n";
echo " <div class=\"register_password\"><span>", gettext("Confirm Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n";
echo " <div class=\"register_nickname\"><span>", gettext("Nickname"), ":</span>", light_form_input_text("nickname", null, 20, 32), "</div>\n";
echo " <div class=\"register_email\"><span>", gettext("Email"), ":</span>", light_form_input_text("email", null, 20, 32), "</div>\n";
echo " <div class=\"register_dob\"><span>", gettext("Date of Birth"), ":</span>\n";
echo " ", light_form_dob_dropdowns(isset($new_user_prefs['DOB_YEAR']) ? htmlentities_array($new_user_prefs['DOB_YEAR']) : 0, isset($new_user_prefs['DOB_MONTH']) ? htmlentities_array($new_user_prefs['DOB_MONTH']) : 0, isset($new_user_prefs['DOB_DAY']) ? htmlentities_array($new_user_prefs['DOB_DAY']) : 0, true), "</div>\n";
if (forum_get_setting('text_captcha_enabled', 'Y') && $text_captcha->generate_keys()) {
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:lregister.php
示例8: cforms_scripts
function cforms_scripts()
{
global $wp_scripts, $localversion;
### get options
$cformsSettings = get_option('cforms_settings');
$r = $cformsSettings['global']['cforms_root'];
### global settings
$request_uri = get_request_uri();
if (version_compare(strval($wp_scripts->registered['jquery']->ver), strval("1.4.2")) === -1) {
wp_deregister_script('jquery');
wp_register_script('jquery', $r . '/js/jquery.js', false, '1.4.2');
wp_enqueue_script('jquery');
}
### Add admin styles
wp_register_style('cforms-admin-style', $r . '/cforms-admin.css');
wp_enqueue_style('cforms-admin-style');
if (strpos($request_uri, 'cforms-options') !== false) {
wp_register_style('calendar-style', $r . '/styling/calendar.css');
wp_enqueue_style('calendar-style');
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-core');
wp_register_script('cforms_admin_cal', $r . '/js/cformsadmincal.js', false, $localversion);
wp_enqueue_script('cforms_admin_cal');
}
wp_deregister_script('prototype');
wp_register_script('cforms_interface', $r . '/js/interface.js', false, $localversion);
wp_register_script('cforms_admin', $r . '/js/cformsadmin.js', false, $localversion);
wp_enqueue_script('cforms_interface');
wp_enqueue_script('cforms_admin');
}
开发者ID:nvvetal,项目名称:water,代码行数:30,代码来源:lib_functions.php
示例9: set_server_protocol
// Correctly set server protocol
set_server_protocol();
// Disable caching if on AOL
cache_disable_aol();
// Disable caching if proxy server detected.
cache_disable_proxy();
// Check that Beehive is installed correctly
check_install();
// Multiple forum support
require_once BH_INCLUDE_PATH . 'forum.inc.php';
// Initialise the session
session::init();
// Perform ban check
ban_check($_SESSION);
// Check to see if user account has been banned.
if (session::user_banned()) {
light_html_user_banned();
exit;
}
// Check to see if the user has been approved.
if (!session::user_approved()) {
light_html_user_require_approval();
exit;
}
// Get the webtag for the current forum
$webtag = get_webtag();
// Check we have a webtag and have access to the specified forum
if (!forum_check_webtag_available($webtag) || !forum_check_access_level()) {
$request_uri = rawurlencode(get_request_uri(false));
header_redirect("lforums.php?webtag_error");
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:lboot.php
示例10: light_html_guest_error
function light_html_guest_error()
{
$webtag = get_webtag();
forum_check_webtag_available($webtag);
light_html_draw_error(gettext("Sorry, you need to be logged in to use this feature."), 'llogout.php', 'post', array('login' => gettext("Login now")), array('final_uri' => get_request_uri(true, false)));
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:6,代码来源:light.inc.php
示例11: light_poll_display
function light_poll_display($tid, $msg_count, $folder_fid, $in_list = true, $closed = false, $limit_text = true, $is_preview = false)
{
$webtag = get_webtag();
$total_votes = 0;
$user_votes = 0;
$guest_votes = 0;
$poll_data = poll_get($tid);
$poll_results = poll_get_votes($tid);
$user_poll_votes_array = poll_get_user_votes($tid);
poll_get_total_votes($tid, $total_votes, $user_votes, $guest_votes);
$request_uri = get_request_uri();
$poll_display = "<div class=\"poll\">\n";
$poll_display .= "<form accept-charset=\"utf-8\" method=\"post\" action=\"{$request_uri}\" target=\"_self\">\n";
$poll_display .= form_input_hidden('webtag', htmlentities_array($webtag));
$poll_display .= form_input_hidden('tid', htmlentities_array($tid));
if ((!is_array($user_poll_votes_array) || $poll_data['CHANGEVOTE'] == POLL_VOTE_MULTI) && (session::get_value('UID') > 0 || $poll_data['ALLOWGUESTS'] == POLL_GUEST_ALLOWED && forum_get_setting('poll_allow_guests', 'Y')) && ($poll_data['CLOSES'] == 0 || $poll_data['CLOSES'] > time()) && !$is_preview) {
foreach ($poll_results as $question_id => $poll_question) {
$poll_display .= "<h3>" . word_filter_add_ob_tags($poll_question['QUESTION'], true) . "</h3>\n";
if ($poll_data['OPTIONTYPE'] == POLL_OPTIONS_DROPDOWN) {
$dropdown_options_array = array_map('poll_dropdown_options_callback', $poll_question['OPTIONS_ARRAY']);
$poll_display .= light_form_dropdown_array("pollvote[{$question_id}]", $dropdown_options_array);
} else {
foreach ($poll_question['OPTIONS_ARRAY'] as $option_id => $option) {
if (sizeof($poll_question['OPTIONS_ARRAY']) == 1 || $poll_question['ALLOW_MULTI'] == 'Y') {
$poll_display .= light_form_checkbox("pollvote[{$question_id}][{$option_id}]", 'Y', word_filter_add_ob_tags($option['OPTION_NAME']), false);
} else {
$poll_display .= light_form_radio("pollvote[{$question_id}]", $option_id, word_filter_add_ob_tags($option['OPTION_NAME']), false);
}
}
}
}
} else {
if ($poll_data['SHOWRESULTS'] == POLL_SHOW_RESULTS || $poll_data['CLOSES'] > 0 && $poll_data['CLOSES'] < time()) {
$poll_display .= "<div class=\"poll_results\">\n";
foreach ($poll_results as $question_id => $poll_question) {
$poll_display .= "<h3>" . word_filter_add_ob_tags($poll_question['QUESTION'], true) . "</h3>\n";
$poll_display .= light_poll_graph_display($poll_question['OPTIONS_ARRAY']);
}
$poll_display .= "</div>\n";
} else {
$poll_display .= "<div class=\"poll_results\">\n";
foreach ($poll_results as $question_id => $poll_question) {
$poll_display .= "<h3>" . word_filter_add_ob_tags($poll_question['QUESTION'], true) . "</h3>\n";
foreach ($poll_question['OPTIONS_ARRAY'] as $option_id => $option) {
$poll_display .= word_filter_add_ob_tags($option['OPTION_NAME']);
}
}
$poll_display .= "</div>\n";
}
}
if (!$is_preview) {
$poll_display .= "<div class=\"poll_vote_counts\">" . poll_format_vote_counts($poll_data, $user_votes, $guest_votes) . "</div>\n";
if ($poll_data['CLOSES'] <= time() && $poll_data['CLOSES'] != 0) {
$poll_display .= "<div class=\"poll_vote_closed\">" . gettext("Poll has ended") . "</div>\n";
if (is_array($user_poll_votes_array) && sizeof($user_poll_votes_array) > 0) {
$poll_display .= poll_display_user_votes($user_poll_votes_array);
}
} else {
if (is_array($user_poll_votes_array) && sizeof($user_poll_votes_array) > 0) {
$poll_display .= poll_display_user_votes($user_poll_votes_array);
if ($poll_data['CHANGEVOTE'] == POLL_VOTE_MULTI) {
$poll_display .= "<div class=\"poll_buttons\">" . light_form_submit('pollsubmit', gettext("Vote")) . "</div>";
}
if ($poll_data['CHANGEVOTE'] != POLL_VOTE_CANNOT_CHANGE) {
$poll_display .= "<div class=\"poll_buttons\">" . light_form_submit('pollchangevote', gettext("Change vote")) . "</div>\n";
}
if ($poll_data['VOTETYPE'] == POLL_VOTE_PUBLIC && $poll_data['CHANGEVOTE'] < POLL_VOTE_MULTI && $poll_data['POLLTYPE'] != POLL_TABLE_GRAPH) {
$poll_display .= "<div class=\"poll_type_warning\">" . gettext("<b>Warning</b>: This is a public ballot. Your name will be visible next to the option you vote for.") . "</div>\n";
}
} else {
if (session::get_value('UID') > 0 || $poll_data['ALLOWGUESTS'] == POLL_GUEST_ALLOWED && forum_get_setting('poll_allow_guests', 'Y')) {
$poll_display .= "<div class=\"poll_buttons\">" . light_form_submit('pollsubmit', gettext("Vote")) . "</div>";
if ($poll_data['VOTETYPE'] == POLL_VOTE_PUBLIC && $poll_data['CHANGEVOTE'] < POLL_VOTE_MULTI && $poll_data['POLLTYPE'] != POLL_TABLE_GRAPH) {
$poll_display .= "<div class=\"poll_type_warning\">" . gettext("<b>Warning</b>: This is a public ballot. Your name will be visible next to the option you vote for.") . "</div>\n";
}
}
}
}
}
$poll_display .= "</form>\n";
$poll_display .= "</div>\n";
$poll_data['CONTENT'] = $poll_display;
$poll_data['FROM_RELATIONSHIP'] = user_get_relationship(session::get_value('UID'), $poll_data['FROM_UID']);
light_message_display($tid, $poll_data, $msg_count, 1, $folder_fid, $in_list, $closed, $limit_text, true, $is_preview);
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:85,代码来源:light.inc.php
示例12: admin_check_credentials
function admin_check_credentials()
{
$webtag = get_webtag();
if (($admin_timeout = session::get_value('ADMIN_TIMEOUT')) && $admin_timeout > time()) {
session::set_value('ADMIN_TIMEOUT', time() + HOUR_IN_SECONDS);
return true;
}
if (isset($_POST['admin_logon']) && isset($_POST['admin_password'])) {
$admin_logon = $_POST['admin_logon'];
$admin_password = $_POST['admin_password'];
if (($admin_uid = user_logon($admin_logon, $admin_password)) && $admin_uid == session::get_value('UID')) {
session::set_value('ADMIN_TIMEOUT', time() + HOUR_IN_SECONDS);
return true;
} else {
html_display_error_msg(gettext("The username or password you supplied are not valid."), '500', 'center');
}
}
html_draw_top();
if (isset($error_message) && strlen(trim($error_message)) > 0) {
html_display_error_msg($error_message, '500', 'center');
}
if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) {
html_display_warning_msg(gettext('To save any changes you must re-authenticate yourself'), '500', 'center');
} else {
html_display_warning_msg(gettext('To access the Admin area you must re-authenticate yourself'), '500', 'center');
}
echo "<div align=\"center\">\n";
echo " <form accept-charset=\"utf-8\" name=\"logonform\" method=\"post\" action=\"", get_request_uri(), "\" target=\"_self\" autocomplete=\"off\">\n";
if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) {
echo form_input_hidden_array($_POST);
}
echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
echo " <br />\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"325\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"subhead\">", gettext("Please enter your password"), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table class=\"posthead\" width=\"100%\">\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
echo " <td align=\"right\" width=\"90\">", gettext("Username"), ":</td>\n";
echo " <td align=\"left\">", form_input_text('admin_logon', '', 24, 32, '', 'bhinputlogon'), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"right\" width=\"90\">", gettext("Password"), ":</td>\n";
echo " <td align=\"left\">", form_input_password('admin_password', '', 24, 32, '', 'bhinputlogon'), "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\" colspan=\"2\">", form_submit('logon', gettext("Logon")), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </form>\n";
echo "</div>\n";
html_draw_bottom();
exit;
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:80,代码来源:admin.inc.php
示例13: check_pathinfo
function check_pathinfo()
{
$host = get_host();
$port = get_port();
$uri = strtolower(get_schema()) . '://' . get_host() . get_request_uri() . '/pathinfotest?check_path_info=1';
$content = '';
$host_addr_arr = array($host, '127.0.0.1', 'localhost');
foreach ($host_addr_arr as $host_addr) {
$fp = @fsockopen($host_addr, $port, $errno, $errstr, 2);
if ($fp) {
$out = "GET " . $uri . " HTTP/1.1\r\n";
$out .= "Host: {$host}\r\n";
$out .= "Connection: close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp) && strlen($content) < 512) {
$content .= fgets($fp, 128);
}
fclose($fp);
}
$content = preg_split("\r?\n\r?\n", $content);
if (strpos($content[1], 'SUPPORT_PATHINFO') !== false) {
return true;
}
}
if (function_exists('curl_init')) {
ob_start();
$fp = curl_init($uri);
curl_exec($fp);
curl_close($fp);
$str = ob_get_contents();
ob_end_clean();
return $str == 'SUPPORT_PATHINFO' ? true : false;
} else {
return false;
}
}
开发者ID:453111208,项目名称:bbc,代码行数:36,代码来源:check.php
示例14: cache_check_request_throttle
function cache_check_request_throttle($amount)
{
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
return false;
}
if (browser_check(BROWSER_AOL)) {
return false;
}
if (headers_sent()) {
return false;
}
$request = get_request_uri();
if (isset($_SESSION['THROTTLE'][$request]) && $_SESSION['THROTTLE'][$request] > time()) {
$throttle_timestamp = $_SESSION['THROTTLE'][$request];
} else {
$throttle_timestamp = time() + $amount;
}
$_SESSION['THROTTLE'][$request] = $throttle_timestamp;
$etag = md5($_SESSION['UID'] . $_SESSION['LOGON']);
return cache_check_last_modified($throttle_timestamp, $etag, time() + $amount);
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:21,代码来源:cache.inc.php
示例15: user_login
//.........这里部分代码省略.........
$reward_amount = $user_reward_amount;
} elseif ($group_reward_type) {
$reward_type = $group_reward_type;
$reward_amount = $group_reward_amount;
}
$credit_reward_type = "";
$credit_reward_amount = "";
if ($user_credit_reward_type > 0) {
$credit_reward_type = $user_credit_reward_type;
$credit_reward_amount = $user_credit_reward_amount;
} elseif ($group_credit_reward_type) {
$credit_reward_type = $group_credit_reward_type;
$credit_reward_amount = $group_credit_reward_amount;
}
// check for subscriptions
$subscriptions_ids = "";
$check_date_ts = mktime(0, 0, 0, $current_date[MONTH], $current_date[DAY], $current_date[YEAR]);
$sql = " SELECT subscription_id ";
$sql .= " FROM " . $table_prefix . "orders_items ";
$sql .= " WHERE user_id=" . $db->tosql($user_id, INTEGER);
$sql .= " AND is_subscription=1 ";
$sql .= " AND subscription_expiry_date>=" . $db->tosql($check_date_ts, DATETIME);
$db->query($sql);
while ($db->next_record()) {
if ($subscriptions_ids) {
$subscriptions_ids .= ",";
}
$subscriptions_ids .= $db->f("subscription_id");
}
set_session("session_subscriptions_ids", $subscriptions_ids);
$user_info = array("user_id" => $user_id, "user_type_id" => $user_type_id, "layout_id" => $layout_id, "login" => $login, "nickname" => $nickname, "name" => $user_name, "subscriptions_ids" => $subscriptions_ids, "email" => $email, "discount_type" => $discount_type, "discount_amount" => $discount_amount, "price_type" => $price_type, "tax_free" => $tax_free, "is_sms_allowed" => $is_sms_allowed, "reward_type" => $reward_type, "reward_amount" => $reward_amount, "credit_reward_type" => $credit_reward_type, "credit_reward_amount" => $credit_reward_amount, "total_points" => $total_points, "credit_balance" => $credit_balance, "order_min_goods_cost" => $order_min_goods_cost, "order_max_goods_cost" => $order_max_goods_cost);
set_session("session_user_info", $user_info);
if ($remember_me && $login && $password) {
setcookie("cookie_user_login", $login, va_timestamp() + 3600 * 24 * 366);
setcookie("cookie_user_password", $password, va_timestamp() + 3600 * 24 * 366);
}
// get currency if available
if ($currency_code) {
get_currency($currency_code);
}
// update shopping cart if it's available
$shopping_cart = get_session("shopping_cart");
if (is_array($shopping_cart) && sizeof($shopping_cart) > 0) {
include_once "./includes/shopping_cart.php";
recalculate_shopping_cart();
// check if any coupons can be added or removed
check_coupons();
}
// check if need to regenerate session id for secure session
if ($secure_sessions) {
session_set_cookie_params(0, "/", "", true);
session_regenerate_id();
}
// update last visit time
$sql = " UPDATE " . $table_prefix . "users SET last_visit_date=" . $db->tosql(va_time(), DATETIME);
$sql .= ", last_visit_ip=" . $db->tosql(get_ip(), TEXT);
$sql .= ", last_visit_page=" . $db->tosql(get_request_uri(), TEXT);
$sql .= ", last_logged_date=" . $db->tosql(va_time(), DATETIME);
$sql .= ", last_logged_ip=" . $db->tosql(get_ip(), TEXT);
$sql .= " WHERE user_id=" . $db->tosql($user_id, INTEGER);
$db->query($sql);
if ($make_redirects && $redirect_page) {
// convert redirect page to the full url
$ssl = get_param("ssl");
if ($ssl) {
$page_site_url = $secure_url;
} else {
$page_site_url = $site_url;
}
$return_page = get_request_uri();
if (!preg_match("/^https?:\\/\\//i", $redirect_page) && preg_match("/^https?:\\/\\/[^\\/]+(\\/.*)\$/i", $page_site_url, $matches)) {
$page_path_regexp = prepare_regexp($matches[1]);
if (preg_match("/^" . $page_path_regexp . "/i", $redirect_page)) {
$redirect_page = $page_site_url . preg_replace("/^" . $page_path_regexp . "/i", "", $redirect_page);
}
}
header("Location: " . $redirect_page);
exit;
}
} elseif ($current_ts > $expiry_date_ts) {
$is_errors = true;
$errors .= ACCOUNT_EXPIRED_MSG . "<br>";
} else {
$is_errors = true;
$errors .= ACCOUNT_APPROVE_ERROR . "<br>";
}
} else {
$is_errors = true;
if ($user_id) {
$errors .= NO_RECORDS_MSG . "<br>";
} else {
$errors .= LOGIN_PASSWORD_ERROR . "<br>";
}
}
if ($is_errors) {
setcookie("cookie_user_login");
setcookie("cookie_user_password");
}
return !$is_errors;
}
开发者ID:nisargadesign,项目名称:CES,代码行数:101,代码来源:common_functions.php
示例16: set_request_uri
private function set_request_uri($uri, $full_domain_name = '', $is_full_path = 0)
{
$results = $uri;
if ($is_full_path == 0) {
$results = get_request_uri($uri, $full_domain_name);
}
return urldecode($results);
}
开发者ID:jojoee,项目名称:autofeed,代码行数:8,代码来源:news.php
示例17: poll_display
function poll_display($tid, $msg_count, $first_msg, $folder_fid, $in_list = true, $closed = false, $limit_text = true, $show_sigs = true, $is_preview = false, $highlight_array = array())
{
$webtag = get_webtag();
$total_votes = 0;
$user_votes = 0;
$guest_votes = 0;
$poll_data = poll_get($tid);
$poll_results = poll_get_votes($tid);
$user_poll_votes_array = poll_get_user_votes($tid);
poll_get_total_votes($tid, $total_votes, $user_votes, $guest_votes);
$request_uri = get_request_uri();
$poll_display = "<br />\n";
$poll_display .= "<div align=\"center\">\n";
$poll_display .= " <table class=\"box\" cellpadding=\"0\" cellspacing=\"0\" width=\"580\">\n";
$poll_display .= " <tr>\n";
$poll_display .= &q
|
请发表评论