-
Notifications
You must be signed in to change notification settings - Fork 76
/
ajax.php
45 lines (41 loc) · 939 Bytes
/
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
<?php
if($_GET){
include_once ("GameEngine/Database/connection.php");
include_once ("GameEngine/config.php");
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
mysql_select_db(SQL_DB);
switch($_GET['f']) {
case 'qst':
if (isset($_GET['qact'])){
$qact=$_GET['qact'];
}else {
$qact=null;
}
if (isset($_GET['qact2'])){
$qact2=$_GET['qact2'];
}else {
$qact2=null;
}
if (isset($_GET['qact3'])){
$qact3=$_GET['qact3'];
}else {
$qact3=null;
}
include("Templates/Ajax/quest_core.tpl");
break;
}
switch($_GET['cmd']) {
case 'changeVillageName':
$q = "UPDATE " . TB_PREFIX . "vdata SET `name` = '" . $_POST['name'] . "' where `wref` = '" . $_POST['did'] . "'";
mysql_query($q);
break;
case 'mapLowRes':
$x = $_POST['x'];
$y = $_POST['y'];
$xx = $_POST['width'];
$yy = $_POST['height'];
include("Templates/Ajax/mapscroll.tpl");
break;
}
}
?>