Easy hiscores changes
This commit is contained in:
parent
6db20bd0db
commit
43b27a532e
|
@ -2,6 +2,7 @@
|
|||
$score = $_GET['score'];
|
||||
$name = $_GET['name'];
|
||||
$level = $_GET['level'];
|
||||
$easymode = $_GET['easymode'];
|
||||
|
||||
sqlite_escape_string($score);
|
||||
sqlite_escape_string($name);
|
||||
|
@ -12,11 +13,16 @@ sqlite_escape_string($level);
|
|||
|
||||
|
||||
# open hiscore database
|
||||
$db = sqlite_open("hiscores.db", 0666, $errorstr);
|
||||
if ($easymode == 1) {
|
||||
$db = sqlite_open("hiscores.easy.db", 0666, $errorstr);
|
||||
} else {
|
||||
$db = sqlite_open("hiscores.db", 0666, $errorstr);
|
||||
}
|
||||
|
||||
|
||||
# insert entry
|
||||
$insert = sprintf("insert into hiscores (score, name, level) values (%d, '%s', %d);",$score, $name, $level);
|
||||
|
||||
$rv = sqlite_exec($db, $insert);
|
||||
sqlite_close($db);
|
||||
|
||||
|
|
Loading…
Reference in New Issue