Exemple #1
0
function deproxifyURL($url, $givenFlag = false)
{
    return deproxyURL($url, $givenFlag);
}
Exemple #2
0
# Accepted charsets
if (isset($_SERVER['HTTP_ACCEPT_CHARSET'])) {
    $toSet[CURLOPT_HTTPHEADER][] = 'Accept-Charset: ' . $_SERVER['HTTP_ACCEPT_CHARSET'];
}
/*****************************************************************
* Browser options
* Allows customization of a "virtual" browser via /extras/edit-browser.php
******************************************************************/
# Send user agent
if ($_SESSION['custom_browser']['user_agent']) {
    $toSet[CURLOPT_USERAGENT] = $_SESSION['custom_browser']['user_agent'];
}
# Set referrer
if ($_SESSION['custom_browser']['referrer'] == 'real') {
    # Automatically determine referrer
    if (isset($_SERVER['HTTP_REFERER']) && $flag != 'norefer' && strpos($tmp = deproxyURL($_SERVER['HTTP_REFERER']), GLYPE_URL) === false) {
        $toSet[CURLOPT_REFERER] = $tmp;
    }
} else {
    if ($_SESSION['custom_browser']['referrer']) {
        # Send custom referrer
        $toSet[CURLOPT_REFERER] = $_SESSION['custom_browser']['referrer'];
    }
}
# Clear the norefer flag
if ($flag == 'norefer') {
    $flag = '';
}
/*****************************************************************
* Authentication
******************************************************************/
Exemple #3
0
        $args = array();
    }
    # Did we find any args to pass?
    if ($args) {
        # Add phrase to start of array (to give to call_user_func_array())
        $args = array_merge((array) $phrases[$_GET['e']], $args);
        $error = call_user_func_array('sprintf', $args);
    } else {
        # Just a simple print
        $error = $phrases[$_GET['e']];
    }
    # Finally add it to the $themeReplace array to get it in there
    $themeReplace['error'] = '<div id="error">' . $error . '</div>';
    # And a link to try again?
    if (!empty($_GET['return'])) {
        $themeReplace['error'] .= '<p style="text-align:right">[<a href="' . htmlentities($_GET['return']) . '">Reload ' . htmlentities(deproxyURL($_GET['return'])) . '</a>]</p>';
    }
}
/*****************************************************************
* Check PHP version
******************************************************************/
if (version_compare(PHP_VERSION, 5) < 0) {
    $themeReplace['error'] = '<div id="error">You need PHP 5 to run this script. You are currently running ' . PHP_VERSION . '</div>';
}
if (count($adminDetails) === 0) {
    header("HTTP/1.1 302 Found");
    header("Location: admin.php");
    exit;
}
/*****************************************************************
* Maintenance - check if we want to do anything now