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


PHP UI::Redirect方法代码示例

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


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

示例1: Notify

		function Notify(AbstractPaymentModule $PaymentModule, $status)
		{		
			global $PaymentModuleFactory;
			
			if ($status == PAYMENT_STATUS::SUCCESS)
			{
				UI::Redirect("payment_success.php?op=".$_SESSION['wizard']['whois']["operation"]);
			}
			else
			{
				$smarty = Core::GetSmartyInstance("SmartyExt");
				
				$PaymentForm = $PaymentModule->GetPaymentForm();
				
				$payment_module = $PaymentModuleFactory->GetModuleObjectByName($_SESSION['wizard']['checkout']["gate"]);
					
				$fields = $PaymentForm->ListFields();
				$smarty_fields = array();
				foreach($fields as $field)
				{
					$smarty_fields[$field->Title] = array("name" => $field->Name, "required" => $field->IsRequired, "type" => $field->FieldType, "values" => $field->Options);
					if ($_REQUEST[$field->Name])
						$attr[$field->Title] = $_REQUEST[$field->Name];
				}
				
				$display["errors"] = explode("\n", $PaymentModule->GetFailureReason());
				$display["fields"] = $smarty_fields;
				$display["post"] = $attr;
				$display['phone_widget'] = Phone::GetInstance()->GetWidget();
				$template_name = "paymentgate.tpl";
				
				$smarty->assign($GLOBALS["display"]);
				$smarty->assign($display);
				$smarty->display($template_name);
			}
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:36,代码来源:process_payment.php

示例2: _

			}
			catch (Exception $e)
			{
				$err = $e->getMessage();
			}
		}
		else
		{
			$payment_module = $PaymentModuleFactory->GetModuleObjectByName($_REQUEST["gate"]);
			
			// If Total = 0 then mark all invoices in order as paid
			if ($Order->GetTotal() == 0)
			{
				$Order->MarkAsPaid($payment_module);
				$okmsg = _("Payment successfully complete");
				UI::Redirect("order_info.php?orderid={$Order->ID}");
			}
			else
			{		
				$payment_module->AttachObserver(new UIPaymentObserver());
				$client_row = $db->GetRow("SELECT * FROM users WHERE id='{$_SESSION["userid"]}'");
				
				if ($_POST && $post_action == "proceed")
				{
				    $chk = $payment_module->ValidatePaymentFormData($_POST);
			
				    if ($chk === true)
					{
						$reflect = new ReflectionObject($payment_module);
						if ($reflect->implementsInterface("IPostBackPaymentModule"))
							$payment_module->RedirectToGateway($Order, array_merge($client_row, $_POST));
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:checkout.php

示例3: RedirectToGateway

		/**
		 * Redirect user to gateway payment form, using HTTP 'Location:' header or UI:RedirectPOST($host, $values);
		 * 
		 * @param float $amount Purchase amount
		 * @param int $orderid Order ID. Can be used as an unique identifier.
		 * @param string $payment_for Human-readable description of the payment
		 * @param array $post_values Array of fields, posted back by your payment form. Array keys are equal to field names you returned in IPaymentModule::GetPaymentForm()
		 * @return bool True if payment succeed or false if failed. If payment is failed and you return false, $this->GetFailureReason() will also be called.
		 */
		public final function RedirectToGateway(Order $order, $post_values = array())
		{
			if (CONTEXTS::$APPCONTEXT == APPCONTEXT::REGISTRANT_CP)
			{
				UI::Redirect("invoice_print.php?id={$order->ID}");
			}
			elseif (CONTEXTS::$APPCONTEXT == APPCONTEXT::ORDERWIZARD)
			{
				$smarty = Core::GetSmartyInstance("SmartyExt");				
				$smarty->assign($GLOBALS["display"]);
				$smarty->display("order_complete.tpl");
				exit();
			}
				
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:24,代码来源:class.PaymentModule.php

示例4: foreach

                }
            }
        }
        // If order has invoices, save it and issue invoices
        if (count($Order->GetInvoiceList())) {
            Log::Log("Save order", E_USER_NOTICE);
            $Order->Save();
            $invoices_paid = true;
            foreach ($Order->GetInvoiceList() as $_Invoice) {
                $invoices_paid &= $_Invoice->Status == INVOICE_STATUS::PAID;
            }
            if ($Order->GetTotal() == 0 || $invoices_paid) {
                UI::Redirect("order_info.php?orderid={$Order->ID}");
            } else {
                $_SESSION['orderid'] = $Order->ID;
                UI::Redirect("checkout.php");
            }
        }
    }
}
$display["attr"] = $_POST;
if (!$stepno) {
    $stepno = 1;
}
//
// get TLD Prices
//
if ($stepno == 1) {
    $display["transferTLDs"] = array();
    foreach ($TLDs as $k => $v) {
        try {
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:bulk_transfer.php

示例5: loginAsOwnerAction

 public function loginAsOwnerAction()
 {
     $account = Scalr_Account::init()->loadById($this->getParam(self::CALL_PARAM_NAME));
     $owner = $account->getOwner();
     Scalr_Session::create($owner->getId());
     UI::Redirect("/#/dashboard");
 }
开发者ID:rakesh-mohanta,项目名称:scalr,代码行数:7,代码来源:Accounts.php

示例6: array

			{
				$db->Execute("UPDATE countries SET enabled='1' WHERE id=?", array($row["id"]));
				$row["enabled"] = 1;
			}
			elseif (!isset($post_enabled[$row["id"]]) && $row['enabled'] == 1)
			{
				$db->Execute("UPDATE countries SET enabled='0' WHERE id=?", array($row["id"]));
				$row["enabled"] = 0;
			}
			
			$db->Execute("UPDATE countries SET vat=? WHERE id=?", array(round($post_vat[$row["id"]], 2), $row["id"]));
			
			$row["vat"] = $post_vat[$row["id"]];
			
			$mess = _("Countries successfully saved");
		}
		
		$display["rows"][] = $row;
	}
	
	if ($_POST && $post_actionsubmit)
		UI::Redirect("countries.php");
	
	$display["pn"] = $req_pn;
	$display["pt"] = $req_pt;
	$display["pf"] = $post_filter_q ? $post_filter_q : $req_pf;
	
	$display["help"] = "";
	
	require_once ("src/append.inc.php");
?>
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:countries.php


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