本文整理汇总了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);
}
}
示例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));
示例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();
}
}
示例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 {
示例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");
}
示例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");
?>