-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,025 changed files
with
136,119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
echo '1.0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
require("system/system.php"); | ||
require("../config.php"); | ||
auth(); | ||
require("../system/application/libraries/POT/OTS.php"); | ||
|
||
/* Status types */ | ||
define('OK', 0); | ||
define('MISSING_VAR', 1); | ||
define('ACCOUNTNAME_TAKEN', 2); | ||
define('UNKNOWN', 3); | ||
|
||
/* Variable is missing? */ | ||
if(!isset($_GET['accountName']) || !isset($_GET['password']) || !isset($_GET['email'])) { | ||
die(json_encode(array('status'=>MISSING_VAR))); | ||
} | ||
|
||
$ots = POT::getInstance(); | ||
$ots->connect(POT::DB_MYSQL, array('host' => HOSTNAME, 'user' => USERNAME, 'database' => DATABASE, 'password' => PASSWORD)); | ||
$account = new OTS_Account(); | ||
$account->find($_GET['accountName']); | ||
|
||
/* Account name taken? */ | ||
if($account->isLoaded()) { | ||
die(json_encode(array('status'=>ACCOUNTNAME_TAKEN))); | ||
} | ||
$name = $account->createNamed($_GET['accountName']); | ||
$account->setPassword(sha1($_GET['password'])); | ||
$account->setEmail($_GET['email']); | ||
$account->setCustomField('premdays', PREMDAYS); | ||
try { | ||
$account->save(); | ||
} | ||
catch(Exception $e) { | ||
die(json_encode(array('status'=>UNKNOWN, 'message'=>$e->getMessage()))); | ||
} | ||
die(json_encode(array('status'=>OK, 'id'=>$account->getId()))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT count(1) FROM `accounts` WHERE name != '1'")->fetch_array(); | ||
echo $sql[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT `type`, `value`, `param`, `expires`, `added`, `comment`, `reason`, `action`, `statement` FROM `bans` WHERE `active` = '1'"); | ||
while($cmd = $sql->fetch_array()) { | ||
$return[] = $cmd; | ||
} | ||
echo json_encode($return); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT count(1) FROM `bans`")->fetch_array(); | ||
echo $sql[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
require("system/system.php"); | ||
require("../config.php"); | ||
auth(); | ||
$cities = array(); | ||
foreach($config['cities'] as $id=>$name) { | ||
$cities[$id] = $name; | ||
} | ||
echo json_encode($cities); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT count(1) FROM `guilds`")->fetch_array(); | ||
echo $sql[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
require('../config.php'); | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
|
||
$world = (isset($_GET['world'])?$_GET['world']:0); | ||
$skill = (isset($_GET['skill'])?$_GET['skill']:0); | ||
$config['newchar_vocations'][$world][] = 'Account Manager'; | ||
$filter = "'".join("','", $config['newchar_vocations'][$world])."'"; | ||
switch(@$skill) { | ||
case 1: | ||
$sql = $db->query('SELECT name,online,level,experience,vocation,promotion, world_id FROM players WHERE players.world_id LIKE "'.$world.'" AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND name NOT IN('.$filter.') ORDER BY level DESC, experience DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Experience"; | ||
break; | ||
case 2: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 0 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Fist Fighting"; | ||
break; | ||
case 3: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 1 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Club Fighting"; | ||
break; | ||
case 4: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 2 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Sword Fighting"; | ||
break; | ||
case 5: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 3 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Axe Fighting"; | ||
break; | ||
case 6: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 4 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Distance Fighting"; | ||
break; | ||
case 7: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 5 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Shielding"; | ||
break; | ||
case 8: | ||
$sql = $db->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = 6 AND name NOT IN('.$filter.') ORDER BY value DESC, count DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Fishing"; | ||
break; | ||
case 9: | ||
$sql = $db->query('SELECT name,online,maglevel,level,vocation,promotion FROM players WHERE players.world_id = '.$world.' AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND name NOT IN('.$filter.') ORDER BY maglevel DESC, manaspent DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Magic level"; | ||
break; | ||
default: | ||
$sql = $db->query('SELECT name,online,level,experience,vocation,promotion, world_id FROM players WHERE players.world_id LIKE "'.$world.'" AND players.deleted = 0 AND players.group_id < '.$config['players_group_id_block'].' AND name NOT IN('.$filter.') ORDER BY level DESC, experience DESC LIMIT 50'); | ||
while($cmd = $sql->fetch_array()){ $return['players'][] = $cmd; } | ||
$return['type'] = "Experience"; | ||
break; | ||
} | ||
echo json_encode($return); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT count(1) FROM `houses`")->fetch_array(); | ||
echo $sql[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
require('../config.php'); | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$config['newchar_vocations'][0][] = 'Account Manager'; | ||
$filter = "'".join("','", $config['newchar_vocations'][0])."'"; | ||
$sql = $db->query("SELECT count(1) FROM `players` WHERE name NOT IN ({$filter})")->fetch_array(); | ||
echo $sql[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT `name`, `level`, `world_id`, `sex`, `vocation` FROM `players` WHERE `online` = '1'"); | ||
while($cmd = $sql->fetch_array()) { | ||
$return[] = $cmd; | ||
} | ||
echo json_encode($return); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
require("system/system.php"); | ||
auth(); | ||
$db = new database(); | ||
$return = array(); | ||
$sql = $db->query("SELECT count(1) FROM `players` WHERE `online` = '1'")->fetch_array(); | ||
echo $sql[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
require("system/system.php"); | ||
require("../config.php"); | ||
auth(); | ||
echo $config['server_name']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
require("system/system.php"); | ||
require("../config.php"); | ||
auth(); | ||
$server_vocations = array(); | ||
foreach($config['server_vocations'] as $id=>$name) { | ||
$server_vocations[$id] = $name; | ||
} | ||
echo json_encode($server_vocations); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
require("system/system.php"); | ||
require("../config.php"); | ||
auth(); | ||
$worlds = array(); | ||
foreach($config['worlds'] as $id=>$name) { | ||
$worlds[$id] = $name; | ||
} | ||
echo json_encode($worlds); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
require("../config.php"); | ||
/*Database class for Modern AAC API.*/ | ||
class database extends mysqli { | ||
private $status; | ||
public function __construct() { | ||
global $config; | ||
parent::__construct($config['database']['host'],$config['database']['login'],$config['database']['password'],$config['database']['database']); | ||
$this->status = 1; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
require("system/trusted_list.php"); | ||
require("system/database.php"); | ||
|
||
function auth() { | ||
global $allowed; | ||
if(!in_array($_SERVER['REMOTE_ADDR'], $allowed)) { | ||
exit("This server could not authenticate your request."); | ||
} | ||
else return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
/*This list includes allowed server that can request data from API.*/ | ||
$allowed = array(); | ||
$allowed[] = "127.0.0.1"; // Local server | ||
|
||
/* Official servers, these are 100% safe and should not be removed (might lose functionality if you do) */ | ||
$allowed[] = gethostbyname("vapus.net"); // VAPus | ||
$allowed[] = "188.40.136.66"; // Old New VAPus | ||
$allowed[] = "188.40.110.66"; // Old VAPus IP (used for the fallback server) | ||
$allowed[] = "188.40.38.144"; // Fallback server for the updater (Might request call to isValid etc) | ||
$allowed[] = "88.208.252.193"; // ModernAAC API Server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | ||
|
||
$commands['/help'] = array('access'=>5, 'path'=>'help/command.php', 'help'=>'help/help.php'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | ||
require("commands/commands.php"); | ||
|
||
echo "This is example command!"; | ||
|
||
echo "<br/>The list of arguments passed to it:<pre>"; | ||
var_dump($args); | ||
echo "</pre>"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Help File! |
Oops, something went wrong.