forked from Queens-College-Libraries/openroom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (26 loc) · 1009 Bytes
/
index.php
File metadata and controls
31 lines (26 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
require_once('vendor/autoload.php');
include("includes/or-theme.php");
//Check for and enforce SSL
if ($settings["https"] == "true" && $_COOKIE["redirected"] != "true") {
$op = isset($_GET["op"]) ? "?op=" . $_GET["op"] : "";
setcookie("redirected", "true");
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://" . $settings["instance_url"] . $op);
exit();
}
if (isset($_COOKIE["redirected"]) && $_COOKIE["redirected"] == "true") {
setcookie("redirected", "false");
}
include($_SESSION["themepath"] . "header.php");
if (!(isset($_SESSION["username"])) || $_SESSION["username"] == "") {
include("modules/login.php");
} elseif ($_SESSION["systemid"] == "" || !(isset($_SESSION["systemid"])) || $_SESSION["systemid"] != $settings["systemid"]) {
include("modules/login.php");
} else {
include($_SESSION["themepath"] . "content.php");
}
include($_SESSION["themepath"] . "footer.php");