Location: PHPKode > scripts > ezStats for Medal of Honor > update.php
<?php
	include 'config.php';
	include 'classes.php';
	include 'functions.php';
	include 'settings.php';
	
	$ezLoc->get_data("admin");
	
	/* Manuelles Update eines Spielers */
	if (isset($_GET['update'])) {
		$player = $ezData->get_player_name($_GET['update']);
		echo $ezData->update_player($player);
	}
	
	/* Statsdaten für Mitglieder */
	else {
		$all = $ezData->get_all_players("all", "name", 50);
		$update = $ezData->update_playerlist($all);
		
		foreach ($update as $name => $result) {
			if ($result) {
				$str = str_replace('%name%', htmlentities($name), $ezLoc->data['player_updated']);
				echo $str."<br/>";
			} else {
				$str = str_replace('%name%', htmlentities($name), $ezLoc->data['player_not_updated']);
				echo $str."<br/>";
			}
		}
		
		$query = "UPDATE ".$ezstats['prefix']."settings SET LastUpdate = '".$_SERVER['REQUEST_TIME']."' WHERE ID = 1";
		$ezSQL->safe_query($query);
	}
?>
Return current item: ezStats for Medal of Honor