Esempio n. 1
0
/**
 * cart all shipping quotes, used for google checkout
 * returns all the quotes for a selected shipping method
 * @access public
 *
 * @return array of shipping options
 */
function wpsc_selfURL()
{
    $s = empty($_SERVER["HTTPS"]) ? "" : $_SERVER["HTTPS"] == "on" ? "s" : "";
    $protocol = wpsc_strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/") . $s;
    $port = $_SERVER["SERVER_PORT"] == "80" ? "" : ":" . $_SERVER["SERVER_PORT"];
    return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
/**
 * cart all shipping quotes, used for google checkout
 * returns all the quotes for a selected shipping method
 *
 * @since
 * @access public
 *
 * @uses wpsc_cart
 *
 * @return array of shipping options
*/
function wpsc_selfURL()
{
    $s = empty($_SERVER['HTTPS']) ? '' : $_SERVER['HTTPS'] == 'on' ? 's' : '';
    $protocol = wpsc_strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s;
    $port = $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
    return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}