diff --git a/index.php b/index.php
index 09c22b5662..b2e7f7e267 100644
--- a/index.php
+++ b/index.php
@@ -28,11 +28,14 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php"))
header("Location: ".PROJECT_PATH."/resources/install.php");
exit;
}
-require_once "includes/require.php";
-require_once "includes/header.php";
-echo "
";
-echo "
";
-
-require_once "includes/footer.php";
+if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/index.php")){
+ require_once "themes/".$_SESSION['domain']['template']['name']."/index.php";
+}
+else {
+ require_once "includes/require.php";
+ require_once "includes/header.php";
+ echo "
\n";
+ require_once "includes/footer.php";
+}
?>
\ No newline at end of file
diff --git a/login.php b/login.php
index 9c28d6adce..ccac639b80 100644
--- a/login.php
+++ b/login.php
@@ -33,124 +33,12 @@ include "root.php";
//adds multiple includes
require_once "includes/require.php";
-//add multi-lingual support
- require_once "core/user_settings/app_languages.php";
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
+//include the 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";
+ }
+ else {
+ require_once "resources/login.php";
}
-//get the http values and set as variables
- $path = check_str($_GET["path"]);
- $msg = check_str($_GET["msg"]);
-
-//set a default login destination
- if (strlen($_SESSION['login']['destination']['url']) == 0) {
- $_SESSION['login']['destination']['url'] = PROJECT_PATH."/core/user_settings/user_dashboard.php";
- }
-
-//add the header
- include "includes/header.php";
-
-//show the message
- if (strlen($msg) > 0) {
- echo "
";
- echo "
| Message | \n"; - echo "
|---|
| \n";
-
- switch ($msg) {
- case "username required":
- echo "Please provide a username.";
- break;
- case "incorrect account information":
- echo "The username or password was incorrect. Please try again.";
- break;
- case "install complete":
- echo " \n"; - echo "Installation is complete. "; - echo " "; - echo "Getting Started: "; - echo "
| \n";
- echo "
| Message | \n"; + echo "
|---|
| \n";
+ switch ($msg) {
+ case "username required":
+ echo "Please provide a username.";
+ break;
+ case "incorrect account information":
+ echo "The username or password was incorrect. Please try again.";
+ break;
+ case "install complete":
+ echo " \n"; + echo "Installation is complete. "; + echo " "; + echo "Getting Started: "; + echo "
| \n";
+ echo "