Skip to content

Commit ba383d2

Browse files
committed
minor webpage changes
1 parent 2c55103 commit ba383d2

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

public_html/index.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
function show_scores() {
33
# read array from file
4-
echo '<table><tr><th>Name</th><th>Speedup achieved</th></tr>';
4+
echo '<table><tr><th>Name</th><th>Runtime (CPU seconds)</th></tr>';
55
include("scores.php");
66

77
# update array with post request
@@ -10,17 +10,17 @@ function show_scores() {
1010
$score = htmlspecialchars($_POST["score"]);
1111
$scores[$name] = $score;
1212
}
13-
arsort($scores);
13+
asort($scores);
1414

1515
# write array to file
1616
$handle = fopen("scores.php","w");
17-
$string = "<?php\n\$scores = " . var_export($scores,true) . ";\n?>";
18-
fwrite($handle,$string);
17+
$string = '<?php $scores = ' . var_export($scores,true) . ';?>';
18+
fwrite($handle, $string);
1919
fclose($handle);
2020

2121
# display table
2222
foreach($scores as $key=>$value) {
23-
echo '<tr><td>' . $key . '</td><td>' . number_format($value,2) . ' x</td></tr>';
23+
echo '<tr><td>' . $key . '</td><td>' . number_format($value,2) . '</td></tr>';
2424
}
2525
echo '</table>';
2626

@@ -126,7 +126,8 @@ function show_scores() {
126126
-->
127127

128128
<div class="content">
129-
<? include('workshop2013/inc/header.php'); ?>
129+
<h1>R script runtime table</h1>
130+
<!--<h2 class="strapline">November 26th to 29th 2013</h2>-->
130131
</div>
131132

132133
</div>
@@ -161,7 +162,16 @@ function show_scores() {
161162

162163

163164

165+
<div class="panel-pane pane-custom pane-1 intro clearfix" >
166+
<p class="intro">
167+
Below is a table of runtimes automatically submitted by the R script.
168+
</p>
169+
</div>
170+
171+
<div class="panel-pane pane-custom pane-2 clearfix" >
164172
<?php show_scores(); ?>
173+
</div>
174+
165175

166176

167177
</div>

0 commit comments

Comments
 (0)