Seite 1 von 1

Clown MOD - DB Änderungen rückgängig machen

Verfasst: 16.10.2005 15:54
von tomtom
Hallo...
<?php
//copyright © 2003 Volodymy (CLowN) Skoryk
//this update template copyright : ©2003 Freakin' Booty ;-P & Antony Bailey

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//


if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
exit;
}

if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}


$page_title = 'Updating the database for CLowN\' SP1';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';


$sql = array();
$sql[] = "DROP TABLE IF EXISTS `" . $table_prefix . "album_sp_config`";
$sql[] = "CREATE TABLE `" . $table_prefix . "album_sp_config` (
`config_name` varchar(255) NOT NULL default '',
`config_value` varchar(255) NOT NULL default '',
PRIMARY KEY (`config_name`)
) TYPE=MyISAM";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('disp_late', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('rate_type', '2')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('disp_high', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('disp_rand', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('img_rows', '2')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('img_cols', '4')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('use_watermark', '0')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('wut_users', '0')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('disp_watermark_at', '3')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('hon_rate_times', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('hon_rate_sep', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('hon_rate_where', '')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('hon_rate_users', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('midthumb_use', '1')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('midthumb_height', '600')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('midthumb_width', '800')";
$sql[] = "INSERT INTO `" . $table_prefix . "album_sp_config` VALUES ('midthumb_cache', '1')";
$sql[] = "ALTER TABLE `" . $table_prefix . "album_rate` ADD `rate_hon_point` TINYINT(3) DEFAULT '0' NOT NULL";

for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();

echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&nbsp;</td></tr>';

echo '<tr><th>Finish</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.</span></td></tr></table>';

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Ich möchte die DB-Changes rückgängig machen, die durch o.g. Skript gemacht wurden.

Wer kann mir dafür den MySQL Query geben?

Danke!

Verfasst: 16.10.2005 16:22
von Markus67
Hi ...

da kannst du einfach in KB:phpmyadmin die Tabelle
phpbb_album_sp_config löschen.

und dann noch in der Tabelle phpbb_album_rate das Feld rate_hon_point

Und das wars auch schon.

Markus

Verfasst: 16.10.2005 16:26
von tomtom
Danke Markus!