-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.php
More file actions
133 lines (128 loc) · 6.59 KB
/
Copy pathapp.php
File metadata and controls
133 lines (128 loc) · 6.59 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
sec_session_start();
if (login_check($mysqli) == true)
$logged = 'in';
else
header('Location: index.php');
list($gather_count,
$gather_tier,
$crafting_count,
$crafting_tier,
$farming_count,
$farming_tier,
$player_count,
$player_tier) = home_stats($mysqli);
list($titles,$values) = format_js_chart($gather_count);
$player_name = json_encode($_SESSION['username']);
?>
<! DOCTYPE html>
<html>
<head>
<title>INF Alliance Application</title>
<script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script type="text/JavaScript" src="js/forms.js"></script>
<link rel="stylesheet" type="text/css" href="css/app.css"></link>
<input type="hidden" id="tab" value="home">
</head>
<body>
<div class="background"></div>
<?php
if ($logged == 'in') {
echo '<b>' . htmlentities($_SESSION['username']) . ' | </b><a href="includes/logout.php">Logout</a>';
} else {
echo 'Currently logged ' . $logged . '.';
}
?>
<div class="header">
<p>Pinned Announcements / Events / Upcoming Events / UTC Clock</p>
</div>
<div class="menu">
<input class="home_btn" type="button" value="Home" onclick="showHome()">
<input class="gather_btn" type="button" value="Gathering" onclick="showGather()">
<input class="craft_btn" type="button" value="Crafting" onclick="showCraft()">
<input class="farm_btn" type="button" value="Farming" onclick="showFarm()">
<input class="gvg_btn" type="button" value="GvG" onclick="showGvG()">
<input class="account_btn" type="button" value="<?php echo $_SESSION['username']; ?>" onclick="showAccount()">
</div>
<div class="main_app">
<div id="home" class="home_view">
<script type="text/javascript">
window.onload = function(){
var titles = JSON.parse('<?= $titles; ?>');
var values = JSON.parse('<?= $values; ?>');
var player = JSON.parse('<?= $player_name; ?>');
createPieChart('Gathering',titles,values, true);
createPieChart('Gathering',titles,values);
<?php list($titles,$values) = format_js_chart($gather_tier);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart('Gathering Tiers',titles,values, true);
createPieChart('Gathering Tiers',titles,values);
<?php list($titles,$values) = format_js_chart($crafting_count);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart('Crafting',titles,values, true);
createPieChart('Crafting',titles,values);
<?php list($titles,$values) = format_js_chart($crafting_tier);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart('Crafting Tiers',titles,values, true);
createPieChart('Crafting Tiers',titles,values);
<?php list($titles,$values) = format_js_chart($farming_count);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart('Farming',titles,values, true);
createPieChart('Farming',titles,values);
<?php list($titles,$values) = format_js_chart($farming_tier);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart('Farming Tiers',titles,values, true);
createPieChart('Farming Tiers',titles,values);
<?php list($titles,$values) = format_js_chart($player_count);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart(player,titles,values, true, 1);
createPieChart(player,titles,values, false, 1);
<?php list($titles,$values) = format_js_chart($player_tier);?>
titles = JSON.parse('<?= $titles; ?>');
values = JSON.parse('<?= $values; ?>');
createPieChart(player + " Tiers",titles,values, true, 2);
createPieChart(player + " Tiers",titles,values, false, 2);
}
</script>
<div class="chart" id="HomeGatheringChart"></div>
<div class="chart" id="HomeGatheringTiersChart"></div>
<div class="chart" id="HomeCraftingChart"></div>
<div class="chart" id="HomeCraftingTiersChart"></div>
<div class="chart" id="HomeFarmingChart"></div>
<div class="chart" id="HomeFarmingTiersChart"></div>
<div class="chart" id="HomePlayerChart"></div>
<div class="chart" id="HomePlayerTiersChart"></div>
</div>
<div id="gather" class="gather_view">
<div class="chart" id="GatheringChart"></div>
<div class="chart" id="GatheringTiersChart"></div>
<input class="search" type="text" id="GatheringSearch" onkeyup="searchFilter('GatheringSearch','GatheringTable')" placeholder="Search for names..">
<?php GenerateHTMLTable('Gathering', $mysqli);?>
</div>
<div id="craft" class="craft_view">
<div class="chart" id="CraftingChart"></div>
<div class="chart" id="CraftingTiersChart"></div>
<input class="search" type="text" id="CraftingSearch" onkeyup="searchFilter('CraftingSearch','CraftingTable')" placeholder="Search for names..">
<?php GenerateHTMLTable('Crafting', $mysqli);?>
</div>
<div id="farm" class="farm_view">
<div class="chart" id="FarmingChart"></div>
<div class="chart" id="FarmingTiersChart"></div>
<input class="search" type="text" id="FarmingSearch" onkeyup="searchFilter('FarmingSearch','FarmingTable')" placeholder="Search for names..">
<?php GenerateHTMLTable('Farming', $mysqli);?>
</div>
<div id="gvg" class="gvg_view"></div>
<div id="account" class="account_view">
<div class="chart" id="PlayerChart"></div>
<div class="chart" id="PlayerTiersChart"></div>
</div>
</div>
</body>