<?php
/**
* ExploraHost Custom Modules
 */

// File Name
$file_name = basename(__FILE__);

// load databases
$mu = Connection::Database('MuOnline');
$me = Connection::Database('Me_MuOnline');

// Load Rankings Class
$Rankings = new Rankings();
$Character = new Character();

// Load Ranking Configs
loadModuleConfigs('rankings');

/*if(mconfig('active')) {

	//Ranking KING OF MU
	$result = $mu->query_fetch("SELECT TOP 50 Name,Score,Score_semanal FROM RankingKingPlayer ORDER BY Score DESC");
	if(is_array($result)){
		$cache = BuildCacheData($result);
		UpdateCache('arnold_rankings_king_player.cache', $cache);
	}
		
	

	//Ranking Blood Castle
	$accounts = $mu->query_fetch("SELECT TOP 50 Name,Score,Score_semanal FROM RankingBloodCastle ORDER BY Score DESC");
	if(is_array($accounts)){
		$result=null;
		foreach($accounts as $row) {
			$platerData = $Character->CharacterData($row['Name']);
			if(!is_array($platerData)) continue;
			$result[] = array(
				$row['Name'],
				$row['Score'],
				$row['Score_semanal'],
				$platerData[_CLMN_CHR_CLASS_],
				$platerData[_CLMN_CHR_MAP_]
			);
		}
		$cache = BuildCacheData($result);
		UpdateCache('arnold_rankings_blood_castle.cache', $cache);
	}
		
	

}*/

// UPDATE CRON
updateCronLastRun($file_name);