請問有沒有人可以將Activity Mod Plus 1.0.8 db 手寫出來要入的部份呢\r
因為admin_ina_in_un.php 按了沒反應
所以打算在phpmyadmin 手動輸入db table
phpbb ver 2.0.10
windows xp
[問題]Activity Mod Plus DB
版主: 版主管理群
[php]
<?php
/***************************************************************************
* admin_ina_in_un.php
* ---------------------
* Version : 1.0.8
* Email : austin@austin-inc.net
* Site : http://phpbb-amod.com
* Copyright : aUsTiN-Inc 2003/4
*
***************************************************************************/
if( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) )
{
$mode = ( isset( $HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = '';
}
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Activities']['DB Adjustments'] = "$file";
return;
}
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path .'language/lang_'. $board_config['default_lang'] . '/lang_activity.' . $phpEx);
define("iNA_TOP_SCORES", $table_prefix .'ina_top_scores');
define("iNA_BAN", $table_prefix .'ina_ban');
define("iNA_CHEAT", $table_prefix .'ina_cheat_fix');
define("iNA_CAT", $table_prefix .'ina_categories');
define("iNA_CAT_DATA", $table_prefix .'ina_categories_data');
define("iNA_CHALLENGE", $table_prefix .'ina_challenge_tracker');
define("iNA_CHALLENGE_USERS", $table_prefix .'ina_challenge_users');
define("iNA_TROPHY_COMMENTS", $table_prefix .'ina_trophy_comments');
define("iNA", $table_prefix .'ina_data');
define("iNA_SCORES", $table_prefix .'ina_scores');
define("iNA_GAMES", $table_prefix .'ina_games');
define("iNA_SESSIONS", $table_prefix .'ina_sessions');
define("iNA_LAST_PLAYED", $table_prefix .'ina_last_game_played');
define("iNA_GAMBLE", $table_prefix .'ina_gamble');
define("iNA_GAMBLE_PROGRESS", $table_prefix .'ina_gamble_in_progress');
define("iNA_RATING", $table_prefix .'ina_rating_votes');
define("iNA_FAVORITES", $table_prefix .'ina_favorites');
$link = append_sid("admin_ina_in_un.". $phpEx);
echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
echo " <tr>";
echo " <th class='thHead' colspan='2'>";
echo " ". $lang['admin_db_1'];
echo " </th>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
if($mode == "main" || !$mode)
{
echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
echo " <tr>";
echo " <td align='left' valign='top' width='100%' class='row2'>";
echo " <span class='gensmall'>";
echo " ". $lang['admin_db_2'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
echo "<table border='0' align='center' valign='top' class='forumline' width='100%'>";
echo " <tr>";
echo " <td align='center' valign='top' width='100%' class='row2'>";
echo " <span class='genmed'>";
echo " ". $lang['admin_db_3'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<form name='new_install' action='$link' method='post'>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <input type='hidden' name='mode' value='fresh_install'>";
echo " <input type='submit' class='mainoption' value='". $lang['admin_db_4'] ."' onchange='new_install.edit_trophy.submit()'>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</form>";
echo "<br><br>";
echo "<table border='0' align='center' valign='top' class='forumline' width='100%'>";
echo " <tr>";
echo " <td align='center' valign='top' width='100%' class='row2'>";
echo " <span class='genmed'>";
echo " ". $lang['admin_db_5'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<form name='upgrade' action='$link' method='post'>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <select name='version'>";
echo " <option selected value=''>". $lang['admin_db_6'] ."</option>";
echo " <option value='1'>". $lang['admin_db_7'] ."</option>";
echo " <option value='2'>". $lang['admin_db_8'] ."</option>";
echo " <option value='3'>". $lang['admin_db_9'] ."</option>";
echo " <option value='4'>". $lang['admin_db_10'] ."</option>";
echo " <option value='5'>". $lang['admin_db_11'] ."</option>";
echo " <option value='6'>". $lang['admin_db_21'] ."</option>";
echo " <option value='7'>". $lang['admin_db_22'] ."</option>";
echo " <option value='8'>". $lang['admin_db_23'] ."</option>";
echo " <option value='9'>". $lang['admin_db_24'] ."</option>";
echo " </select>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <input type='hidden' name='mode' value='upgrading'>";
echo " <input type='submit' class='mainoption' value='". $lang['admin_db_12'] ."' onchange='upgrade.edit_trophy.submit()'>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</form>";
echo "<br><br>";
echo "<table border='0' align='center' valign='top' class='forumline' width='100%'>";
echo " <tr>";
echo " <td align='center' valign='top' width='100%' class='row2'>";
echo " <span class='genmed'>";
echo " ". $lang['admin_db_13'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<form name='uninstall' action='$link' method='post'>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <input type='hidden' name='mode' value='remove'>";
echo " <input type='submit' class='mainoption' value='". $lang['admin_db_14'] ."' onchange='uninstall.edit_trophy.submit()'>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</form>";
}
if($mode == "upgrading" || $mode == "fresh_install")
{
if($mode == "fresh_install" && $mode != "upgrading")
{
$sql = "DROP TABLE IF EXISTS ". iNA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TOP_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_BAN ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHEAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT_DATA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE_USERS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TROPHY_COMMENTS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SESSIONS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_LAST_PLAYED ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE_PROGRESS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_RATING ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_FAVORITES ."";
$result = $db -> sql_query($sql);
}
$sql = "DROP TABLE IF EXISTS ". iNA ."";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_RATING ."` (
`game_id` int(15) NOT NULL default '0',
`rating` int(15) NOT NULL default '0',
`date` int(15) NOT NULL default '0',
`player` int(15) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_SESSIONS ."` (
`playing_time` int(15) NOT NULL default '0',
`playing_id` int(10) NOT NULL default '0',
`playing` int(11) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_LAST_PLAYED ."` (
`game_id` int(20) default '0',
`user_id` int(11) default '0',
`date` int(20) default NULL
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_GAMBLE ."` (
`game_id` int(20) default '0',
`sender_id` int(11) default '0',
`reciever_id` int(11) default '0',
`amount` int(10) default '0',
`winner_id` int(11) default '0',
`loser_id` int(11) default '0',
`date` int(20) default NULL,
`been_paid` int(11) default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_GAMBLE_PROGRESS ."` (
`game_id` int(20) default '0',
`sender_id` int(11) default '0',
`reciever_id` int(11) default '0',
`sender_score` int(20) default '0',
`reciever_score` int(20) default '0',
`sender_playing` int(1) NOT NULL default '0',
`reciever_playing` int(1) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE ". iNA ." ( version VARCHAR(255) DEFAULT NULL )";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE ". iNA_GAMES ."
(`game_id` mediumint(9) NOT NULL auto_increment,
`game_name` varchar(25) default NULL,
`game_path` varchar(255) default NULL,
`game_desc` varchar(255) default NULL,
`game_charge` int(11) unsigned default '0',
`game_reward` int(11) unsigned NOT NULL default '0',
`game_bonus` smallint(5) unsigned default '0',
`game_use_gl` tinyint(3) unsigned default '0',
`game_flash` tinyint(1) unsigned NOT NULL default '0',
`game_show_score` tinyint(1) NOT NULL default '1',
`win_width` smallint(6) NOT NULL default '0',
`win_height` smallint(6) NOT NULL default '0',
`highscore_limit` varchar(255) default NULL,
`reverse_list` tinyint(1) NOT NULL default '0',
`played` int(10) unsigned NOT NULL default '0',
`instructions` text, PRIMARY KEY (`game_id`) )";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE ". iNA_SCORES ."
(`game_name` varchar(255) default NULL,
`player` varchar(40) default NULL,
`score` int(10) unsigned NOT NULL default '0',
`date` int(11) default NULL )";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_TOP_SCORES ."` (
`game_name` varchar(255) default NULL,
`player` varchar(40) default NULL,
`score` int(10) unsigned NOT NULL default '0',
`date` int(11) default NULL
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CHALLENGE ."` (
`user` int(10) default '0',
`count` int(25) default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CHALLENGE_USERS ."` (
`user_to` int(10) default '0',
`user_from` int(10) default '0',
`count` int(25) default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_TROPHY_COMMENTS ."` (
`game` varchar(255) NOT NULL default '',
`player` int(10) default NULL,
`comment` text NOT NULL,
`date` int(15) NOT NULL default '0',
`score` int(20) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_BAN ."` (
`id` int(10) NOT NULL default '0',
`username` varchar(40) default NULL
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CHEAT ."` (
`game_id` int(10) NOT NULL default '0',
`player` varchar(40) default NULL,
`game_count` int(100) NOT NULL auto_increment,
PRIMARY KEY (`game_count`)
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CAT ."` (
`cat_id` mediumint(9) NOT NULL auto_increment,
`cat_name` varchar(25) default NULL,
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
#================================================================#
#==== Start 1.0.8 Changes ======================================#
#
$sql = "CREATE TABLE `". iNA_FAVORITES ."` (
`user` int(10) NOT NULL default '0',
`games` text
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_last_playtype VARCHAR(255) DEFAULT 'parent' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_games_played INT(10) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMBLE ." ADD winner_score INT(11) DEFAULT '0' AFTER loser_id ;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMBLE ." ADD loser_score INT(11) DEFAULT '0' AFTER winner_score;";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_email_sent', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_rating_reward', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_rating_reward', '0');";
$result = $db -> sql_query($sql);
$sql = "UPDATE ". CONFIG_TABLE ."
SET config_value = '1.0.8'
WHERE config_name = 'ina_version';";
$result = $db -> sql_query($sql);
#
#==== End 1.0.8 Changes ========================================#
#================================================================#
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_trophy_king', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_trophy_king_old', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_trophy', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_everything', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_trophy_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_comments_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_gamble_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_challenges_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_top5_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_cash_name', 'Tokens');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('default_reward_dbfield','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('default_cash','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_rewards_mod','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_cash_system','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_order', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('report_cheater','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('warn_cheater','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_point_system','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_gamelib','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('games_path','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('gamelib_path','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_gk_shop','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_allowance_system','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('games_per_page','20')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('current_ina_date','". date("Y-m-d") ."');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_delete','0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_charge', '50');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_increment', '5');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_path', 'Amod/');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_reward', '20');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_height', '500');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_width', '400');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_guest_play', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_button_option', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_post_block', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_post_block_count', '10');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_join_block', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_join_block_count', '14');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_challenge', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pm_trophy', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_challenge_msg', 'Your Trophy For %g% Has Been Challenged By %n%.');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_challenge_sub', 'Trophy Challenge In Progress');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pm_trophy_msg', '%n% Has Taken Your Trophy For %g%.');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pm_trophy_sub', 'Trophy Lost!');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('challenges_sent', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_new_game_limit', '7');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pop_game_limit', '5');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_new_game_count', '3');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_newest', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_online', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_cheat', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_show_view_profile', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_show_view_topic', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_logo', 'http://phpbb-amod.com/sig.gif');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_max_games_per_day', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_max_games_per_day', '100');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_max_games_per_day_date', '');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_version', '1.0.7');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_submit_scores_m', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_submit_scores_g', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". iNA ." VALUES ('v2.0.0')";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." CHANGE proper_name proper_name TEXT NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." ADD cat_id INT(4) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CAT ." ADD cat_desc TEXT NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CAT ." ADD cat_img VARCHAR(255) NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." ADD proper_name varchar(255) default '';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_SCORES ." CHANGE score score FLOAT(10,2) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_TOP_SCORES ." CHANGE score score FLOAT(10,2) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CHEAT ." CHANGE player player INT(10) DEFAULT '0';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CHEAT ." DROP game_count;";
$result = $db -> sql_query($sql);
\n $sql = "ALTER TABLE ". iNA_GAMES ." ADD `disabled` INT( 1 ) DEFAULT '1' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." ADD `install_date` INT( 20 ) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD user_trophies int(10) not null default '0';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_cheat_fix int(100) not null default '0';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_games_today INT(10) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_last_visit_page VARCHAR(255) NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_game_playing INT(10) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
if($mode == "upgrading")
{
message_die(GENERAL_MESSAGE, $lang['admin_db_17'], $lang['admin_db_18']);
}
else
{
message_die(GENERAL_MESSAGE, $lang['admin_db_19'], $lang['admin_db_18']);
}
}
if($mode == "remove")
{
$sql = "DROP TABLE IF EXISTS ". iNA_RATING ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SESSIONS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_LAST_PLAYED ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE_PROGRESS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TOP_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_BAN ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHEAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT_DATA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE_USERS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TROPHY_COMMENTS ."";
$result = $db -> sql_query($sql);
#==== Start 1.0.8 Changes ======================================#
$sql = "DROP TABLE IF EXISTS ". iNA_FAVORITES ."";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." DROP ina_last_playtype;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." DROP ina_games_played;";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_email_sent';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_rating_reward';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_rating_reward';";
$result = $db -> sql_query($sql);
#==== End 1.0.8 Changes ========================================#
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_logo';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_max_games_per_day';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_max_games_per_day';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_version';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_submit_scores_m';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_submit_scores_g';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_trophy_king';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_trophy_king_old';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_trophy';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'default_reward_dbfield';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'default_cash';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_rewards_mod';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_cash_system';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'report_cheater';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_order';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'warn_cheater';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_point_system';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_gamelib';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'games_path';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'gamelib_path';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_gk_shop';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_allowance_system';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'games_per_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'current_ina_date';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_delete';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_charge';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_increment';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_path';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_reward';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_height';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_width';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_guest_play';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_button_option';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_post_block';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_post_block_count';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_join_block';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_join_block_count');";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_challenge';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pm_trophy';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_challenge_msg';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_challenge_sub';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pm_trophy_msg';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pm_trophy_sub';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'challenges_sent';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_new_game_limit';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pop_game_limit';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_new_game_count';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_newest';";
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_online';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_cheat';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_show_view_profile';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_show_view_topic';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_order';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_cash_name';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_top5_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_challenges_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_gamble_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_comments_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_trophy_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_everything';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP user_trophies;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_cheat_fix;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_games_today;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_last_visit_page;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_game_playing;";
$result = $db -> sql_query($sql);
message_die(GENERAL_MESSAGE, $lang['admin_db_20'], $lang['admin_db_18']);
}
include('page_footer_admin.' . $phpEx);
?>[/php]
?>[/php]
<?php
/***************************************************************************
* admin_ina_in_un.php
* ---------------------
* Version : 1.0.8
* Email : austin@austin-inc.net
* Site : http://phpbb-amod.com
* Copyright : aUsTiN-Inc 2003/4
*
***************************************************************************/
if( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) )
{
$mode = ( isset( $HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
$mode = '';
}
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Activities']['DB Adjustments'] = "$file";
return;
}
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path .'language/lang_'. $board_config['default_lang'] . '/lang_activity.' . $phpEx);
define("iNA_TOP_SCORES", $table_prefix .'ina_top_scores');
define("iNA_BAN", $table_prefix .'ina_ban');
define("iNA_CHEAT", $table_prefix .'ina_cheat_fix');
define("iNA_CAT", $table_prefix .'ina_categories');
define("iNA_CAT_DATA", $table_prefix .'ina_categories_data');
define("iNA_CHALLENGE", $table_prefix .'ina_challenge_tracker');
define("iNA_CHALLENGE_USERS", $table_prefix .'ina_challenge_users');
define("iNA_TROPHY_COMMENTS", $table_prefix .'ina_trophy_comments');
define("iNA", $table_prefix .'ina_data');
define("iNA_SCORES", $table_prefix .'ina_scores');
define("iNA_GAMES", $table_prefix .'ina_games');
define("iNA_SESSIONS", $table_prefix .'ina_sessions');
define("iNA_LAST_PLAYED", $table_prefix .'ina_last_game_played');
define("iNA_GAMBLE", $table_prefix .'ina_gamble');
define("iNA_GAMBLE_PROGRESS", $table_prefix .'ina_gamble_in_progress');
define("iNA_RATING", $table_prefix .'ina_rating_votes');
define("iNA_FAVORITES", $table_prefix .'ina_favorites');
$link = append_sid("admin_ina_in_un.". $phpEx);
echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
echo " <tr>";
echo " <th class='thHead' colspan='2'>";
echo " ". $lang['admin_db_1'];
echo " </th>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
if($mode == "main" || !$mode)
{
echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
echo " <tr>";
echo " <td align='left' valign='top' width='100%' class='row2'>";
echo " <span class='gensmall'>";
echo " ". $lang['admin_db_2'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
echo "<table border='0' align='center' valign='top' class='forumline' width='100%'>";
echo " <tr>";
echo " <td align='center' valign='top' width='100%' class='row2'>";
echo " <span class='genmed'>";
echo " ". $lang['admin_db_3'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<form name='new_install' action='$link' method='post'>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <input type='hidden' name='mode' value='fresh_install'>";
echo " <input type='submit' class='mainoption' value='". $lang['admin_db_4'] ."' onchange='new_install.edit_trophy.submit()'>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</form>";
echo "<br><br>";
echo "<table border='0' align='center' valign='top' class='forumline' width='100%'>";
echo " <tr>";
echo " <td align='center' valign='top' width='100%' class='row2'>";
echo " <span class='genmed'>";
echo " ". $lang['admin_db_5'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<form name='upgrade' action='$link' method='post'>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <select name='version'>";
echo " <option selected value=''>". $lang['admin_db_6'] ."</option>";
echo " <option value='1'>". $lang['admin_db_7'] ."</option>";
echo " <option value='2'>". $lang['admin_db_8'] ."</option>";
echo " <option value='3'>". $lang['admin_db_9'] ."</option>";
echo " <option value='4'>". $lang['admin_db_10'] ."</option>";
echo " <option value='5'>". $lang['admin_db_11'] ."</option>";
echo " <option value='6'>". $lang['admin_db_21'] ."</option>";
echo " <option value='7'>". $lang['admin_db_22'] ."</option>";
echo " <option value='8'>". $lang['admin_db_23'] ."</option>";
echo " <option value='9'>". $lang['admin_db_24'] ."</option>";
echo " </select>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <input type='hidden' name='mode' value='upgrading'>";
echo " <input type='submit' class='mainoption' value='". $lang['admin_db_12'] ."' onchange='upgrade.edit_trophy.submit()'>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</form>";
echo "<br><br>";
echo "<table border='0' align='center' valign='top' class='forumline' width='100%'>";
echo " <tr>";
echo " <td align='center' valign='top' width='100%' class='row2'>";
echo " <span class='genmed'>";
echo " ". $lang['admin_db_13'];
echo " </span>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<form name='uninstall' action='$link' method='post'>";
echo "<table border='0' align='center' valign='top'>";
echo " <tr>";
echo " <td align='center' valign='middle' width='100%' class='row2'>";
echo " <input type='hidden' name='mode' value='remove'>";
echo " <input type='submit' class='mainoption' value='". $lang['admin_db_14'] ."' onchange='uninstall.edit_trophy.submit()'>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</form>";
}
if($mode == "upgrading" || $mode == "fresh_install")
{
if($mode == "fresh_install" && $mode != "upgrading")
{
$sql = "DROP TABLE IF EXISTS ". iNA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TOP_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_BAN ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHEAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT_DATA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE_USERS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TROPHY_COMMENTS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SESSIONS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_LAST_PLAYED ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE_PROGRESS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_RATING ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_FAVORITES ."";
$result = $db -> sql_query($sql);
}
$sql = "DROP TABLE IF EXISTS ". iNA ."";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_RATING ."` (
`game_id` int(15) NOT NULL default '0',
`rating` int(15) NOT NULL default '0',
`date` int(15) NOT NULL default '0',
`player` int(15) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_SESSIONS ."` (
`playing_time` int(15) NOT NULL default '0',
`playing_id` int(10) NOT NULL default '0',
`playing` int(11) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_LAST_PLAYED ."` (
`game_id` int(20) default '0',
`user_id` int(11) default '0',
`date` int(20) default NULL
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_GAMBLE ."` (
`game_id` int(20) default '0',
`sender_id` int(11) default '0',
`reciever_id` int(11) default '0',
`amount` int(10) default '0',
`winner_id` int(11) default '0',
`loser_id` int(11) default '0',
`date` int(20) default NULL,
`been_paid` int(11) default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_GAMBLE_PROGRESS ."` (
`game_id` int(20) default '0',
`sender_id` int(11) default '0',
`reciever_id` int(11) default '0',
`sender_score` int(20) default '0',
`reciever_score` int(20) default '0',
`sender_playing` int(1) NOT NULL default '0',
`reciever_playing` int(1) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE ". iNA ." ( version VARCHAR(255) DEFAULT NULL )";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE ". iNA_GAMES ."
(`game_id` mediumint(9) NOT NULL auto_increment,
`game_name` varchar(25) default NULL,
`game_path` varchar(255) default NULL,
`game_desc` varchar(255) default NULL,
`game_charge` int(11) unsigned default '0',
`game_reward` int(11) unsigned NOT NULL default '0',
`game_bonus` smallint(5) unsigned default '0',
`game_use_gl` tinyint(3) unsigned default '0',
`game_flash` tinyint(1) unsigned NOT NULL default '0',
`game_show_score` tinyint(1) NOT NULL default '1',
`win_width` smallint(6) NOT NULL default '0',
`win_height` smallint(6) NOT NULL default '0',
`highscore_limit` varchar(255) default NULL,
`reverse_list` tinyint(1) NOT NULL default '0',
`played` int(10) unsigned NOT NULL default '0',
`instructions` text, PRIMARY KEY (`game_id`) )";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE ". iNA_SCORES ."
(`game_name` varchar(255) default NULL,
`player` varchar(40) default NULL,
`score` int(10) unsigned NOT NULL default '0',
`date` int(11) default NULL )";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_TOP_SCORES ."` (
`game_name` varchar(255) default NULL,
`player` varchar(40) default NULL,
`score` int(10) unsigned NOT NULL default '0',
`date` int(11) default NULL
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CHALLENGE ."` (
`user` int(10) default '0',
`count` int(25) default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CHALLENGE_USERS ."` (
`user_to` int(10) default '0',
`user_from` int(10) default '0',
`count` int(25) default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_TROPHY_COMMENTS ."` (
`game` varchar(255) NOT NULL default '',
`player` int(10) default NULL,
`comment` text NOT NULL,
`date` int(15) NOT NULL default '0',
`score` int(20) NOT NULL default '0'
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_BAN ."` (
`id` int(10) NOT NULL default '0',
`username` varchar(40) default NULL
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CHEAT ."` (
`game_id` int(10) NOT NULL default '0',
`player` varchar(40) default NULL,
`game_count` int(100) NOT NULL auto_increment,
PRIMARY KEY (`game_count`)
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "CREATE TABLE `". iNA_CAT ."` (
`cat_id` mediumint(9) NOT NULL auto_increment,
`cat_name` varchar(25) default NULL,
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
#================================================================#
#==== Start 1.0.8 Changes ======================================#
#
$sql = "CREATE TABLE `". iNA_FAVORITES ."` (
`user` int(10) NOT NULL default '0',
`games` text
) TYPE=MyISAM;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_last_playtype VARCHAR(255) DEFAULT 'parent' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_games_played INT(10) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMBLE ." ADD winner_score INT(11) DEFAULT '0' AFTER loser_id ;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMBLE ." ADD loser_score INT(11) DEFAULT '0' AFTER winner_score;";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_email_sent', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_rating_reward', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_rating_reward', '0');";
$result = $db -> sql_query($sql);
$sql = "UPDATE ". CONFIG_TABLE ."
SET config_value = '1.0.8'
WHERE config_name = 'ina_version';";
$result = $db -> sql_query($sql);
#
#==== End 1.0.8 Changes ========================================#
#================================================================#
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_trophy_king', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_trophy_king_old', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_trophy', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_everything', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_trophy_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_comments_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_gamble_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_challenges_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_top5_page', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_cash_name', 'Tokens');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('default_reward_dbfield','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('default_cash','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_rewards_mod','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_cash_system','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_order', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('report_cheater','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('warn_cheater','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_point_system','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_gamelib','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('games_path','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('gamelib_path','')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_gk_shop','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('use_allowance_system','0')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('games_per_page','20')";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('current_ina_date','". date("Y-m-d") ."');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_delete','0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_charge', '50');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_increment', '5');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_path', 'Amod/');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_reward', '20');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_height', '500');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_default_g_width', '400');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_guest_play', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_button_option', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_post_block', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_post_block_count', '10');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_join_block', '2');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_join_block_count', '14');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_challenge', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pm_trophy', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_challenge_msg', 'Your Trophy For %g% Has Been Challenged By %n%.');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_challenge_sub', 'Trophy Challenge In Progress');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pm_trophy_msg', '%n% Has Taken Your Trophy For %g%.');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pm_trophy_sub', 'Trophy Lost!');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('challenges_sent', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_new_game_limit', '7');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_pop_game_limit', '5');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_new_game_count', '3');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_newest', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_online', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_cheat', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_show_view_profile', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_show_view_topic', '1');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_logo', 'http://phpbb-amod.com/sig.gif');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_use_max_games_per_day', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_max_games_per_day', '100');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_max_games_per_day_date', '');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_version', '1.0.7');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_submit_scores_m', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". CONFIG_TABLE ." VALUES ('ina_disable_submit_scores_g', '0');";
$result = $db -> sql_query($sql);
$sql = "INSERT INTO ". iNA ." VALUES ('v2.0.0')";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." CHANGE proper_name proper_name TEXT NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." ADD cat_id INT(4) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CAT ." ADD cat_desc TEXT NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CAT ." ADD cat_img VARCHAR(255) NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." ADD proper_name varchar(255) default '';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_SCORES ." CHANGE score score FLOAT(10,2) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_TOP_SCORES ." CHANGE score score FLOAT(10,2) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CHEAT ." CHANGE player player INT(10) DEFAULT '0';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_CHEAT ." DROP game_count;";
$result = $db -> sql_query($sql);
\n $sql = "ALTER TABLE ". iNA_GAMES ." ADD `disabled` INT( 1 ) DEFAULT '1' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". iNA_GAMES ." ADD `install_date` INT( 20 ) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD user_trophies int(10) not null default '0';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_cheat_fix int(100) not null default '0';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_games_today INT(10) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_last_visit_page VARCHAR(255) NOT NULL;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." ADD ina_game_playing INT(10) DEFAULT '0' NOT NULL;";
$result = $db -> sql_query($sql);
if($mode == "upgrading")
{
message_die(GENERAL_MESSAGE, $lang['admin_db_17'], $lang['admin_db_18']);
}
else
{
message_die(GENERAL_MESSAGE, $lang['admin_db_19'], $lang['admin_db_18']);
}
}
if($mode == "remove")
{
$sql = "DROP TABLE IF EXISTS ". iNA_RATING ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SESSIONS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_LAST_PLAYED ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMBLE_PROGRESS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_GAMES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TOP_SCORES ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_BAN ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHEAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CAT_DATA ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_CHALLENGE_USERS ."";
$result = $db -> sql_query($sql);
$sql = "DROP TABLE IF EXISTS ". iNA_TROPHY_COMMENTS ."";
$result = $db -> sql_query($sql);
#==== Start 1.0.8 Changes ======================================#
$sql = "DROP TABLE IF EXISTS ". iNA_FAVORITES ."";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." DROP ina_last_playtype;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ." DROP ina_games_played;";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_email_sent';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_rating_reward';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_rating_reward';";
$result = $db -> sql_query($sql);
#==== End 1.0.8 Changes ========================================#
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_logo';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_max_games_per_day';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_max_games_per_day';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_version';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_submit_scores_m';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_submit_scores_g';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_trophy_king';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_trophy_king_old';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_trophy';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'default_reward_dbfield';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'default_cash';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_rewards_mod';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_cash_system';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'report_cheater';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_order';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'warn_cheater';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_point_system';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_gamelib';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'games_path';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'gamelib_path';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_gk_shop';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'use_allowance_system';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'games_per_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'current_ina_date';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_delete';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_charge';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_increment';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_path';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_reward';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_height';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_g_width';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_guest_play';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_button_option';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_post_block';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_post_block_count';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_join_block';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_join_block_count');";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_challenge';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pm_trophy';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_challenge_msg';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_challenge_sub';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pm_trophy_msg';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pm_trophy_sub';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'challenges_sent';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_new_game_limit';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_pop_game_limit';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_new_game_count';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_newest';";
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_use_online';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_cheat';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_show_view_profile';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_show_view_topic';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_default_order';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_cash_name';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_top5_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_challenges_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_gamble_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_comments_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_trophy_page';";
$result = $db -> sql_query($sql);
$sql = "DELETE FROM ". CONFIG_TABLE ."
WHERE config_name = 'ina_disable_everything';";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP user_trophies;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_cheat_fix;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_games_today;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_last_visit_page;";
$result = $db -> sql_query($sql);
$sql = "ALTER TABLE ". USERS_TABLE ."
DROP ina_game_playing;";
$result = $db -> sql_query($sql);
message_die(GENERAL_MESSAGE, $lang['admin_db_20'], $lang['admin_db_18']);
}
include('page_footer_admin.' . $phpEx);
?>[/php]
?>[/php]