-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
executable file
·91 lines (86 loc) · 2.6 KB
/
header.php
File metadata and controls
executable file
·91 lines (86 loc) · 2.6 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
require_once "inc.php";
session_start();
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
if (isset($_SESSION["signedInToxxx.com"]) && $_SESSION["signedInToxxx.com"] == true) {
$userInfo = $_SESSION["userInfo"];
$userid = $db->getUserId($userInfo);
}
$filename = basename($_SERVER['PHP_SELF'], ".php");
if ($filename == "index") {
$title = "Home";
} else if ($filename == "bills") {
$title = "Billing";
checkSignIn();
} else if ($filename == "groups") {
$title = "Group";
checkSignIn();
} else if ($filename == "signin") {
$title = "Sign In";
checkSignOut();
} else if ($filename == "signup") {
$title = "Sign up";
checkSignOut();
} else if ($filename == "account") {
$title = "Account";
checkSignIn();
} else if ($filename == "pwdrecover") {
$title = "Recover Password";
checkSignOut();
} else if ($filename == "pwdreset") {
$title = "Reset Password";
checkSignOut();
} else if ($filename == "history") {
$title = "History";
checkSignIn();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Splitify - <?php echo $title; ?></title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.php" class="logo">Splitify</a>
<nav class="site-nav">
<ul class="underline-menu">
<li class="<?php if ($filename == "index") {
echo "active";
}
?>"><a href="index.php">Home</a></li>
<?php if (isset($_SESSION["signedInToxxx.com"]) && $_SESSION["signedInToxxx.com"] == true) {?>
<li class="<?php if ($filename == "bills") {
echo "active";
}
?>"><a href="bills.php">Bills</a></li>
<li class="<?php if ($filename == "groups") {
echo "active";
}
?>"><a href="groups.php">Groups</a></li>
<li class="<?php if ($filename == "account") {
echo "active";
}
?>"><a href="account.php">Account</a></li>
<li><a href="includes/signout.inc.php">Sign Out</a></li>
<?php } else {?>
<li class="<?php if ($filename == "signin") {
echo "active";
}
?>"><a href="signin.php">Sign In</a></li>
<li class="<?php if ($filename == "signup") {
echo "active";
}
?>"><a href="signup.php">Sign up</a></li>
<?php }?>
</ul>
</nav>
</header>
<div class="container">
<?php include "alert.php";