<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 3/3/2018	ELL
// Revised: 3/3/2018	ELL
// Added checking and setting of session save path to accomodate servers where this in not set.
// 
$connect_dir = "connect";
$doc_root = $_SERVER['DOCUMENT_ROOT'];
if (file_exists("../connect/config_sites.php"))
	include ("../connect/config_sites.php");
elseif (file_exists($doc_root . "/connect/config_sites.php"))	// Custom userfile folders
	include ($doc_root . "/connect/config_sites.php");
else	{	// Must be installeed in sub domain or sub folder with non-standard userfile folders.
	$php_self = $_SERVER["PHP_SELF"];
	$self_parts = explode('/', $php_self);
	$this_script = $self_parts[count($self_parts) - 1];
	$sub_dir = str_replace(array($doc_root, $this_script), "", $php_self);
	$sub_dir_parts = explode('/', $sub_dir);
	$connect_path = $doc_root . '/' . $sub_dir_parts[0] . "/";
	include ($doc_root . '/' . $sub_dir_parts[0] . "/connect/config_sites.php");
}
	
$sess_save_path = session_save_path();
if (!isset($sess_save_path) || ($sess_save_path == ""))	{
	if (defined('SESSION_SAVE_PATH'))
		session_save_path(SESSION_SAVE_PATH);
	else
		session_save_path('/tmp');
}
		
session_start();
$_SESSION['is_touchscreen'] = $_POST['is_touchscreen'];
?>