Edit file File name : import.php Content :<?php ////////////////////////////////////////////////////////////// //=========================================================== // import.php(For individual softwares) //=========================================================== // SOFTACULOUS // Version : 1.0 // Inspired by the DESIRE to be the BEST OF ALL // ---------------------------------------------------------- // Started by: Alons // Date: 10th Jan 2009 // Time: 21:00 hrs // Site: http://www.softaculous.com/ (SOFTACULOUS) // ---------------------------------------------------------- // Please Read the Terms of use at http://www.softaculous.com // ---------------------------------------------------------- //=========================================================== // (c)Softaculous Inc. //=========================================================== ////////////////////////////////////////////////////////////// if ( !defined('SOFTACULOUS') ) { die('Hacking Attempt'); } ///////////////////////////////////////// // All functions in this PAGE must begin // with TWO UNDERSCORE '__' to avoid // clashes with SOFTACULOUS Functions // e.g. __funcname() ///////////////////////////////////////// ////////////////////////////////////////// // Note : The path of the script package // is $software['path'].'/' . So to // access other files use // $software['path'].'/other_file.ext' ////////////////////////////////////////// //The Upgrade process function __import_a2wp_beginner ( $path ) { // We never want to use this for import return false; $file = sfile($path.'/wp-config.php'); if ( empty($file) ) { return false; } $r = array(); soft_preg_replace('/\ndefine\((\s*?)("|\')DB_HOST("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdbhost'], 7); if ( empty($r['softdbhost']) ) { soft_preg_replace('/define\((\s*?)("|\')DB_HOST("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdbhost'], 7); } soft_preg_replace('/\ndefine\((\s*?)("|\')DB_USER("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdbuser'], 7); if ( empty($r['softdbuser']) ) { soft_preg_replace('/define\((\s*?)("|\')DB_USER("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdbuser'], 7); } soft_preg_replace('/\ndefine\((\s*?)("|\')DB_PASSWORD("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdbpass'], 7); if ( empty($r['softdbpass']) ) { soft_preg_replace('/define\((\s*?)("|\')DB_PASSWORD("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdbpass'], 7); } soft_preg_replace('/\ndefine\((\s*?)("|\')DB_NAME("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdb'], 7); if ( empty($r['softdb']) ) { soft_preg_replace('/define\((\s*?)("|\')DB_NAME("|\')(\s*?),(\s*?)("|\')(.*?)("|\')(\s*?)\);/is', $file, $r['softdb'], 7); } $r['ver'] = __version_a2wp_beginner($path); return $r; } function __version_a2wp_beginner ( $path ) { $file = sfile($path.'/wp-includes/version.php'); if ( !empty($file) ) { soft_preg_replace('/\$wp_version(\s*?)=(\s*?)("|\')(.*?)("|\');/is', $file, $ver, 4); } return $ver; } if ( !function_exists('soft_preg_replace') ) { function soft_preg_replace ( $pattern, $file, &$var, $valuenum ) { preg_match($pattern, $file, $matches); $var = trim($matches[$valuenum]); } } Save