forked from iopietro/Travianz-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajax.php
50 lines (48 loc) · 1.7 KB
/
ajax.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
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename ajax.php ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
switch($_GET['f']) {
case 'k7':
$x = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['x']);
$y = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['y']);
$xx = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['xx']);
$yy = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['yy']);
$howmany = $x - $xx;
if($howmany == 12 || $howmany == -12) {
include("Templates/Ajax/mapscroll2.tpl");
}
else {
include("Templates/Ajax/mapscroll.tpl");
}
break;
case 'kp':
$z = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['z']);
//include("Templates/Ajax/plusmap.tpl");
break;
case 'qst':
if (isset($_GET['qact'])){
$qact=preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['qact']);
}else {
$qact=null;
}
if (isset($_GET['qact2'])){
$qact2=preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['qact2']);
}else {
$qact2=null;
}
if (isset($_GET['qact3'])){
$qact3=preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['qact3']);
}else {
$qact3=null;
}
include("Templates/Ajax/quest_core.tpl");
break;
}
?>