| query_write("DELETE FROM " . TABLE_PREFIX . "arcade_games"); $games = $db->query("SELECT * FROM " . TABLE_PREFIX . "games_list"); while ($game = $db->fetch_array($games)) { $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_games VALUES ($game[gid], '$game[gname]', '" . addslashes($game['gtitle']) . "', '" . addslashes($game['gwords']) . "', '$game[gname].swf', '$game[gwidth]', '$game[gheight]', '$game[gname]2.gif','$game[gname]1.gif',7,0,0,'',1,$game[gcount], $game[added],0,0,0,0,0,0,0,0,0)"); } echo 'Games imported.Click here to continue'; } if ($_REQUEST['do'] == 'scores') { $db->query_write("DELETE FROM " . TABLE_PREFIX . "arcade_sessions"); $scores = $db->query(" SELECT games_scores.*, games.gname FROM " . TABLE_PREFIX . "games_scores AS games_scores LEFT JOIN " . TABLE_PREFIX . "games_list AS games ON (games_scores.gid = games.gid) ORDER BY score "); while ($score = $db->fetch_array($scores)) { $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_sessions VALUES ('$score[s_id]', $score[gid], '$score[gname]', $score[mid], $score[datescored], $score[datescored], '0.00', '" . addslashes($score['comment']) . "', 1, $score[score], 1, 0)"); } echo 'Scores imported.Click here to continue'; } if ($_REQUEST['do'] == 'champs') { $scores = $db->query("SELECT gameid, score, userid FROM " . TABLE_PREFIX . "arcade_sessions ORDER BY score"); while ($score = $db->fetch_array($scores)) { $db->query_write("UPDATE " . TABLE_PREFIX . "arcade_games SET highscorerid = $score[userid], highscore = $score[score] WHERE gameid = $score[gameid]"); } echo 'High scores imported.Click here to continue'; } if ($_REQUEST['do'] == 'news') { $db->query("DELETE FROM " . TABLE_PREFIX . "arcade_news"); $getnews = $db->query("SELECT * FROM " . TABLE_PREFIX . "gamenews"); while ($news = $db->fetch_array($getnews)) { $news['newstext'] = str_replace(array('', ''), array('', ''), $news['newstext']); $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news VALUES ('', '".addslashes($news[newstext])."', '$news[newstype]', $news[datestamp])"); } echo 'News imported.Import Complete!'; } ?>
| 0 | 0 | |