Could one of you pro's help me out with this script?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Could one of you pro's help me out with this script?
skullcramp
CZ Newbie
skullcramp has been a member for over 20 year's 20 Year Member
usa.gif idaho.gif
Occupation: General Manager
Gender: Male
Fav. Sports Team: San Diego Chargers
Website:
Status: Offline
Joined: Apr 28, 2004
0.00 posts per day
Posts: 28
Points: 2,662
   
I'm trying to run the below script and I get this error messege. My host help says it's the script and not the server.

Error message

Server error!
The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: arcade_install.php

If you think this is a server error, please contact the webmaster.

Error 500


Here's the script:

<?php
/********************************************************/
/* Arcade 3.0.2 - Installer Script                      */
/* By: JRSweets (JRSweets@gmail.com)                    */
/* http://www.jeffrusso.net                             */
/* Copyright © 2004 by JeffRusso.net                    */
/********************************************************/

require_once("mainfile.php");
global $admin;

if(!is_array($admin)) {
      $adm = base64_decode($admin);
      $adm = explode(":", $adm);
      $admin_name = "$adm[0]";
} else {
      $admin_name = "$admin[0]";
}

$index=1;

if (!$result = $db->sql_query("SELECT * FROM ".$prefix."_authors WHERE aid='$admin_name'")) {
      die("Unable to retrive Admin Information.");
}

$isadmin = $db->sql_fetchrow($result);

if ($isadmin['radminsuper']==1) {
      switch($op) {
            default:
               $pagetitle = "Arcade";
               include("header.php");
               title("$pagetitle");

               OpenTable();
               echo "<table align='center' border='0' cellpadding='2' cellspacing='2'>\n";
               echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
               echo "<tr><td>This script will install, destall or upgrade the tables for the $pagetitle.</td></tr>\n";
               echo "<tr><td><b>Backup data tables before going on!</b></td></tr>\n";
               echo "<tr><td><select name='op'>\n";
               echo "<option value=''>---- Install Options ----</option>\n";
               echo "<option value='install'>First Time Install of $pagetitle</option>\n";
               echo "<option value=''>---- Upgrade Options ----</option>\n";
               echo "<option value='upgradev2x'>Upgrade $pagetitle V2 to $pagetitle V3.0.2</option>\n";
               echo "<option value='upgradev3'>Upgrade $pagetitle V3 to $pagetitle V3.0.2</option>\n";
               echo "<option value=''>---- Comments Mod Options ----</option>\n";
               echo "<option value='sync'>Comments Sync - Use only if Comments Mod was not Installed</option>\n";
               echo "<option value=''>---- Destall Options ----</option>\n";
               echo "<option value='destall'>Destall $pagetitle</option>\n";
               echo "</select> <input type='submit' value='COMMIT'></td></tr>\n";
               echo "<tr><td><b>Once you have finished with this script, delete it from your server!</b></td></tr>\n";
               echo "</form>";
               echo "</table>\n";
               CloseTable();

               include("footer.php");
               break;

            case "install":
               $pagetitle = "Arcade: Install";
               include("header.php");
               title("$pagetitle");

               $error12 = 0;

               OpenTable();
               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbgames");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbgames (game_id mediumint(8) NOT NULL auto_increment,game_pic varchar(50) NOT NULL default '',game_desc varchar(255) NOT NULL default '',game_highscore INT(11) NOT NULL default '0',game_highdate int(11) NOT NULL default '0',game_highuser mediumint(8) NOT NULL default '0',game_name varchar(50) NOT NULL default '',game_swf varchar(50) NOT NULL default '',game_scorevar varchar(20) NOT NULL default '',game_type tinyint(4) NOT NULL default '0',game_width mediumint(5) NOT NULL default '550',game_height varchar(5) NOT NULL default '380',game_order MEDIUMINT(8) DEFAULT '0' NOT NULL,game_set MEDIUMINT(8) DEFAULT '0' NOT NULL,arcade_catid MEDIUMINT(8) DEFAULT '1' NOT NULL,KEY game_id (game_id))")) { echo "Table ".$prefix."_bbgames Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbgames UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbscores");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbscores (game_id mediumint(8) NOT NULL default '0',user_id mediumint(8) NOT NULL default '0',score_game INT(11) NOT NULL default '0',score_date int(11) NOT NULL default '0',score_time int(11) NOT NULL default '0',score_set mediumint(8) NOT NULL default '0')")) { echo "Table ".$prefix."_bbscores Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbscores UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbgamehash");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbgamehash (gamehash_id CHAR(32) NOT NULL,game_id MEDIUMINT(8) NOT NULL,user_id MEDIUMINT(8) NOT NULL,hash_date INT(11) NOT NULL)")) { echo "Table ".$prefix."_bbgamehash Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbgamehash UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbhackgame");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbhackgame (user_id MEDIUMINT(8) NOT NULL,game_id MEDIUMINT(8) NOT NULL,date_hack INT(11) NOT NULL)")) { echo "Table ".$prefix."_bbhackgame Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbhackgame UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_categories");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_categories (arcade_catid mediumint(8) unsigned NOT NULL auto_increment,arcade_cattitle varchar(100) NOT NULL default '',arcade_nbelmt mediumint(8) unsigned NOT NULL default '0',arcade_catorder mediumint(8) unsigned NOT NULL default '0', KEY arcade_catid (arcade_catid)) TYPE=MyISAM")) { echo "Table ".$prefix."_bbarcade_categories Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_categories UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade (arcade_name varchar(255) NOT NULL default '',arcade_value varchar(255) NOT NULL default '',PRIMARY KEY  (arcade_name))")) { echo "Table ".$prefix."_bbarcade Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbauth_arcade_access");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbauth_arcade_access (group_id mediumint(8) NOT NULL default '0',arcade_catid mediumint(8) unsigned NOT NULL default '0',KEY group_id (group_id),KEY arcade_catid (arcade_catid)) TYPE=MyISAM")) { echo "Table ".$prefix."_bbauth_arcade_access Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbauth_arcade_access UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_comments");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_comments (game_id mediumint(8) NOT NULL default '0',comments_value varchar(255) NOT NULL default '') TYPE=MyISAM")) { echo "Table ".$prefix."_bbarcade_comments Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_comments UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_fav");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_fav (`order` mediumint(8) NOT NULL default '0',user_id mediumint(8) NOT NULL default '0',game_id mediumint(8) NOT NULL default '0') TYPE=MyISAM")) { echo "Table ".$prefix."_bbarcade_fav Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_fav UnSuccesfully Created.</font><br>"; }

               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade_categories ADD arcade_catauth TINYINT(2) NOT NULL")) { echo "Succesfully Altered Table ".$prefix."_bbarcade_categories.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade_categories.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_users ADD user_allow_arcadepm TINYINT(0) DEFAULT '1' NOT NULL")) { echo "Succesfully Altered Table ".$prefix."_users.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_users.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbscores ADD INDEX ( `game_id` )")) { echo "Succesfully Altered Table ".$prefix."_bbscores.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbscores.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbscores ADD INDEX ( `user_id` )")) { echo "Succesfully Altered Table ".$prefix."_bbscores.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbscores.</font><br>"; }

               if ($result = $db->sql_query("UPDATE ".$prefix."_bbgames SET game_order = game_id WHERE game_order = '0'")) { echo "Succesfully Updated Table ".$prefix."_bbgames.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Updated Table ".$prefix."_bbgames.</font><br>"; }
                                        if ($result = $db->sql_query("UPDATE ".$prefix."_bbgames SET game_order = game_id WHERE game_order = '0'")) { echo "Succesfully Updated Table ".$prefix."_bbgames.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Updated Table ".$prefix."_bbgames.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade_categories (arcade_catid, arcade_cattitle, arcade_catorder) VALUES ('1', 'Arcade', '1')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade_categories.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade_categories.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('use_category_mod', '1')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('category_preview_games', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('games_par_page', '15')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('game_order', 'Alpha')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('display_winner_avatar', '1')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('stat_par_page', '10')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('winner_avatar_position', 'left')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('maxsize_avatar', '200')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('linkcat_align', '2')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('limit_by_posts', '0')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('posts_needed', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('days_limit', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('limit_type', 'date')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('use_fav_category', '1')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('arcade_announcement', 'Welcome to the Arcade!<br>Enjoy!')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }

               echo "<hr>\n";

               if (!$error12 = 1) {
                     echo "Arcade Unsuccesfully Installed!<br>\n";
               } else {
                     echo "Arcade Installed Successfully!<br>\n";
               }

               echo "Please delete this off your server now.\n";
               CloseTable();

               include("footer.php");
               break;

            case "upgradev2x":
               $pagetitle = "Arcade: Upgrade V2.0.x to V3.0.2";
               include("header.php");
               title("$pagetitle");

               $error12 = 0;

               OpenTable();
               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbauth_arcade_access");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbauth_arcade_access (group_id mediumint(8) NOT NULL default '0',arcade_catid mediumint(8) unsigned NOT NULL default '0',KEY group_id (group_id),KEY arcade_catid (arcade_catid)) TYPE=MyISAM")) { echo "Table ".$prefix."_bbauth_arcade_access Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbauth_arcade_access UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_comments");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_comments (game_id mediumint(8) NOT NULL default '0',comments_value varchar(255) NOT NULL default '') TYPE=MyISAM")) { echo "Table ".$prefix."_bbarcade_comments Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_comments UnSuccesfully Created.</font><br>"; }

               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_fav");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_fav (`order` mediumint(8) NOT NULL default '0',user_id mediumint(8) NOT NULL default '0',game_id mediumint(8) NOT NULL default '0') TYPE=MyISAM")) { echo "Table ".$prefix."_bbarcade_fav Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_fav UnSuccesfully Created.</font><br>"; }

               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_users ADD user_allow_arcadepm TINYINT(0) DEFAULT '1' NOT NULL")) { echo "Succesfully Altered Table ".$prefix."_users.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_users.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade_categories ADD arcade_catauth TINYINT(2) NOT NULL")) { echo "Succesfully Altered Table ".$prefix."_bbarcade_categories.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade_categories.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS limit_by_posts")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS posts_needed")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS days_limit")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS limit_type")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS winner_avatar_position")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS maxsize_avatar")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS linkcat_align")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
                                        if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbscores ADD INDEX ( `game_id` )")) { echo "Succesfully Altered Table ".$prefix."_bbscores.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbscores.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbscores ADD INDEX ( `user_id` )")) { echo "Succesfully Altered Table ".$prefix."_bbscores.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbscores.</font><br>"; }


               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('limit_by_posts', '0')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('posts_needed', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('days_limit', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('limit_type', 'date')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade (arcade_name, arcade_value) VALUES('winner_avatar_position','left')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade (arcade_name, arcade_value) VALUES('maxsize_avatar','200')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade (arcade_name, arcade_value) VALUES('linkcat_align','2')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('arcade_announcement', 'Welcome to the Arcade!<br>Enjoy!')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }

               echo "<hr>\n";

               if (!$error12 = 1) {
                     echo "Arcade Unsuccesfully Updated!<br>\n";
               } else {
                     echo "Arcade Updated Successfully!<br>\n";
               }

               echo "<b>***IMPORTANT***</b> - If you didn't have the comments mod installed, re-run the installer and select the Comments Sync option.<br>\n";
               echo "Please delete this off your server now.\n";
               CloseTable();

               include("footer.php");
               break;

            case "upgradev3":
               $pagetitle = "Arcade: Upgrade V3.0.0 to V3.0.2";
               include("header.php");
               title("$pagetitle");

               $error12 = 0;

               OpenTable();
               $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_fav");
               if ($result = $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_fav (`order` mediumint(8) NOT NULL default '0',user_id mediumint(8) NOT NULL default '0',game_id mediumint(8) NOT NULL default '0') TYPE=MyISAM")) { echo "Table ".$prefix."_bbarcade_fav Succesfully Created.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_fav UnSuccesfully Created.</font><br>"; }

               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS limit_by_posts")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS posts_needed")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS days_limit")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbarcade DROP IF EXISTS limit_type")) { echo "Succesfully Altered Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_users ADD user_allow_arcadepm TINYINT(0) DEFAULT '1' NOT NULL")) { echo "Succesfully Altered Table ".$prefix."_users.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_users.</font><br>"; }
                                        if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbscores ADD INDEX ( `game_id` )")) { echo "Succesfully Altered Table ".$prefix."_bbscores.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbscores.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_bbscores ADD INDEX ( `user_id` )")) { echo "Succesfully Altered Table ".$prefix."_bbscores.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_bbscores.</font><br>"; }


               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('limit_by_posts', '0')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('posts_needed', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('days_limit', '5')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('limit_type', 'date')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('use_fav_category', '1')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }
               if ($result = $db->sql_query("INSERT INTO ".$prefix."_bbarcade VALUES ('arcade_announcement', 'Welcome to the Arcade!<br>Enjoy!')")) { echo "Succesfully Inserted Data into Table ".$prefix."_bbarcade.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unsuccesfully Inserted Data into Table ".$prefix."_bbarcade.</font><br>"; }

               echo "<hr>\n";

               if (!$error12 = 1) {
                     echo "Arcade Unsuccesfully Updated!<br>\n";
               } else {
                     echo "Arcade Updated Successfully!<br>\n";
               }

               echo "<b>***IMPORTANT***</b> - If you didn't have the comments mod installed, re-run the installer and select the Comments Sync option.<br>\n";
               echo "<br>Please delete this off your server when done.\n";
               CloseTable();

               include("footer.php");
               break;

          case "sync":
        $pagetitle = "Comments Mod Sync - Use Only if Comments Mod was never installed";
        include("header.php");
        title("$pagetitle");
        OpenTable();
      
     //Creates Comments Table
     $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_comments");
     $db->sql_query("CREATE TABLE ".$prefix."_bbarcade_comments (game_id mediumint(8) NOT NULL default '0',comments_value varchar(255) NOT NULL default '') TYPE=MyISAM");
     echo "- Created Table successfully<br />\n";     

     //Inserts games into Comments Table
     $result = $db->sql_query("SELECT game_id FROM $prefix"._bbgames." ORDER BY game_id");
      while ($row = $db->sql_fetchrow($result))
      {
         $game_id = $row['game_id'];
         $db->sql_query("INSERT INTO ".$prefix."_bbarcade_comments ( game_id, comments_value) VALUES ($game_id, '')");
      }
     echo "- Populated comments table successfully<br />\n";       

     echo "<hr>\n";
        echo "Arcade Comments Sync Done!<br>\n";
        echo "Please delete this off your server now.\n";
        CloseTable();
        include("footer.php");
    break;

            case "destall":
               $pagetitle = "Arcade 3.0.2: Destall";
               include("header.php");
               title("$pagetitle");

               $error12 = 0;

               OpenTable();
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbgames")) { echo "Table ".$prefix."_bbgames Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbgames UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbscores")) { echo "Table ".$prefix."_bbscores Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbscores UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbgamehash")) { echo "Table ".$prefix."_bbgamehash Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbgamehash UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbhackgame")) { echo "Table ".$prefix."_bbhackgame Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbhackgame UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_categories")) { echo "Table ".$prefix."_bbarcade_categories Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_categories UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade")) { echo "Table ".$prefix."_bbarcade Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbauth_arcade_access")) { echo "Table ".$prefix."_bbauth_arcade_access Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbauth_arcade_access UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_comments")) { echo "Table ".$prefix."_bbarcade_comments Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_comments UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_bbarcade_fav")) { echo "Table ".$prefix."_bbarcade_fav Succesfully Deleted.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Table ".$prefix."_bbarcade_fav UnSuccesfully Deleted.</font><br>"; }
               if ($result = $db->sql_query("ALTER TABLE ".$prefix."_users DROP user_allow_arcadepm")) { echo "Succesfully Altered Table ".$prefix."_users.<br>"; } else { $error12 = 1; echo "<font color=\"red\">Unable to Alter Table ".$prefix."_users.</font><br>"; }

               echo "<hr>\n";

               if (!$error12 = 1) {
                     echo "Arcade Unsuccesfully Un-Installed!<br>\n";
               } else {
                     echo "Arcade Un-Installed Successfully!<br>\n";
               }

               echo "Thanks for trying out the Arcade. Please delete this file off your server now.\n";
               CloseTable();

               include("footer.php");
               break;
      }
} else {
      $pagetitle = "Arcade 3.0.2: ERROR";
      include("header.php");
      title("$pagetitle");

      OpenTable();
      echo "<center><b>Sorry, ONLY super admins may run this script</b><center>\n";
      CloseTable();

      include("footer.php");
}
?>



Thanks...


Back to top Reply with quote
#2   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
Try reuploading the script again and make sure that you are uploading it as ASCII. There are other possible solutions in the link below.
[ Register or login to view links on this board. ]



Back to top Reply with quote
#3   re: Could one of you pro's help me out with this script?
skullcramp
CZ Newbie
skullcramp has been a member for over 20 year's 20 Year Member
usa.gif idaho.gif
Occupation: General Manager
Gender: Male
Fav. Sports Team: San Diego Chargers
Website:
Status: Offline
Joined: Apr 28, 2004
0.00 posts per day
Posts: 28
Points: 2,662
   
Nice! That worked like a charm Telli... Your the greatest!

Mucho Gracias!



Back to top Reply with quote
#4   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I'm not Telli. icon_eek.gif

Check my username again... lol



Back to top Reply with quote
#5   re: Could one of you pro's help me out with this script?
skullcramp
CZ Newbie
skullcramp has been a member for over 20 year's 20 Year Member
usa.gif idaho.gif
Occupation: General Manager
Gender: Male
Fav. Sports Team: San Diego Chargers
Website:
Status: Offline
Joined: Apr 28, 2004
0.00 posts per day
Posts: 28
Points: 2,662
   
Oops! icon_eek.gif lol Thanks Jeff!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum