<?php
session_start();

$_SESSION["debug"] = 1;

require_once "../conf.inc.php";
require_once DIR_PHP_LAYOUTS . "header.php";

error_reporting(E_ALL);
ini_set('display_errors', 1);

core::removeFileMaintenance();
echo core::isMaintenance();

// echo backup::create();

// echo backup::restore("/var/www/dev.cms.cse-invent.com/backups/20230503-124717.zip");

/*
function test($_host) {
    echo "<div>";
    echo "<h3>" . $_host . "</h3>";
    echo "<div>";
    $originalConnectionTimeout = ini_get('default_socket_timeout');
    ini_set('default_socket_timeout', 2);
    echo (@ssh2_connect($_host, 22, array("hostkey" => "ssh-dsa"))) ? "Connexion OK" : "Connexion KO";
    ini_set('default_socket_timeout', $originalConnectionTimeout);
    echo "</div>";
    echo "</div>";
}

test("46.105.33.123"); // ProWeb
test("home595637013.1and1-data.host"); // 1and1
test("test.rebex.net"); // 1and1
test("itcsubmit.wustl.edu"); // 1and1
test("demo.wftpserver.com"); // 1and1
*/