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


PHP Frontend::redirection方法代码示例

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


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

示例1: microtime_string

    for ($i = 0; $i < 10; $i++) {
        $randstring = $characters[rand(0, strlen($characters) - 1)];
    }
    return $randstring;
}
function microtime_string()
{
    list($usec, $sec) = explode(" ", microtime());
    return str_ireplace('.', '', (double) $usec + (double) $sec);
}
$db = new Database();
$api = new Api();
$html = new Frontend();
$settings = $db->select('settings', null, '*', 1);
if (!$settings['shipping_api'] or !$settings['ship_ready']) {
    $html->redirection('../../royalmail.php');
}
if (!isset($_SESSION['force'])) {
    $_SESSION['force'] = microtime_string();
    echo "<script>document.location.reload(true)</script>";
} else {
    $errorCount = 0;
    $orders = $api->getOrders('label_request');
    foreach ($orders as $order) {
        $_order = new Mage_Sales_Model_Order();
        $_order->loadByIncrementId($order['reference']);
        if (!$db->select('royal_mail', '`reference` = ' . $order['reference'])) {
            $api->addGiftMessageToComments($_order);
        }
        $xml = $api->createOrderXML($order, $settings, $order['postage']);
        echo '<div class="col-md-6">';
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:mage.php

示例2: RandomString

    echo "<pre>";
    print_r($data);
    echo "</pre>";
    ?>
		</div>
	</div>
	<?php 
}
function RandomString()
{
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $randstring = '';
    for ($i = 0; $i < 10; $i++) {
        $randstring = $characters[rand(0, strlen($characters) - 1)];
    }
    return $randstring;
}
$html = new Frontend();
$db = new Session();
if (isset($_SESSION['userid'])) {
    $db->update("users", "last_seen", "CURRENT_TIMESTAMP", $_SESSION['userid']);
}
if (is_file("update.lock") or is_file("install.lock")) {
    if ($current_page != "lock.php" and $current_page != "update.php") {
        $html->redirection("lock.php");
    }
}
if (basename($_SERVER['PHP_SELF']) != "logon.php" and basename($_SERVER['PHP_SELF']) != "upload.php") {
    $html->navbar();
}
$alerts = new Alerts();
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:header.php

示例3: foreach

$ai = $mage_db->select("m2epro_amazon_listing_product", null, "listing_product_id,sku");
if ($mp and $ai) {
    if ($_SESSION['display']) {
        $report->start("Comparing Amazon Item Sku's to Products", 3);
    }
    foreach ($ai as $si) {
        $result = $mage_db->select("m2epro_listing_product", $si['listing_product_id'], "product_id", 1);
        $si['product_id'] = $result['product_id'];
        if ($mp[$si['product_id']] !== $si['sku']) {
            if ($_SESSION['display']) {
                $entry = $mp[$si['product_id']] . "||" . $si['sku'];
                $report->entry("warning", $si['product_id'], $entry);
            } else {
                $mage_db->delete("m2epro_amazon_listing_product", "`listing_product_id` = " . $si['listing_product_id']);
                $mage_db->delete("m2epro_listing_product", $si['listing_product_id']);
                $html->redirection("../scripts.php");
            }
        }
        // else if($_SESSION['display']) {
        // 	$entry = $mp[$si['product_id']]."||".$si['sku'];
        // 	$report->entry("info", "skipping", $entry);
        // }
    }
    if ($_SESSION['display']) {
        $report->end();
    }
}
////////////////
// End Script //
////////////////
if ($_SESSION['display']) {
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:m2e.php


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