Пример #1
0
} elseif ($install_step == 'config_detail') {
    if (!$domain_name) {
        //get the domain
        $domain_array = explode(":", $_SERVER["HTTP_HOST"]);
        $domain_name = $domain_array[0];
    }
    include "resources/page_parts/install_config_detail.php";
} elseif ($install_step == 'config_database') {
    include "resources/page_parts/install_config_database.php";
} elseif ($install_step == 'execute') {
    echo "<p><b>" . $text['header-installing'] . "</b></p>\n";
    //$protocol = 'http';
    //if($_SERVER['HTTPS']) { $protocol = 'https'; }
    //echo "<iframe src='$protocol://$domain_name/core/install/install_first_time.php' style='border:solid 1px #000;width:100%;height:auto'></iframe>";
    require_once "core/install/resources/classes/detect_switch.php";
    $detect_switch = new detect_switch($event_host, $event_port, $event_password);
    $detect_ok = true;
    try {
        $detect_switch->detect();
    } catch (Exception $e) {
        echo "<p>Failed to detect configuration detect_switch reported: " . $e->getMessage() . "</p>\n";
        $detect_ok = false;
    }
    if ($detect_ok) {
        $install_ok = true;
        echo "<pre style='text-align:left;'>\n";
        function error_handler($err_severity, $errstr, $errfile, $errline)
        {
            if (0 === error_reporting()) {
                return false;
            }
	for the specific language governing rights and limitations under the
	License.

	The Original Code is FusionPBX

	The Initial Developer of the Original Code is
	Mark J Crane <*****@*****.**>
	Portions created by the Initial Developer are Copyright (C) 2008-2012
	the Initial Developer. All Rights Reserved.

	Contributor(s):
	Matthew Vale <*****@*****.**>
*/
//fetch the values
require_once "core/install/resources/classes/detect_switch.php";
$switch_detect = new detect_switch($event_host, $event_port, $event_password);
//$switch_detect->event_port = 2021;
$detect_ok = true;
try {
    $switch_detect->detect();
} catch (Exception $e) {
    echo "<p><b>Failed to detect configuration</b> detect_switch reported: " . $e->getMessage() . "</p>\n";
    $detect_ok = false;
}
echo "<form method='post' name='detect_switch' action=''>\n";
echo "<input type='hidden' name='install_language' value='" . $_SESSION['domain']['language']['code'] . "'/>\n";
echo "<input type='hidden' name='install_step' value='detect_config'/>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' align='left' nowrap><b>" . $text['header-event_socket'] . "</b><br><br></td>\n";
echo "<td width='70%' align='right'>";
Пример #3
0
} elseif ($install_step == 'config_detail') {
    if (!$domain_name) {
        //get the domain
        $domain_array = explode(":", $_SERVER["HTTP_HOST"]);
        $domain_name = $domain_array[0];
    }
    include "resources/page_parts/install_config_detail.php";
} elseif ($install_step == 'config_database') {
    include "resources/page_parts/install_config_database.php";
} elseif ($install_step == 'execute') {
    echo "<p><b>" . $text['header-installing'] . "</b></p>\n";
    //$protocol = 'http';
    //if($_SERVER['HTTPS']) { $protocol = 'https'; }
    //echo "<iframe src='$protocol://$domain_name/core/install/install_first_time.php' style='border:solid 1px #000;width:100%;height:auto'></iframe>";
    require_once "core/install/resources/classes/detect_switch.php";
    $switch_detect = new detect_switch($event_host, $event_port, $event_password);
    $detect_ok = true;
    try {
        $switch_detect->detect();
    } catch (Exception $e) {
        echo "<p>Failed to detect configuration detect_switch reported: " . $e->getMessage() . "</p>\n";
        $detect_ok = false;
    }
    if ($detect_ok) {
        $install_ok = true;
        echo "<pre style='text-align:left;'>\n";
        function error_handler($err_severity, $errstr, $errfile, $errline)
        {
            if (0 === error_reporting()) {
                return false;
            }