Created
May 21, 2014 15:31
-
-
Save nilsmunch/f214b5309543dc621d04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
session_start(); | |
if ($_GET['action'] == 'reset') { | |
$_SESSION['SCORE'] = 0; | |
} | |
if ($_GET['action'] == 'up') { | |
$_SESSION['SCORE'] ++; | |
} | |
if ($_GET['sell']) { | |
$_SESSION['SCORE'] += 999; | |
} | |
if ($_GET) header('location:/'); | |
echo '<title>Number game awesome time!</title>'; | |
echo '<div style="text-align:center"><h1>Numberwang!</h1>'; | |
echo '<hr><h1>'.(int)$_SESSION['SCORE'].'</h1>'; | |
echo '<hr><a href="/?sell=bob" style="color:darkorange;font-weight:bold">Buy InApp Booster (10$)</a> · <a href="/?action=up">Increment!</a>'; | |
echo ' · <a href="/?action=reset">Reset</a>'; | |
echo '</div>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment