$getval){ ${$getvar} = $getval; } foreach($_POST as $postvar => $postval){ ${$postvar} = $postval; } if(!isset($language)) $language="en"; //Übergabe der Parameter über FORM if (isset($_POST['dbhost'])) { $config['dbhost']=$dbhost; $config['dbuser']=$dbuser; $config['dbpass']=$dbpass; $config['dbport']=$dbport; $config['dbsocket']=$dbsocket; } else { // Wenn Connection-String existiert -> Verbindungsdaten aus connstr auslesen if (isset($connstr) && !empty($connstr)) { $p=explode("|",$connstr); $dbhost=$config['dbhost']=$p[0]; $dbuser=$config['dbuser']=$p[1]; $dbpass=$config['dbpass']=$p[2]; $dbport=$config['dbport']=$p[3]; $dbsocket=$config['dbsocket']=$p[4]; } else $connstr=""; } //Variabeln $phase=(isset($phase)) ? $phase : 0; $connstr="$dbhost|$dbuser|$dbpass|$dbport|$dbsocket"; $delfiles=Array(); include_once('./inc/functions.php'); include_once('./inc/mysql.php'); include_once('./inc/runtime.php'); $config['language']=$language; include('./language/lang_list.php'); include('language/'.$language.'/lang_install.php'); $img_ok='ok'; $img_failed='failed'; $href="install.php?language=$language&phase=$phase&connstr=$connstr"; ?> MySQLDumper - Installation 9 && $phase<12) { $Anzeige=$lang['install'].' - '.$lang['step'].' '.($phase-7); } elseif ($phase>19 && $phase<100) { $Anzeige=$lang['tools']; } else { $Anzeige=$lang['uninstall'].' - '.$lang['step'].' '.($phase-99); } echo '

'.$lang['install_tomenu'].'

'; echo '

'.$Anzeige.'

'; echo '

Version '.MSD_VERSION.' '.MSD_VERSION_ADD.'
'.$lang['install_forcescript'].'

'; switch ($phase) { case 0: // Anfang - Sprachauswahl if(file_exists("config.php") && file_exists($config['paths']['config']."parameter.php"))zipConfig(); echo '
'; echo ''; echo '
LanguageTools
'; echo GetLanguageCombo("radio","radio","language",""); echo '
","
'; foreach($lang['languages'] as $key) { echo("\n
'.$lang['tools1'][$key].'

'); if(file_exists($config['paths']['config']."config.gz")) echo ''.$lang['tools2'][$key].'

'; if(file_exists($config['paths']['config']."parameter.php")) echo ''.$lang['tools3'][$key].'

'; if(file_exists("config.php") && file_exists($config['paths']['config']."parameter.php")) echo ''.$lang['tools4'][$key].''; echo("
"); } echo("\n
"); echo ''; break; case 1: // checken if(isset($trychmod) && $trychmod==1) @chmod("config.php","0777"); echo '
'.$lang['dbparameter'].'
'; if(!is_writable("config.php")) { echo '

'.$lang['confignotwritable'].'

'; echo ''.$lang['tryagain'].''; echo '     '.$lang['install_tomenu'].''; } else { $tmp=file("config.php"); $stored=0; if (!isset($_POST['dbconnect'])) { // Erstaufruf - Daten aus config.php auslesen for($i=0;$i'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if(isset($dbconnect)) { echo ''; echo ''; } echo '
'.$lang['db_host'].':
'.$lang['db_user'].':
'.$lang['db_pass'].':
'; echo $lang['port'].':  '.$lang['install_help_port'].'
'.$lang['socket'].':  '.$lang['install_help_socket'].'
'.$lang['testconnection'].':
'.$lang['dbconnection'].'
'; MSD_mysql_connect(); if(!$config['dbconnection']) { echo '

'.$lang['connectionerror'].'

 '; } else { echo '

'.$lang['connection_ok'].'

'; $connection="ok"; $connstr="$dbhost|$dbuser|$dbpass|$dbport|$dbsocket"; echo ''; SearchDatabases(1); } echo '

'; if(isset($connection) && $connection=="ok" && !empty($databases['Name'])) { echo '
'; echo ' '; echo '
'; } } break; case 2: // echo '
MySQLDumper - '.$lang['confbasic'].'
'; $tmp=@file("config.php"); $stored=0; for($i=0;$i'.$lang['import12'].'

'; } else { if(ini_get('safe_mode')==1) { $nextphase=(extension_loaded("ftp")) ? 10 : 9; } else $nextphase=$phase+2; echo $lang['install_step2finished']; echo '

 

'; echo '
'; echo '

 

'; echo '
'; } break; case 3: // if(ini_get('safe_mode')==1) $nextphase=10; else $nextphase=$phase+1; echo '
'.$lang['editconf'].'
'; echo '

      '; echo ''; echo '
'; break; case 4: //Verzeichnisse if(isset($_POST['submit'])) { $ret=true; if ($fp=fopen("config.php", "wb")) { if (!fwrite($fp,stripslashes(stripslashes($_POST['configfile'])))) $ret=false; if (!fclose($fp)) $ret=false; } else $ret=false; if($ret==false) { echo '
'.$lang['errorman'].' config.php '.$lang['manuell'].'.'; die; } } echo '
'.$lang['createdirs'].'
'; SetFileRechte("work/");@chmod("work",0777); SetFileRechte("work/config/");@chmod("work/config",0777); SetFileRechte("work/log/");@chmod("work/log",0777); SetFileRechte("work/backup/");@chmod("work/backup",0777); SetFileRechte("work/structure/");@chmod("work/structure",0777); $iw[0]=IsWritable("work"); $iw[1]=IsWritable("work/config"); $iw[2]=IsWritable("work/log"); $iw[3]=IsWritable("work/backup"); $iw[4]=IsWritable("work/structure"); echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) echo ''; echo '
'.$lang['dir'].''.$lang['rechte'].''.$lang['status'].'
work'.Rechte("work").''.(($iw[0]) ? $img_ok : $img_failed).'
work/config'.Rechte("work/config").''.(($iw[1]) ? $img_ok : $img_failed).'
work/log'.Rechte("work/log").''.(($iw[2]) ? $img_ok : $img_failed).'
work/backup'.Rechte("work/backup").''.(($iw[3]) ? $img_ok : $img_failed).'
work/structure'.Rechte("work/structure").''.(($iw[4]) ? $img_ok : $img_failed).'
'.$lang['dirs_created'].'

'; break; case 5: echo '
'.$lang['laststep'].'
'; echo '

'.$lang['installfinished'].'

'; SetDefault(true); include("language/".$language."/lang_install.php"); if(file_exists($config['paths']['config']."config.gz")) { echo '

'.$lang['import1'].''; } echo '

'.$lang['import2'].''; break; case 9: clearstatcache(); $iw[0]=IsWritable("work"); $iw[1]=IsWritable("work/config"); $iw[2]=IsWritable("work/log"); $iw[3]=IsWritable("work/backup"); $iw[4]=IsWritable("work/structure"); echo '
'.$lang['ftpmode'].'
'; echo '

'.$lang['safemodedesc'].'

'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) echo ''; echo '
'.$lang['idomanual'].'
'.$lang['dofrom'].'
'.Realpfad('./').'
work'.(($iw[0]) ? $img_ok : $img_failed).'
work/config'.(($iw[1]) ? $img_ok : $img_failed).'
work/log'.(($iw[2]) ? $img_ok : $img_failed).'
work/backup'.(($iw[3]) ? $img_ok : $img_failed).'
work/structure'.(($iw[4]) ? $img_ok : $img_failed).'
'.$lang['dirs_created'].'
'; break; case 10: //safe_mode FTP $config['ftp_useSSL']=0; clearstatcache(); $iw[0]=IsWritable("work"); $iw[1]=IsWritable("work/config"); $iw[2]=IsWritable("work/log"); $iw[3]=IsWritable("work/backup"); $iw[4]=IsWritable("work/structure"); if(!isset($install_ftp_port) || $install_ftp_port<1) $install_ftp_port=21; echo '
'.$lang['ftpmode'].'
'; echo '

'.$lang['safemodedesc'].'

'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) echo ''; echo '
'.$lang['idomanual'].'
'.$lang['dofrom'].'
'.Realpfad('./').'
work'.(($iw[0]) ? $img_ok : $img_failed).'
work/config'.(($iw[1]) ? $img_ok : $img_failed).'
work/log'.(($iw[2]) ? $img_ok : $img_failed).'
work/backup'.(($iw[3]) ? $img_ok : $img_failed).'
work/structure'.(($iw[4]) ? $img_ok : $img_failed).'
'.$lang['dirs_created'].'
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'.$lang['ftpmode2'].'
FTP-Server
FTP-Port
FTP-User
FTP-'.$lang['pass'].'
'.$lang['info_scriptdir'].'
'; if(isset($ftp_connect)) { echo '
'; $tftp=TesteFTP($install_ftp_server,$install_ftp_port,$install_ftp_user_name,$install_ftp_user_pass,$install_ftp_path); echo $tftp; echo ' '; if(substr($tftp,-9)=="") { echo '
'; echo ' '; echo '
'; } echo '
'; } //echo ''; //echo ''; break; case 11: //FTP-Create Dirs echo '
'.$lang['ftpmode'].'
'; if(CreateDirsFTP()==1) { SetDefault(true); echo DirectoryWarnings(); echo '
'.$lang['installfinished']; if(is_writable($config['paths']['config'])) { if(file_exists($config['paths']['config']."config.gz")) { echo '

'.$lang['import1'].''; } echo '
'.$lang['import2'].''; } } break; case 20: //import echo '
'.$lang['import'].'
'; $import=importConfig($config['paths']['config']."config.gz"); if($import==0) { echo '
'.$lang['import3'].'
'; SetDefault(true); echo '
'.$lang['import4'].'
'; echo ''.$lang['import5'].'    '.$lang['import6'].''; } elseif($import==1) { echo '

'.$lang['import11'].'

'; } elseif($import==2) { echo '

'.$lang['import12'].'

'; } break; break; case 21: //upload + import echo '
'.$lang['import2'].'
'; echo '
'; echo '
'; echo ''; echo '
'; break; case 22: //posting from upload echo '
'.$lang['import7'].'
'; $backlink=''.$lang['import8'].''; if (isset($_POST['upload'])) { $error=false; if (!($_FILES['upfile']['name'])) { echo "".$lang['fm_uploadfilerequest'].'

'.$backlink; exit; } if (file_exists($config['paths']['config'].$_FILES['upfile']['name'])) unlink($config['paths']['config'].$_FILES['upfile']['name']); if ($_FILES['upfile']['name']!='config.gz') { echo "".$lang['import9']."

".$backlink; exit; } if (move_uploaded_file($_FILES['upfile']['tmp_name'],$config['paths']['config'].$_FILES['upfile']['name'])) { chmod($config['paths']['config'].$upfile_name,0755); } else { echo "".$lang['fm_uploadmoveerror']."
".$backlink; exit; } } echo '
'.$lang['import10'].'
'; $import=importConfig($config['paths']['config']."config.gz"); if($import==0) { echo '
'.$lang['import3'].'
'; SetDefault(true); echo '
'.$lang['import4'].'
'; echo ''.$lang['import5'].'    '.$lang['import6'].''; } elseif($import==1) { echo '

'.$lang['import11'].'

'; } elseif($import==2) { echo '

'.$lang['import12'].'

'; } break; case 100: //uninstall echo '
'.$lang['ui1'].'
'; echo zipConfig().'

'; echo '
'.$lang['ui2'].'
'; echo ''.$lang['ui3'].'     '; echo ''.$lang['ui4'].''; break; case 101: echo '
'.$lang['ui5'].'
'; $paths=Array(); $w=substr($config['paths']['work'],0,strlen($config['paths']['work'])-1); if(is_dir($w)) $res = rec_rmdir ($w); else $res=0; // wurde das Verzeichnis korrekt gelöscht if($res==0) { // das Verzeichnis wurde korrekt gelöscht echo '

'.$lang['ui6'].'

'; echo $lang['ui7']."
\"".Realpfad("./")."\"
".$lang['manuell'].".

"; echo ''.$lang['ui8'].''; }else { echo '

'.$lang['ui9'].'"'.$paths[count($paths)-1].'"'; } break; } ?>

Download Config from '.$config['paths']['config'].''; } function importConfig($importfile) { global $config; $cf1=Array(); $imp1=Array(); $sql1=Array(); $tmp=Array(); if(!file_exists($importfile)) exit; $tmp=file("config.php"); $imp=gzfile($importfile); for($i=0;$i