Link14716
08-27-2002, 12:23 AM
I wanna know how to set parameters and get them to work! :) Here is part of the file I am using.....
if ($action == "play") {
if (!$game) {
$game = tetris;
}
// Variable copying
$username = $bbuserinfo[username];
$userid = $bbuserinfo[userid];
// If someone tries to input a security code via any method, the no permission page will show
if ($_REQUEST['sec_no']) {
show_nopermission();
}
// Random security code generation
$lower = 100000000;
$higher = 999999999;
$sec_no = rand($lower, $higher);
// Date var
$date = mktime();
// New record inserted into the database, with new security code
$input_code = $DB_site->query("INSERT INTO arcade (userid, sec_no, game, comment, date) VALUES ('$userid', '$sec_no', '$game', '', '$date')");
// Fetches the high score for use in the game
$scoring = $DB_site->query("SELECT * FROM arcade WHERE game='$game' ORDER BY score DESC LIMIT 1");
$scoring_array=$DB_site->fetch_array($scoring);
$cur_high = $scoring_array['score'];
// Gets the "$game" template
eval("dooutput(\"".gettemplate('$game')."\");");
It doesn't get the template, so I am guessing that doesn't work ;)
if ($action == "play") {
if (!$game) {
$game = tetris;
}
// Variable copying
$username = $bbuserinfo[username];
$userid = $bbuserinfo[userid];
// If someone tries to input a security code via any method, the no permission page will show
if ($_REQUEST['sec_no']) {
show_nopermission();
}
// Random security code generation
$lower = 100000000;
$higher = 999999999;
$sec_no = rand($lower, $higher);
// Date var
$date = mktime();
// New record inserted into the database, with new security code
$input_code = $DB_site->query("INSERT INTO arcade (userid, sec_no, game, comment, date) VALUES ('$userid', '$sec_no', '$game', '', '$date')");
// Fetches the high score for use in the game
$scoring = $DB_site->query("SELECT * FROM arcade WHERE game='$game' ORDER BY score DESC LIMIT 1");
$scoring_array=$DB_site->fetch_array($scoring);
$cur_high = $scoring_array['score'];
// Gets the "$game" template
eval("dooutput(\"".gettemplate('$game')."\");");
It doesn't get the template, so I am guessing that doesn't work ;)