editme.game.php, enter $shortname as below for 'editme'. define('CVS_REVISION', '$RCSfile: bambam.game.php,v $ - $Revision: 1.35 $'); define('NO_REGISTER_GLOBALS', 1); // #################### PRE-CACHE TEMPLATES AND DATA ###################### $phrasegroups = array(); $specialtemplates = array(); require_once('./global.php'); // ############################# EDIT HERE ################################ // This installation/uninstallation process assumes that you used the unique // shortname for this game in the filenames for both the .swf and the two // image files. Meaning, if your game title is "Flashbert", your shortname // is "flashbert", then it's assumed that your image files are "flashbert1.gif", // and "flashbert2.gif". It is also assumed that your game is one file, named // "flashbert.swf". If this is not the case, you have more editing to do below. // install_ and uninstall_notice allows you to announce the action 'YES', or not 'NO' $title='Bam Bam'; // Example: 'Flashbert' $shortname='bambam'; // Example: 'flashbert' $description=' BamBam's are individual sticks that are hit together to make noise in support of your cause. Hit them as many times as you can!'; // Example: 'Avoid the balls and snakes, jump and change the blocks in this classic game.' $game_width='500'; // Example: '360' $game_height='375'; // Example: '420' $secondary_swf_exist='NO'; // 'YES' ONLY if your game requires two .swf files. The loader should be $shortname.swf, the game filename defined next. $secondary_swf_filename=''; // Example: 'flashbert_game' -- ONLY used if $secondary_swf is set to YES. Do not include the .swf extension. $report_install='YES'; // 'YES' for make install announcement (default) in game news, blank (or 'NO') for don't. $report_uninstall='NO'; // 'YES' for make uninstall announcement in game news, blank (or 'NO') for don't (default). // ################### NO MORE EDITS BELOW THIS LINE ###################### print_cp_header("v3 Arcade - $title"); // welcome step if (!isset($_POST['do'])) { $gameexists1 = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games WHERE shortname='$shortname'"); if ($DB_site->num_rows($gameexists1)==0) { print_form_header('". $shortname .".game', 'install'); print_table_header("v3 Arcade - $title INSTALL"); if ($secondary_swf_exist == "YES") { print_description_row("This script will install $title for your v3 Arcade.

Make sure you upload the following files:
". $shortname ."1.gif -> /images/arcade/". $shortname ."1.gif
". $shortname ."2.gif -> /images/arcade/". $shortname ."2.gif
". $shortname .".swf -> /games/". $shortname .".swf
". $secondary_swf_filename .".swf -> /games/". $secondary_swf_filename .".swf

Click on \"Install $title\" to begin the installation."); } else { print_description_row("This script will install $title for your v3 Arcade.

Make sure you upload the following files:
". $shortname ."1.gif -> /images/arcade/". $shortname ."1.gif
". $shortname ."2.gif -> /images/arcade/". $shortname ."2.gif
". $shortname .".swf -> /games/". $shortname .".swf

Click on \"Install $title\" to begin the installation."); } print_submit_row("Install $title", 0); } else { print_form_header('". $shortname .".game', 'uninstall'); print_table_header("v3 Arcade - $title UNINSTALL"); if ($secondary_swf_exist == "YES") { print_description_row("This script will uninstall $title for your v3 Arcade.

Make sure you delete the following files:
". $shortname ."1.gif -> /images/arcade/". $shortname ."1.gif
". $shortname ."2.gif -> /images/arcade/". $shortname ."2.gif
". $shortname .".swf -> /games/". $shortname .".swf
". $secondary_swf_filename .".swf -> /games/". $secondary_swf_filename .".swf

Once you click to uninstall, there is no going back. So make sure that is what you want to do. You will lose all existing scores and time played in the specified game. You do not need to uninstall to upgrade a game. Simply overwrite the .swf file in your games folder.

Click on \"Uninstall $title\" to begin the removal."); } else { print_description_row("This script will uninstall $title for your v3 Arcade.

Make sure you delete the following files:
". $shortname ."1.gif -> /images/arcade/". $shortname ."1.gif
". $shortname ."2.gif -> /images/arcade/". $shortname ."2.gif
". $shortname .".swf -> /games/". $shortname .".swf

Once you click to uninstall, there is no going back. So make sure that is what you want to do. You will lose all existing scores and time played in the specified game. You do not need to uninstall to upgrade a game. Simply overwrite the .swf file in your games folder.

Click on \"Uninstall $title\" to begin the removal."); } print_submit_row("Uninstall $title", 0); } } // ############################################################################# // action step if ($_POST['do'] == "install") { $DB_site->query("INSERT INTO " . TABLE_PREFIX . "games (shortname, gameid, title, descr, file, width, height, miniimage, stdimage, gamesettings, highscorerid, highscore) VALUES ('$shortname', NULL, '$title', '$description', '$shortname.swf', '$game_width', '$game_height', '". $shortname ."2.gif', '". $shortname ."1.gif', 29, NULL, NULL)"); if ($report_install == "YES") { $DB_site->query(" INSERT INTO " . TABLE_PREFIX . "gamenews (newstext,newstype,datestamp) VALUES ('New Game Installed: $title','newgame'," . TIMENOW . ") "); } print_form_header('". $shortname .".game', ''); print_table_header("v3 Arcade - INSTALL $title"); print_description_row("Installation Complete! (PLEASE DELETE THIS FILE.)"); } if ($_POST['do'] == "uninstall") { $gameexists2 = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "gamechallenges WHERE game='$shortname'"); $gameexists3 = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "gamesessions WHERE gamename='$shortname'"); $DB_site->query("DELETE FROM " . TABLE_PREFIX . "games where shortname='$shortname'"); $DB_site->query("DELETE FROM " . TABLE_PREFIX . "gamenews where newstext='New Game Installed: $title'"); if ($DB_site->num_rows($gameexists2)!=0) { $DB_site->query("DELETE FROM " . TABLE_PREFIX . "gamechallenges where game='$shortname'"); } if ($DB_site->num_rows($gameexists3)!=0) { $DB_site->query("DELETE FROM " . TABLE_PREFIX . "gamesessions where gamename='$shortname'"); } if ($report_uninstall == "YES") { $DB_site->query(" INSERT INTO " . TABLE_PREFIX . "gamenews (newstext,newstype,datestamp) VALUES ('Game Removed: $title','newgame'," . TIMENOW . ") "); } print_form_header('". $shortname .".game', ''); print_table_header("v3 Arcade - UNINSTALL $title"); print_description_row("Removal Complete! (PLEASE DELETE THIS FILE.)"); } /*======================================================================*\ || #################################################################### || || # v3Arcade Game Installer/Uninstaller - version 3 - April 21, 2004 # || || #################################################################### || \*======================================================================*/ ?>