tcs
12-31-2005, 10:00 PM
This will add a "Clear All Scores" Button in your Arcade admincp under "Scores Tools"
Clicking this button will clear all scores out of your database.
1 php file to edit and only 2 entries to make. (About a minite of your time)
Open the /admincp/arcadeadmin.php file.
then
Back up you database!!!!!!!
No Warrenties or guaentees express or implied.
Find:
print_cp_footer();
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// REMOVE ZERO SCORES
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Add this Above:
print_form_header('arcadeadmin', 'removescores');
print_table_header('Remove ALL Scores');
print_description_row('Will Remove All Scores from your Database. Cannot be undone');
print_submit_row($vbphrase['start'], '');
Find:
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// REMOVE USER SCORES
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
And Add this Above:
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// REMOVE ALL SCORES
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if ($_REQUEST['do'] == 'removescores')
{
print_cp_header($vbphrase['arcade_scores']);
$db->query_write("DELETE FROM " . TABLE_PREFIX ."arcade_sessions
");
$db->query_write("DELETE FROM " . TABLE_PREFIX ."arcade_news
");
$db->query_write("UPDATE " . TABLE_PREFIX ."arcade_games SET highscore='0.000'");
$db->query_write("UPDATE " . TABLE_PREFIX ."arcade_games SET highscorerid='0'");
// Getting Arcade functions to rebuild the counts.
require_once(DIR . '/includes/functions_arcade.php');
build_games();
print_cp_redirect('arcadeadmin.php?do=scores');
}
Clicking this button will clear all scores out of your database.
1 php file to edit and only 2 entries to make. (About a minite of your time)
Open the /admincp/arcadeadmin.php file.
then
Back up you database!!!!!!!
No Warrenties or guaentees express or implied.
Find:
print_cp_footer();
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// REMOVE ZERO SCORES
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Add this Above:
print_form_header('arcadeadmin', 'removescores');
print_table_header('Remove ALL Scores');
print_description_row('Will Remove All Scores from your Database. Cannot be undone');
print_submit_row($vbphrase['start'], '');
Find:
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// REMOVE USER SCORES
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
And Add this Above:
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// REMOVE ALL SCORES
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if ($_REQUEST['do'] == 'removescores')
{
print_cp_header($vbphrase['arcade_scores']);
$db->query_write("DELETE FROM " . TABLE_PREFIX ."arcade_sessions
");
$db->query_write("DELETE FROM " . TABLE_PREFIX ."arcade_news
");
$db->query_write("UPDATE " . TABLE_PREFIX ."arcade_games SET highscore='0.000'");
$db->query_write("UPDATE " . TABLE_PREFIX ."arcade_games SET highscorerid='0'");
// Getting Arcade functions to rebuild the counts.
require_once(DIR . '/includes/functions_arcade.php');
build_games();
print_cp_redirect('arcadeadmin.php?do=scores');
}