示例#1
0
function footer($update_info = null)
{
    $self = get_self();
    $year = date("Y");
    echo "</div>";
    echo "<div id=\"footer\">" . "Copyright ionCube Ltd. 2002-{$year} | " . "Loader Wizard version " . script_version() . " ";
    if ($update_info === true) {
        $update_info = check_for_wizard_update(false);
    }
    $wizard_version_string = '(';
    if ($update_info === null) {
        $wizard_version_string .= '<a href="' . LOADERS_PAGE . '">check for new version</a>';
    } else {
        if ($update_info !== false) {
            $wizard_version_string .= '<a href="' . LOADERS_PAGE . '">download version ' . $update_info . '</a>';
        } else {
            $wizard_version_string .= "current";
        }
    }
    $wizard_version_string .= ')';
    echo $wizard_version_string;
    echo " | <a href=\"{$self}?page=phpinfo\" target=\"phpinfo\">phpinfo</a>";
    echo " | <a href=\"{$self}?page=phpconfig\" target=\"phpconfig\">config</a>";
    echo " | <a href=\"{$self}\">wizard start</a>";
    echo " | <a href=\"{$self}?page=loader_check\">loader test</a>";
    echo ' | <a href="' . LOADERS_PAGE . '" target="loaders">Loaders</a>';
    echo "</div>\n";
    echo "\n</body></html>\n";
}
function footer($update_info = null)
{
    $self = get_self();
    $base = get_base_address();
    $default = get_default_address(false);
    $year = gmdate("Y");
    echo "</div>";
    echo "<div id=\"footer\">" . "Copyright ionCube Ltd. 2002-{$year} | " . "Loader Wizard version " . script_version() . " ";
    if ($update_info === true) {
        $update_info = check_for_wizard_update(false);
    }
    $loader_wizard_loc = LOADER_WIZARD_URL;
    $wizard_version_string = <<<EOT
    <script type="text/javascript">
    var xmlhttp;
    function version_check()
    { 
        var body = document.getElementsByTagName('body')[0];
        var ldel = document.getElementById('loading');
        if (!ldel) {
            body.innerHTML += '<div id="loading"></div>';
            ldel = document.getElementById('loading');
        }
        ldel.innerHTML = '<p>Retrieving Wizard version information<br>Please wait</p>';
        ldel.style.display = 'block';
        ldel.style.height = '300px';
        ldel.style.left = '200px';
        ldel.style.border = '4px #660000 solid';
        if (window.XMLHttpRequest) {
            xmlhttp=new XMLHttpRequest();
        } else {
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            var loadedOkay = 0;
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                var wizardversion = xmlhttp.responseText;
                var msg;
                clearTimeout(xmlHttpTimeout);
                buttons = '';
                if (wizardversion == '1') {
                    msg = 'You have the current version of the<br>ionCube Loader Wizard'; 
                } else if (wizardversion != '0') {
                    msg = 'A new version, ' + wizardversion + ', of the loader wizard is available';
                    buttons = '<button onclick="document.getElementById(\\'loading\\').style.display=\\'none\\'; window.open(\\'{$loader_wizard_loc}\\'); return false">Get new version</button> &nbsp;'; 
                } else {
                    msg = 'Wizard version information cannot be obtained from the<br>ionCube server';
                }
                buttons += '<button onclick="document.getElementById(\\'loading\\').style.display=\\'none\\'; return false">Close this box</button>'; 
                ldel.innerHTML = '<p>' + msg +  '<br>' + buttons + '</p>';
            }
        }
        xmlhttp.open("GET",'{$self}?page=wizardversion&wizard_only=1&clear_info=1',true);
        xmlhttp.send();
        var xmlHttpTimeout=setTimeout(ajaxTimeout,7000);
    }
    function ajaxTimeout(){
       xmlhttp.abort();
       msg = 'Wizard version information cannot be obtained from the<br>ionCube server';
       button = '<button onclick="document.getElementById(\\'loading\\').style.display=\\'none\\'; return false">Close this box</button>';
       var ldel = document.getElementById('loading');
       ldel.innerHTML = '<p>' + msg +  '<br>' + button + '</p>';
    }
    </script>
EOT;
    $wizard_version_string .= '(';
    if ($update_info === null) {
        $wizard_version_string .= '<a target="_blank" href="' . $loader_wizard_loc . '" onclick="version_check();return false;">check for new version</a>';
    } else {
        if ($update_info !== false) {
            $wizard_version_string .= '<a href="' . LOADERS_PAGE . '" target="_blank">download version ' . $update_info . '</a>';
        } else {
            $wizard_version_string .= "current";
        }
    }
    $wizard_version_string .= ')';
    echo $wizard_version_string;
    $server_type_code = server_type_code();
    if (!info_should_be_disabled()) {
        echo " | <a href=\"{$base}&amp;page=phpinfo\" target=\"phpinfo\">phpinfo</a>";
        echo " | <a href=\"{$base}&amp;page=phpconfig\" target=\"phpconfig\">config</a>";
        echo " | <a href=\"{$base}&amp;page=extra&amp;stype={$server_type_code}\" target=\"extra\">additional</a>";
        echo " | <a href=\"{$base}&amp;page=system_info_archive&amp;stype={$server_type_code}\">info archive</a>";
    }
    echo " | <a href=\"{$default}\" onclick=\"showOverlay();\">wizard start</a>";
    echo " | <a href=\"{$base}&amp;page=loader_check\" onclick=\"showOverlay();\">loader test</a>";
    echo ' | <a href="' . LOADERS_PAGE . '" target="loaders">loaders</a>';
    echo "</div>\n";
    echo "\n</body></html>\n";
}