123456789101112131415161718 |
- <?php
-
- if(!empty($_GET['login']) && !empty($_GET['score'])) {
- Score::add($_GET['login'], $_GET['score']);
- $scArray = array(
- "status" => 1,
- "message" => "score_add_success"
- );
- } else {
- $scores = Score::getScores(10);
- $scArray = array();
- for($i = 0; $i < sizeof($scores); $i++) {
- array_push($scArray, array(
- "login" => utf8_encode($scores[$i]->getLogin()),
- "score" => $scores[$i]->getScore()
- ));
- }
- }
|