for ($i=0; $i < 3; $i++) { $config['ftp_transfer'][$i]=( isset($_POST['ftp_transfer'][$i]) ) ? $_POST['ftp_transfer'][$i] : 0; $config['ftp_timeout'][$i]=( isset($_POST['ftp_timeout'][$i]) ) ? $_POST['ftp_timeout'][$i] : 30; $config['ftp_useSSL'][$i]=( isset($_POST['ftp_useSSL'][$i]) ) ? $_POST['ftp_useSSL'][$i] : 0; $config['ftp_mode'][$i]=( isset($_POST['ftp_mode'][$i]) ) ? 1 : 0; $config['ftp_server'][$i]=( isset($_POST['ftp_server'][$i]) ) ? $_POST['ftp_server'][$i] : ''; $config['ftp_port'][$i]=( isset($_POST['ftp_port'][$i]) ) ? $_POST['ftp_port'][$i] : 21; $config['ftp_user'][$i]=( isset($_POST['ftp_user'][$i]) ) ? $_POST['ftp_user'][$i] : ''; $config['ftp_pass'][$i]=( isset($_POST['ftp_pass'][$i]) ) ? $_POST['ftp_pass'][$i] : ''; $config['ftp_dir'][$i]=( isset($_POST['ftp_dir'][$i]) ) ? stripslashes($_POST['ftp_dir'][$i]) : '/'; if ($config['ftp_dir'][$i] == "" || ( strlen($config['ftp_dir'][$i]) > 1 && substr($config['ftp_dir'][$i],-1) != "/" )) $config['ftp_dir'][$i].="/"; if (isset($_POST['testFTP' . $i])) { $checkFTP[$i]='<div class="ssmall">' . $lang['L_TESTCONNECTION'] . ' FTP-Connection ' . ( $i + 1 ) . '<br><br>' . TesteFTP($i) . '</div>'; $ftptested=$i; } } } $showVP=false; $oldtheme=$config['theme']; $oldscposition=$config['interface_server_caption_position']; if ($ftptested > -1) { $ftp_server[$ftptested]=$_POST['ftp_server'][$ftptested]; $ftp_port[$ftptested]=$_POST['ftp_port'][$ftptested]; $ftp_user[$ftptested]=$_POST['ftp_user'][$ftptested]; $ftp_pass[$ftptested]=$_POST['ftp_pass'][$ftptested];
echo '<tr><td colspan="3" align="right"><input type="submit" name="dir_check" value=" ' . $lang['L_CHECK_DIRS'] . ' " class="Formbutton"></td></tr>'; if ($iw[0] && $iw[1] && $iw[2] && $iw[3]) { echo '<tr><td colspan="2">' . $lang['L_DIRS_CREATED'] . '<br><input class="Formbutton" type="Button" value=" ' . $lang['L_INSTALL_CONTINUE'] . ' " onclick="location.href=\'install.php?language=' . $language . '&phase=4&connstr=' . $connstr . '\'"></td></tr>'; } echo '</table></td><td width="50%" valign="top">'; echo '<table><tr><td class="hd2" colspan="2">' . $lang['L_FTPMODE2'] . '</td></tr>'; echo '<tr><td>FTP-Server</td><td><input type="text" name="install_ftp_server" value="' . $install_ftp_server . '"></td></tr>'; echo '<tr><td>FTP-Port</td><td><input type="text" name="install_ftp_port" value="' . $install_ftp_port . '" size="4"></td></tr>'; echo '<tr><td>FTP-User</td><td><input type="text" name="install_ftp_user_name" value="' . $install_ftp_user_name . '"></td></tr>'; echo '<tr><td>FTP-' . $lang['L_PASS'] . '</td><td><input type="text" name="install_ftp_user_pass" value="' . $install_ftp_user_pass . '"></td></tr>'; echo '<tr><td>' . $lang['L_INFO_SCRIPTDIR'] . '</td><td><input type="text" name="install_ftp_path" value="' . $install_ftp_path . '"></td></tr>'; echo '<tr><td colspan="2" align="right"> <input type="submit" name="ftp_connect" value="' . $lang['L_CONNECT'] . '" class="Formbutton"></td></tr></table></table></form>'; if (isset($ftp_connect)) { echo '<table><tr><td class="small">'; $tftp = TesteFTP($install_ftp_server, $install_ftp_port, $install_ftp_user_name, $install_ftp_user_pass, $install_ftp_path); echo $tftp; echo '</td><td colspan="2" align="right"> '; if (substr($tftp, -9) == "</strong>") { echo '<form action="install.php?language=' . $language . '&phase=11" method="post"> <input type="hidden" name="connstr" value="' . $connstr . '">'; echo '<input type="hidden" name="install_ftp_server" value="' . $install_ftp_server . '"> <input type="hidden" name="install_ftp_port" value="' . $install_ftp_port . '"> <input type="hidden" name="install_ftp_user_name" value="' . $install_ftp_user_name . '"> <input type="hidden" name="install_ftp_user_pass" value="' . $install_ftp_user_pass . '"> <input type="hidden" name="install_ftp_path" value="' . $install_ftp_path . '">'; echo '<input type="submit" name="submit" value=" ' . $lang['L_CREATEDIRS2'] . ' " class="Formbutton"></form>'; } echo '</td></tr></table>'; } //echo '</td></tr>';
} } } $oldtheme = $config['theme']; $oldscposition = $config['interface_server_caption_position']; $checkFTP = array(" <br><br> <br> ", " <br><br> <br> ", " <br><br> <br> "); if (isset($_POST['testFTP0'])) { $checkFTP[0] = '<div class="ssmall">' . $lang['testconnection'] . ' FTP-Connection 1<br><br>' . TesteFTP($_POST['ftp_server0'], $_POST['ftp_port0'], $_POST['ftp_user0'], $_POST['ftp_pass0'], $_POST['ftp_dir0']) . '</div>'; $ftptested = 0; } if (isset($_POST['testFTP1'])) { $checkFTP[1] = '<div class="ssmall">' . $lang['testconnection'] . ' FTP-Connection 2<br><br>' . TesteFTP($_POST['ftp_server1'], $_POST['ftp_port1'], $_POST['ftp_user1'], $_POST['ftp_pass1'], $_POST['ftp_dir1']) . '</div>'; $ftptested = 1; } if (isset($_POST['testFTP2'])) { $checkFTP[2] = '<div class="ssmall">' . $lang['testconnection'] . ' FTP-Connection 3<br><br>' . TesteFTP($_POST['ftp_server2'], $_POST['ftp_port2'], $_POST['ftp_user2'], $_POST['ftp_pass2'], $_POST['ftp_dir2']) . '</div>'; $ftptested = 2; } if ($ftptested > -1) { $ftp_server[$ftptested] = $_POST['ftp_server' . $ftptested]; $ftp_port[$ftptested] = $_POST['ftp_port' . $ftptested]; $ftp_user[$ftptested] = $_POST['ftp_user' . $ftptested]; $ftp_pass[$ftptested] = $_POST['ftp_pass' . $ftptested]; $ftp_dir[$ftptested] = stripslashes($_POST['ftp_dir' . $ftptested]); if ($ftp_dir[$ftptested] == "" || strlen($ftp_dir[$ftptested]) > 1 && substr($ftp_dir[$ftptested], -1) != "/") { $ftp_dir[$ftptested] .= "/"; } } if (isset($_POST['load'])) { $msg = SetDefault(true); $msg = nl2br($msg) . "<br>" . $lang['load_success'] . "<br>";