本文整理汇总了PHP中getCurrentLocation函数的典型用法代码示例。如果您正苦于以下问题:PHP getCurrentLocation函数的具体用法?PHP getCurrentLocation怎么用?PHP getCurrentLocation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCurrentLocation函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: displayErrorNotAllRequiredDataPresentInPost
function displayErrorNotAllRequiredDataPresentInPost($missingPostParameters)
{
$currentLocation = getCurrentLocation();
$errorMessage = "Not all required data present missing: " . implode(",", $missingPostParameters);
$url = addErrorMessageToUrl($currentLocation, $errorMessage);
header("Location: {$url}");
die("Redirecting to: {$currentLocation} not all required data present");
}
开发者ID:Cassioblu55,项目名称:linger,代码行数:8,代码来源:redirectUtilities.php
示例2: getCurrentLocation
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'modules/imaging/includes/includes.php';
require_once 'modules/imaging/includes/xmlrpc.inc.php';
require_once 'modules/imaging/includes/web_def.inc.php';
$location = getCurrentLocation();
if (isset($_POST["bconfirm"])) {
$params = getParams();
$item_uuid = $_POST['itemid'];
$label = urldecode($_POST['itemlabel']);
$ret = xmlrpc_delServiceToLocation($item_uuid, $location, $params);
// goto images list
if ($ret[0] and !isXMLRPCError()) {
$str = sprintf(_T("Service <strong>%s</strong> removed from default boot menu", "imaging"), $label);
new NotifyWidgetSuccess($str);
// Synchronize boot menu
$ret = xmlrpc_synchroLocation($location);
if (isXMLRPCError()) {
new NotifyWidgetFailure(sprintf(_T("Boot menu generation failed for package server: %s", "imaging"), implode(', ', $ret[1])));
}
header("Location: " . urlStrRedirect("imaging/manage/service", $params));
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:service_del.php
示例3: SetPanelSettings
public function SetPanelSettings()
{
$GLOBALS['FooterScripts'] = '';
$GLOBALS['HideLogoutLink'] = 'display: none';
if(CustomerIsSignedIn()) {
$GLOBALS['HideLogoutLink'] = '';
}
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$baseURL = getConfig('ShopPathNormal');
}
else {
$baseURL = getCurrentLocation();
}
if(strpos($baseURL, '?') === false) {
$baseURL .= '?';
}
else {
$baseURL .= '&';
}
$fullSiteLink = $baseURL.'fullSite=1';
$GLOBALS['ISC_CLASS_TEMPLATE']->assign('FullSiteLink', $fullSiteLink);
// Show Mobile Site link
if(canViewMobileSite()) {
$mobileSiteURL = preg_replace('/(&)?fullSite=\d*/i', '', $baseURL);
$GLOBALS['MobileSiteURL'] = $mobileSiteURL.'fullSite=0';
$GLOBALS['MobileSiteLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('MobileSiteLink');
}
// Show "All prices are in [currency code]"
$currency = GetCurrencyById($GLOBALS['CurrentCurrency']);
if(is_array($currency) && $currency['currencycode']) {
$GLOBALS['AllPricesAreInCurrency'] = sprintf(GetLang('AllPricesAreInCurrency'), isc_html_escape($currency['currencyname']), isc_html_escape($currency['currencycode']));
}
if(GetConfig('DebugMode') == 1) {
$end_time = microtime_float();
$GLOBALS['ScriptTime'] = number_format($end_time - ISC_START_TIME, 4);
$GLOBALS['QueryCount'] = $GLOBALS['ISC_CLASS_DB']->NumQueries;
if (function_exists('memory_get_peak_usage')) {
$GLOBALS['MemoryPeak'] = "Memory usage peaked at ".Store_Number::niceSize(memory_get_peak_usage(true));
} else {
$GLOBALS['MemoryPeak'] = '';
}
if (isset($_REQUEST['debug'])) {
$GLOBALS['QueryList'] = "<ol class='QueryList' style='font-size: 13px;'>\n";
foreach($GLOBALS['ISC_CLASS_DB']->QueryList as $query) {
$GLOBALS['QueryList'] .= "<li style='line-height: 1.4; margin-bottom: 4px;'>".isc_html_escape($query['Query'])." — <em>".number_format($query['ExecutionTime'], 4)."seconds</em></li>\n";
}
$GLOBALS['QueryList'] .= "</ol>";
}
$GLOBALS['DebugDetails'] = "<p>Page built in ".$GLOBALS['ScriptTime']."s with ".$GLOBALS['QueryCount']." queries. ".$GLOBALS['MemoryPeak']."</p>";
}
else {
$GLOBALS['DebugDetails'] = '';
}
// Do we have any live chat service code to show in the footer
$modules = GetConfig('LiveChatModules');
if(!empty($modules)) {
$liveChatClass = GetClass('ISC_LIVECHAT');
$GLOBALS['LiveChatFooterCode'] = $liveChatClass->GetPageTrackingCode('footer');
}
// Load our whitelabel file for the front end
require_once ISC_BASE_PATH.'/includes/whitelabel.php';
// Load the configuration file for this template
$poweredBy = 0;
require_once ISC_BASE_PATH.'/templates/'.GetConfig('template').'/config.php';
if(isset($GLOBALS['TPL_CFG']['PoweredBy'])) {
if(!isset($GLOBALS['ISC_CFG']['TemplatePoweredByLines'][$GLOBALS['TPL_CFG']['PoweredBy']])) {
$GLOBALS['TPL_CFG']['PoweredBy'] = 0;
}
$poweredBy = $GLOBALS['TPL_CFG']['PoweredBy'];
}
// Showing the powered by?
$GLOBALS['PoweredBy'] = '';
if($GLOBALS['ISC_CFG']['DisableFrontEndPoweredBy'] == false && isset($GLOBALS['ISC_CFG']['TemplatePoweredByLines'][$poweredBy])) {
$GLOBALS['PoweredBy'] = $GLOBALS['ISC_CFG']['TemplatePoweredByLines'][$poweredBy];
}
if(empty($GLOBALS['OptimizerConversionScript']) && empty($GLOBALS['OptimizerTrackingScript']) && empty($GLOBALS['OptimizerControlScript'])) {
$this->setGwoCookieCrossDomain();
}
$GLOBALS['SitemapURL_HTML'] = isc_html_escape(SitemapLink());
$GLOBALS['SNIPPETS']['SitemapLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('SitemapLink');
if (Interspire_TaskManager::hasTasks()) {
// hasTasks is only implemented for Internal so this will (should) never run for Resque-based task manager
$GLOBALS['FooterScripts'] .= Interspire_TaskManager::getTriggerHtml('json');
}
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:Footer.php
示例4: SetupSSLOptions
function SetupSSLOptions()
{
$ShopPath = GetConfig('ShopPath');
$GLOBALS['ISC_CFG']['ShopPathNormal'] = $ShopPath;
$useSSL = GetConfig('UseSSL');
// Is SSL enabled for the checkout process? If so setup the checkout links as such
if($useSSL != SSL_NONE) {
// determine which url we should be on
if ($useSSL == SSL_NORMAL) {
$ShopPathSSL = $ShopPath;
}
else if ($useSSL == SSL_SHARED) {
$ShopPathSSL = GetConfig("SharedSSLPath");
}
elseif ($useSSL == SSL_SUBDOMAIN) {
$ShopPathSSL = GetConfig("SubdomainSSLPath");
}
$ShopPathSSL = str_replace("http://", "https://", $ShopPathSSL);
// Are we on a page that should use SSL?
$ssl_pages = array (
"account.php",
"checkout.php",
"login.php"
);
$uri = explode("/", $_SERVER['PHP_SELF']);
$page = $uri[count($uri)-1];
if (in_array($page, $ssl_pages)) {
$ShopPath = $ShopPathSSL;
// If we're not accessing this page via HTTPS then we need to redirect the user to the HTTPS version
if($_SERVER['HTTPS'] == "off" && $_SERVER['REQUEST_METHOD'] == "GET") {
$location = getCurrentLocation(true);
// for shared ssl we need to transfer the session to the new site; append the the session token to the url
if ($useSSL == SSL_SHARED && isset($_COOKIE['SHOP_SESSION_TOKEN']) && !isset($_GET['tk'])) {
if(!empty($_GET)) {
$location .= "&";
}
else {
$location .= "?";
}
$location .= "tk=" . $_COOKIE['SHOP_SESSION_TOKEN'];
}
header("Location: " . $ShopPathSSL . '/' . $location);
exit;
}
}
$GLOBALS['ISC_CFG']['ShopPathSSL'] = $ShopPathSSL;
}
else {
$GLOBALS['ISC_CFG']['ShopPathSSL'] = $ShopPath;
}
// If we're still on a HTTPS link (maybe this page requires it for a certain checkout module)
// override the shop path with the HTTPS version
if($_SERVER['HTTPS'] == "on") {
$GLOBALS['ISC_CFG']['ShopPath'] = GetConfig('ShopPathSSL');
}
// Now that the variables are stored in the config section, we just map them back to the existing globals we had
$GLOBALS['ShopPath'] = GetConfig('ShopPath');
$GLOBALS['ShopPathSSL'] = GetConfig('ShopPathSSL');
$GLOBALS['ShopPathNormal'] = GetConfig('ShopPathNormal');
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:72,代码来源:ssl.php
示例5: Table
$f->push(new Table());
$f->add(new HiddenTpl("itemid"), array("value" => $id, "hide" => True));
$f->add(new TrFormElement(_T("Label", "imaging"), new InputTpl("image_label")), array("value" => $label));
$f->add(new TrFormElement(_T("Description", "imaging"), new InputTpl("image_description")), array("value" => $desc));
$f->pop();
list($count, $post_installs) = xmlrpc_getAllPostInstallScripts($location);
if (isset($master['post_install_scripts'])) {
$f = get_post_install_scripts($f, $master['post_install_scripts'], $post_installs);
} else {
$f = get_post_install_scripts($f, array(), $post_installs);
}
$f->addButton("bvalid", _T("Validate"));
$f->display();
} else {
$item_uuid = $_POST['itemid'];
$loc_uuid = getCurrentLocation();
$params = array();
$params['name'] = $_POST['image_label'];
$params['desc'] = $_POST['image_description'];
$params['post_install_script'] = $_POST['post_install'];
$params['is_master'] = True;
$p_order = array();
foreach ($_POST as $post_key => $post_value) {
if (ereg('order_', $post_key)) {
$post_key = str_replace("order_", "", $post_key);
$p_order[$post_key] = $post_value;
}
}
$params['post_install_scripts'] = $p_order;
$ret = xmlrpc_editImageLocation($item_uuid, $loc_uuid, $params);
if ($ret[0] and !isXMLRPCError()) {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:master_edit.php
注:本文中的getCurrentLocation函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论