<?php
/*********************************************************************/
/* MineCobalt - Minecraft SMP Web Administration */
/* Copyright (c) 2011, Mark Randall @ MineCobalt */
/* All rights reserved. */
/*********************************************************************/
/* Please read licence.txt */
/*********************************************************************/
/* Pagename: ajax.php */
/* Purpose: This page handles the AJAX from the pages */
/*********************************************************************/
session_start();
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
require($_SERVER['DOCUMENT_ROOT']."/.settings/siteconfig.php");
require($_SERVER['DOCUMENT_ROOT']."/.classes/mysql.php");
$sql = new mysql_connection($config['mysql']['username'], $config['mysql']['password'], $config['mysql']['hostname'], $config['mysql']['port'], $config['mysql']['database']);
require($_SERVER['DOCUMENT_ROOT']."/.classes/bukkit.php");
$bukkit = new bukkit($config['minecraft']['server'],$config['minecraft']['port']);
require($_SERVER['DOCUMENT_ROOT']."/.functions/members.php");
//
// Load the action that we want from the post string
//
$action = $_REQUEST['action'];
$action = strtolower($action);
switch($action){
case "check_username":
if(check_username($_REQUEST['username'])){
echo "true";
}else{
echo "false";
}
}
?>