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


PHP html_redirect函数代码示例

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


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

示例1: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $db;
     global $config;
     if (is_array($vars['product_id'])) {
         $p = $db->get_payment($payment_id);
         $price_count = 0;
         foreach ($p['data'][0]['BASKET_PRICES'] as $pp) {
             if ($pp) {
                 $price_count++;
             }
         }
         if ($price_count > 1) {
             return "Only 1 paid product can be selected";
         }
         $product_id = $vars['product_id'][0];
     }
     $product =& get_product($product_id);
     $vars = array('email' => $this->config['business'], 'amount' => $price, 'ordernumber' => $payment_id, 'description' => $product->config['title'], 'returnurl' => sprintf("%s/thanks.php?member_id=%d&product_id=%d&payment_id=%d", $config['root_url'], $member_id, $product_id, $payment_id));
     //encode and send
     $vars1 = array();
     foreach ($vars as $kk => $vv) {
         $v = urlencode($vv);
         $k = urlencode($kk);
         $vars1[] = "{$k}={$v}";
     }
     $vars = join('&', $vars1);
     if ($this->config['testing']) {
         html_redirect("https://demo.nochex.com/nochex.dll/checkout?{$vars}");
     } else {
         html_redirect("https://www.nochex.com/nochex.dll/checkout?{$vars}");
     }
     exit;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:34,代码来源:nochex.inc.php

示例2: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $config, $db;
     $products = $product_id;
     $orig_product_id = $product_id;
     if (is_array($product_id)) {
         $product_id = $product_id[0];
     }
     $product =& get_product($product_id);
     if (count($orig_product_id) > 1) {
         $product->config['title'] = $config['multi_title'];
     }
     $member = $db->get_user($member_id);
     if (preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $product->config['start_date'])) {
         $begin_date = $product->config['start_date'];
     } else {
         $begin_date = date('Y-m-d');
     }
     if (true || $product->config['is_recurring']) {
         // only subscriptions (for reason of Trials), if not recurring will use cycles == 1
         $vars = array("_ipn_act" => "_ipn_subscription", "fid" => "", "itestmode" => $this->config['testmode'] ? "on" : "off", "notifyURL" => $config['root_url'] . "/plugins/payment/safepay/ipn.php", "returnURL" => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), "cancelURL" => $config['root_url'] . "/cancel.php", "notifyEml" => $this->config['notifyEml'], "iowner" => $this->config['owner'], "ireceiver" => $this->config['owner'], "iamount" => sprintf('%.2f', $price), "itemName" => $product->config['title'], "itemNum" => "1", "idescr" => $product->config['description'], "cycleLength" => $product->config['expire_days'] ? get_date_day_diff(time(), strtotime($product->get_expire($begin_date, 'expire_days'))) : '0', "cycles" => $product->config['is_recurring'] ? "0" : "1", "trialPeriod" => $product->config['trial1_days'] ? get_date_day_diff(time(), strtotime($product->get_expire($begin_date, 'trial1_days'))) : '0', "trialCycles" => "1", "trialAmount" => $product->config['trial1_price'], "idelivery" => "1", "iquantity" => "1", "imultiplyPurchase" => "n", "custom1" => $payment_id, "custom2" => "", "custom3" => "", "custom4" => "", "custom5" => "", "colortheme" => "");
     } else {
         // DISABLED! (no Trials support here)
         $vars = array("_ipn_act" => "_ipn_payment", "fid" => "", "itestmode" => $this->config['testmode'] ? "on" : "off", "notifyURL" => $config['root_url'] . "/plugins/payment/safepay/ipn.php", "returnURL" => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), "cancelURL" => $config['root_url'] . "/cancel.php", "notifyEml" => $this->config['notifyEml'], "iowner" => $this->config['owner'], "ireceiver" => $this->config['owner'], "iamount" => sprintf('%.2f', $price), "itemName" => $product->config['title'], "itemNum" => "1", "idescr" => $product->config['description'], "idelivery" => "1", "iquantity" => "1", "imultiplyPurchase" => "n", "custom1" => $payment_id, "custom2" => "", "custom3" => "", "custom4" => "", "custom5" => "", "colortheme" => "");
     }
     $vars1 = array();
     foreach ($vars as $kk => $vv) {
         $v = urlencode($vv);
         $k = urlencode($kk);
         $vars1[] = "{$k}={$v}";
     }
     $vars = join('&', $vars1);
     html_redirect("https://www.safepaysolutions.com/index.php?{$vars}", '', 'Please wait', 'Please wait');
     exit;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:35,代码来源:safepay.inc.php

示例3: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $config, $db;
     $product = $db->get_product($product_id);
     $price = 0 + $price;
     $vars = array('url' => urlencode($config['root_url'] . "/plugins/payment/webmoney/thanks.php"), 'purse' => $this->config['purse'], 'amount' => $price, 'method' => 'GET', 'desc' => urlencode($payment_id . ": " . $product['title']), 'mode' => $this->config['testing'] ? 'test' : '');
     $pm = $db->get_payment($payment_id);
     $pm['data']['wm_vars'] = $vars;
     $db->update_payment($pm['payment_id'], $pm);
     $db->log_error("WebMoney SENT: " . webmoney_get_dump($vars));
     $url = "https://light.wmtransfer.com/pci.aspx";
     switch ($this->config['interface']) {
         case 'rus':
             $url = "https://light.webmoney.ru/pci.aspx";
             break;
         case 'eng':
             $url = "https://light.wmtransfer.com/pci.aspx";
             break;
         case 'keeper':
             $url = "wmk:paylink";
             $vars['url'] = "<" . $vars['url'] . ">";
             break;
     }
     $vars1 = array();
     foreach ($vars as $kk => $vv) {
         $vars1[] = "{$kk}={$vv}";
     }
     $vars = join('&', $vars1);
     //header("Location: $url?$vars");
     html_redirect($url . "?" . $vars, 0, 'Please wait', 'Please wait');
     exit;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:32,代码来源:webmoney.inc.php

示例4: show_archive

function show_archive()
{
    global $db, $t, $vars, $config;
    global $all_count, $count, $start;
    if ($_SESSION['_amember_id']) {
        $member_id = $_SESSION['_amember_id'];
    } else {
        $member_id = -1;
    }
    // is guest
    if ($config['archive_for_browsing'] != '1' && !$_SESSION['_amember_id']) {
        $redirect = $config['root_url'] . "/newsletter.php";
        html_redirect("{$redirect}", 0, 'Redirect', _TPL_REDIRECT_CLICKHERE);
        exit;
    }
    if ($vars['archive_id']) {
        $a =& $db->get_newsletter($vars['archive_id'], $member_id);
        $t->assign('a', $a);
        $t->display('newsletter_archive_more.html');
    } else {
        //$db->delete_old_newsletters();
        $all_count = $db->get_archive_list_c($vars['thread_id'], $member_id);
        $count = 20;
        $al =& $db->get_archive_list($start, $count, $vars['thread_id'], $member_id);
        $t->assign('al', $al);
        $t->display('newsletter_archive.html');
    }
}
开发者ID:subashemphasize,项目名称:test_site,代码行数:28,代码来源:newsletter.php

示例5: error_report_show

function error_report_show($redirect_page, $err_no)
{
    if (stristr($redirect_page, '?')) {
        $concat = '&';
    } else {
        $concat = '?';
    }
    $page = $redirect_page . $concat . "failed=true&error={$err_no}";
    html_redirect($page);
    exit;
}
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:11,代码来源:error_api.php

示例6: delete_signature

function delete_signature($sig_id)
{
    global $dbEmailSig;
    $sql = "DELETE FROM `{$dbEmailSig}` WHERE id = {$sig_id}";
    mysql_query($sql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR);
    }
    journal(CFG_LOGGING_NORMAL, 'Global Signature deleted', "A global signature was deleted", CFG_JOURNAL_ADMIN, 0);
    html_redirect("edit_global_signature.php");
    exit;
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:12,代码来源:edit_global_signature.php

示例7: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $config;
     $product =& get_product($product_id);
     $c_product_id = $product->config['fastspring_id'];
     if (!$c_product_id) {
         fatal_error("FastSpring Product ID empty for Product# {$product_id}");
     }
     $url = "https://sites.fastspring.com/" . $this->config['company'] . "/instant/" . $c_product_id . "?referrer=" . $payment_id;
     if ($this->config['testmode']) {
         $url .= "&mode=test&member=new&sessionOption=new";
     }
     html_redirect($url, $print_header = 0, $title = 'Please wait', $text = 'Please wait');
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:14,代码来源:fastspring.inc.php

示例8: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $config, $db;
     $p = $db->get_payment($payment_id);
     $pr = $db->get_product($p['product_id']);
     $u = $db->get_user($member_id);
     $url = $pr['anylink_url'];
     foreach ($u as $k => $v) {
         $url = str_replace('{$member.' . $k . '}', $v, $url);
     }
     $url = str_replace('{$payment_id}', $payment_id, $url);
     if ($url == '') {
         fatal_error(sprintf(_PLUG_PAY_ANYLINK_REDIR_ERROR, $p[product_id]));
     }
     html_redirect("{$url}", 0, _PLUG_PAY_REDIRECT_WAIT, _PLUG_PAY_REDIRECT_REDIRECT);
     exit;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:17,代码来源:anylink.inc.php

示例9: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $config, $db;
     $products = $product_id;
     $orig_product_id = $product_id;
     if (is_array($product_id)) {
         $product_id = $product_id[0];
     }
     $product =& get_product($product_id);
     if (count($orig_product_id) > 1) {
         $product->config['title'] = $config['multi_title'];
     }
     $member = $db->get_user($member_id);
     $vars = array('payee_email' => $this->config['business'], 'payer_email' => $member['email'], 'transaction_ref' => $payment_id, 'return_URL' => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), 'cancel_URL' => $config['root_url'] . "/cancel.php", 'notify_URL' => $config['root_url'] . "/plugins/payment/stormpay/ipn.php", 'amount' => sprintf('%.2f', $price), 'product_name' => $product->config['title'], 'generic' => 1, 'require_IPN' => 1);
     $vars1 = array();
     foreach ($vars as $kk => $vv) {
         $v = urlencode($vv);
         $k = urlencode($kk);
         $vars1[] = "{$k}={$v}";
     }
     $vars = join('&', $vars1);
     html_redirect("https://www.stormpay.com/stormpay/handle_gen.php?{$vars}", '', 'Please wait', 'Please wait');
     exit;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:24,代码来源:stormpay.inc.php

示例10: do_payment

 function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
 {
     global $config;
     global $db;
     $product =& get_product($product_id);
     $varsx = array('vpc_Version' => '1', 'vpc_Command' => 'pay', 'vpc_MerchTxnRef' => $payment_id, 'vpc_AccessCode' => $this->config['access_code'], 'vpc_Merchant' => $this->config['merchant_id'], 'vpc_OrderInfo' => $payment_id, 'vpc_Amount' => intval($price * 100), 'vpc_Locale' => 'en', 'vpc_ReturnURL' => $config['root_url'] . "/plugins/payment/migs_r/thanks.php");
     $securehash = $this->config['secure_secret'];
     ksort($varsx);
     foreach ($varsx as $k => $v) {
         $securehash .= $v;
     }
     $securehash = strtoupper(md5($securehash));
     $varsx['vpc_SecureHash'] = $securehash;
     $vars1 = array();
     foreach ($varsx as $kk => $vv) {
         $v = urlencode($vv);
         $k = urlencode($kk);
         $vars1[] = "{$kk}={$vv}";
     }
     $varsx = join('&', $vars1);
     html_redirect("https://migs.mastercard.com.au/vpcpay?" . $varsx, '', 'Please wait', 'Please wait');
     //header("Location: https://migs.mastercard.com.au/vpcpay?".$varsx);
     exit;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:24,代码来源:migs_r.inc.php

示例11: auth_authenticate_user

    require_once "bug_group_action_page.php";
    exit;
}
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$action_page = 'test_action.php';
$detail_page = 'bug_detail_page.php';
$bug_update_url = 'bug_detail_update_page.php';
$num = 0;
$bg_color = '';
$project_properties = session_get_project_properties();
$project_name = $project_properties['project_name'];
$project_id = $project_properties['project_id'];
if (isset($_POST['filter_jump']) && $_POST['filter_jump'] != '') {
    html_redirect("{$detail_page}?bug_id={$_POST['filter_jump']}");
} else {
    $filter_jump = "";
}
$s_display_options = session_set_display_options("bug", $_POST);
$order_by = $s_display_options['order_by'];
$order_dir = $s_display_options['order_dir'];
$page_number = $s_display_options['page_number'];
$filter_per_page = $s_display_options['filter']['per_page'];
$filter_bug_status = $s_display_options['filter']['status'];
$filter_bug_category = $s_display_options['filter']['category'];
$filter_bug_component = $s_display_options['filter']['component'];
$filter_reported_by = $s_display_options['filter']['reported_by'];
$filter_assigned_to = $s_display_options['filter']['assigned_to'];
$filter_assigned_to_dev = $s_display_options['filter']['assigned_to_developer'];
$filter_found_in_rel = $s_display_options['filter']['found_in_release'];
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:31,代码来源:bug_page.php

示例12: decrement_free_incidents

 if ($type == 'free') {
     decrement_free_incidents(contact_siteid($contactid));
     plugin_do('incident_created_site');
 } else {
     // decrement contract incident by incrementing the number of incidents used
     increment_incidents_used($maintid);
     plugin_do('incident_created_contract');
 }
 $html .= "<h3>{$strIncident}: {$incidentid}</h3>";
 $html .= "<p align='center'>";
 $html .= sprintf($strIncidentLoggedEngineer, $incidentid);
 $html .= "</p>\n";
 $suggested_user = suggest_reassign_userid($incidentid);
 trigger('TRIGGER_INCIDENT_CREATED', array('incidentid' => $incidentid, 'sendemail' => $send_email));
 if ($CONFIG['auto_assign_incidents']) {
     html_redirect("incident_add.php?action=reassign&userid={$suggested_user}&incidentid={$incidentid}");
     exit;
 } else {
     echo $html;
 }
 // List Engineers
 // We need a user type 'engineer' so we don't just list everybody
 // Status zero means account disabled
 $sql = "SELECT * FROM `{$dbUsers}` WHERE status!=0 ORDER BY realname";
 $result = mysql_query($sql);
 if (mysql_error()) {
     trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
 }
 echo "<h3>{$strUsers}</h3>\n            <table align='center'>\n            <tr>\n                <th>&nbsp;</th>\n                <th>{$strName}</th>\n                <th>{$strTelephone}</th>\n                <th>{$strStatus}</th>\n                <th>{$strMessage}</th>\n                <th colspan='5'>{$strIncidentsinQueue}</th>\n                <th>{$strAccepting}</th>\n            </tr>";
 echo "<tr>\n            <th colspan='5'></th>\n            <th align='center'>{$strActionNeeded} / {$strOther}</th>";
 echo "<th align='center'>" . priority_icon(4) . "</th>";
开发者ID:nicdev007,项目名称:sitracker,代码行数:31,代码来源:incident_add.php

示例13: cleanvar

    $direction = 'lr';
}
$redirect = cleanvar($_REQUEST['redirect']);
switch ($action) {
    case 'addlink':
        // Insert the link
        if ($direction == 'lr') {
            $sql = "INSERT INTO `{$dbLinks}` ";
        }
        $sql .= "(linktype, origcolref, linkcolref, userid) ";
        $sql .= "VALUES ('{$linktypeid}', '{$origref}', '{$linkref}', '{$sit[2]}')";
        mysql_query($sql);
        if (mysql_error()) {
            trigger_error(mysql_error(), E_USER_ERROR);
        }
        html_redirect($redirect);
        break;
    case '':
    default:
        include APPLICATION_INCPATH . 'htmlheader.inc.php';
        // Find out what kind of link we are to make
        $sql = "SELECT * FROM `{$dbLinkTypes}` WHERE id='{$linktypeid}'";
        $result = mysql_query($sql);
        while ($linktype = mysql_fetch_object($result)) {
            if ($direction == 'lr') {
                echo "<h2>Link {$linktype->lrname}</h2>";
            } elseif ($direction == 'rl') {
                echo "<h2>Link {$linktype->rlname}</h2>";
            }
            echo "<p align='center'>Make a {$linktype} link for origtab {$origtab}, origref {$origref}</p>";
            // FIMXE i18n
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:link_add.php

示例14: header

            header("Location: {$CONFIG['application_webpath']}noaccess.php?id=79");
            exit;
        } else {
            $status = update_contract_balance($contractid, $reason, $amount, $sourceservice);
            if ($status) {
                html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", TRUE, $strSuccessfullyUpdated);
            } else {
                html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", FALSE, $strUpdateFailed);
            }
        }
        break;
    case 'transfer':
        if (user_permission($sit[2], 79) == FALSE) {
            header("Location: {$CONFIG['application_webpath']}noaccess.php?id=79");
            exit;
        } else {
            $status = update_contract_balance($contractid, $reason, $amount * -1, $sourceservice);
            if ($status) {
                $status = update_contract_balance($contractid, $reason, $amount, $destinationservice);
                if ($status) {
                    html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", TRUE);
                } else {
                    html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", FALSE);
                }
                exit;
            }
            html_redirect('main.php', FALSE, $strFailed);
            exit;
        }
        break;
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:contract_edit_service.php

示例15: html_print_operation_successful

function html_print_operation_successful($page_title, $redirect_page)
{
    global $db;
    $s_project_properties = session_get_project_properties();
    $project_name = $s_project_properties['project_name'];
    html_window_title();
    html_print_body();
    html_page_title($project_name . " - " . lang_get($page_title));
    html_page_header($db, $project_name);
    html_print_menu();
    print "<div class=operation-successful>" . lang_get('operation_successful') . "</div>";
    html_print_footer();
    html_redirect($redirect_page);
    exit;
}
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:15,代码来源:html_api.php


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