Esempio n. 1
0
if (!function_exists("find_loader")) {
    function find_loader()
    {
        $parts = explode("/", __DIR__);
        $target = array_search("atpay_php", $parts);
        $i = 1;
        $path = array();
        while ($i <= $target) {
            $path[$i - 1] = $parts[$i];
            $i++;
        }
        require "/" . join("/", $path) . "/src/index.php";
    }
}
if (!function_exists("atpay_loader")) {
    find_loader();
}
if (!class_exists("MockBox")) {
    class MockBox
    {
        public function encrypt($data, $nonce)
        {
            return $data;
        }
    }
}
if (!class_exists("MockNoncer")) {
    class MockNoncer
    {
        public function next()
        {
Esempio n. 2
0
function list_loader_errors()
{
    $errors = array();
    $loader_loc = find_loader();
    $self = get_self();
    if (is_string($loader_loc)) {
        $errors = loader_compatibility_test($loader_loc);
    } else {
        $errors = $loader_loc;
    }
    if (!empty($errors)) {
        $try_again = '<a href="#" onClick="window.location.href=window.location.href">try again</a>';
        if (count($errors) > 1) {
            $retry_message = "Please correct those errors and {$try_again}.";
            echo 'The following problems have been found with the Loader installation:';
        } else {
            $retry_message = "Please correct that error and {$try_again}.";
            echo 'The following problem has been found with the Loader installation:';
        }
        echo make_list($errors, "ul");
        echo $retry_message;
    }
    echo " You may wish to view the following for further help:";
    echo make_list(help_resources($errors), "ul");
    echo '<a href="' . $self . '">Click here to go back to the start of the Loader Wizard</a>.<br>';
}
function loaderbin_page()
{
    info_disabled_check();
    $loader_path = find_loader(true);
    if (is_string($loader_path)) {
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename=' . basename($loader_path));
        @readfile($loader_path);
    }
}