if ($opt['page']['https']['mode'] == HTTPS_DISABLED) { if ($opt['page']['https']['active']) { header('Location: http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); } $opt['page']['force_https_login'] = false; } else { if ($opt['page']['https']['mode'] == HTTPS_ENFORCED) { if (!$opt['page']['https']['active']) { header('Location: https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); } $opt['page']['force_https_login'] = true; } } } // load domain specific settings load_domain_settings(); // load HTML specific includes require_once $rootpath . 'lib/cookie.class.php'; //site in service? if ($site_in_service == false) { header('Content-type: text/html; charset=utf-8'); $page_content = read_file($rootpath . 'html/outofservice.tpl.php'); die($page_content); } //by default, use start template if (!isset($tplname)) { $tplname = 'start'; } //restore cookievars[] load_cookie_settings(); //language changed?
$fax_caller_id_name = $row["fax_caller_id_name"]; $fax_caller_id_number = $row["fax_caller_id_number"]; $fax_email_connection_type = $row["fax_email_connection_type"]; $fax_email_connection_host = $row["fax_email_connection_host"]; $fax_email_connection_port = $row["fax_email_connection_port"]; $fax_email_connection_security = $row["fax_email_connection_security"]; $fax_email_connection_validate = $row["fax_email_connection_validate"]; $fax_email_connection_username = $row["fax_email_connection_username"]; $fax_email_connection_password = $row["fax_email_connection_password"]; $fax_email_connection_mailbox = $row["fax_email_connection_mailbox"]; $fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"]; $fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"]; //load default settings, then domain settings over top unset($_SESSION); $_SESSION = $default_settings; load_domain_settings($domain_uuid); //load event socket connection parameters $_SESSION['event_socket_ip_address'] = $event_socket['ip_address']; $_SESSION['event_socket_port'] = $event_socket['port']; $_SESSION['event_socket_password'] = $event_socket['password']; //get domain name, set local and session variables $sql = "select domain_name from v_domains where domain_uuid = '" . $domain_uuid . "'"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $record = $prep_statement->fetch(PDO::FETCH_NAMED); $domain_name = $record['domain_name']; $_SESSION['domain_name'] = $record['domain_name']; $_SESSION['domain_uuid'] = $domain_uuid; unset($sql, $prep_statement, $record); //set needed variables $fax_page_size = $_SESSION['fax']['page_size']['text'];