Login Changes:

If visiting /index.php and /themes/[theme]/index.php exists, will load it.
If visiting /index.php and /themes/[theme]/login.php exists, will load it.
If NEITHER exist, will load /resources/login.php.

If visiting /login.php and /themes/[theme]/login.php exists, will load it.
If DOESN'T exist, will load /resources/login.php/

/resources/login.php reworked, Enhanced theme reworked.
This commit is contained in:
Nate Jones
2014-07-27 00:13:52 +00:00
parent 87b428c435
commit e962705677
6 changed files with 206 additions and 188 deletions

View File

@@ -21,7 +21,7 @@
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Mark J. Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
@@ -35,6 +35,9 @@ include "root.php";
//do nothing
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
//original directory
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) {
//move config.php from the includes to resources directory.
rename($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php", $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php");
} elseif (file_exists("/etc/fusionpbx/config.php")){
//linux
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
@@ -47,7 +50,7 @@ include "root.php";
//adds multiple includes
require_once "resources/require.php";
//include the login
//use custom login, if present, otherwise use default login
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/login.php")){
require_once "themes/".$_SESSION['domain']['template']['name']."/login.php";
}