This repository was archived by the owner on May 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.php
More file actions
74 lines (68 loc) · 1.32 KB
/
index.php
File metadata and controls
74 lines (68 loc) · 1.32 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
<?php
include("inc/auth.class.php");
include("inc/virtualtrader.class.php");
$auth = new Auth;
$virtualtrader = new VirtualTrader;
if(isset($_COOKIE['auth_session']))
{
if($auth->checksession($_COOKIE['auth_session']))
{
$session = $auth->sessioninfo($_COOKIE['auth_session']);
$userbalance = $virtualtrader->GetUserBalance($session['username']);
}
}
if(isset($_GET['page']))
{
$page = $_GET['page'];
switch($page)
{
case 'home':
include("pages/home.php");
break;
case 'login':
include("pages/login.php");
break;
case 'register':
include("pages/register.php");
break;
case 'resetpass':
include("pages/resetpass.php");
break;
case 'activate':
include("pages/activate.php");
break;
case 'change-pass':
include("pages/change-pass.php");
break;
case 'change-email':
include("pages/change-email.php");
break;
case 'logout':
include("pages/logout.php");
break;
case 'stocks':
include("pages/stocks.php");
break;
case 'stockinfo':
include("pages/stockinfo.php");
break;
case 'userinfo':
include("pages/userinfo.php");
break;
case 'mystocks':
include("pages/mystocks.php");
break;
case 'top-10':
include("pages/top-10.php");
break;
default:
include("pages/404.php");
break;
}
}
else
{
header("Location: ?page=home");
exit();
}
?>