-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
152 lines (120 loc) · 5.63 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
SESSION_START();
ob_start();
$page = 'home';
$page_title = 'Home';
require_once('inc/functions.php');
if(isset($_GET['newlicense'])) {
cache::clear();
if (!prometheus::lkcheck()) {
setSetting($_GET['newlicense'], 'api_key', 'value', false);
cache::clear();
}
}
util::redirect('splash.php');
if (!prometheus::loggedin())
include('inc/login.php');
else
$UID = $_SESSION['uid'];
if (getSetting('installed', 'value2') == 0) {
cache::clear();
util::redirect('install.php');
}
if (prometheus::loggedin() && !actions::delivered() && $page != 'required')
util::redirect('store.php?page=required');
if (prometheus::loggedin() && is_numeric(actions::delivered('customjob', $_SESSION['uid'])) && $_GET['page'] != 'customjob')
util::redirect('store.php?page=customjob&pid=' . actions::delivered('customjob', $_SESSION['uid']));
ob_end_clean();
?>
<?php include('inc/header.php'); ?>
<?php if (getSetting('installed', 'value2') == 1) { ?>
<div class="content">
<div class="container">
<div class="row">
<div class="col-xs-12">
<?php if (isset($_GET['installed']) && $_GET['installed'] == true) { ?>
<p class="bs-callout bs-callout-success">
<button type="button" class="close" data-dismiss="alert">×</button>
Installation successfull! Please delete install.php if it didn't do it itself. The first
user who signs in gets admin access!<br>
</p>
<?php } ?>
</div>
</div>
<div class="row">
<?php
include('inc/news.php');
?>
<div class="col-xs-<?= $news_width; ?>">
<?php if (!prometheus::loggedin()) { ?>
<div class="header">
<?= lang('signin', 'Sign in'); ?>
</div>
<?= lang('welcome_signin', 'You need to sign in first in order to buy any packages'); ?><br><br>
<?php echo '<a href="' . SteamSignIn::genUrl() . '"><img src="//steamcommunity-a.akamaihd.net/public/images/signinthroughsteam/sits_large_noborder.png"></img></a>'; ?>
<br><br>
<?php } ?>
<div class="header">
<?= lang('welcome_main', 'welcome'); ?>
</div>
<?php if (getSetting('enable_goal', 'value2') == 1) { ?>
<div class="donationGoal">
<?php
$goal = goal::get();
?>
<h2><?= lang('monthly_goal', 'Monthly goal'); ?></h2>
<div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar"
aria-valuenow="<?php echo $goal['perc']; ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo $goal['perc']; ?>%;">
<span>
<?php echo $goal['perc']; ?>% (<?php echo $goal['total'] . ' ' . $goal['cur']; ?>
/ <?php echo $goal['goal'] . ' ' . $goal['cur']; ?>)
</span>
</div>
</div>
</div>
<?php } ?>
<?php if (getSetting('show_top', 'value2') == 1) { ?>
<div class="top_donators">
<h2><?= lang('top_donators', 'Top 3 donators'); ?></h2>
<table class="table table-striped">
<thead>
<tr>
<td><?= lang('name', 'Name') ?></td>
<td><?= lang('amount', 'Amount') ?></td>
</tr>
</thead>
<tbody>
<?= dashboard::getTopDonators(); ?>
</tbody>
</table>
</div>
<?php } ?>
<?php if (getSetting('show_recent', 'value2') == 1) { ?>
<div class="recent_donators">
<h2><?= lang('recent_donators', 'Recent donators'); ?></h2>
<table class="table table-striped">
<thead>
<tr>
<td><?= lang('name', 'Name') ?></td>
<td><?= lang('package', 'Package') ?></td>
<td><?= lang('amount', 'Amount') ?></td>
<td><?= lang('timestamp', 'Timestamp') ?></td>
</tr>
</thead>
<tbody>
<?= dashboard::getRecent(); ?>
</tbody>
</table>
</div>
<?php } ?>
<?php echo page::get('frontpage'); ?>
</div>
</div>
</div>
</div>
<?php include('inc/footer.php'); ?>
<?php
/* Just because one is british does not mean one uses british slang, one can be quite proper. */
} ?>