-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
49 lines (42 loc) · 1.01 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
<?php
require('init.php');
$mvthemedir = 'templates/'.mv_setting('selected_theme');
if (isset($_GET['ajax'])) {
$path = realpath($mvthemedir.'/'.str_replace('../', '', $_GET['ajax']).'.php');
if ($_GET['ajax'] == 'times' && isset($_SESSION['user'])) {
if (empty($_SESSION['user'])) {
die('Session invalid.');
}
echo(json_encode(mv_vote_times()));
}
else if ($_GET['ajax'] == 'step3continue' && isset($_SESSION['user'])) {
if (empty($_SESSION['user'])) {
die('Session invalid.');
}
$rewardvotes = mv_reward_votes();
$rewardentry = mv_reward();
//var_dump($rewardentry);
if (empty($rewardentry)) {
echo(mv_site_count() - count($rewardvotes));
}
else {
echo(0);
}
}
else if ($path !== false) {
include($path);
/*if (strpos($path, $mvthemedir.'/') !== false) {
require($path);
}
else {
header('HTTP/1.1 404 Not Found');
echo('The requested file could not be found');
}*/
}
else {
die('Invalid request.');
}
die();
}
require($mvthemedir.'/index.php');
?>