Changeset 100 for trunk/include
- Timestamp:
- Mar 8, 2009, 4:09:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/config_from_xoops.class.php
r95 r100 45 45 $array_file = file($this->xoops_mainfile_path); 46 46 for ($i = 0 ; $i <count($array_file) ; $i++){ 47 /* Ref. ImpressCMS 48 49 mainfile.php 50 define( 'XOOPS_TRUST_PATH', 'C:/xampp/trust_pathf6fac' ); 51 52 include_once(XOOPS_TRUST_PATH . '/3aec9eefada2c57b3705952094b7b070.php'); 53 54 define( 'XOOPS_DB_PREFIX', SDATA_DB_PREFIX ); 55 define( 'XOOPS_DB_HOST', SDATA_DB_HOST ); 56 define( 'XOOPS_DB_USER', SDATA_DB_USER ); 57 define( 'XOOPS_DB_PASS', SDATA_DB_PASS ); 58 define( 'XOOPS_DB_NAME', SDATA_DB_NAME ); 59 define( 'XOOPS_DB_SALT', SDATA_DB_SALT ); 60 61 XOOPS_TRUST_PATH . '/3aec9eefada2c57b3705952094b7b070.php' 62 define( 'SDATA_DB_HOST', 'localhost' ); 63 define( 'SDATA_DB_USER', 'root' ); 64 define( 'SDATA_DB_PASS', '' ); 65 define( 'SDATA_DB_NAME', 'impress' ); 66 define( 'SDATA_DB_PREFIX', 'id85d03cc' ); 67 define( 'SDATA_DB_SALT', '3mhUHMrsTU3CTifQbenOtK1ULG5QN2Dwx8zCfwtynudub4TS9AnmZAhmdQr43Uvot' ); 68 69 ref. code C:\xampp\htdocs\impress\install\page_configsave.php 70 $sdata_rewrite = array(); 71 $sdata_rewrite['DB_HOST'] = $vars['DB_HOST']; 72 $sdata_rewrite['DB_USER'] = $vars['DB_USER']; 73 $sdata_rewrite['DB_PASS'] = $vars['DB_PASS']; 74 $sdata_rewrite['DB_NAME'] = $vars['DB_NAME']; 75 $sdata_rewrite['DB_PREFIX'] = $vars['DB_PREFIX']; 76 $sdata_rewrite['DB_SALT'] = $vars['DB_SALT']; 77 78 79 foreach( $sdata_rewrite as $key => $val ) { 80 if( preg_match( "/(define\()([\"'])(SDATA_$key)\\2,\s*([\"'])(.*?)\\4\s*\)/", $content ) ) { 81 $val = addslashes( $val ); 82 $content = preg_replace( "/(define\()([\"'])(SDATA_$key)\\2,\s*([\"'])(.*?)\\4\s*\)/", 83 "define( 'SDATA_$key', '$val' )", $content ); 84 } else { 85 //$this->error = true; 86 //$this->report .= _NGIMG.sprintf( ERR_WRITING_CONSTANT, "<b>$val</b>")."<br />\n"; 87 } 88 } 89 */ 90 47 91 $array_file[$i] = trim($array_file[$i]); 48 92 $array_file[$i] = str_replace(' ','',$array_file[$i]);
Note: See TracChangeset
for help on using the changeset viewer.