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


PHP CoreUtils::Redirect方法代码示例

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


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

示例1: Notify

		public function Notify(AbstractPaymentModule $PaymentModule, $status)
		{
			Log::Log("UIPaymentObserver: received notify", E_USER_NOTICE);
			
			if ($status == PAYMENT_STATUS::SUCCESS)
			{
				$GLOBALS["okmsg"] = _("Thank you for your payment!");
	            if (!$_SESSION["success_payment_redirect_url"])
		        	CoreUtils::Redirect("inv_view.php");
		        else 
		        	CoreUtils::Redirect($_SESSION["success_payment_redirect_url"]);
			}
			elseif ($status == PAYMENT_STATUS::FAILURE)
			{
				$PaymentForm = $PaymentModule->GetPaymentForm();
				
				$smarty = Core::GetSmartyInstance("SmartyExt");
				
				$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["errmsg"] = "The following errors occured";
				$display["err"] = explode("\n", $PaymentModule->GetFailureReason());				
				$display["gate"] = $PaymentModule->GetModuleName();
				$display["orderid"] = $PaymentModule->GetOrderID(false);
				$display["fields"] = $smarty_fields;
				$display["post"] = $attr;
				$template_name = "client/paymentdata.tpl";
				
				$smarty->assign($GLOBALS["display"]);
				$smarty->assign($display);
				$smarty->display($template_name);
			}
			else 
				throw new Exception(sprintf(_("Undefined PaymentStatus received from %s payment module."), $PaymentModule->GetModuleName()), E_USER_ERROR);
		}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:42,代码来源:checkout.php

示例2: stripslashes

			foreach ($post_body as $key=>$val)
			{
				$handle = @fopen ("{$smarty->template_dir}/{$req_dir}/{$key}", "w");
				if ($handle)
				{
	                @fwrite($handle, stripslashes($val));
				    @fclose ($handle);
				}
				else 
	                $err[] = "Cannot modify this template. Please set permissions to 0777 (world-writable).";
			}
			
			if (!$err)
			{
	            $okmsg = "Template file saved";
	            CoreUtils::Redirect("templ_view.php");	
			}
		}
	}
	
	$req_dir = str_replace(".", "", $req_dir);
	$req_cd = str_replace(".", "", $req_cd);
	$req_explode = str_replace("..", "", $req_explode);
	
	if ($req_dir == "up")
	{
	    $chunks = explode("/", $req_cd);
	    array_pop($chunks);
	    $req_dir = @implode("/", $chunks);
	}
	
开发者ID:rchicoria,项目名称:epp-drs,代码行数:30,代码来源:templates_manager.php

示例3: sprintf

				if (!$errmsg)
				{
					$okmsg = sprintf(_("Managed DNS enabled successfully for %s"), $Domain->GetHostName());
					CoreUtils::Redirect("ns.php");
				}
			}
			else if ($post_enable_managed_dns == 0 && $Domain->IsManagedDNSEnabled == 1)
			{
				// Disable managed DNS
				$db->Execute("UPDATE domains SET managed_dns='0' WHERE id=?", array($Domain->ID));
				$zone = $db->GetRow("SELECT * FROM zones WHERE zone=?", array($Domain->GetHostName()));
				$db->Execute("UPDATE zones SET isdeleted='1' WHERE id=?", array($zone['id']));
				$db->Execute("DELETE FROM records WHERE zoneid=?", array($zone['id']));
				
				$okmsg = sprintf(_("Managed DNS disabled successfully for %s"), $Domain->GetHostName());
				CoreUtils::Redirect("ns.php");
			}
		}
		elseif ($post_task == "modify")
		{	
			$registryOptions = $Registry->GetManifest()->GetRegistryOptions();
			$host_as_attr = (bool)$registryOptions->ability->hostattr;
			
			$nslist = array();
			foreach ($post_ns as $k => $hostname)
			{
				if ($hostname && !in_array($hostname, (array)$post_delete))
				{
					if ($host_as_attr && FQDN::IsSubdomain($hostname, $Domain->GetHostName()))
					{
						$nslist[] = new NameserverHost($hostname, $post_ns_ip[$k]);
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:ns.php

示例4: array

			$i = 0;
			foreach ((array)$post_id as $k=>$invoiceid)
			{
				try
				{
					Invoice::Load($invoiceid)->Delete();
					$i++;	
				}
				catch(Exception $e)
				{
					if (preg_match('/Domain ID=\d+ not found in database/i', $e->getMessage()))
					{
						$db->Execute('DELETE FROM invoices WHERE id=?', array($invoiceid));
						$i++;
					}
				}
			}
			
			$okmsg = sprintf(_("%d invoices deleted."), $i);
			CoreUtils::Redirect($_SERVER["HTTP_REFERER"]);
		}
	}

	
	$display["title"] = _("Invoices  »  View");
	$display["help"] = _("Invoice status can be one of the following: <br>&nbsp;&nbsp;&bull;&nbsp;Pending - Invoice was not paid yet; <br>&nbsp;&nbsp;&bull;&nbsp;Paid - Invoice has been paid; <br>&nbsp;&nbsp;&bull;&nbsp;Rejected - Invoice rejected. Possible reasons: payment failed, invoice manually cancelled by Registrar.");
	$display["load_extjs"] = true;	

										
	require_once("src/append.inc.php");
?>
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:inv_view.php

示例5: sprintf

                    } else {
                        if (!$_SESSION['BU_TLD']) {
                            $errmsg = sprintf(_("No domain extension was selected"));
                        } else {
                            if (!$_SESSION['BU_DOMAINS']) {
                                $errmsg = sprintf(_("No domains were selected"));
                            } else {
                                // Create bulk update task abd put in into tasks queue
                                $Queue = TaskQueue::GetInstance();
                                try {
                                    // Define contact clids list
                                    $clids = array(CONTACT_TYPE::REGISTRANT => $post_registrant, CONTACT_TYPE::ADMIN => $post_admin, CONTACT_TYPE::TECH => $post_tech, CONTACT_TYPE::BILLING => $post_billing);
                                    // Construct task
                                    $Task = new Task($_SESSION['userid'], new BulkUpdateContactJob($_SESSION['BU_TLD'], $clids), $_SESSION['BU_DOMAINS']);
                                    $Queue->Put($Task);
                                    CoreUtils::Redirect("bulk_update_complete.php");
                                } catch (Exception $e) {
                                    $errmsg = $e->getMessage();
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
if ($stepno == 1) {
    // Get available TLDs
    $display["tlds"] = array();
    //		$TLDs = $RegistryModuleFactory->GetExtensionList();
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:bulk_update_contacts.php

示例6: array

				if ($PendingOperation->Type == Registry::OP_UPDATE_APPROVE)
				{
					$fields = array();
					foreach ($Contact->GetEditableNames() as $n)
					{
						$fields[$n] = $PendingOperation->ObjectBefore->GetField($n);
					}
					$Contact->SetFieldList($fields);	
					$Contact->SetDiscloseList($PendingOperation->ObjectBefore->GetDiscloseList());
					DBContact::GetInstance()->Save($Contact);	
					$okmsg = _("Contact update rejected");
				}
				else
				{
					DBContact::GetInstance()->Delete($Contact);
					$okmsg = _("Contact create rejected");					
				}
				
				CoreUtils::Redirect("contacts_view.php");
				break;
			}
		}
	}
	
   
    $display["help"] = _("This page contains all your contacts for all domain extensions that you have registered. Contacts are unique per domain extension. There are different types of contacts. Most common are Registrant, Billing and Technical. Some domain extension require other contact types to register domain.");
    $display["load_extjs"] = true;
    
	require_once ("src/append.inc.php")
?>
开发者ID:rchicoria,项目名称:epp-drs,代码行数:30,代码来源:contacts_view.php

示例7: array

					}
					
					foreach ((array)$post_add as $k=>$v)
					{
						if ($v["rkey"] != '' && $v["rvalue"] != '')
							$db->Execute("INSERT INTO records SET zoneid=?, `rtype`=?, `ttl`=?, `rpriority`=?, `rvalue`=?, `rkey`=?", array($zoneinfo["id"], $v["rtype"], $v["ttl"], $v["rpriority"], $v["rvalue"], $v["rkey"]));
					}
    				
					
    				Log::Log(sprintf(_("Succesfully generated DNS zone for '%s'"), $post_zonename), E_USER_NOTICE);    
    			    $db->Execute("UPDATE zones SET isupdated='0', isdeleted='0' WHERE id=?", array($zoneinfo["id"]));
    			    
    			    $db->CompleteTrans();
    			    
    			    $okmsg = _("Zone successfully updated");
    			    CoreUtils::Redirect("dnszone_edit.php?zonename={$post_zonename}");
    			}
			}
			catch(Exception $e)
			{
				$db->RollbackTrans();
				$errmsg = sprintf(_("Failed to update DNS zone for '%s'. Please contact service administrator"), $post_zonename);
				Log::Log(sprintf(_("Failed to update DNS zone for '%s'"), $post_zonename), E_USER_ERROR);
				Log::Log($e->getMessage(), E_USER_ERROR);
			}
		}
	}
		
	$display["add"] = array(1, 2, 3, 4, 5);
	$display["def_sn"] = date("Ymd")."01";
	$display["zonename"] = $req_zonename;
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:dnszone_edit.php

示例8:

<?
	require_once('src/prepend.inc.php');
		
	CoreUtils::Redirect("manage_contact.php?domainid={$get_id}&c=registrant");
?>
开发者ID:rchicoria,项目名称:epp-drs,代码行数:5,代码来源:complete_trade.php

示例9: catch

				else
				{
					try {
						$payment_module = $PaymentModuleFactory->GetModuleObjectByName($_SESSION['wizard']['checkout']["gate"]);
					} catch (Exception $e) {
						$err[] = "Cannot use selected payment method at this time. {$e->getMessage()}";
					}
					
					if ($payment_module) 
					{
						// If Total = 0 then mark all invoices in order as paid
						if ($Order->GetTotal() == 0)
						{
							// Invoice automaticly mark as paid after creation if Total == 0;
							//$Order->MarkAsPaid($payment_module);
							CoreUtils::Redirect("pdt.php");
						}
						else
						{
							$PaymentForm = $payment_module->GetPaymentForm();
							
						    if ($PaymentForm == false)
							{
								$reflect = new ReflectionObject($payment_module);
								if ($reflect->implementsInterface("IPostBackPaymentModule"))
								{
									$payment_module->RedirectToGateway(	
																		$Order,
																		$userinfo
																	   );
								}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:index.php

示例10: Invoice

			try
			{
				$Invoice = new Invoice(INVOICE_PURPOSE::CUSTOM, 0, $post_userid);
				$Invoice->SetTotal($post_total);
				$Invoice->Description = $post_description;
				$Invoice->Save();
			}
			catch(Exception $e)
			{
				$errmsg = $e->getMessage();
			}
			
			if (!$errmsg)
			{
				$okmsg = _("Invoice successfully created");
				CoreUtils::Redirect("inv_view.php");
			}
		}
	}
	
	$display["users"] = $db->GetAll("SELECT * FROM users");
	foreach ($display["users"] as &$user)
	{
		if ((float)$user["vat"] > 0)
			$user["client_vat"] = (float)$userinfo["vat"];
		else
			$user["client_vat"] = (float)$db->GetOne("SELECT vat FROM countries WHERE code=?", array($user["country"]));
	}
	
	$display["selected_user"] = $req_userid;
	$display["help"] = "";   
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:inv_create.php

示例11:

	    				if (!$field->DefaultValue)
	    					$field->DefaultValue = "";	
	    				
	    				$db->Execute("INSERT INTO pmodules_config 
    									SET `title`	= ?,
    										`hint`	= ?, 
    										`type`	= ?, 
    										`key`	= ?, 
    										`value` = ?,
    										`module_name` = ?", 
	    					array($field->Title, $field->Hint, $field->FieldType, $field->Name, $field->DefaultValue ? $Crypto->Encrypt($field->DefaultValue, LICENSE_FLAGS::REGISTERED_TO) : "", $get_module));
	    			}
    			}
								
	            $okmsg = "Module successfully enabled. Please configure the module below.";
			    CoreUtils::Redirect("pmodule_config.php?module={$get_module}");
			}
		}
	}
	else 
	{
		$errmsg = _("Payment modules configuration is disabled in demo mode. No data is displayed or submitted.");
	}
	
	$modules = $PaymentModuleFactory->ListModules(true);
	
	foreach ($modules as $k=>$ModuleName) 
	{
		$display["modules"][$k]["mname"] = $ModuleName;
		$display["modules"][$k]["nameNormal"] = $ModuleName;
		
开发者ID:rchicoria,项目名称:epp-drs,代码行数:30,代码来源:pmodules_view.php

示例12: redirect

	/**
	* header() replacement - dealing with windows
	* @access public
	* @param string $url URL to redirect to
	* @return void
	* @deprecated
	*/
	function redirect($url)
	{
		CoreUtils::Redirect($url);
	}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:11,代码来源:common.inc.php

示例13: sprintf

				
			if ($display["preregistration_enabled"])
			{
				$db->Execute("REPLACE INTO discounts SET purpose=?, discount=?, TLD=?, packageid=?", 
					array(INVOICE_PURPOSE::PREREGISTRATION_DROPCATCHING, $discs['preregister'], $req_TLD, $packageid));
			}
				
			if ($display["trade_enabled"])
			{
				$db->Execute("REPLACE INTO discounts SET purpose=?, discount=?, TLD=?, packageid=?", 
					array(INVOICE_PURPOSE::DOMAIN_TRADE, $discs['trade'], $req_TLD, $packageid));
			}
		}
		
		$okmsg = sprintf(_("Prices & Discounts for '%s' successfully updated."), $req_TLD);
		CoreUtils::Redirect("tld_view.php?pn={$req_pn}&pt={$req_pt}&pf={$req_pf}");
	}
		
	$display["price_transfer"] = $db->GetOne("SELECT cost FROM prices WHERE TLD=? AND purpose=?", 
												array($req_TLD, INVOICE_PURPOSE::DOMAIN_TRANSFER));

	if ($display["trade_enabled"])
	{
		$display["price_trade"] = $db->GetOne("SELECT cost FROM prices WHERE TLD=? AND purpose=?", 
												array($req_TLD, INVOICE_PURPOSE::DOMAIN_TRADE));
	}
												
	$display["price_register"] = array();
	$display["price_renew"] = array();
	$display["price_preregister"] = array();
	foreach ($periods as $period)
开发者ID:rchicoria,项目名称:epp-drs,代码行数:30,代码来源:tld_price.php

示例14: _

		        $okmsg = _("Invoice purpose successfully updated");
		        CoreUtils::Redirect("ipurposes_view.php");
		    }
		    else 
		    {
		         
		        $db->Execute("INSERT INTO invoice_purposes SET name = ?, description = ?, `key`=?, issystem='0'", array(
		                              $post_name,
		                              $post_description,
		                              preg_replace("/[^A-Za-z0-9]+/", "_", $post_name)
		                            )
		                    );
	                             
		        $okmsg = _("Invoice purpose create successfully");
		        CoreUtils::Redirect("ipurposes_view.php");
		    }
		}
	}
	
	if (!$req_id)
	{
	    $display = array_merge($display, $_POST);
	}
	else 
	{
	    $id = (int)$req_id;
	    $info = $db->GetRow("SELECT * FROM invoice_purposes WHERE id = ?", array($id));
	    $display = array_merge($display, $info);
	}
开发者ID:rchicoria,项目名称:epp-drs,代码行数:29,代码来源:ipurposes_add.php

示例15: require_once

<? 
    require_once('src/prepend.inc.php');

    $display["help"] = _("On this page you can edit additional form fields for client registration form.");
	
	if ($_POST && $post_actionsubmit)
	{
		if ($post_action == "del")
		{
			foreach ((array)$_POST["delete"] as $dd)
			{	
			    $db->Execute("DELETE FROM client_fields WHERE id = ?", array($dd));
   			    $db->Execute("DELETE FROM client_info WHERE fieldid=?", array($dd));
			}
			CoreUtils::Redirect("?mess=$i "._("fields deleted."));
		}
	};
	
	$sql = "SELECT * FROM `client_fields` WHERE 1 > 0";
	
	if ($get_id)
	{
	    $id = (int)$get_id;
	    $sql .= " AND id = '{$id}'";
	}
	
	//Paging
	$paging = new SQLPaging($sql);
	$paging->ApplyFilter($_POST["filter_q"], array("name"));
	//$paging->ApplySQLPaging();
	$paging->ParseHTML();
开发者ID:rchicoria,项目名称:epp-drs,代码行数:31,代码来源:fields_view.php


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