2012-06-04 14:58:40 +00:00
|
|
|
<?php
|
|
|
|
|
/*
|
|
|
|
|
FusionPBX
|
|
|
|
|
Version: MPL 1.1
|
|
|
|
|
|
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
|
1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
|
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 <markjcrane@fusionpbx.com>
|
2022-10-10 19:35:44 -06:00
|
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2022
|
2012-06-04 14:58:40 +00:00
|
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
Contributor(s):
|
2014-07-27 00:13:52 +00:00
|
|
|
Mark J. Crane <markjcrane@fusionpbx.com>
|
2012-06-04 14:58:40 +00:00
|
|
|
*/
|
2022-10-10 16:35:14 -06:00
|
|
|
//includes files
|
2023-06-15 14:28:23 -03:00
|
|
|
require_once __DIR__ . "/resources/require.php";
|
2013-07-06 07:38:14 +00:00
|
|
|
|
2015-04-14 01:36:01 +00:00
|
|
|
//start session
|
2016-12-11 22:54:39 -07:00
|
|
|
if (!isset($_SESSION)) { session_start(); }
|
2015-04-14 01:36:01 +00:00
|
|
|
|
2022-10-12 10:43:14 -06:00
|
|
|
//if config.conf file does not exist then redirect to the install page
|
|
|
|
|
if (file_exists("/usr/local/etc/fusionpbx/config.conf")) {
|
2022-10-10 19:35:44 -06:00
|
|
|
//BSD
|
2022-10-12 10:43:14 -06:00
|
|
|
} elseif (file_exists("/etc/fusionpbx/config.conf")) {
|
2022-10-10 19:35:44 -06:00
|
|
|
//Linux
|
|
|
|
|
} else {
|
2022-10-15 21:12:09 -06:00
|
|
|
header("Location: /core/install/install.php");
|
2013-01-05 09:44:18 +00:00
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-27 00:13:52 +00:00
|
|
|
//use custom login, if present, otherwise use default login
|
2019-12-28 00:59:11 -07:00
|
|
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/login.php")) {
|
2013-02-10 02:12:23 +00:00
|
|
|
require_once "themes/".$_SESSION['domain']['template']['name']."/login.php";
|
2013-01-05 09:33:49 +00:00
|
|
|
}
|
2013-02-10 02:12:23 +00:00
|
|
|
else {
|
|
|
|
|
require_once "resources/login.php";
|
2012-12-18 14:57:44 +00:00
|
|
|
}
|
2013-01-05 04:34:45 +00:00
|
|
|
|
2016-12-11 22:09:27 -07:00
|
|
|
?>
|