Пример #1
0
// php, php3, html, etc, whatever your vb board is running
// BACK UP YOUR DATABASE
##################################################################################################################
# CHANGE NOTHING BELOW THIS LINE # CHANGE NOTHING BELOW THIS LINE # CHANGE NOTHIING BELOW THIS LINE # CHANGE NOTHI
##################################################################################################################
include_once './../db_mysql.php';
include_once './../ImpExFunction.php';
include_once './../ImpExDatabaseCore.php';
// BACK UP YOUR DATABASE
extract(parse_ini_file('./../ImpExConfig.php'), EXTR_SKIP);
$Db_target = new DB_Sql_vb_impex();
$Db_target->appname = 'vBulletin:ImpEx Target';
$Db_target->appshortname = 'vBulletin:ImpEx Target';
$Db_target->type = 'mysql';
$Db_target->database = $targetdatabase;
$Db_target->connect($targetserver, $targetuser, $targetpassword, 0);
$Db_target->select_db($targetdatabase);
$Imp_database = new ImpExDatabaseCore();
$thread_ids_array = $Imp_database->get_threads_ids($Db_target, $Db_target->type, $target_table_prefix);
// BACK UP YOUR DATABASE
# Posts
if ($do_posts) {
    $posts = $Db_target->query("SELECT postid, pagetext FROM " . $targettableprefix . "post");
    while ($post = $Db_target->fetch_array($posts)) {
        if (strrpos($post['pagetext'], $old_domain . $old_forum_path)) {
            $text = $post['pagetext'];
            // Threads id replacment
            #viewtopic.php\?topic OR viewtopic.php\?t
            $text = preg_replace("#(.*){$old_domain}{$old_forum_path}viewtopic.php\\?topic=([0-9]+)\\&forum=[0-9]+(.*)#isUe", "phpBB_thread_id_swapper(\$file_extenstion, \$new_domain, \$new_forum_path, '\\1', '\\2', \$thread_ids_array)", $post['pagetext']);
            $Db_target->query("UPDATE " . $targettableprefix . "post SET pagetext='" . addslashes($text) . "' WHERE postid='" . $post['postid'] . "'");
            echo "<br /><b>Post done -></b><i> " . $post['postid'] . "</i>";
Пример #2
0
define('IDIR', ($getcwd = getcwd()) ? $getcwd : '.');
include_once './../db_mysql.php';
// BACK UP YOUR DATABASE
require_once './../ImpExConfig.php';
$targetserver = $impexconfig['target']['server'];
$targetuser = $impexconfig['target']['user'];
$targetpassword = $impexconfig['target']['password'];
$targetdatabase = $impexconfig['target']['database'];
$targettableprefix = $impexconfig['target']['tableprefix'];
$targettablecharset = $impexconfig['target']['charset'];
$Db_target = new DB_Sql_vb_impex();
$Db_target->appname = 'vBulletin:ImpEx Target';
$Db_target->appshortname = 'vBulletin:ImpEx Target';
$Db_target->type = 'mysql';
$Db_target->database = $targetdatabase;
$Db_target->connect($targetserver, $targetuser, $targetpassword, 0, $targettablecharset);
$Db_target->select_db($targetdatabase);
// BACK UP YOUR DATABASE
# Posts
if ($do_posts) {
    $posts = $Db_target->query("SELECT postid, pagetext, title FROM " . $targettableprefix . "post");
    while ($post = $Db_target->fetch_array($posts)) {
        $text = str_replace(array_keys($replacer), $replacer, $post['pagetext']);
        $title_text = str_replace(array_keys($replacer), $replacer, $post['title']);
        #$text = preg_replace('##siU', '', $text);
        #$title_text = preg_replace('##siU', '', $text);
        $Db_target->query("UPDATE " . $targettableprefix . "post SET pagetext='" . addslashes($text) . "', title='" . addslashes($title_text) . "' WHERE postid='" . $post['postid'] . "'");
        echo "<br /><b>Post done -></b><i> " . $post['postid'] . "</i>";
    }
}
# Signatures
Пример #3
0
// Id swapper.
// Swaps all the userids in the database for the imported userid
// THIS IS A GARRUNTEED WAY TO TRASH YOU DB !!!
// COMPLETLY INVALIDATES SUPPORT
// USE AT YOUR OWN RISK.
//
// I / we / the company takes no responsiability for you running this script
// Jerry - jerry.hutchings@vbulletin.com
define('DIR', ($getcwd = getcwd()) ? $getcwd : '.');
require_once DIR . '/db_mysql.php';
$Db_target = new DB_Sql_vb_impex();
$Db_target->server = 'localhost';
$Db_target->user = '******';
$Db_target->password = '******';
$Db_target->database = 'vb3';
$Db_target->connect();
$refrence_ids = array();
$ids = $Db_target->query("SELECT userid,importuserid FROM user where importuserid !='null'");
while ($id = $Db_target->fetch_array($ids)) {
    $refrence_ids[$id['userid']] = $id['importuserid'];
}
echo "<h4>Altering tables.........</h4>";
// ALTER TO UNSIGNED && DROP PRIMARY KEY
$Db_target->query("ALTER TABLE `user` CHANGE `userid` `userid` INT( 10 ) NOT NULL");
$Db_target->query("ALTER TABLE `user` DROP PRIMARY KEY");
echo "<p>User table.....</p>";
$Db_target->query("ALTER TABLE `customavatar` CHANGE `userid` `userid` INT( 10 ) NOT NULL");
$Db_target->query("ALTER TABLE `customavatar` DROP PRIMARY KEY");
echo "<p>User table.....</p>";
echo "<h4>Tables well the truly done now ........</h4>";
$i = 0;
Пример #4
0
         } else {
             $ImpExDisplay->display_error($ImpExDisplay->phrases['no_mssql_support']);
             $ImpExDisplay->display_error($ImpExDisplay->phrases['no_mssql_support_link']);
             exit;
         }
     }
 }
 $Db_source->appname = 'vBulletin:ImpEx Source';
 $Db_source->appshortname = 'vBulletin:ImpEx Source';
 $Db_source->database = $impexconfig['source']['database'];
 if (strtolower(trim($impexconfig['source']['databasetype'])) == 'mysql' or strtolower(trim($impexconfig['source']['databasetype'])) == 'mysqli') {
     $Db_source->type = 'mysql';
 } else {
     $Db_source->type = $impexconfig['source']['databasetype'];
 }
 $Db_source->connect($impexconfig['source']['server'], $impexconfig['source']['user'], $impexconfig['source']['password'], $impexconfig['source']['persistent'], $impexconfig['source']['charset']);
 if ($Db_source->link_id) {
     // got connected
     switch ($Db_source->geterrno()) {
         case 1046:
             $ImpExDisplay->display_error($ImpExDisplay->phrases['no_source_set']);
             exit;
             break;
         case 1049:
             $ImpExDisplay->display_error($ImpExDisplay->phrases['source_not_exsist']);
             exit;
             break;
     }
 } else {
     $ImpExDisplay->display_error($ImpExDisplay->phrases['failed_connection']);
     exit;
Пример #5
0
require_once IDIR . '/db_mysql.php';
require_once IDIR . '/ImpExFunction.php';
require_once IDIR . '/ImpExDatabaseCore.php';
require_once IDIR . '/ImpExDatabase_360.php';
require_once IDIR . '/ImpExModule.php';
require_once IDIR . '/ImpExSession.php';
require_once IDIR . '/ImpExController.php';
require_once IDIR . '/ImpExDisplay.php';
require_once IDIR . '/ImpExDisplayWrapper.php';
$Db_target = new DB_Sql_vb_impex();
$Db_source = new DB_Sql_vb_impex();
$Db_target->appname = 'vBulletin:ImpEx Target';
$Db_target->appshortname = 'vBulletin:ImpEx Target';
$Db_target->database = $impexconfig['target']['database'];
$Db_target->type = $impexconfig['target']['databasetype'];
$Db_target->connect($impexconfig['target']['server'], $impexconfig['target']['user'], $impexconfig['target']['password'], $impexconfig['target']['persistent'], $impexconfig['target']['charset']);
$Db_target->select_db($impexconfig['target']['database']);
// #############################################################################
// Session start
// #############################################################################
$ImpExDisplay = new ImpExDisplay();
$ImpExDisplay->phrases =& $impex_phrases;
$ImpEx = new ImpExController();
$ImpExSession = new ImpExSession();
$tire_1 = '';
$tire_2 = '';
$tire_3 = '';
#var_dump($folders);
foreach (scandir(IDIR . "/systems/") as $id => $folder) {
    if ($folder[0] != '.' and $folder != 'index.html' and $folder != 'webboard' and $folder != 'ubbthreads' and $folder != 'rat' and $folder != 'ikon' and $folder != 'ubb' and $folder != 'phpBB' and $folder != 'gossamer_threads' and $folder != 'gossamer_threads.zip' and $folder != 'probid.zip') {
        require_once IDIR . "/systems/" . $folder . "/000.php";