示例#1
0
文件: API.php 项目: juggernautt/lines
<?php

require_once 'BL.php';
if ($_POST['action'] == "addScore") {
    add_new_score($_POST['name'], $_POST['scores']);
    $result = get_all_scores();
    print json_encode($result);
    return;
}
示例#2
0
	<header>
		<h1>Tile Tapper 100 - Hall of Fame</h1>
	</header>
	<p id="top">This is the hall of fame website for Tile Tapper 100, the table below shows the top 100 scores achieved by players around the globe!</p>
	<table class="table table-striped">
		<tr>
			<td>RANK</td>
			<td>SELFIE</td>
			<td>NAME</td>
			<td>LOCALE</td>
			<td>SCORE</td>
		</tr>
		<tr>
		<!-- php foreach loops over array of highscores and prints each score to the page... -->
		<?php 
$scores = get_all_scores();
$i = 0;
foreach ($scores as $score) {
    ?>
				<td><?php 
    $i++;
    echo $i;
    ?>
</td>
				<td><img src="assets/img/<?php 
    echo $score['player_photo'];
    ?>
" class="avatar_image"></td>
				<td><?php 
    echo $score['player_name'];
    ?>