#!/bin/php <?php include 'lib.php'; include 'includes/db.php'; include 'includes/ranking.php'; ranking_to_file('ranking/week.json', 'WEEK'); ranking_to_file('ranking/month.json', 'MONTH'); ranking_to_file('ranking/year.json', 'YEAR'); ranking_to_file('ranking/all.json', 'YEAR', 10);
public function export() { $this->say("\tBegin export"); // Export ranking_to_file('ranking/week.json', 'WEEK'); ranking_to_file('ranking/month.json', 'MONTH'); ranking_to_file('ranking/year.json', 'YEAR'); ranking_to_file('ranking/all.json', 'YEAR', 10); $this->say("\t\t" . 'Ranking exported'); $this->say("\tEnd export"); }
public function end() { // Last round ended normally $this->observer->move_tournament($this, 'running', 'ended'); $this->set_status(6); $this->terminate(); $this->log($this->players[0]->player_id, 'end', ''); ranking_to_file('ranking/week.json', 'WEEK'); ranking_to_file('ranking/month.json', 'MONTH'); }