~ubuntu-branches/ubuntu/wily/qtdeclarative-opensource-src/wily-proposed

« back to all changes in this revision

Viewing changes to examples/quick/tutorials/samegame/samegame4/highscores/scores.php

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Ricardo Salveti de Araujo, Timo Jyrinki
  • Date: 2014-06-19 02:39:21 UTC
  • mfrom: (0.1.18 experimental)
  • Revision ID: package-import@ubuntu.com-20140619023921-yb2oasnuetz9b0fc
Tags: 5.3.0-3ubuntu4
[ Ricardo Salveti de Araujo ]
* debian/control:
  - Updating dependencies as we now also have libqt5quickwidgets5-gles
* libqt5quickwidgets5.symbols: updating to allow gles variant

[ Timo Jyrinki ]
* Update libqt5quickparticles5.symbols from build logs

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
        $time = $_POST["time"];
9
9
        if($name == "")
10
10
            $name = "Anonymous";
11
 
        $file = fopen("score_data.xml", "a");
12
 
        $ret = fwrite($file, "<record><score>". $score . "</score><name>" 
 
11
        $file = fopen("score_data.xml", "a");
 
12
        $ret = fwrite($file, "<record><score>". $score . "</score><name>"
13
13
            . $name . "</name><gridSize>" . $grid . "</gridSize><seconds>"
14
14
            . $time . "</seconds></record>\n");
15
15
        echo "Your score has been recorded. Thanks for playing!";
18
18
    }else{#Read high score list
19
19
        #Now uses XSLT to display. So just print the file. With XML cruft added.
20
20
        #Note that firefox at least won't apply the XSLT on a php file. So redirecting
21
 
        $file = fopen("scores.xml", "w");
 
21
        $file = fopen("scores.xml", "w");
22
22
        $ret = fwrite($file, '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"
23
23
            . '<?xml-stylesheet type="text/xsl" href="score_style.xsl"?>' . "\n"
24
24
            . "<records>\n" . file_get_contents("score_data.xml") . "</records>\n");