-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
77 lines (74 loc) · 1.78 KB
/
index.php
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
<?php
/************************************************
* Infinity Corp Manager Index Page
*
* Created by Harley Faggetter
*
*
*
*
*************************************************/
session_start();
//Check that you're logged in.
if($_SESSION['login']===1)
{
//Pass doctype, html headers and greeting
echo
(
"<!DOCTYPE html>
<html>
<head>
<title>Infinity Corp Manager Prototype</title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />
</head>
<body>
<p>Welcome " . $_SESSION['username'] . "<br />"
);
//Check whether you've been logged in as a corp owner11
if($_SESSION['corpowner']===1)
{
echo "<p><a href=\"mycorp.php\" target=\"_top\">My Corp</a><br />";
}
//Otherwise show Corp Registration option
elseif($_SESSION['corpowner']!=1)
{
echo "<p><a href=\"corpreg.php\" target=\"_top\">Corp Registration</a><br />";
}
//Then show everything else
echo
(
"<p><a href=\"corpdir.php\" target=\"_top\">Corp Directory</a><br />
<p><a href=\"logout.php\" target=\"_top\">Logout</a></p>
</body>
</html>"
);
}
//Show this if not logged in
else
{
//But include this if you've just verified your email
if($_GET['v'] === "1")
{
echo "You're now verified, please log in. <br />";
}
echo
(
"<!doctype html>
<html>
<head>
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />
<title>Infinity Corp Manager Prototype</title>
</head>
<body>
<h1 style=\"text-align:center;\">INFINITY Corp Manager</h1><br />
<center>Version 0.1<br />
<p>Please sign in to access this service.
<form name=\"input\" action=\"unifiedlogin.php\" method=\"post\">
Username: <input type=\"text\" name=\"user\" /><br />
Password: <input type=\"password\" name=\"loginP\" /><br />
<input type=\"submit\" value=\"Register/Login\" /></center>
</body>
</html>"
);
}
?>